CN115334135B - Multi-cloud api asynchronous processing method, device and equipment based on event bus - Google Patents

Multi-cloud api asynchronous processing method, device and equipment based on event bus Download PDF

Info

Publication number
CN115334135B
CN115334135B CN202210917542.XA CN202210917542A CN115334135B CN 115334135 B CN115334135 B CN 115334135B CN 202210917542 A CN202210917542 A CN 202210917542A CN 115334135 B CN115334135 B CN 115334135B
Authority
CN
China
Prior art keywords
service
processing
request
api
event bus
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
CN202210917542.XA
Other languages
Chinese (zh)
Other versions
CN115334135A (en
Inventor
杨海天
杨松
伍明迪
高洪滨
熊潇
张峰坡
王俊
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Shenzhou Yunhe Data Technology Development Co ltd
Original Assignee
Beijing Shenzhou Yunhe Data Technology Development Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing Shenzhou Yunhe Data Technology Development Co ltd filed Critical Beijing Shenzhou Yunhe Data Technology Development Co ltd
Priority to CN202210917542.XA priority Critical patent/CN115334135B/en
Publication of CN115334135A publication Critical patent/CN115334135A/en
Application granted granted Critical
Publication of CN115334135B publication Critical patent/CN115334135B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/10Protocols in which an application is distributed across nodes in the network
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

Embodiments of the present application provide a method, an apparatus, a device, and a computer readable storage medium for multi-cloud api asynchronous processing based on an event bus. The method comprises the steps that an api platform receives an initiation request sent by a service through rpc and forwards the initiation request to an event bus according to api capability; the event bus responds to an initiation request sent by the api platform and distributes the initiation request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the api platform; and the api platform receives the service data sent by the event bus, switches rpc protocols and returns the service data to the corresponding rpc interface. In this way, the technical complexity is reduced, and in complex service scenarios, the coupling degree is effectively reduced, so that service deployment and use are more convenient and faster.

Description

Multi-cloud api asynchronous processing method, device and equipment based on event bus
Technical Field
Embodiments of the present application relate to the field of data processing, and in particular, to a method, an apparatus, a device, and a computer readable storage device for multi-cloud api asynchronous processing based on an event bus.
Background
Under the environment of huge tax return data volume, the real-time performance of a data interface is difficult to be ensured when tax returns are butted with tax returns in tax areas in different books in face of frequently-changing tax rules and tax return specifications, and when a plurality of enterprises call the api, the api with continuous training is adopted to acquire a result so as to judge whether tax return information and tax return data are correct in time. In the process, system performance is very consumed, especially when complex services are docked, the docking rpc protocols are different, so that development difficulty is increased by geometric times of technical complexity and service complexity, the whole process is not intelligent enough, and a plurality of links need to be manually processed.
Disclosure of Invention
According to the embodiment of the application, a multi-cloud api asynchronous processing scheme based on an event bus is provided.
In a first aspect of the present application, a method for asynchronous processing of a multi-cloud api based on an event bus is provided. The method comprises the following steps:
the api platform receives an initiation request sent by a service through rpc and forwards the initiation request to an event bus according to the api capability;
the event bus responds to an initiation request sent by the api platform and distributes the initiation request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the api platform;
and the api platform receives the service data sent by the event bus, switches rpc protocols and returns the service data to the corresponding rpc interface.
Further, the initiation request includes data parameters, callback rpc protocol and/or callback interface information.
Further, the sending the initiation request to the corresponding service node for processing includes:
if the corresponding service node is an internal node, the initiation request is directly sent to the corresponding service node for processing;
if the corresponding service node is an external node, acquiring a processing interface, authentication information and/or encryption key of external service where the service node is located; and calling an external cloud service based on the processing interface, authentication information and/or encryption key of the external service, encrypting the initiation request, and sending the encrypted initiation request and the current event bus id to a corresponding service node.
Further, the receiving the service data generated by the service node processing the initiation request includes:
if the service node is an internal node, directly receiving service data generated by the service node for processing the initiation request;
and if the service node is an external node, receiving encrypted service data generated by the service node for processing the initiation request.
In a second aspect of the present application, a multi-cloud api asynchronous processing device based on an event bus is provided. The device comprises a service, an api platform, an event bus, a bus processing platform and a processing node:
the service is used for sending an initiation request to the api platform;
the api platform is used for receiving an initiation request sent by a service through rpc and forwarding the initiation request to the event bus according to the api capability; receiving service data sent by an event bus, switching rpc protocols, and returning the service data to a corresponding rpc interface;
the event bus is used for responding to an initiating request sent by the api platform and distributing the initiating request to the bus processing platform; receiving service data sent by a bus processing platform;
the bus processing platform is used for receiving an initiating request sent by the event bus and sending the initiating request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the event bus;
and the processing node is used for receiving the initiation request sent by the bus processing platform, processing the initiation request to generate service data, and sending the service data to the bus processing platform.
In a third aspect of the present application, an electronic device is provided. The electronic device includes: a memory and a processor, the memory having stored thereon a computer program, the processor implementing the method as described above when executing the program.
In a fourth aspect of the present application, there is provided a computer readable storage medium having stored thereon a computer program which when executed by a processor implements a method as according to the first aspect of the present application.
According to the multi-cloud api asynchronous processing method based on the event bus, an api platform receives an initiation request sent by a service through rpc, and forwards the initiation request to the event bus according to api capacity; the event bus responds to an initiation request sent by the api platform and distributes the initiation request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the api platform; the api platform receives the service data sent by the event bus, switches rpc protocol, returns the service data to the corresponding rpc interface, does not depend on the original training mechanism any more, and adopts calling, callback and awakening modes. The technical complexity is reduced, and in complex service scenes, the coupling degree is effectively reduced, so that service deployment and use are more convenient and faster.
It should be understood that the description in this summary is not intended to limit key or critical features of embodiments of the present application, nor is it intended to be used to limit the scope of the present application. Other features of the present application will become apparent from the description that follows.
Drawings
The above and other features, advantages and aspects of embodiments of the present application will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. In the drawings, wherein like or similar reference numerals denote like or similar elements, in which:
FIG. 1 illustrates a flow chart of a method of event bus based multi-cloud api asynchronous processing according to an embodiment of the present application;
FIG. 2 illustrates an asynchronous traffic and data processing mode timing diagram of the internal multi rpc protocol according to an embodiment of the present application;
FIG. 3 illustrates a timing diagram of internal invocation of external cloudy traffic and data processing modes according to an embodiment of the present application;
FIG. 4 illustrates a timing diagram of external invocation of internal asynchronous services and data processing modes according to an embodiment of the present application;
FIG. 5 illustrates an external invocation of cloudy asynchronous data and traffic handling manner timing diagram in accordance with an embodiment of the present application;
FIG. 6 illustrates an asynchronous client implementation timing diagram according to an embodiment of the present application;
FIG. 7 shows a block diagram of an event bus based multi-cloud api asynchronous processing device according to an embodiment of the present application;
fig. 8 shows a schematic diagram of a structure of a terminal device or a server suitable for implementing an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present disclosure more apparent, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present disclosure, and it is apparent that the described embodiments are some embodiments of the present disclosure, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments in this disclosure without inventive faculty, are intended to be within the scope of this disclosure.
In addition, the term "and/or" herein is merely an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist together, and B exists alone. In addition, the character "/" herein generally indicates that the front and rear associated objects are an "or" relationship.
Fig. 2 shows a flowchart of a method of event bus based multi-cloud api asynchronous processing according to an embodiment of the present disclosure. The method comprises the following steps:
s110, the api platform receives an initiation request sent by the service through rpc and forwards the initiation request to the event bus according to the api capability.
In some embodiments, an interface call registration is performed once and then an initiation request is sent to the api platform. The initiation request comprises data parameters, callback rpc protocol (such as http, dubbo, webservice), callback interface information and the like (interface address, method, parameter type and the like; and the callback interface needs to realize a data format specified by an api platform).
Further, if the interface is an internal interface, interface authentication is not required; if the external interface is the external interface, the authentication information of the interface needs to be checked, and when the external interface is registered, the authentication and encryption information corresponding to the callback domain name which is configured in advance needs to be checked.
In some embodiments, according to the api capability, the initiation request is forwarded to an event bus, a returned event bus id is obtained, local request information is stored, the event bus id is bound, and according to the actual bus id, a request id is generated and returned to the client.
S120, an event bus responds to an initiation request sent by an api platform, and the initiation request is distributed to a corresponding service node for processing; and receiving service data generated by the service node for processing the initiation request, and sending the service data to the api platform.
In some embodiments, an event bus responds to an initiation request sent by an api platform, and sends the initiation request to a corresponding service node for processing, and if the corresponding service node is an internal node, the initiation request is directly sent to the corresponding service node for processing;
if the corresponding service node is an external node, acquiring a processing interface, authentication information and/or encryption key of external service where the service node is located; and calling an external cloud service based on the processing interface, authentication information and/or encryption key of the external service, encrypting the initiation request, and sending the encrypted initiation request and the current event bus id to a corresponding service node.
Further, if the service node is an internal node, the event bus directly receives service data generated by the service node for processing the initiation request;
and if the service node is an external node, the event bus receives encrypted service data generated by the service node for processing the initiation request.
And an event bus for transmitting the service data (with time id) to the api platform.
And S130, the api platform receives the service data sent by the event bus, switches rpc protocols and returns the service data to the corresponding rpc interface.
In some embodiments, the api platform queries the registered request information according to the service bus id, and if the request initiating node is an internal node, returns the data stored in the bus according to the request information; if the request initiating node is an external node, inquiring callback authentication information and encryption information according to the request information and the callback domain name, and sending the encrypted data to the callback interface.
Further, the method further comprises the following steps:
the client corresponding to the server operates as follows:
the client calls a method for initiating an api request and gives a processing function;
the client initiates an api request, and obtains a returned request id and a local key value pair; the key is request id, and the stored value is a processing function;
after the business processing finishes callback, inquiring a corresponding processing function in the key value pair based on the request id;
the returned data is passed to the processing function and this function is performed.
A number of embodiments of event bus based multi-cloud api asynchronous processing methods based on the present disclosure are presented below:
asynchronous traffic and data processing modes implementing example one, internal multi rpc protocol:
referring to fig. 2, the internal service initiates an api call to the api platform through rpc, and the initiating carries the message content: the method comprises the steps of carrying out one initiation of the registration of an api by callback interface information (such as interface address, method, parameter type and the like, requiring realization of a data format regulated by an api platform) according to data parameters and callback rpc protocols (such as http, dubbo, webservice), sending a functional event to an event bus by the platform according to the capability of the api, generating a corresponding api request id according to the event id, returning the corresponding api request id to a client, storing the request information, dispatching a corresponding service node to solve the service function service node according to the functional event, reporting the solved service data to an event bus, sending the solved information to the api platform by the event bus, inquiring the request information according to the service bus information by the api, switching rpc protocols according to the callback information given by the api, and returning the data to a corresponding rpc interface.
Implementation example II, internal calling external cloud service and data processing mode
Referring to fig. 3, the multi-cloud service registers with the event bus processing platform, and the registration information includes: interface address, data format, interface authentication information, encryption mode. The key internal service initiates api call to the api platform through rpc, and the initiated message content is carried: the method comprises the steps that data parameters and callback rpc protocols are used for enabling callback interface information to perform one initiation of api registration, a platform sends functional events to an event bus according to the capability of the api, generates corresponding api request ids according to the event ids and returns the api request ids to a client, the request information event bus is stored to obtain processed interface information according to the functional events, the processed interface information is dispatched to a corresponding external cloud service interface to process the external cloud service interface according to stored interface, authentication, encryption and other information to complete processing, an event completion interface of the event bus is called based on the event information, the event completion interface of the event bus is completed, the event and the stored data event bus dispatch the solved information to an api platform, the api inquires the request information according to service bus information, switches rpc protocols according to the callback information given by the api, and returns data to a corresponding rpc interface.
Implementation example III, external calling internal asynchronous service and data processing mode
Referring to fig. 4, an external service registers an interface application and configures (including a domain name, a protocol-http/webservice, callback interface authentication information, calling interface authentication information, an encryption mode and a secret key) the external service to initiate an api call to the api platform through the interface, and the initiation carries message content: the method comprises the steps of data parameters, callback rpc protocol (such as http, webservice), callback interface information (an interface address, a method, a parameter type and the like need to realize a data format regulated by an api platform), sending a functional event to an event bus by a registration platform initiating the api according to the capability of the api, generating a corresponding api request id according to the event id, returning the api request id to a client, storing the request information, dispatching a corresponding service node to solve the service function service node according to the functional event, reporting the solved service data to an event bus, dispatching the solved information to the api platform by the event bus, inquiring the request information by the api according to the service bus information, switching rpc protocol according to the callback information given by the api, encrypting the data and the interface authentication parameter, and returning the data and the interface authentication parameter to a corresponding external rpc interface.
Implementation example IV, external calling multi-cloud asynchronous data and service processing mode
Referring to fig. 5, an external service registers an interface application and configures (including a domain name, a protocol-http/webservice, callback interface authentication information, calling interface authentication information, an encryption mode, and a key) a multi-cloud service to an event bus processing platform (supporting http and webservice interface registration), and the registration information includes data formats specified by the implementation platform: interface address, data format, interface authentication information, encryption mode, key external service initiates api call to api platform through interface, initiating carrying message content: the method comprises the steps that data parameters and callback rpc protocols are used for carrying out registration of an initiating api on callback interface information, a platform sends functional events to an event bus according to the capability of the api, generates corresponding api request ids according to event ids and returns the api request ids to a client, and stores the request information event buses, corresponding service node solution service function event buses are dispatched according to the functional events, processed interface information is obtained according to the functional events, the interface information is dispatched to corresponding external cloud service interfaces to process external cloud service interfaces according to stored information, authentication, encryption and the like, an event completion interface of the event buses is called based on the event information, the event completion interface and the callback information after solution are dispatched to the api platform by the stored data event buses, the api inquires the request information according to the service bus information, the data encryption is carried out by switching rpc protocols according to the given callback information of the api, and the data and interface authentication parameters are returned to the corresponding external rpc interfaces.
Implementation example five, asynchronous client implementation
Referring to FIG. 6, a client calls an initiate api request method and gives a processing function;
the client initiates an api request, and obtains a returned request id and a local key value pair; wherein the key is request id and the stored value is a processing function;
after the business processing finishes callback, inquiring a corresponding processing function in the key value pair based on the request id;
the returned data is passed to the processing function and this function is performed.
Initiating a code instance, taking http as an example:
Figure BDA0003776364370000091
/>
Figure BDA0003776364370000101
according to the embodiment of the disclosure, the following technical effects are achieved:
the method is compatible with the multi-platform of the client, the information of calling the internal and external networks, and the intranet calling of the multi-cloud multi-platform of the compatible processing end, and the method does not depend on an original training mechanism any more, but adopts calling, callback and awakening modes. The technical complexity is reduced, and in complex service scenes, the coupling degree is effectively reduced, so that service deployment and use are more convenient and faster.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all alternative embodiments, and that the acts and modules referred to are not necessarily required in the present application.
The foregoing is a description of embodiments of the method, and the following further describes embodiments of the device.
Fig. 7 shows a block diagram of an event bus based multi-cloud api asynchronous processing device 700 according to an embodiment of the present application as shown in fig. 7, the device 700 comprising a service 710, an api platform 720, an event bus 730, a bus processing platform 740 and a processing node 750:
a service 710 for sending an initiation request to the api platform;
an api platform 720, configured to receive an initiation request sent by a service through rpc, and forward the initiation request to an event bus according to an api capability; receiving service data sent by an event bus, switching rpc protocols, and returning the service data to a corresponding rpc interface;
an event bus 730, configured to respond to an initiation request sent by the api platform, and send the initiation request to the bus processing platform; receiving service data sent by a bus processing platform;
the bus processing platform 740 is configured to receive an initiation request sent by the event bus, and send the initiation request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the event bus;
and the processing node 750 is configured to receive an initiation request sent by the bus processing platform, process the initiation request to generate service data, and send the service data to the bus processing platform.
It will be clear to those skilled in the art that, for convenience and brevity of description, specific working procedures of the described modules may refer to corresponding procedures in the foregoing method embodiments, which are not described herein again.
Fig. 8 shows a schematic diagram of a structure of a terminal device or a server suitable for implementing an embodiment of the present application.
As shown in fig. 8, the terminal device or the server 800 includes a Central Processing Unit (CPU) 701, which can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 802 or a program loaded from a storage section 808 into a Random Access Memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, ROM 702, and RAM 803 are connected to each other by a bus 804. An input/output (I/O) interface 805 is also connected to the bus 804.
The following components are connected to the I/O interface 805: an input portion 806 including a keyboard, mouse, etc.; an output portion 807 including a display such as a Cathode Ray Tube (CRT), a Liquid Crystal Display (LCD), and a speaker; a storage section 808 including a hard disk or the like; and a communication section 809 including a network interface card such as a LAN card, a modem, or the like. The communication section 809 performs communication processing via a network such as the internet. The drive 810 is also connected to the I/O interface 805 as needed. A removable medium 811 such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, or the like is mounted on the drive 810 as needed so that a computer program read out therefrom is mounted into the storage section 808 as needed.
In particular, the above method flow steps may be implemented as a computer software program according to embodiments of the present application. For example, embodiments of the present application include a computer program product comprising a computer program embodied on a machine-readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network via the communication section 809, and/or installed from the removable media 811. The above-described functions defined in the system of the present application are performed when the computer program is executed by a Central Processing Unit (CPU) 801.
It should be noted that the computer readable medium shown in the present application may be a computer readable signal medium or a computer readable storage medium, or any combination of the two. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable 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. In the context of this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In the present application, however, a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, with computer-readable program code embodied therein. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer 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 computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present application. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The units or modules described in the embodiments of the present application may be implemented by software, or may be implemented by hardware. The described units or modules may also be provided in a processor. Wherein the names of the units or modules do not in some cases constitute a limitation of the units or modules themselves.
As another aspect, the present application also provides a computer-readable storage medium that may be included in the electronic device described in the above embodiments; or may be present alone without being incorporated into the electronic device. The computer-readable storage medium stores one or more programs that when executed by one or more processors perform the methods described herein.
The foregoing description is only of the preferred embodiments of the present application and is presented as a description of the principles of the technology being utilized. It will be appreciated by persons skilled in the art that the scope of the application referred to in this application is not limited to the specific combinations of features described above, but it is intended to cover other embodiments in which any combination of features described above or their equivalents is possible without departing from the spirit of the application. Such as the above-mentioned features and the technical features having similar functions (but not limited to) applied for in this application are replaced with each other.

Claims (6)

1. An event bus-based multi-cloud api asynchronous processing method, which is characterized by being executed by an electronic device and comprising the following steps:
the api platform receives an initiation request sent by a service through rpc and forwards the initiation request to an event bus according to the api capability; acquiring a returned event bus id, storing local request information, binding the event bus id, generating a request id according to the event bus id, and returning to service;
the event bus responds to an initiation request sent by the api platform and distributes the initiation request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the api platform; if the corresponding service node is an internal node, the initiation request is directly sent to the corresponding service node for processing, and an event bus directly receives service data generated by the service node for processing the initiation request;
if the corresponding service node is an external node, acquiring a processing interface, authentication information and an encryption key of external service where the service node is located; based on the processing interface, authentication information and encryption key of the external service, calling the external cloud service, encrypting the initiation request, and sending the encrypted initiation request and the current event bus id to a corresponding service node; the event bus receives encrypted service data generated by the service node for processing the initiation request;
the event bus sends the business data carrying the time id to the api platform;
after the api platform inquires the request information according to the service bus information, the api platform receives the service data sent by the event bus, switches rpc protocol and returns the service data to the corresponding rpc interface;
the service call initiates an api request method and gives a processing function; the service initiates an api to initiate a request to an api platform, the service obtains a returned request id to generate a local key value pair, a key is the request id, and a stored value is a processing function; after the business processing finishes callback, inquiring a corresponding processing function in the key value pair based on the request id; and transmitting the returned service data to the processing function and executing the function.
2. The method of claim 1, wherein the initiation request comprises a data parameter, a callback rpc protocol, and/or callback interface information.
3. The multi-cloud api asynchronous processing device based on the event bus is characterized by comprising a service, an api platform, an event bus, a bus processing platform and a processing node:
the service is used for sending an initiation request to the api platform, wherein the service calls an initiation api request method and gives a processing function; the service initiates an api to initiate a request to an api platform, the service obtains a returned request id to generate a local key value pair, a key is the request id, and a stored value is a processing function; after the business processing finishes callback, inquiring a corresponding processing function in the key value pair based on the request id; transmitting the returned service data to a processing function and executing the function;
the api platform is used for receiving an initiation request sent by a service through rpc and forwarding the initiation request to the event bus according to the api capability; acquiring a returned event bus id, storing local request information, binding the event bus id, generating a request id according to the event bus id, and returning to service; receiving service data sent by an event bus, switching rpc protocols, and returning the service data to a corresponding rpc interface;
the event bus is used for responding to an initiating request sent by the api platform and distributing the initiating request to the bus processing platform; receiving service data sent by a bus processing platform; if the corresponding service node is an internal node, the initiation request is directly sent to the corresponding service node for processing, and an event bus directly receives service data generated by the service node for processing the initiation request; if the corresponding service node is an external node, acquiring a processing interface, authentication information and an encryption key of external service where the service node is located; based on the processing interface, authentication information and encryption key of the external service, calling the external cloud service, encrypting the initiation request, and sending the encrypted initiation request and the current event bus id to a corresponding service node; the event bus receives encrypted service data generated by the service node for processing the initiation request; the event bus sends the business data carrying the time id to the api platform; the bus processing platform is used for receiving an initiating request sent by the event bus and sending the initiating request to a corresponding service node for processing; receiving service data generated by the service node for processing the initiation request, and sending the service data to the event bus;
and the service node is used for receiving the initiation request sent by the bus processing platform, processing the initiation request to generate service data, and sending the service data to the bus processing platform.
4. The apparatus of claim 3, wherein the initiation request comprises a data parameter, a callback rpc protocol, and/or callback interface information.
5. An electronic device comprising a memory and a processor, the memory having stored thereon a computer program, characterized in that the processor, when executing the computer program, implements the method according to any of claims 1-2.
6. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any one of claims 1-2.
CN202210917542.XA 2022-08-01 2022-08-01 Multi-cloud api asynchronous processing method, device and equipment based on event bus Active CN115334135B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210917542.XA CN115334135B (en) 2022-08-01 2022-08-01 Multi-cloud api asynchronous processing method, device and equipment based on event bus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210917542.XA CN115334135B (en) 2022-08-01 2022-08-01 Multi-cloud api asynchronous processing method, device and equipment based on event bus

Publications (2)

Publication Number Publication Date
CN115334135A CN115334135A (en) 2022-11-11
CN115334135B true CN115334135B (en) 2023-06-02

Family

ID=83919859

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210917542.XA Active CN115334135B (en) 2022-08-01 2022-08-01 Multi-cloud api asynchronous processing method, device and equipment based on event bus

Country Status (1)

Country Link
CN (1) CN115334135B (en)

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886426A (en) * 2021-10-21 2022-01-04 京东科技信息技术有限公司 Data query method and device, computer equipment and storage medium

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109347921A (en) * 2018-09-20 2019-02-15 北京京东金融科技控股有限公司 A kind for the treatment of method and apparatus of digital certificate business
CN110187983A (en) * 2019-05-24 2019-08-30 北京奇艺世纪科技有限公司 A kind of remote invocation method, device and electronic equipment
CN110351342A (en) * 2019-06-20 2019-10-18 平安科技(深圳)有限公司 Service order processing method, device, computer equipment and storage medium
CN111181943B (en) * 2019-12-24 2023-04-18 深圳平安医疗健康科技服务有限公司 Service interaction method and device based on service middlebox, computer equipment and computer storage medium
CN112688952B (en) * 2020-12-28 2022-09-30 京信网络系统股份有限公司 Message processing method, device, radio remote unit and medium
CN114003647A (en) * 2021-12-31 2022-02-01 北京泰迪熊移动科技有限公司 Data processing method and device and computer readable storage medium

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113886426A (en) * 2021-10-21 2022-01-04 京东科技信息技术有限公司 Data query method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN115334135A (en) 2022-11-11

Similar Documents

Publication Publication Date Title
CN106533932B (en) A kind of method and apparatus for pushing instant message
US11868707B2 (en) Information interaction method and apparatus, server, system, and storage medium
CN114745724B (en) Access processing method and device, electronic equipment and computer readable medium
CN112269770B (en) Document sharing method, device and system and electronic equipment
CN108924183B (en) Method and device for processing information
US7941134B2 (en) Push-to-talk communication system and push-to-talk communication method
CN112965673A (en) Content printing method, device, equipment and storage medium
CN106357654B (en) Remote procedure calling method, device and communication system
US20020188666A1 (en) Lightweight dynamic service conversation controller
US20190370293A1 (en) Method and apparatus for processing information
CN114513552A (en) Data processing method, device, equipment and storage medium
CN108076110B (en) Electronic data exchange system and apparatus comprising an electronic data exchange system
CN115334135B (en) Multi-cloud api asynchronous processing method, device and equipment based on event bus
CN109981778B (en) Method, device, equipment and storage medium for realizing service of content distribution network
WO2023029974A1 (en) Cloud service method, and electronic device and computer-readable storage medium
CN112866622B (en) Information processing method, device, server, storage medium and system
CN111459825B (en) Block chain application system, method and device for payment service
CN114461582A (en) File processing method, device, equipment and storage medium
CN112836201A (en) Method, device, equipment and computer readable medium for multi-platform information intercommunication
CN112732457A (en) Image transmission method, image transmission device, electronic equipment and computer readable medium
CN114745367B (en) Data transmission method, device, electronic equipment and storage medium
CN114513548B (en) Directional call information processing method and device
CN113992671B (en) Data processing method, electronic device, and computer-readable storage medium
CN115086425B (en) Message transmission method, device, program product, medium and electronic equipment
CN113014470B (en) Receipt processing method and device for session message in instant messaging application

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