CN114385386A - Method, device, equipment and storage medium for calling micro-service - Google Patents

Method, device, equipment and storage medium for calling micro-service Download PDF

Info

Publication number
CN114385386A
CN114385386A CN202210044703.9A CN202210044703A CN114385386A CN 114385386 A CN114385386 A CN 114385386A CN 202210044703 A CN202210044703 A CN 202210044703A CN 114385386 A CN114385386 A CN 114385386A
Authority
CN
China
Prior art keywords
instance
tenant
micro
service
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202210044703.9A
Other languages
Chinese (zh)
Inventor
林思远
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
China Construction Bank Corp
Original Assignee
China Construction Bank Corp
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 China Construction Bank Corp filed Critical China Construction Bank Corp
Priority to CN202210044703.9A priority Critical patent/CN114385386A/en
Publication of CN114385386A publication Critical patent/CN114385386A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the application provides a method, a device, equipment and a storage medium for calling micro-services, wherein the method comprises the following steps: receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro service interface information; reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants; determining a target instance from the instance list according to the first tenant identification; calling a micro-service interface according to the target example; the method and the device for arranging the micro-services can solve the problem that an arranging engine is more and more bulky and is difficult to maintain due to an existing micro-service arranging method.

Description

Method, device, equipment and storage medium for calling micro-service
Technical Field
The application belongs to the technical field of internet, and particularly relates to a method, a device, equipment and a storage medium for calling micro-services.
Background
With the rapid development of internet technology, more and more new terms are sounding at the ears of people, such as: microservice, which is an emerging software architecture, splits a large single application and service into tens of supported microservices. As shown in FIG. 1, the per-microservice policy is to make the work easier, and it can extend a single component rather than the entire application stack to meet service level agreements. The registry is related to the micro-services, the registry is a service discovery mechanism in a micro-service architecture, each micro-service needs to register itself in the registry through a gateway, and when the services access each other, the registry obtains an available service address and then calls the service address through an arranging engine. Allowing multiple systems to coexist in one microservice architecture is one of the most efficient ways to take advantage of microservice stability and modularity, which is commonly referred to as multi-tenancy (multi-tenancy).
In a multi-tenant environment, in order to express personalized differences of tenants during micro-service invocation, a layout engine is required to load a large number of special instances of the tenants, so that the layout engine is increasingly too bulky and difficult to maintain.
Disclosure of Invention
The embodiment of the application provides a micro-service calling method, a micro-service calling device, a micro-service calling equipment and a storage medium, and can solve the problem that an arrangement engine is more and more bulky and is difficult to maintain due to an existing micro-service arrangement method.
In a first aspect, an embodiment of the present application provides a method for invoking a micro service, including:
receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro service interface information;
reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants;
determining a target instance from the instance list according to the first tenant identification;
and calling the micro-service interface according to the target instance.
In one embodiment, determining a target instance from the instance list based on the first tenant identity includes:
and when the instance list comprises the special instance corresponding to the first tenant identification, determining the special instance as the target instance.
In one embodiment, determining a target instance from the instance list based on the first tenant identity includes:
and when the special instance corresponding to the first tenant identification is not included in the instance list, determining the common instance as the target instance.
In one embodiment, the method further comprises:
and when the micro-service is registered, configuring the corresponding relation between the tenant identification of each tenant and the special instance of each tenant, and configuring the common instance shared by each tenant.
In a second aspect, an embodiment of the present application provides a micro service invoking device, including:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a service request sent by a tenant, and the service request comprises a first tenant identification and micro service interface information of the tenant;
the reading module is used for reading an available example list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants;
the determining module is used for determining a target instance from the instance list according to the first tenant identification;
and the calling module is used for calling the micro-service interface according to the target example.
In an embodiment, the determining module is specifically configured to:
and when the instance list comprises the special instance corresponding to the first tenant identification, determining the special instance as the target instance.
In an embodiment, the determining module is specifically configured to:
and when the special instance corresponding to the first tenant identification is not included in the instance list, determining the common instance as the target instance.
In one embodiment, the apparatus further comprises a configuration module
And the configuration module is used for configuring the corresponding relation between the tenant identification of each tenant and the special instance of each tenant and configuring the common instance shared by each tenant when the micro service is registered.
In a third aspect, an embodiment of the present application provides an electronic device, including: a memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing the microservice calling method of the first aspect.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where an implementation program for information transfer is stored, and when the program is executed by a processor, the method for invoking a micro-service of the first aspect is implemented.
In a fifth aspect, the present application provides a computer program product, and when executed by a processor of an electronic device, the instructions in the computer program product cause the electronic device to execute the micro-service invocation method of the first aspect.
The micro-service calling method, the device, the equipment and the storage medium in the embodiment of the application receive a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro-service interface information; reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants; determining a target instance from the instance list according to the first tenant identification; calling a micro-service interface according to the target example; the tenant is served by a mode of combining the special instances and the public instances, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings needed to be used in the embodiments of the present application will be briefly described below, and for those skilled in the art, other drawings can be obtained according to the drawings without creative efforts.
Fig. 1 is a schematic diagram of a micro service invocation process provided in an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for invoking a micro service according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a flow node call flow provided in an embodiment of the present application;
fig. 4 is a schematic structural diagram of a micro service invocation device according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
Features and exemplary embodiments of various aspects of the present application will be described in detail below, and in order to make objects, technical solutions and advantages of the present application more apparent, the present application will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application. It will be apparent to one skilled in the art that the present application may be practiced without some of these specific details. The following description of the embodiments is merely intended to provide a better understanding of the present application by illustrating examples thereof.
It is noted that, herein, relational terms such as first and second, and the like may be used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Also, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
In a multi-tenant environment, in order to express personalized differences of tenants during micro-service invocation, a layout engine is required to load a large number of special instances of the tenants, so that the layout engine is increasingly too bulky and difficult to maintain.
In order to solve the prior art problems, embodiments of the present application provide a method, an apparatus, a device, and a storage medium for invoking a micro service. The method comprises the steps of receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro service interface information; reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants; determining a target instance from the instance list according to the first tenant identification; calling a micro-service interface according to the target example; the tenant is served by a mode of combining the special instances and the public instances, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient. First, a method for invoking micro-services provided in the embodiments of the present application is described below.
Fig. 2 is a flowchart illustrating a method for invoking a micro-service according to an embodiment of the present application. As shown in fig. 2, the method may include the steps of:
s210, receiving a service request sent by a tenant.
The service request comprises a first tenant identification of a tenant and micro service interface information. The tenant identity may be recorded using the tenant context.
S220, reading an available example list of the micro service interface corresponding to the micro service interface information.
Wherein, the instance list comprises the corresponding relation between the tenant identification and the instance. The instances include a private instance corresponding to the tenant identity and a common instance common to the multi-tenants. And when the gateway receives a service request sent by a tenant, starting to read an available instance list of the micro service interface corresponding to the micro service interface information.
And S230, determining a target instance from the instance list according to the first tenant identification.
Wherein the target instance can be determined from the instance list according to the first tenant identity.
In one embodiment, S230: determining a target instance from the instance list according to the first tenant identity may include:
when the specific instance corresponding to the first tenant identification can be included in the instance list, the specific instance is determined to be the target instance.
When the instance list can include the dedicated instance corresponding to the first tenant identity, it indicates that the dedicated instance corresponding to the first tenant identity should be used for serving the tenant, and the dedicated instance is determined to be the target instance. For example, when tenant a calls microservice interface 1, the gateway reads the instance list, which includes: the micro-service instance (tenant A dedicated), the micro-service instance (tenant B dedicated), and the micro-service instance (public) are determined to be the target instance.
In one embodiment, S230: determining a target instance from the instance list according to the first tenant identity may include:
and when the special instance corresponding to the first tenant identification is not included in the instance list, determining the common instance as the target instance.
When the instance list does not include the dedicated instance corresponding to the first tenant identity, it indicates that the current tenant can serve the tenant without using the dedicated instance, and determines that the common instance is the target instance. For example, when tenant a calls microservice interface 1, the gateway reads the instance list, which includes: the micro-service instance (tenant B dedicated), the micro-service instance (tenant C dedicated), and the micro-service instance (public) are determined to be the target instance.
And S240, calling the micro-service interface according to the target instance.
After the target instance is determined, the micro-service interface can be called according to the target instance to serve the tenant.
The method comprises the steps of receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro service interface information; reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants; determining a target instance from the instance list according to the first tenant identification; calling a micro-service interface according to the target example; the tenant is served by a mode of combining the special instances and the public instances, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient.
In one embodiment, the method may further comprise:
s250, when the micro-service is registered, configuring the corresponding relation between the tenant identification of each tenant and the special instance of each tenant, and configuring the common instance shared by each tenant.
When micro-service is registered, the interface definitions of the micro-service interfaces of each tenant are consistent in the registration center, but the tenant identifications are different, and the special instances are also different. By configuring the corresponding relationship between the tenant identification of each tenant and the special instance of each tenant, the special instance of each tenant can be determined according to the tenant identification. The private instance includes a tenant-specific process definition, and the public instance includes a tenant-common process definition.
According to the embodiment of the application, the tenant is served by the mode of combining the special instance and the public instance, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient.
To help understanding, the micro-service invoking method provided in the embodiments of the present application is described below with reference to specific examples: as shown in fig. 3, different tenants have different requirements for different process nodes, for example, assuming that the business process 1 is composed of process node 1, process node 2 and process node 3, the gateway queries the orchestration engine for the next process node to determine the route of the request. When the tenant a initiates the service flow 1, as for the flow node 1, the tenant a customizes a special node implementation, that is, the tenant a needs to apply a flow node corresponding to the dedicated instance, and then uses the flow node 1 (tenant a) to implement the service. When the tenant B initiates the service process 1, the tenant B does not customize a special node implementation, that is, the tenant B does not need to apply a process node for a dedicated instance response, the process node 1 (default) is used to implement the service, and the process node 1 (default) is a common process node. Similarly, when the business process flow is transferred to the process node 2, the gateway queries the current routing service of the orchestration engine, and the orchestration engine reads the process definition, and finds that the process node 2 includes 3 implementation modes: the process node 2 (tenant A), the process node 2 (tenant B) and the process node 2 (default) are used for implementing business by using the process node 2 (tenant A) for the tenant A; for the tenant B, the flow node 2 (tenant B) is used for realizing the service; for tenant C, flow node 2 (default) is used for service implementation. Similarly, the micro-service implementation rule for the interface 3 is similar to the micro-service implementation rule for the interface 2, and is not described again.
According to the embodiment of the application, the tenant is served by the mode of combining the special instance and the public instance, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient.
Fig. 2-3 illustrate a method for invoking a micro-service, and the following describes an apparatus provided by an embodiment of the present application with reference to fig. 4 and fig. 5.
Fig. 4 is a schematic structural diagram of a micro service invocation device according to an embodiment of the present application, where each module in the device shown in fig. 4 has a function of implementing each step in fig. 1, and can achieve its corresponding technical effect. As shown in fig. 4, the apparatus may include:
a receiving module 410, configured to receive a service request sent by a tenant, where the service request includes a first tenant identifier of the tenant and micro service interface information;
a reading module 420, configured to read an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants;
a determining module 430, configured to determine a target instance from the instance list according to the first tenant identity;
and the calling module 440 is used for calling the micro-service interface according to the target instance.
The method comprises the steps of receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro service interface information; reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants; determining a target instance from the instance list according to the first tenant identification; calling a micro-service interface according to the target example; the tenant is served by a mode of combining the special instances and the public instances, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient.
In an embodiment, the determining module 430 is specifically configured to:
and when the instance list comprises the special instance corresponding to the first tenant identification, determining the special instance as the target instance.
In an embodiment, the determining module 430 is specifically configured to:
and when the special instance corresponding to the first tenant identification is not included in the instance list, determining the common instance as the target instance.
In one embodiment, the apparatus further comprises a configuration module
And the configuration module is used for configuring the corresponding relation between the tenant identification of each tenant and the special instance of each tenant and configuring the common instance shared by each tenant when the micro service is registered.
The method comprises the steps of receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification of the tenant and micro service interface information; reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between the tenant identifications and the instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants; determining a target instance from the instance list according to the first tenant identification; calling a micro-service interface according to the target example; the tenant is served by a mode of combining the special instances and the public instances, and instance data needing to be loaded by the arranging engine is reduced, so that the data loading amount of the arranging engine is small, and the maintenance is convenient.
Fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present application. As shown in fig. 5, the apparatus may include a processor 501 and a memory 502 storing computer program instructions.
Specifically, the processor 501 may include a Central Processing Unit (CPU), an Application Specific Integrated Circuit (ASIC), or one or more Integrated circuits configured to implement the embodiments of the present Application.
Memory 502 may include mass storage for data or instructions. By way of example, and not limitation, memory 502 may include a Hard Disk Drive (HDD), a floppy Disk Drive, flash memory, an optical Disk, a magneto-optical Disk, tape, or a Universal Serial Bus (USB) Drive or a combination of two or more of these. In one example, memory 502 can include removable or non-removable (or fixed) media, or memory 502 is non-volatile solid-state memory. The memory 502 may be internal or external to the integrated gateway disaster recovery device.
In one example, the Memory 502 may be a Read Only Memory (ROM). In one example, the ROM may be mask programmed ROM, programmable ROM (prom), erasable prom (eprom), electrically erasable prom (eeprom), electrically rewritable ROM (earom), or flash memory, or a combination of two or more of these.
The processor 501 reads and executes the computer program instructions stored in the memory 502 to implement the method in the embodiment shown in fig. 2, and achieves the corresponding technical effect achieved by the embodiment shown in fig. 2 executing the method, which is not described herein again for brevity.
In one example, the electronic device can also include a communication interface 503 and a bus 510. As shown in fig. 5, the processor 501, the memory 502, and the communication interface 503 are connected via a bus 510 to complete communication therebetween.
The communication interface 503 is mainly used for implementing communication between modules, apparatuses, units and/or devices in the embodiments of the present application.
Bus 510 comprises hardware, software, or both to couple the components of the online data traffic billing device to each other. By way of example, and not limitation, a Bus may include an Accelerated Graphics Port (AGP) or other Graphics Bus, an Enhanced Industry Standard Architecture (EISA) Bus, a Front-Side Bus (Front Side Bus, FSB), a Hyper Transport (HT) interconnect, an Industry Standard Architecture (ISA) Bus, an infiniband interconnect, a Low Pin Count (LPC) Bus, a memory Bus, a Micro Channel Architecture (MCA) Bus, a Peripheral Component Interconnect (PCI) Bus, a PCI-Express (PCI-X) Bus, a Serial Advanced Technology Attachment (SATA) Bus, a video electronics standards association local (VLB) Bus, or other suitable Bus or a combination of two or more of these. Bus 510 may include one or more buses, where appropriate. Although specific buses are described and shown in the embodiments of the application, any suitable buses or interconnects are contemplated by the application.
The electronic device may execute the micro-service calling method in the embodiment of the present application, so as to achieve the corresponding technical effect of the micro-service calling method described in fig. 2.
In addition, in combination with the micro-service invoking method in the foregoing embodiment, the embodiment of the present application may provide a computer storage medium to implement. The computer storage medium having computer program instructions stored thereon; the computer program instructions, when executed by a processor, implement any of the above-described embodiments of the microservice calling method.
It is to be understood that the present application is not limited to the particular arrangements and instrumentality described above and shown in the attached drawings. A detailed description of known methods is omitted herein for the sake of brevity. In the above embodiments, several specific steps are described and shown as examples. However, the method processes of the present application are not limited to the specific steps described and illustrated, and those skilled in the art can make various changes, modifications, and additions or change the order between the steps after comprehending the spirit of the present application.
The functional blocks shown in the above-described structural block diagrams may be implemented as hardware, software, firmware, or a combination thereof. When implemented in hardware, it may be, for example, an electronic Circuit, an Application Specific Integrated Circuit (ASIC), suitable firmware, plug-in, function card, or the like. When implemented in software, the elements of the present application are the programs or code segments used to perform the required tasks. The program or code segments may be stored in a machine-readable medium or transmitted by a data signal carried in a carrier wave over a transmission medium or a communication link. A "machine-readable medium" may include any medium that can store or transfer information. Examples of a machine-readable medium include electronic circuits, semiconductor memory devices, ROM, flash memory, Erasable ROM (EROM), floppy disks, CD-ROMs, optical disks, hard disks, fiber optic media, Radio Frequency (RF) links, and so forth. The code segments may be downloaded via computer networks such as the internet, intranet, etc.
It should also be noted that the exemplary embodiments mentioned in this application describe some methods or systems based on a series of steps or devices. However, the present application is not limited to the order of the above-described steps, that is, the steps may be performed in the order mentioned in the embodiments, may be performed in an order different from the order in the embodiments, or may be performed simultaneously.
Aspects of the present application are described above with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the application. It will be understood that each block of the flowchart illustrations and/or block diagrams, and combinations of blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, enable the implementation of the functions/acts specified in the flowchart and/or block diagram block or blocks. Such a processor may be, but is not limited to, a general purpose processor, a special purpose processor, an application specific processor, or a field programmable logic circuit. It will also be understood 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 for performing the specified functions or acts, or combinations of special purpose hardware and computer instructions.
As described above, only the specific embodiments of the present application are provided, and it can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system, the module and the unit described above may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again. It should be understood that the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive various equivalent modifications or substitutions within the technical scope of the present application, and these modifications or substitutions should be covered within the scope of the present application.

Claims (11)

1. A method for invoking a micro-service, comprising:
receiving a service request sent by a tenant, wherein the service request comprises a first tenant identification and micro service interface information of the tenant;
reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between tenant identifications and instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants;
determining a target instance from the instance list according to the first tenant identification;
and calling the micro service interface according to the target instance.
2. The micro-service invocation method according to claim 1, wherein said determining a target instance from the instance list according to the first tenant identity comprises:
when the instance list comprises a dedicated instance corresponding to the first tenant identification, determining that the dedicated instance is the target instance.
3. The micro-service invocation method according to claim 1, wherein said determining a target instance from the instance list according to the first tenant identity comprises:
when the private instance corresponding to the first tenant identification is not included in the instance list, determining that the public instance is the target instance.
4. The microservice invocation method according to any of claims 1-3, wherein the method further comprises:
and when the micro-service is registered, configuring the corresponding relation between the tenant identification of each tenant and the special instance of each tenant, and configuring the common instance shared by each tenant.
5. A microservice invocation device, comprising:
the system comprises a receiving module, a sending module and a processing module, wherein the receiving module is used for receiving a service request sent by a tenant, and the service request comprises a first tenant identification and micro service interface information of the tenant;
the reading module is used for reading an available instance list of the micro service interface corresponding to the micro service interface information; the instance list comprises corresponding relations between tenant identifications and instances; the instances comprise a private instance corresponding to the tenant identification and a public instance shared by multiple tenants;
a determining module, configured to determine a target instance from the instance list according to the first tenant identity;
and the calling module is used for calling the micro-service interface according to the target example.
6. The micro-service invocation device according to claim 5, wherein the determination module is specifically configured to:
when the instance list comprises a dedicated instance corresponding to the first tenant identification, determining that the dedicated instance is the target instance.
7. The micro-service invocation device according to claim 5, wherein the determination module is specifically configured to:
when the private instance corresponding to the first tenant identification is not included in the instance list, determining that the public instance is the target instance.
8. The microservice invocation device according to any of claims 5-7, wherein the device further comprises a configuration module
The configuration module is used for configuring the corresponding relation between the tenant identification of each tenant and the special instance of each tenant and configuring the common instance shared by each tenant when the micro service is registered.
9. An electronic device, comprising: memory, a processor and a computer program stored on the memory and executable on the processor, the computer program, when executed by the processor, implementing a microservice calling method according to any of claims 1 to 4.
10. A computer-readable storage medium, on which an implementation program of information transfer is stored, the program implementing the micro-service invocation method according to any one of claims 1 to 4 when executed by a processor.
11. A computer program product, wherein instructions in the computer program product, when executed by a processor of an electronic device, cause the electronic device to perform the microservice calling method of any of claims 1 to 4.
CN202210044703.9A 2022-01-14 2022-01-14 Method, device, equipment and storage medium for calling micro-service Pending CN114385386A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210044703.9A CN114385386A (en) 2022-01-14 2022-01-14 Method, device, equipment and storage medium for calling micro-service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210044703.9A CN114385386A (en) 2022-01-14 2022-01-14 Method, device, equipment and storage medium for calling micro-service

Publications (1)

Publication Number Publication Date
CN114385386A true CN114385386A (en) 2022-04-22

Family

ID=81201810

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210044703.9A Pending CN114385386A (en) 2022-01-14 2022-01-14 Method, device, equipment and storage medium for calling micro-service

Country Status (1)

Country Link
CN (1) CN114385386A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174688A (en) * 2022-07-29 2022-10-11 中国工商银行股份有限公司 Service calling method and device based on micro-service system and storage medium
CN115361436A (en) * 2022-08-18 2022-11-18 中国工商银行股份有限公司 Starting method and device of personalized service instance and electronic equipment

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115174688A (en) * 2022-07-29 2022-10-11 中国工商银行股份有限公司 Service calling method and device based on micro-service system and storage medium
CN115361436A (en) * 2022-08-18 2022-11-18 中国工商银行股份有限公司 Starting method and device of personalized service instance and electronic equipment

Similar Documents

Publication Publication Date Title
CN114385386A (en) Method, device, equipment and storage medium for calling micro-service
CN109831494B (en) User data management method and device
CN108681459B (en) Firmware updating method, device and system for intelligent hardware equipment
WO2021129008A1 (en) Service invocation method, apparatus and device, and medium
CN110851207A (en) State transition management method and device, electronic equipment and computer readable storage medium
CN113423120A (en) Data distribution processing method and device based on private network terminal and electronic equipment
CN111126935A (en) Processing method and device of security data, electronic equipment and storage medium
CN114090022A (en) System deployment method, device, equipment and computer storage medium
CN115509628A (en) Method, device, equipment and storage medium for calling micro-service
US11395129B2 (en) Virtual sim card acquisition method, subscriber terminal and server
CN113050978B (en) Gray release control method, device and equipment for application and computer storage medium
CN114637525A (en) Method, device, equipment and medium for compatibility of SDK and access application
CN114416306A (en) Service scheduling method, system, computer equipment and readable storage medium
CN113285888A (en) Multi-service system multi-data center shunting method, device, equipment and medium
CN109194734B (en) Message pushing method and device, server and readable storage medium
CN111930626A (en) Automatic testing method and device based on PaaS cloud service
CN113127847A (en) Data management method and device
US20110230231A1 (en) Communication apparatus
CN114071648B (en) Information configuration method, device, equipment and medium
US11687476B2 (en) Management apparatus, management system, management method, and non-transitory computer readable medium
CN112995900B (en) SIM card distribution method, device, server and computer readable storage medium
CN111383025B (en) Method and device for forwarding wind control data and electronic equipment
CN112350931A (en) Service processing method, device, equipment and computer storage medium
CN115878733A (en) Data uploading method, device, equipment and computer storage medium
CN117177231A (en) Method and device for matching number of Internet of things card, electronic equipment and storage 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