CN114238178A - Calling method and device of micro-service architecture, electronic equipment and storage medium - Google Patents
Calling method and device of micro-service architecture, electronic equipment and storage medium Download PDFInfo
- Publication number
- CN114238178A CN114238178A CN202111496750.9A CN202111496750A CN114238178A CN 114238178 A CN114238178 A CN 114238178A CN 202111496750 A CN202111496750 A CN 202111496750A CN 114238178 A CN114238178 A CN 114238178A
- Authority
- CN
- China
- Prior art keywords
- response result
- interface
- request information
- data according
- protocol request
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 60
- 230000004044 response Effects 0.000 claims abstract description 70
- 238000001914 filtration Methods 0.000 claims abstract description 17
- 230000010354 integration Effects 0.000 claims description 17
- 238000004590 computer program Methods 0.000 claims description 14
- 238000012545 processing Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 abstract description 8
- 238000012423 maintenance Methods 0.000 abstract description 7
- 230000008569 process Effects 0.000 description 19
- 238000004891 communication Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 7
- 230000009471 action Effects 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 6
- 238000004364 calculation method Methods 0.000 description 4
- 230000003993 interaction Effects 0.000 description 3
- 230000006399 behavior Effects 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012986 modification Methods 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000005540 biological transmission Effects 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 238000012827 research and development Methods 0.000 description 1
- 230000011664 signaling Effects 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/12—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor
- G06F13/124—Program control for peripheral devices using hardware independent of the central processor, e.g. channel or peripheral processor where hardware is a sequential transfer control unit, e.g. microprocessor, peripheral processor or state-machine
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Microelectronics & Electronic Packaging (AREA)
- Computer And Data Communications (AREA)
Abstract
The embodiment of the application provides a calling method and device of a micro service architecture, electronic equipment and a storage medium, wherein the method comprises the following steps: receiving protocol request information of external micro-services; acquiring interface data according to the protocol request information; integrating interface data according to the protocol request information to obtain an initial response result; filtering the initial response result to obtain a response result; and sending the response result to the external micro service. By implementing the embodiment of the application, a plurality of interfaces with single functions can be freely combined together for calling, so that the calling of the multiple interfaces is simplified, and the maintenance cost is reduced.
Description
Technical Field
The present application relates to the field of interface invocation technologies, and in particular, to a method and an apparatus for invoking a micro service architecture, an electronic device, and a computer-readable storage medium.
Background
Under the industrial background of frequent service change and rapid development, the micro-service architecture is a good solution, and the agility, flexibility and precision elasticity of the micro-service architecture bring convenience to service development. The aim of decoupling the modules is to enable each service to realize a single service as much as possible so as to ensure the universality and reusability of each service.
However, with the increasing complexity of business logic, a single service cannot meet the requirement, and often needs to combine business logic and call multiple interfaces simultaneously, because of more and more protocols, the interfacing between the multiple interfaces is increasingly complex, the maintenance cost is increased, and the reliability of the system is deteriorated.
Disclosure of Invention
An object of the embodiments of the present application is to provide a method and an apparatus for invoking a micro service architecture, an electronic device, and a computer-readable storage medium, which can freely combine a plurality of interfaces with a single function together for invoking, so that invoking of multiple interfaces is simplified, and maintenance cost is reduced.
In a first aspect, an embodiment of the present application provides a method for invoking a micro service architecture, where the method includes:
receiving protocol request information of external micro-services;
acquiring interface data according to the protocol request information;
integrating the interface data according to the protocol request information to obtain an initial response result;
filtering the initial response result to obtain a response result;
and sending the response result to the external micro service.
In the implementation process, the interface data of the plurality of interfaces can be combined together by integrating the interface data, so that complex programs of calling and combining the plurality of interfaces are avoided, the maintenance cost is reduced, the calculation space occupied by combining the plurality of interfaces is reduced, and the system can operate stably.
Further, the step of obtaining interface data according to the protocol request information includes:
acquiring parameters and request data in the protocol request information;
calibrating the request data according to the parameters to obtain calibration data;
and converting the calibration data to obtain the interface data.
In the implementation process, the request is calibrated according to the parameters, so that the request data which do not conform to the protocol request information in the request data can be removed, the invalid conversion of the request data which do not conform to the protocol request information in the subsequent data conversion is avoided, and the authenticity and the validity of the interface data are ensured.
Further, the step of integrating the interface data according to the protocol request information to obtain an initial response result includes:
acquiring an interface identifier in the protocol request information;
and integrating the interface data according to the interface identification to obtain the initial response result.
In the implementation process, the interface identification contains necessary information in the interface data, and the interface data to be integrated is integrated according to the interface identification, so that the complex process of multi-interface combination is reduced, and the integration efficiency is effectively improved.
Further, the step of integrating the interface data according to the interface identifier to obtain the initial response result includes:
acquiring logic layer information of the interface identifier;
and integrating the interface data according to the interface execution sequence and the interface dependency relationship in the logic layer information to obtain the initial response result.
In the implementation process, the interface data with the same logic layer information are integrated, so that the time for searching and matching the interface data can be shortened, and the accuracy and the efficiency of integration are ensured.
Further, the step of filtering the initial response result to obtain a response result includes:
and inputting the initial response result into a post filter and an error filter in sequence to obtain a response result.
In the implementation process, invalid and wrong initial response results can be filtered out through the filtering action of the post-filter and the error filter, so that the obtained response results are in accordance with the interface identification, secondary filtering of the response results by external micro-services is avoided, and time is saved.
In a second aspect, an embodiment of the present application further provides an apparatus for invoking a micro service architecture, where the apparatus includes:
the receiving module is used for receiving protocol request information of the external micro-service;
the processing module is used for acquiring interface data according to the protocol request information;
the integration module is used for integrating the interface data according to the protocol request information to obtain an initial response result;
the filtering module is used for filtering the initial response result to obtain a response result;
and the sending module is used for sending the response result to the external micro-service.
In the implementation process, the interface data of the plurality of interfaces can be combined together by integrating the interface data, so that complex programs of calling and combining the plurality of interfaces are avoided, the maintenance cost is reduced, the calculation space occupied by combining the plurality of interfaces is reduced, and the system can operate stably.
Further, the integration module is to:
acquiring an interface identifier in the protocol request information;
and integrating the interface data according to the interface identification to obtain the initial response result.
Further, the integration module is further configured to:
acquiring logic layer information of the interface identifier;
and integrating the interface data according to the interface execution sequence and the interface dependency relationship in the logic layer information to obtain the initial response result.
In the implementation process, the interface identification contains necessary information in the interface data, and the interface data to be integrated is integrated according to the interface identification, so that the complex process of multi-interface combination is reduced, and the integration efficiency is effectively improved. The interface data with the same logic layer information can be integrated by acquiring the logic layer information, so that the time for searching and matching the interface data is reduced, and the accuracy and the efficiency of integration are ensured.
In a third aspect, an electronic device provided in an embodiment of the present application includes: memory, a processor and a computer program stored in the memory and executable on the processor, the processor implementing the steps of the method according to any of the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, cause the computer to perform the method according to any one of the first aspect.
In a fifth aspect, embodiments of the present application provide a computer program product, which when run on a computer, causes the computer to perform the method according to any one of the first aspect.
Additional features and advantages of the disclosure will be set forth in the description which follows, or in part may be learned by the practice of the above-described techniques of the disclosure, or may be learned by practice of the disclosure.
The present invention can be implemented in accordance with the content of the specification, and the following detailed description of the preferred embodiments of the present application is made with reference to the accompanying drawings.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic flowchart of a method for invoking a micro service architecture according to an embodiment of the present disclosure;
fig. 2 is a schematic structural diagram of a calling device of a micro service architecture according to an embodiment of the present disclosure;
fig. 3 is a schematic structural component diagram of an electronic device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application.
It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures. Meanwhile, in the description of the present application, the terms "first", "second", and the like are used only for distinguishing the description, and are not to be construed as indicating or implying relative importance.
The following detailed description of embodiments of the present application will be described in conjunction with the accompanying drawings and examples. The following examples are intended to illustrate the present application but are not intended to limit the scope of the present application.
Example one
Fig. 1 is a schematic flowchart of a method for invoking a micro service architecture according to an embodiment of the present application, where as shown in fig. 1, the method includes:
s1, receiving protocol request information of external micro service;
s2, obtaining interface data according to the protocol request information;
s3, integrating the interface data according to the protocol request information to obtain an initial response result;
s4, filtering the initial response result to obtain a response result;
and S5, sending the response result to the external micro service.
Taking this embodiment as an example, by integrating the interface data, the interface data of the multiple interfaces can be combined together, so that a complex program for calling and combining the multiple interfaces is avoided, the maintenance cost is reduced, the calculation space required to be occupied by combining the multiple interfaces is reduced, and the system can operate stably. The Protocol includes, but is not limited to, HyperText Transfer Protocol (HTTP Protocol), Domain Name System (DNS) Protocol, File Transfer Protocol (FTP Protocol), and the like.
In this embodiment, the protocol request message at least includes external microservice information and architecture information of the external microservice architecture. Additionally, target microservice information for internal microservices interfaced by external microservices may also be included.
Micro-service: the micro-service is a program, i.e. a service, which divides an application of a single architecture into individual and independent running programs according to business.
Micro-service architecture: a large single application and service is split into several or even tens of supporting microservices that can extend a single component rather than the entire application stack to meet service level agreements.
Further, S2 includes:
acquiring parameters and request data in protocol request information;
calibrating the request data according to the parameters to obtain calibration data;
and converting the calibration data to obtain interface data.
Taking this embodiment as an example, the request is calibrated according to the parameters, so that the request data that does not conform to the protocol request information in the request data can be removed, the request data that does not conform to the protocol request information is prevented from being subjected to invalid conversion by subsequent data conversion, and the authenticity and validity of the interface data are ensured.
And converting the calibration data according to a preset conversion method between the two micro-service architectures, namely the architecture types of the external micro-service and the internal micro-service, and generating interface data supported by the current micro-service architecture. The interface data is generated by converting the calibration data based on the external micro-service architecture and the internal micro-service architecture of the external micro-service, and therefore, the interface data may include architecture information corresponding to the external micro-service architecture and target micro-service information as the internal micro-service.
Further, S3 includes:
acquiring an interface identifier in protocol request information;
and integrating the interface data according to the interface identification to obtain an initial response result.
Taking this embodiment as an example, the interface identifier includes necessary information in the interface data, and the interface data to be integrated is integrated according to the interface identifier, so that a tedious process of combining multiple interfaces is reduced, and the integration efficiency is effectively improved.
Specifically, in a scenario of executing a service process, the external micro service may be a service application in the service system that performs a specific function, and the request data may include at least an interface identifier of the external micro service, for example, the interface identifier of the external micro service may be identified by predefined codes or text information. Illustratively, the interface identification of the micro service center for handling hospital traffic may be represented by a numerical code "001" or the literal information "hospital name".
The request data of the micro service architecture to which the external micro service belongs at least comprises an interface identifier of the external micro service architecture and architecture type information of the external micro service architecture. Illustratively, the micro-service architecture type to which the external micro-service belongs may be one of Spring, Cloud, Dubbo, and Golang, among others.
Further, the step of integrating the interface data according to the interface identifier to obtain an initial response result includes:
acquiring logic layer information of an interface identifier;
and integrating interface data according to the interface execution sequence and the interface dependency relationship in the logic layer information to obtain the initial response result.
Taking this embodiment as an example, by integrating the interface data with the same logical layer information, the time for searching and matching the interface data can be reduced, and the accuracy and efficiency of integration can be ensured.
Specifically, the logic layer information of the interface identifier is obtained, the interface data are sequentially selected according to the interface execution sequence in the logic layer information, the interface dependency relationship of the interface data is integrated, the interface data with the same interface dependency relationship, i.e., the interface data with the same logic layer information are integrated, the interface data with different interfaces are integrated into an initial response result, and therefore, the initial response result includes virtual execution result information of the internal micro service corresponding to the external micro service architecture, and the external micro service information receiving the initial response result.
Further, S4 includes:
and inputting the initial response result into a post filter and an error filter in sequence to obtain a response result. And sending the response result to the external micro-service to complete the call of the interface between the micro-service architectures.
Taking this embodiment as an example, by the filtering action of the post-filter and the error filter, the invalid and erroneous initial response result can be filtered out, so that the obtained response result is in accordance with the interface identifier, and the response result does not need to be filtered by the external micro-service for the second time, thereby saving time.
Specifically, in a specific embodiment, in the process of processing data of a doctor, a hospital and a patient, the micro-service for processing various patient hospitalization information and data is an external micro-service, and the micro-service for processing medical information and data of the hospital and the doctor is an internal micro-service, where the external micro-service and the internal micro-service may be based on multiple micro-service architectures, for example, the external micro-service may be based on a Dubbo architecture, and the internal micro-service may be based on a Spring Cloud architecture, so that after a patient selects a hospitalization behavior to be performed on the terminal device, corresponding generation request information is configured to the hospital or the doctor through the gateway, thereby querying the hospitalization behavior selected by the patient.
Since the external microservice and the internal microservice are respectively based on different microservice architectures, when calling, the microservice calling method in the embodiment of the application is executed through the virtual service of the internal microservice, so as to realize calling.
According to the method and the device for converting the micro-service, the request data in the calling protocol request information are converted according to the preset conversion method between the micro-service architectures, and the interface data corresponding to the protocol supported by the current micro-service architecture are generated, so that the micro-service between different micro-service architectures can be directly called originally when being called, the micro-service interaction efficiency between different architectures is improved, and meanwhile, the research and development cost is reduced.
Example two
In order to execute a corresponding method of the foregoing embodiments to achieve corresponding functions and technical effects, the following provides a calling apparatus of a micro service architecture, as shown in fig. 2, the apparatus including:
the receiving module 1 is used for receiving protocol request information of external micro-services;
the processing module 2 is used for acquiring interface data according to the protocol request information;
the integration module 3 is used for integrating the interface data according to the protocol request information to obtain an initial response result;
the filtering module 4 is used for filtering the initial response result to obtain a response result;
and the sending module 5 is used for sending the response result to the external micro-service.
In the implementation process, the interface data of the plurality of interfaces can be combined together by integrating the interface data, so that complex programs of calling and combining the plurality of interfaces are avoided, the maintenance cost is reduced, the calculation space occupied by combining the plurality of interfaces is reduced, and the system can operate stably.
Further, the processing module 2 is configured to:
acquiring parameters and request data in protocol request information;
calibrating the request data according to the parameters to obtain calibration data;
and converting the calibration data to obtain interface data.
Further, the integration module 3 is configured to:
acquiring an interface identifier in protocol request information;
and integrating the interface data according to the interface identification to obtain an initial response result.
Further, the integration module 3 is also configured to:
acquiring logic layer information of an interface identifier;
and integrating the interface data according to the interface execution sequence and the interface dependency relationship in the logic layer information to obtain an initial response result.
In the implementation process, the interface identification contains necessary information in the interface data, and the interface data to be integrated is integrated according to the interface identification, so that the complex process of multi-interface combination is reduced, and the integration efficiency is effectively improved. The interface data with the same logic layer information can be integrated by acquiring the logic layer information, so that the time for searching and matching the interface data is reduced, and the accuracy and the efficiency of integration are ensured.
Further, the filter module 4 is configured to:
and inputting the initial response result into a post filter and an error filter in sequence to obtain a response result.
In the implementation process, invalid and wrong initial response results can be filtered out through the filtering action of the post-filter and the error filter, so that the obtained response results are in accordance with the interface identification, secondary filtering of the response results by external micro-services is avoided, and time is saved.
The calling device of the microservice architecture can implement the method of the first embodiment. The alternatives in the first embodiment are also applicable to the present embodiment, and are not described in detail here.
The rest of the embodiments of the present application may refer to the contents of the first embodiment, and in this embodiment, details are not repeated.
EXAMPLE III
An embodiment of the present application provides an electronic device, which includes a memory and a processor, where the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the method for invoking the micro service architecture according to the first embodiment.
Alternatively, the electronic device may be a server.
Referring to fig. 3, fig. 3 is a schematic structural composition diagram of an electronic device according to an embodiment of the present disclosure. The electronic device may include a processor 31, a communication interface 32, a memory 33, and at least one communication bus 34. Wherein the communication bus 34 is used for realizing direct connection communication of these components. The communication interface 32 of the device in the embodiment of the present application is used for performing signaling or data communication with other node devices. The processor 31 may be an integrated circuit chip having signal processing capabilities.
The Processor 31 may be a general-purpose Processor, including a Central Processing Unit (CPU), a Network Processor (NP), and the like; but may also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic, discrete hardware components. The various methods, steps, and logic blocks disclosed in the embodiments of the present application may be implemented or performed. A general purpose processor may be a microprocessor or the processor 31 may be any conventional processor or the like.
The Memory 33 may be, but is not limited to, a Random Access Memory (RAM), a Read Only Memory (ROM), a Programmable Read-Only Memory (PROM), an Erasable Read-Only Memory (EPROM), an electrically Erasable Read-Only Memory (EEPROM), and the like. The memory 33 has stored therein computer readable instructions which, when executed by the processor 31, enable the apparatus to perform the various steps involved in the method embodiment of fig. 1 described above.
Optionally, the electronic device may further include a memory controller, an input output unit. The memory 33, the memory controller, the processor 31, the peripheral interface, and the input/output unit are electrically connected to each other directly or indirectly to realize data transmission or interaction. For example, these components may be electrically connected to each other via one or more communication buses 34. The processor 31 is adapted to execute executable modules stored in the memory 33, such as software functional modules or computer programs comprised by the device.
The input and output unit is used for providing a task for a user to create and start an optional time period or preset execution time for the task creation so as to realize the interaction between the user and the server. The input/output unit may be, but is not limited to, a mouse, a keyboard, and the like.
It will be appreciated that the configuration shown in fig. 3 is merely illustrative and that the electronic device may include more or fewer components than shown in fig. 3 or have a different configuration than shown in fig. 3. The components shown in fig. 3 may be implemented in hardware, software, or a combination thereof.
In addition, an embodiment of the present application further provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the computer program implements the method for invoking the micro service architecture according to the first embodiment.
Embodiments of the present application further provide a computer program product, which when running on a computer, causes the computer to execute the method described in the method embodiments.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method can be implemented in other ways. The apparatus embodiments described above are merely illustrative, and for example, the flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of apparatus, 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.
In addition, functional modules in the embodiments of the present application may be integrated together to form an independent part, or each module may exist separately, or two or more modules may be integrated to form an independent part.
The functions, if implemented in the form of software functional modules and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only an example of the present application and is not intended to limit the scope of the present application, and various modifications and changes may be made by those skilled in the art. Any modification, equivalent replacement, improvement and the like made within the spirit and principle of the present application shall be included in the protection scope of the present application. It should be noted that: like reference numbers and letters refer to like items in the following figures, and thus, once an item is defined in one figure, it need not be further defined and explained in subsequent figures.
The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.
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 an … …" does not exclude the presence of other identical elements in a process, method, article, or apparatus that comprises the element.
Claims (10)
1. A calling method of a micro service architecture, the method comprising:
receiving protocol request information of external micro-services;
acquiring interface data according to the protocol request information;
integrating the interface data according to the protocol request information to obtain an initial response result;
filtering the initial response result to obtain a response result;
and sending the response result to the external micro service.
2. The calling method of micro service architecture according to claim 1, wherein the step of obtaining interface data according to the protocol request information comprises:
acquiring parameters and request data in the protocol request information;
calibrating the request data according to the parameters to obtain calibration data;
and converting the calibration data to obtain the interface data.
3. The method for invoking micro service architecture according to claim 1, wherein the step of integrating the interface data according to the protocol request information to obtain an initial response result comprises:
acquiring an interface identifier in the protocol request information;
and integrating the interface data according to the interface identification to obtain the initial response result.
4. The method for invoking micro service architecture according to claim 3, wherein the step of integrating the interface data according to the interface identifier to obtain the initial response result comprises:
acquiring logic layer information of the interface identifier;
and integrating the interface data according to the interface execution sequence and the interface dependency relationship in the logic layer information to obtain the initial response result.
5. The method for invoking micro service architecture according to claim 1, wherein the step of filtering the initial response result to obtain a response result comprises:
and inputting the initial response result into a post filter and an error filter in sequence to obtain a response result.
6. An apparatus for invoking a microservice architecture, the apparatus comprising:
the receiving module is used for receiving protocol request information of the external micro-service;
the processing module is used for acquiring interface data according to the protocol request information;
the integration module is used for integrating the interface data according to the protocol request information to obtain an initial response result;
the filtering module is used for filtering the initial response result to obtain a response result;
and the sending module is used for sending the response result to the external micro-service.
7. The calling apparatus of microservice architecture of claim 6, wherein the integration module is configured to:
acquiring an interface identifier in the protocol request information;
and integrating the interface data according to the interface identification to obtain the initial response result.
8. The calling apparatus of microservice architecture of claim 6, wherein the integration module is further configured to:
acquiring logic layer information of the interface identifier;
and integrating the interface data according to the interface execution sequence and the interface dependency relationship in the logic layer information to obtain the initial response result.
9. An electronic device comprising a memory for storing a computer program and a processor for executing the computer program to cause the electronic device to perform the calling method of the micro service architecture according to any one of claims 1-5.
10. A computer-readable storage medium, characterized in that it stores a computer program which, when executed by a processor, implements the calling method of the microservice architecture of any of claims 1 to 5.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111496750.9A CN114238178A (en) | 2021-12-09 | 2021-12-09 | Calling method and device of micro-service architecture, electronic equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111496750.9A CN114238178A (en) | 2021-12-09 | 2021-12-09 | Calling method and device of micro-service architecture, electronic equipment and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN114238178A true CN114238178A (en) | 2022-03-25 |
Family
ID=80754205
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111496750.9A Pending CN114238178A (en) | 2021-12-09 | 2021-12-09 | Calling method and device of micro-service architecture, electronic equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114238178A (en) |
Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107835178A (en) * | 2017-11-13 | 2018-03-23 | 北京奇艺世纪科技有限公司 | A kind of multi-protocols communication for service method, apparatus and electronic equipment |
CN112214334A (en) * | 2020-09-28 | 2021-01-12 | 亚信科技(中国)有限公司 | Micro-service calling method and device, electronic equipment and computer-readable storage medium |
CN112822298A (en) * | 2021-04-19 | 2021-05-18 | 北京世纪好未来教育科技有限公司 | Business service capacity expansion and reduction method, device, medium and electronic equipment |
CN113672896A (en) * | 2021-07-08 | 2021-11-19 | 浙江大华技术股份有限公司 | Interface authority verification method, system, electronic device and storage medium |
CN113726869A (en) * | 2021-08-26 | 2021-11-30 | 阿里巴巴(中国)有限公司 | Communication method, gateway and electronic equipment |
-
2021
- 2021-12-09 CN CN202111496750.9A patent/CN114238178A/en active Pending
Patent Citations (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN107835178A (en) * | 2017-11-13 | 2018-03-23 | 北京奇艺世纪科技有限公司 | A kind of multi-protocols communication for service method, apparatus and electronic equipment |
CN112214334A (en) * | 2020-09-28 | 2021-01-12 | 亚信科技(中国)有限公司 | Micro-service calling method and device, electronic equipment and computer-readable storage medium |
CN112822298A (en) * | 2021-04-19 | 2021-05-18 | 北京世纪好未来教育科技有限公司 | Business service capacity expansion and reduction method, device, medium and electronic equipment |
CN113672896A (en) * | 2021-07-08 | 2021-11-19 | 浙江大华技术股份有限公司 | Interface authority verification method, system, electronic device and storage medium |
CN113726869A (en) * | 2021-08-26 | 2021-11-30 | 阿里巴巴(中国)有限公司 | Communication method, gateway and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP3370391B1 (en) | System for data cleansing based aggregation and prioritization of it asset field values from real-time event logs and method thereof | |
CN111580884B (en) | Configuration updating method, device, server and electronic equipment | |
CN108170578B (en) | Log collection method and device | |
CN110601880B (en) | Cloud platform, service processing method, command interface and computer equipment | |
US8244908B2 (en) | System, method and program for distributed event detection | |
CN110474903B (en) | Trusted data acquisition method and device and block link point | |
CN111399756A (en) | Data storage method, data downloading method and device | |
WO2019223136A1 (en) | Data acquisition method and apparatus, and computer device and storage medium | |
CN111225018A (en) | Request message processing method and device and electronic equipment | |
CN111988418B (en) | Data processing method, device, equipment and computer readable storage medium | |
US10715628B2 (en) | Attribute operating method and device | |
CN106936660B (en) | Data acquisition method and device | |
CN112506681B (en) | Parameter calling method and device, electronic equipment and storage medium | |
CN114138877A (en) | Method, device and equipment for realizing theme data service based on micro-service architecture | |
CN114238178A (en) | Calling method and device of micro-service architecture, electronic equipment and storage medium | |
CN116668535A (en) | Service execution method, device and equipment based on enhanced service architecture | |
CN111177269A (en) | Block chain data storage and acquisition method and device based on structuralization | |
CN111652580B (en) | Method and device for processing data of nodes | |
CN114020772A (en) | Query condition configuration method, system, electronic device and storage medium | |
CN113094574A (en) | Information query method and device, electronic equipment and readable storage medium | |
CN112052267A (en) | Data query method, equipment, server and storage medium | |
CN107943539B (en) | Application page starting method and application page starting device | |
CN112866351A (en) | Data interaction method, device, server and storage medium | |
CN112597059A (en) | Page element testing method, system and medium based on test case | |
CN111367634A (en) | Information processing method, information processing device and terminal equipment |
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 | ||
CB03 | Change of inventor or designer information | ||
CB03 | Change of inventor or designer information |
Inventor after: Luo Ligang Inventor after: Chang Tao Inventor after: Cheng Penghui Inventor before: Luo Ligang Inventor before: Chang Tao |