CN111669321B - Method, device and system for realizing routing request - Google Patents

Method, device and system for realizing routing request Download PDF

Info

Publication number
CN111669321B
CN111669321B CN202010526902.4A CN202010526902A CN111669321B CN 111669321 B CN111669321 B CN 111669321B CN 202010526902 A CN202010526902 A CN 202010526902A CN 111669321 B CN111669321 B CN 111669321B
Authority
CN
China
Prior art keywords
interface
data
routing
request
interfaces
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010526902.4A
Other languages
Chinese (zh)
Other versions
CN111669321A (en
Inventor
吴悠
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shanghai Qianzhen Information Technology Co ltd
Original Assignee
Shanghai Qianzhen Information Technology 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 Shanghai Qianzhen Information Technology Co ltd filed Critical Shanghai Qianzhen Information Technology Co ltd
Priority to CN202010526902.4A priority Critical patent/CN111669321B/en
Publication of CN111669321A publication Critical patent/CN111669321A/en
Application granted granted Critical
Publication of CN111669321B publication Critical patent/CN111669321B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L45/00Routing or path finding of packets in data switching networks
    • H04L45/14Routing performance; Theoretical aspects

Landscapes

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

Abstract

The application discloses a method, a device and a system for realizing a routing request, an electronic device and a computer readable storage medium, wherein the method comprises the following steps: when the starting of the routing application of the interface platform is detected, acquiring interface data of one or more interfaces; receiving a routing request; responding to the routing request, inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces; and acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier. When the application of the interface platform is detected to be started, the interface data of each system interface is obtained in advance, therefore, when a data request of a certain system is received, the interface data corresponding to the data request can be obtained from the pre-obtained interface data, the data request is forwarded accordingly, the situation that the interface data of each system interface is obtained from an external data source every time the data request is received is avoided, the stability of the interface platform and the external data source is improved, and high availability is achieved.

Description

Method, device and system for realizing routing request
Technical Field
The present application relates to the field of information processing technologies, and in particular, to a method, an apparatus, a system, an electronic device, and a computer-readable storage medium for implementing a routing request.
Background
The interface platform in the prior art can realize unified management on the interfaces of each system, the interface data of each system interface is stored in databases such as mysql, redis and the like, when the interface platform performs routing forwarding on the data requests of each system, the interface platform needs to acquire the interface data from external data sources such as mysql, redis and the like, the uncertainty of the forwarding process is increased, and the realization of the routing function can seriously depend on the stability of the external data sources and cannot be used to a high degree.
Disclosure of Invention
The application aims to provide a method, a device and a system for realizing a routing request, electronic equipment and a computer readable storage medium, and solve the problem that the realization of a routing function in the prior art depends on the stability of an external data source and cannot be highly available.
The purpose of the application is realized by adopting the following technical scheme:
in a first aspect, the present application provides a method for implementing a route request, where the method includes: when the starting of the routing application of the interface platform is detected, acquiring interface data of one or more interfaces, wherein the interface data comprises the routing data of the interfaces; receiving a routing request, wherein the routing request comprises a first interface identifier, and an interface corresponding to the first interface identifier is taken as a first interface; responding to the routing request, inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces; and acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier. The technical scheme has the advantages that when the application of the interface platform is detected to be started, the interface data of each system interface is obtained in advance, therefore, when a data request of a certain system is received, the interface data corresponding to the data request can be obtained from the pre-obtained interface data, the data request is forwarded accordingly, when the interface platform forwards the request, related data are directly obtained from the inside of the system, the situation that the interface data of each system interface is obtained from an external data source every time the data request is received is avoided, the problems that in the prior art, the realization of routing function depends on the stability of the external data source and high availability cannot be achieved are solved, data interaction between the interface platform and the external data source is reduced, the stability of the interface platform and the external data source is improved, and high availability is achieved.
In some possible implementations, the interface data further includes an identification of all data requesters of the interface authentication, and the routing request further includes an identification of the first data requester; the obtaining of the routing data of the first interface according to the interface data corresponding to the first interface identifier includes: acquiring the identifications of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identification; judging whether the identification of at least one data request party is consistent with the identification of the first data request party in the identifications of all the data request parties authenticated by the first interface; and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier. The technical scheme has the advantages that when the application of the interface platform is detected to be started, the identification of the data requesting party authenticated by each interface is obtained in advance, therefore, when a data request of a certain data requesting party for the first interface is received, whether the data requesting party authenticated by the first interface comprises the data requesting party for sending the request can be judged, if yes, the data requesting party is indicated to be an authenticated user of the first interface, and the data requesting party is allowed to call the data of the first interface, so that the data requesting party which is not authenticated by the interface cannot call the data of the interface, the system which is not authenticated by the interface is prevented from obtaining the data of other systems through the interface platform, and the safety of the interface platform is improved.
In some possible implementations, the interface data is data in a key-value format; the querying, in response to the routing request, interface data corresponding to the first interface identifier from the interface data of the one or more interfaces includes: responding to the routing request, using the first interface identifier as a key, inquiring the value corresponding to the first interface identifier from the interface data of the one or more interfaces, and analyzing the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier. The technical scheme has the advantages that the interface data of each system interface is stored through the data in the key-value format, so that the corresponding value can be conveniently obtained by taking the identifier carried by the request as the key and is used for analyzing the routing data.
In some possible implementations, the obtaining interface data of one or more interfaces when the start of the interface platform routing application is detected includes: when the starting of the interface platform routing application is detected, acquiring interface data of the one or more interfaces and storing the interface data to a first data storage device; the querying, in response to the routing request, interface data corresponding to the first interface identifier from the interface data of the one or more interfaces includes: and responding to the routing request, inquiring interface data corresponding to the first interface identification from the first data storage device. The technical scheme has the advantages that when the self-interface platform application is started, the interface data of each system are loaded into the first data storage device, and when the interface platform forwards the request, the relevant data are obtained from the first data storage device.
In some possible implementations, the method further includes: acquiring interface data of the one or more interfaces and storing the interface data to a second data storage device; when the starting of the interface platform routing application is detected, acquiring the interface data of the one or more interfaces and storing the interface data into a first data storage device, wherein the method comprises the following steps: when the starting of the interface platform routing application is detected, the interface data of the one or more interfaces are obtained from the second data storage device and stored to the first data storage device. The technical scheme has the beneficial effects that the second data storage device can be an external data source, so that when the interface platform application is started, the interface data can be obtained from the external data source and stored in the first data storage device for the subsequent query process.
In some possible implementations, the method further includes: and forwarding the routing request to the first interface according to the routing data of the first interface. The technical scheme has the beneficial effect that the request forwarding function is realized through the routing data.
In a second aspect, the present application provides a device for implementing a route request, where the device includes: the data acquisition module is used for acquiring interface data of one or more interfaces when the starting of the routing application of the interface platform is detected, wherein the interface data comprises the routing data of the interfaces; a request receiving module, configured to receive a routing request, where the routing request includes a first interface identifier, and an interface corresponding to the first interface identifier is used as a first interface; the data query module is used for responding to the routing request and querying interface data corresponding to the first interface identification from the interface data of the one or more interfaces; and the route acquisition module is used for acquiring the route data of the first interface according to the interface data corresponding to the first interface identifier.
In some possible implementations, the interface data further includes an identification of all data requesters of the interface authentication, and the routing request further includes an identification of the first data requester; the route obtaining module is used for obtaining the identifications of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identification; judging whether the identification of at least one data requester exists in the identifications of all the data requesters authenticated by the first interface and is consistent with the identification of the first data requester; and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
In some possible implementations, the interface data is data in a key-value format; the data query module is configured to query a value corresponding to the first interface identifier from the interface data of the one or more interfaces by using the first interface identifier as a key in response to the routing request, and analyze the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier.
In some possible implementations, the data obtaining module is configured to obtain the interface data of the one or more interfaces and store the interface data to the first data storage device when the interface platform routing application is detected to be started; the data query module is used for responding to the routing request and querying the interface data corresponding to the first interface identification from the first data storage device.
In some possible implementations, the data obtaining module is further configured to obtain interface data of the one or more interfaces and store the interface data in a second data storage device; when the starting of the interface platform routing application is detected, the interface data of the one or more interfaces are obtained from the second data storage device and stored to the first data storage device.
In some possible implementations, the apparatus further includes a request forwarding module, configured to forward the routing request to the first interface according to the routing data of the first interface.
In a third aspect, the present application provides a system for implementing a routing request, where the system includes a device for implementing a routing request, a data requester and a data provider; the routing request implementation device is used for acquiring interface data of one or more interfaces when the starting of the routing application of the interface platform is detected, wherein the interface data comprises routing data of the interfaces; receiving a routing request, wherein the routing request comprises a first interface identifier, and an interface corresponding to the first interface identifier is taken as a first interface; and responding to the routing request, inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces; acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier; forwarding the routing request to the first interface according to the routing data of the first interface; the data requester is used for sending the routing request to the routing request implementation device; the data provider is configured to provide the first interface.
In some possible implementations, the system further includes a first data storage and a second data storage for storing interface data of the one or more interfaces; the routing request implementation device is further used for acquiring the interface data of the one or more interfaces from the second data storage device and storing the interface data to the first data storage device when the starting of the interface platform routing application is detected; and inquiring interface data corresponding to the first interface identification from the first data storage device.
In some possible implementations, the first data store is a Map container, the second data store is a Mysql database, and the interface data is data in a key-value format.
In some possible implementations, the interface data further includes an identification of all data requesters of the interface authentication, and the routing request further includes an identification of the first data requester; the routing request implementation device is further configured to obtain identifiers of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identifier; judging whether the identification of at least one data requester exists in the identifications of all the data requesters authenticated by the first interface and is consistent with the identification of the first data requester; and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
In some possible implementations, the interface data is data in a key-value format; the routing request implementation device is further configured to, in response to the routing request, query a value corresponding to the first interface identifier from the interface data of the one or more interfaces by using the first interface identifier as a key, and parse the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier.
In a fourth aspect, the present application provides an electronic device implemented by a routing request, including a processor and a memory, where the memory is used for storing executable instructions of the processor, and the processor is configured to execute the steps of the above-mentioned routing request implementing method via executing the executable instructions.
In a fifth aspect, the present application provides a computer-readable storage medium having stored thereon a computer program which, when executed, implements the steps of the above-described route request implementation method.
Compared with the prior art, the beneficial effect of this application includes:
the application discloses a method, a device and a system for realizing routing request, an electronic device and a computer readable storage medium, when detecting the application start of an interface platform, interface data of each system interface is obtained in advance, therefore, when detecting the application start of the interface platform, the interface data of each system interface is obtained in advance, when receiving a data request of a certain system, interface data corresponding to the data request can be obtained from the interface data obtained in advance, the data request is forwarded accordingly, when the interface platform forwards the request, related data is directly obtained from the inside of the system, the interface data of each system interface is prevented from being obtained from an external data source when receiving the data request every time, the problem that the realization of routing function in the prior art depends on the stability of the external data source and can not be used highly is solved, and the data interaction between the interface platform and the external data source is reduced, the stability of the interface platform and the external data source is improved, and high availability is achieved.
Drawings
The present application is further described below with reference to the drawings and examples.
Fig. 1 is a schematic flowchart of a method for implementing a route request according to an embodiment of the present application;
fig. 2 is a schematic flowchart illustrating authentication of a data requester according to an embodiment of the present application;
fig. 3 is a flowchart illustrating a further method for implementing a route request according to an embodiment of the present application;
fig. 4 is a schematic flowchart of a forwarding request provided in an embodiment of the present application;
fig. 5 is a flowchart illustrating a further method for implementing a route request according to an embodiment of the present application;
fig. 6 is a flowchart illustrating a further method for implementing a route request according to an embodiment of the present application;
fig. 7 is a schematic structural diagram of a routing request implementing apparatus according to an embodiment of the present application;
fig. 8 is a schematic structural diagram of a system for implementing a route request according to an embodiment of the present application;
fig. 9 is a schematic structural diagram of an electronic device implemented by a routing request according to an embodiment of the present application;
fig. 10 is a schematic structural diagram of a program product for implementing a method for implementing a route request according to an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
Referring to fig. 1, an embodiment of the present application provides a method for implementing a routing request, which may be applied to an interface platform or other occasions where a data request needs to be forwarded, where the method includes steps S101 to S104.
Step S101: when the starting of the routing application of the interface platform is detected, interface data of one or more interfaces are obtained, wherein the interface data comprise routing data of the interfaces. When detecting that the application of the interface platform is started, acquiring interface data of each system interface in advance, wherein each system is, for example, a business system or other systems. The interface platform routing application may be an interface platform routing application, and the one or more interfaces may include one or more interfaces of one system, or may include multiple interfaces of multiple systems. The routing data may be represented by a uniform resource locator url.
Step S102: receiving a routing request, wherein the routing request comprises a first interface identifier, and an interface corresponding to the first interface identifier is taken as a first interface. The first interface identifier is used for acquiring interface data of the corresponding interface.
Step S103: and responding to the routing request, and inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces. When a data request of a certain system is received, interface data corresponding to the data request can be acquired from interface data acquired in advance.
Step S104: and acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
Therefore, when the interface platform forwards the request, the relevant data is directly acquired from the inside of the system, the problem that the interface data of each system interface is acquired from an external data source when the data request is received every time is avoided, the problems that the realization of the routing function depends on the stability of the external data source and the high availability cannot be achieved in the prior art are solved, the data interaction between the interface platform and the external data source is reduced, the stability of the interface platform and the external data source is improved, and the high availability is achieved.
In some possible implementations, the requestor sending the data request may be authenticated, which in turn forwards the data request to it. Specifically, the interface data further includes an identifier of all data requesters authenticated by the interface, and the routing request further includes an identifier of the first data requester. The first data requester is the sender of the routing request.
Referring to fig. 2, the step S104 may include steps S1041 to S1043.
Step S1041: and acquiring the identifications of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identification.
Step S1042: and judging whether the identification of at least one data request party is consistent with the identification of the first data request party in the identifications of all the data request parties authenticated by the first interface.
Step S1043: and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
The step S104 may further include step S1044: and if the authentication does not exist, returning a prompt of authentication failure to the first data requester.
In one implementation, all data requestors authenticated by the first interface include systems A, B and C, and the first data requester is system a, and it is determined that the data requestors authenticated by the first interface include system a, so that system a can obtain the first interface routing data.
When the application of the interface platform is detected to be started, the identification of the data requester authenticated by each interface is obtained in advance, therefore, when a data request of a certain data requester for the first interface is received, whether the data requester for sending the request is included in the data requesters authenticated by the first interface can be judged, if the data requester for sending the request is included in the data requesters authenticated by the first interface, the data requester is allowed to call the data of the first interface, and thus the data requester which is not authenticated by the interface cannot call the data of the interface, the data of other systems are prevented from being obtained by the system which is not authenticated by the interface platform, and the safety of the interface platform is improved.
In some possible implementation manners, interface data of each system interface may be stored through data in a key-value format, so that the identifier carried by the request is taken as a key to obtain a corresponding value for analyzing the routing data. Specifically, the interface data is data in a key-value format. The step S103 may include: responding to the routing request, using the first interface identifier as a key, inquiring the value corresponding to the first interface identifier from the interface data of the one or more interfaces, and analyzing the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier.
In some possible implementations, the interface data of the systems may be loaded into the first data storage at the time of application startup. Specifically, the step S101 may include: and when the starting of the interface platform routing application is detected, acquiring the interface data of the one or more interfaces and storing the interface data to a first data storage device. The step S103 may include: and responding to the routing request, and inquiring interface data corresponding to the first interface identification from the first data storage device. When the self-interface platform application is started, the interface data of each system is loaded into the first data storage device, and when the interface platform forwards the request, the relevant data is obtained from the first data storage device. Wherein the first data storage is, for example, a Java based Map container.
In some possible implementations, the interface data may be obtained from an external data source and stored to the first data storage device for a subsequent query process when the interface platform application is started. Specifically, referring to fig. 3, the method may further include step S100: interface data of the one or more interfaces is acquired and stored to a second data storage device. The step S101 may include: when the starting of the interface platform routing application is detected, the interface data of the one or more interfaces are obtained from the second data storage device and stored to the first data storage device. Wherein the second data storage may be an external data source, such as a Mysql database or a redis database.
In some possible implementations, the request forwarding function may be implemented by routing data. Specifically, referring to fig. 4, the method may further include step S105: and forwarding the routing request to the first interface according to the routing data of the first interface.
Referring to fig. 5, an embodiment of the present application further provides a method for implementing a route request, where the method includes steps S201 to S204.
Step S201: the interface platform management platform is responsible for registration and interface management of each system, and stores all authentication data of each system and interface data of each interface in the Mysql database. The system registered on the interface platform is a data requester and can also be used as a data provider. A system that is a data provider may provide one or more interfaces for an interface platform to invoke to obtain corresponding data.
Step S202: when the routing application of the interface platform is started, all data are loaded into the Map container from the Mysql database, and the interface platform is responsible for providing an interface for other systems to access.
Step S203: the system A sends a request to the interface platform, accesses the interface platform to obtain data of the system B, and the interface platform obtains authentication data of the requested interface and a request forwarding path from the Map container to authenticate the system A, wherein the authentication data of the interface refers to the identification of all data requesters authenticated by the interface.
Step S204: and if the authentication of the system A is successful, the interface platform forwards the request to a corresponding interface of the system B according to the path for forwarding the request.
For example, the system a is a website system, the system B is an order system, and the website system needs to obtain order data of the order system, and the process is as follows: the network system accesses the interface platform and sends a data request to the interface platform; the interface platform authenticates the network system, and forwards the data request to an interface of the order system after the authentication is successful; the interface of the order system returns order data to the interface platform; and the interface platform returns the order data to the network point system. In the request forwarding process and the data acquisition process, the network point system and the order system do not directly perform data interaction, but forward the data request through the interface platform; the interface platform acquires the authentication data and the interface data when the application is started, so that the data does not need to be acquired from an external data source for authentication and request forwarding after the request is received.
Referring to fig. 6, an embodiment of the present application further provides a method for implementing a route request, where the method includes steps S301 to S304.
Step S301: when the interface platform routing application is started, the access of the database is realized through MyBatis. MyBatis is a persistent layer framework that supports normal sql queries, stored procedures, and advanced mapping.
Step S302: and the interface platform stores the inquired authentication data and routing data of the interface into the LinkedHashMap in a key-value format. The linkedfashmap is inherited to the HashMap, which is one of the Map containers, and the HashMap is inherited to the Map interface.
Step S303: and other systems access the interface platform, the sent request carries the identifier of the first data request party and the first interface identifier, and the interface platform takes the first interface identifier as a key to obtain the corresponding value from the LinkedHashMap.
Step S304: and analyzing the authentication data and the routing data of the first interface from the value, authenticating the first data request party by using the authentication data, and forwarding the request by using the analyzed routing data after the authentication is successful. The authentication data of the first interface refers to the identifications of all requesters authenticated by the first interface.
Referring to fig. 7, an embodiment of the present application further provides a device for implementing a route request, where the device includes: a data obtaining module 201, configured to obtain interface data of one or more interfaces when detecting starting of an interface platform routing application, where the interface data includes routing data of the interfaces; a request receiving module 202, configured to receive a routing request, where the routing request includes a first interface identifier, and an interface corresponding to the first interface identifier is a first interface; a data query module 203, configured to query, in response to the routing request, interface data corresponding to the first interface identifier from the interface data of the one or more interfaces; a route obtaining module 204, configured to obtain the route data of the first interface according to the interface data corresponding to the first interface identifier.
In some possible implementations, the interface data further includes an identification of all data requestors of the interface authentication, and the routing request further includes an identification of the first data requester; the route obtaining module 204 is configured to obtain identifiers of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identifier; judging whether the identification of at least one data request party is consistent with the identification of the first data request party in the identifications of all the data request parties authenticated by the first interface; and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
In some possible implementations, the interface data is data in a key-value format; the data query module 203 is configured to, in response to the routing request, query a value corresponding to the first interface identifier from the interface data of the one or more interfaces by using the first interface identifier as a key, and parse the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier.
In some possible implementations, the data obtaining module 201 is configured to, when the interface platform routing application is detected to be started, obtain and store the interface data of the one or more interfaces to a first data storage device; the data query module 203 is configured to query, in response to the routing request, interface data corresponding to the first interface identifier from the first data storage device.
In some possible implementations, the data obtaining module 201 is further configured to obtain interface data of the one or more interfaces and store the interface data in a second data storage device; when the starting of the interface platform routing application is detected, the interface data of the one or more interfaces are obtained from the second data storage device and stored to the first data storage device.
In some possible implementations, with continued reference to fig. 7, the apparatus further includes a request forwarding module 205 configured to forward the routing request to the first interface according to the routing data of the first interface.
Referring to fig. 8, an embodiment of the present application further provides a system for implementing a route request, where the system includes a data requester 301, a route request implementing device 302, and a data provider 303.
The routing request implementing device 302 is configured to, when detecting that the interface platform routing application is started, obtain interface data of one or more interfaces, where the interface data includes routing data of the interfaces; receiving a routing request, wherein the routing request comprises a first interface identifier, and an interface corresponding to the first interface identifier is taken as a first interface; and responding to the routing request, inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces; acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier; and forwarding the routing request to the first interface according to the routing data of the first interface.
The data requester 301 is configured to send the route request to the route request implementing apparatus 302.
The data provider 303 is configured to provide the first interface.
The data requester 301 is, for example, a website system, the data provider 303 is, for example, an order system, and the route request realization means 302 is, for example, one or more servers.
In some possible implementations, the system further comprises a first data storage 304 and a second data storage 305, the second data storage 305 being configured to store interface data of the one or more interfaces; the routing request implementing means 302 is further configured to, when the starting of the interface platform routing application is detected, obtain the interface data of the one or more interfaces from the second data storage means 305 and store the interface data to the first data storage means 304; and querying the first data storage device 304 for interface data corresponding to the first interface identifier.
In some possible implementations, the first data store 304 is a Map container, the second data store 305 is a Mysql database, and the interface data is data in a key-value format.
In some possible implementations, the interface data further includes an identification of all data requesters of the interface authentication, and the routing request further includes an identification of the first data requester; the routing request implementing device 302 is further configured to obtain identifiers of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identifier; judging whether the identification of at least one data requester exists in the identifications of all the data requesters authenticated by the first interface and is consistent with the identification of the first data requester; and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
In some possible implementations, the interface data is data in a key-value format; the routing request implementing device 302 is further configured to, in response to the routing request, query a value corresponding to the first interface identifier from the interface data of the one or more interfaces by using the first interface identifier as a key, and parse the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier.
Referring to fig. 9, an electronic device 3 implemented by a routing request is further provided in the embodiments of the present application, where the electronic device 3 includes at least one storage unit 31, at least one processing unit 32, and a bus 33 connecting different platform systems.
The storage unit 31 may include readable media in the form of volatile storage units, such as a random access memory unit (RAM)311 and/or a cache memory unit 312, and may further include a read only memory unit (ROM) 313.
The storage unit 31 further stores a program product 4, and the program product 4 can be executed by the processing unit 32, so that the processing unit 32 executes the steps of the method for implementing a routing request in the embodiment of the present application (as shown in fig. 1). The storage unit 31 may also include a program/utility 314 having a set (at least one) of program modules 315, such program modules including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination thereof may comprise an implementation of a network environment.
Accordingly, the processing unit 32 may execute the program product 4 described above, and may execute the program/utility 314.
Bus 33 may be one or more of several types of bus structures, including a memory unit bus or memory unit controller, a peripheral bus, an accelerated graphics port, a processing unit, or a local bus using any of a variety of bus architectures.
The electronic device 3 may also communicate with one or more external devices 34, such as a keyboard, pointing device, bluetooth device, etc., and may also communicate with one or more devices capable of interacting with the electronic device 3, and/or with any device (e.g., router, modem, etc.) that enables the electronic device 3 to communicate with one or more other computing devices. Such communication may be through input/output (I/O) interfaces 35. Also, the electronic device 3 may communicate with one or more networks (e.g., a Local Area Network (LAN), a Wide Area Network (WAN), and/or a public network, such as the internet) via the network adapter 36. The network adapter 36 may communicate with other modules of the electronic device 3 via the bus 33. It should be appreciated that although not shown in FIG. 9, other hardware and/or software modules may be used in conjunction with the electronic device 3, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage platforms, to name a few.
Referring to fig. 10, an embodiment of the present application further provides a computer-readable storage medium for storing a computer program, where the computer program, when executed, implements the steps of the method for implementing a routing request in the embodiment of the present application (as shown in fig. 1). Fig. 10 shows a program product 4 provided by the present embodiment for implementing the above method, which may employ a portable compact disc read only memory (CD-ROM) and include program codes, and may be run on a terminal device, such as a personal computer. However, the program product 4 of the present invention is not limited thereto, and in this document, a readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. Program product 4 may employ any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples (a non-exhaustive list) of the readable storage medium include: an electrical connection having one or more wires, a portable disk, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
A computer readable storage medium may include a propagated data signal with readable program code embodied therein, for example, in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A readable storage medium may also be any readable medium that is not a readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a readable storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing. Program code for carrying out operations for aspects of the present invention may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
The foregoing description and drawings are only for purposes of illustrating the preferred embodiments of the present application and are not intended to limit the present application, which is, therefore, to the contrary, the intention is to cover all modifications, equivalents, and alternatives falling within the spirit and scope of the present application.

Claims (8)

1. A method for realizing a route request is applied to a system for realizing the route request, the system comprises a device for realizing the route request, a data requester and a data provider, and the method comprises the following steps:
when the starting of the routing application of the interface platform is detected, acquiring interface data of one or more interfaces, wherein the interface data comprises the routing data of the interfaces;
receiving a routing request, wherein the routing request comprises a first interface identifier, and an interface corresponding to the first interface identifier is taken as a first interface;
responding to the routing request, inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces;
acquiring routing data of the first interface according to the interface data corresponding to the first interface identifier;
forwarding the routing request to the first interface according to the routing data of the first interface;
the data requester is used for sending the routing request to the routing request implementation device;
the data provider is used for providing the first interface;
when the starting of the routing application of the interface platform is detected, acquiring interface data of one or more interfaces comprises the following steps:
when detecting the starting of the interface platform routing application, acquiring interface data of the one or more interfaces and storing the interface data to a first data storage device, wherein the first data storage device is an internal device of the routing request implementation device;
the querying, in response to the routing request, interface data corresponding to the first interface identifier from the interface data of the one or more interfaces includes:
and responding to the routing request, and inquiring interface data corresponding to the first interface identification from the first data storage device.
2. The method of claim 1, wherein the interface data further includes an identification of all data requesters of the interface authentication, and wherein the routing request further includes an identification of the first data requester;
the obtaining of the routing data of the first interface according to the interface data corresponding to the first interface identifier includes:
acquiring identifications of all data requesters authenticated by the first interface according to the interface data corresponding to the first interface identification;
judging whether the identification of at least one data request party is consistent with the identification of the first data request party in the identifications of all the data request parties authenticated by the first interface;
and if the first interface identifier exists, acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier.
3. The method of claim 1, wherein the interface data is data in a key-value format;
the querying, in response to the routing request, interface data corresponding to the first interface identifier from the interface data of the one or more interfaces includes:
responding to the routing request, using the first interface identifier as a key, inquiring the value corresponding to the first interface identifier from the interface data of the one or more interfaces, and analyzing the interface data corresponding to the first interface identifier according to the value corresponding to the first interface identifier.
4. The method of claim 1, further comprising:
acquiring interface data of the one or more interfaces and storing the interface data to a second data storage device;
when the starting of the interface platform routing application is detected, acquiring the interface data of the one or more interfaces and storing the interface data to a first data storage device, wherein the method comprises the following steps:
when the starting of the interface platform routing application is detected, the interface data of the one or more interfaces are obtained from the second data storage device and stored to the first data storage device.
5. A routing request implementing apparatus applied to a routing request implementing system, the system including the routing request implementing apparatus, a data requester and a data provider, the apparatus comprising:
the data acquisition module is used for acquiring interface data of one or more interfaces when the starting of the routing application of the interface platform is detected, wherein the interface data comprises the routing data of the interfaces;
a request receiving module, configured to receive a routing request, where the routing request includes a first interface identifier, and an interface corresponding to the first interface identifier is used as a first interface;
the data query module is used for responding to the routing request and querying interface data corresponding to the first interface identification from the interface data of the one or more interfaces;
the route acquisition module is used for acquiring the route data of the first interface according to the interface data corresponding to the first interface identifier;
a request forwarding module, configured to forward the routing request to the first interface according to the routing data of the first interface;
the data requester is used for sending the routing request to the routing request implementation device;
the data provider is used for providing the first interface;
the data acquisition module is used for acquiring the interface data of the one or more interfaces and storing the interface data into a first data storage device when the starting of the interface platform routing application is detected, wherein the first data storage device is an internal device of the routing request implementation device; the data query module is used for responding to the routing request and querying the interface data corresponding to the first interface identification from the first data storage device.
6. A route request implementation system is characterized by comprising a route request implementation device, a data requester and a data provider;
the routing request implementation device is used for acquiring interface data of one or more interfaces when the starting of the routing application of the interface platform is detected, wherein the interface data comprises routing data of the interfaces; receiving a routing request, wherein the routing request comprises a first interface identifier, and an interface corresponding to the first interface identifier is taken as a first interface; and responding to the routing request, inquiring interface data corresponding to the first interface identification from the interface data of the one or more interfaces; acquiring the routing data of the first interface according to the interface data corresponding to the first interface identifier; forwarding the routing request to the first interface according to the routing data of the first interface;
the data requester is used for sending the routing request to the routing request implementation device;
the data provider is configured to provide the first interface.
7. The system of claim 6, further comprising a first data storage device and a second data storage device, the second data storage device for storing interface data for the one or more interfaces;
the routing request implementation device is further used for acquiring the interface data of the one or more interfaces from the second data storage device and storing the interface data to the first data storage device when the starting of the interface platform routing application is detected; and inquiring interface data corresponding to the first interface identification from the first data storage device.
8. The system of claim 7, wherein the first data store is a Map container, the second data store is a Mysql database, and the interface data is data in a key-value format.
CN202010526902.4A 2020-06-11 2020-06-11 Method, device and system for realizing routing request Active CN111669321B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010526902.4A CN111669321B (en) 2020-06-11 2020-06-11 Method, device and system for realizing routing request

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010526902.4A CN111669321B (en) 2020-06-11 2020-06-11 Method, device and system for realizing routing request

Publications (2)

Publication Number Publication Date
CN111669321A CN111669321A (en) 2020-09-15
CN111669321B true CN111669321B (en) 2022-06-24

Family

ID=72386888

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010526902.4A Active CN111669321B (en) 2020-06-11 2020-06-11 Method, device and system for realizing routing request

Country Status (1)

Country Link
CN (1) CN111669321B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844784A (en) * 2017-03-14 2017-06-13 上海网易小额贷款有限公司 Data cache method, device and computer-readable recording medium
CN108052569A (en) * 2017-12-07 2018-05-18 深圳市康必达控制技术有限公司 Data bank access method, device, computer readable storage medium and computing device
CN108804447A (en) * 2017-04-28 2018-11-13 北京京东尚科信息技术有限公司 Utilize the method and system of cache responses request of data
CN108874465A (en) * 2018-05-31 2018-11-23 上海爱优威软件开发有限公司 A kind of application starting method and system based on caching

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2015072028A1 (en) * 2013-11-18 2015-05-21 株式会社日立製作所 Storage control device
US9864531B2 (en) * 2015-05-13 2018-01-09 International Business Machines Corporation Raid-topology-aware multipath routing
US10469362B1 (en) * 2015-09-30 2019-11-05 Amazon Technologies, Inc. Network routing utilization of application programming interfaces
CN109614559A (en) * 2018-11-16 2019-04-12 泰康保险集团股份有限公司 Data processing method and device
CN109522062A (en) * 2018-11-16 2019-03-26 北京微播视界科技有限公司 Display data determines method, applications client and electronic equipment
CN111224880A (en) * 2019-12-31 2020-06-02 北京健康之家科技有限公司 Interface data acquisition method and device for single-page application and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106844784A (en) * 2017-03-14 2017-06-13 上海网易小额贷款有限公司 Data cache method, device and computer-readable recording medium
CN108804447A (en) * 2017-04-28 2018-11-13 北京京东尚科信息技术有限公司 Utilize the method and system of cache responses request of data
CN108052569A (en) * 2017-12-07 2018-05-18 深圳市康必达控制技术有限公司 Data bank access method, device, computer readable storage medium and computing device
CN108874465A (en) * 2018-05-31 2018-11-23 上海爱优威软件开发有限公司 A kind of application starting method and system based on caching

Also Published As

Publication number Publication date
CN111669321A (en) 2020-09-15

Similar Documents

Publication Publication Date Title
CN108923908B (en) Authorization processing method, device, equipment and storage medium
US9444899B2 (en) Use of internet information services logging to collect user information in an asynchronous manner
CA2813170C (en) Remote access to tracking system contact information
CN107635027B (en) Domain name resolution method, medium, device and computing equipment
CN111062024B (en) Application login method and device
US8880634B2 (en) Cache sharing among branch proxy servers via a master proxy server at a data center
CN111045833B (en) Interface calling method and device
US20130124756A1 (en) Unauthenticated redirection requests with protection
CN113271296B (en) Login authority management method and device
CN110659100B (en) Container management method, device and equipment
US9514176B2 (en) Database update notification method
US9665732B2 (en) Secure Download from internet marketplace
US8949599B2 (en) Device management apparatus, method for device management, and computer program product
CN111460129A (en) Method and device for generating identification, electronic equipment and storage medium
CN115396180B (en) Uniform authentication method and device for micro service gateway, micro service gateway and storage medium
CN112702336A (en) Security control method and device for government affair service, security gateway and storage medium
CN113992382B (en) Service data processing method and device, electronic equipment and storage medium
CN109669790A (en) Data sharing method, device, shared platform and storage medium based on cloud platform
CN113282589A (en) Data acquisition method and device
CN111669321B (en) Method, device and system for realizing routing request
US10904746B2 (en) Implementation method, apparatus and system for remote access
CN109120692B (en) Method and apparatus for processing requests
WO2020015168A1 (en) Survey grid optimization method, electronic device and computer-readable storage medium
CN111885006A (en) Page access and authorized access method and device
CN113641966B (en) Application integration method, system, equipment and medium

Legal Events

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