CN115202750A - Interface service calling method, device, management platform and medium based on micro service - Google Patents

Interface service calling method, device, management platform and medium based on micro service Download PDF

Info

Publication number
CN115202750A
CN115202750A CN202210712732.8A CN202210712732A CN115202750A CN 115202750 A CN115202750 A CN 115202750A CN 202210712732 A CN202210712732 A CN 202210712732A CN 115202750 A CN115202750 A CN 115202750A
Authority
CN
China
Prior art keywords
interface
service
calling
access instruction
query
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
CN202210712732.8A
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.)
Shenzhen Coocaa Network Technology Co Ltd
Original Assignee
Shenzhen Coocaa Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Coocaa Network Technology Co Ltd filed Critical Shenzhen Coocaa Network Technology Co Ltd
Priority to CN202210712732.8A priority Critical patent/CN115202750A/en
Publication of CN115202750A publication Critical patent/CN115202750A/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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/24Querying
    • G06F16/245Query processing
    • G06F16/2455Query execution
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/955Retrieval from the web using information identifiers, e.g. uniform resource locators [URL]
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44505Configuring for program initiating, e.g. using registry, configuration files
    • G06F9/4451User profiles; Roaming
    • 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/44Arrangements for executing specific programs
    • G06F9/445Program loading or initiating
    • G06F9/44521Dynamic linking or loading; Link editing at or after load time, e.g. Java class loading
    • G06F9/44526Plug-ins; Add-ons

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Computational Linguistics (AREA)
  • Stored Programmes (AREA)

Abstract

The application is applicable to the technical field of interface services, and particularly relates to a method, a device, a management platform and a medium for calling an interface service based on a micro service. The method is used for an interface service management platform, the interface service management platform comprises a configuration management layer and an interface calling layer, an access instruction is generated by using the configuration management layer according to acquired configuration parameters configured by a user, the service type of the access instruction is identified by using the interface calling layer, a service checking plug-in matched with the service type is called, the processing type configured by the user in the access instruction is extracted after the checking is passed, a preprocessing plug-in matched with the processing type is called to obtain a query type, and an execution query plug-in matched with the query type is called to execute query operation, so that the calling of the interface is realized in a plug-in form.

Description

Interface service calling method, device, management platform and medium based on micro service
Technical Field
The application is applicable to the technical field of interface services, and particularly relates to a method, a device, a management platform and a medium for calling an interface service based on a micro service.
Background
At present, a plurality of frameworks for rapidly developing services exist in the current market, the frameworks are used for developing independent interface services, the deployed services are fewer and better managed, when the data volume of the deployed services is gradually increased, the final result is that the maintenance cost is increased, interface service information provided to the outside cannot be inquired from the macro level, and the interface service information can only be manually maintained manually. In order to merge the use requirements of different services, it is usually necessary to maintain more service interfaces to implement the call of different services, and it is a prerequisite to implement the convergence of multiple services by using a unified interface management platform to perform unified monitoring, statistics, and management on these interfaces. However, the existing interface management platform has a low management degree for interface services, and only can realize some basic management functions, such as integrated use, integrated development, and the like, the platform needs special operation and maintenance management, has less automation and functions, and cannot meet the requirements of low operation and maintenance and light weight, and the platform needs to be stopped and updated and released to the whole body to use if the function needs to be updated, and the updated functions are usually very small, which results in poor management efficiency of the management platform and is not beneficial to use. Therefore, how to reasonably configure the framework of the management platform makes it a problem to be solved urgently to improve the management efficiency and ensure the normal use of the interface call.
Disclosure of Invention
In view of this, embodiments of the present application provide a method, an apparatus, a management platform, and a medium for invoking an interface service based on a microservice, so as to solve a problem how to reasonably configure a framework of the management platform, so that the management efficiency is improved, and meanwhile, normal use of the interface invocation is ensured.
In a first aspect, an embodiment of the present application provides an interface service calling method based on a microservice, where the interface service calling method is applied to an interface service management platform, the interface service management platform includes a configuration management layer and an interface calling layer, and the method includes:
acquiring configuration parameters configured by a user by using the configuration management layer, and generating an access instruction according to the configuration parameters;
using the interface calling layer to perform service identification on the access instruction, determining a corresponding service type, and calling a service verification plug-in matched with the service type to verify the access instruction; after the verification is passed, extracting the processing type configured by the user in the access instruction, and calling a preprocessing plug-in matched with the processing type to preprocess the access instruction to obtain a query type; and calling an execution query plug-in matched with the query type to execute the query operation, and feeding back the result of the query operation.
In a second aspect, an embodiment of the present application provides an interface service invoking apparatus based on a microservice, where the interface service invoking apparatus is applied to an interface service management platform, the interface service management platform includes a configuration management layer and an interface invoking layer, and the apparatus includes:
the configuration management module is used for acquiring configuration parameters configured by a user by using the configuration management layer and generating an access instruction according to the configuration parameters;
the interface calling module is used for carrying out service identification on the access instruction by using the interface calling layer, determining a corresponding service type, and calling a service verification plug-in matched with the service type to verify the access instruction; after the verification is passed, extracting the processing type configured by the user in the access instruction, and calling a preprocessing plug-in matched with the processing type to preprocess the access instruction to obtain a query type; and calling an execution query plug-in matched with the query type to execute the query operation, and feeding back the result of the query operation.
In a third aspect, an embodiment of the present application provides an interface service management platform, where the interface service management platform includes a processor, a memory, and a computer program stored in the memory and executable on the processor, and the processor implements the interface service calling method according to the first aspect when executing the computer program.
In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, where a computer program is stored, and the computer program, when executed by a processor, implements the interface service invoking method according to the first aspect.
Compared with the prior art, the embodiment of the application has the beneficial effects that: the method is used for the interface service management platform, the interface service management platform comprises a configuration management layer and an interface calling layer, the configuration management layer is used for obtaining configuration parameters configured by a user, an access instruction is generated according to the configuration parameters, the interface calling layer is used for carrying out service identification on the access instruction, the corresponding service type is determined, a service checking plug-in matched with the service type is called to check the access instruction, after the check is passed, the processing type configured by the user in the access instruction is extracted, the preprocessing plug-in matched with the processing type is called to preprocess the access instruction, the query type is obtained, an execution query plug-in matched with the query type is called to execute query operation, and the result of the query operation is fed back, so that the interface is called in a plug-in mode, due to the characteristics of the plug-in, an updated function can be added to the interface calling layer in the plug-in mode, so that the management of the interface service management platform is facilitated, and the calling of the interface can be effectively realized.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required to be used in the embodiments or the prior art description will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and for those skilled in the art, other drawings may be obtained according to these drawings without inventive labor.
Fig. 1 is a schematic application environment diagram of an interface service calling method based on microservice according to an embodiment of the present application;
fig. 2 is a schematic flowchart of a method for invoking an interface service based on a microservice according to a second embodiment of the present application;
fig. 3 is a schematic structural diagram of an interface service invoking device based on a microservice according to a third embodiment of the present application;
fig. 4 is a schematic structural diagram of an interface service management platform according to a fourth embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather mean "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless otherwise specifically stated.
It should be understood that, the sequence numbers of the steps in the following embodiments do not mean the execution sequence, and the execution sequence of each process should be determined by the function and the inherent logic of the process, and should not constitute any limitation to the implementation process of the embodiments of the present application.
In order to explain the technical means of the present application, the following description will be given by way of specific examples.
The configuration-based interface development method provided in the embodiment of the present application can be applied to the application environment shown in fig. 1, where a client communicates with a server. The client includes, but is not limited to, a smart television, a palm top computer, a desktop computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, a cloud terminal device, a Personal Digital Assistant (PDA), and other terminal devices. The server can be implemented by an independent server or a server cluster composed of a plurality of servers.
Referring to fig. 2, a schematic flowchart of an interface service invoking method based on micro-services according to an embodiment of the present application is shown, where the method is applied to an interface service management platform, and the interface service management platform includes a configuration management layer and an interface invoking layer. The configuration management layer and the interface calling layer are constructed based on a micro-service framework, service functions can be modularized, and management efficiency is improved. As shown in fig. 2, the interface service calling method may include the steps of:
step S201, using the configuration management layer to obtain the configuration parameters configured by the user, and generating an access instruction according to the configuration parameters.
In this application, the interface service management platform may be developed based on a spring cloud back-end micro-service framework and a front-end vue framework. The configuration management layer can be used for supporting a corresponding configuration page, so that a user can perform operations such as parameter configuration and the like through the configuration page, and the configuration management layer can acquire configuration parameters configured by the user.
The configuration parameters may refer to an interface name, an interface entry parameter, an interface exit parameter, a Uniform Resource Locator (URL) of the interface, an identification number (ID) of the interface, and necessary parameters that enable the interface to normally operate, such as a plug-in parameter to be called and an authentication parameter, and in addition, other types of parameters may be configured according to actual requirements to meet diversified interface configuration requirements.
The access instruction can be an instruction which can be used for realizing interface calling by generating corresponding information such as access links according to the configuration parameters and forwarding the access instruction to the interface calling layer through the gateway.
In an embodiment, the access instruction may be a URL generated according to the configuration parameter.
Optionally, before the configuration management layer obtains the configuration parameters configured by the user and generates the access instruction according to the configuration parameters, the method further includes:
the method comprises the steps that when interface viewing operation of a user is obtained, a configuration management layer obtains configuration information of at least one historical interface;
displaying the configuration information of each historical interface, and collecting a multiplexing trigger instruction of a user to any historical interface;
displaying parameters of a historical interface corresponding to the multiplexing trigger instruction, and adopting parameters modified by a user on the parameters of the historical interface;
and taking the modified parameters as configuration parameters configured by a user.
The configuration management layer can store information of some historical interfaces, including configuration information, when a user needs to check, the configuration information of the historical interfaces can be displayed through pages supported by the user, and the user can select the historical interfaces, namely, the used interfaces are reused.
On the basis, if the user only needs to reuse part of the configuration of the historical interface, the parameters of the interface can be modified, so that the configuration parameters configured by the user can be formed for subsequent instruction generation.
The configuration management layer can support the man-machine interaction between a user and a page, so that the user can conveniently select, configure and the like, and the configuration efficiency of the user is improved.
Optionally, after the configuration information of the at least one history interface is obtained, the method further includes:
acquiring use information of each historical interface, wherein the use information comprises access frequency, an abnormal constant and hit cache number of the interface;
and when a detailed information viewing instruction of a user to any historical interface is acquired, displaying the access frequency, the abnormal constant and the hit cache number of the corresponding historical interface.
The configuration management layer may further store usage information of the historical interface, where the usage information may include information that can characterize performance characteristics of the historical interface, such as access frequency, an exception number, a number of hit caches, and the like. The use information is displayed, so that a user can visually observe the performance of the historical interface, the user can be helped to select and configure the interface, and the efficiency of user configuration is improved.
Step S202, using an interface calling layer to perform service identification on the access instruction, determining a corresponding service type, and calling a service verification plug-in matched with the service type to verify the access instruction.
In the application, the interface calling layer can be used for supporting corresponding functions of service identification, service verification, preprocessing, query execution, data output and the like, the functions are set in sequence, and in order to realize interface calling, the functions are executed in sequence. The service type and the service verification plug-in are in a mapping relation, and the corresponding service verification plug-in can be called based on the service type.
And setting a corresponding service identification function according to the overall planning requirement of the interface service management platform, so that the interface service management platform can identify different types of interfaces as far as possible, and the service breadth is improved. The service identification may identify a user-defined Structured Query Language (SQL), an algorithm model, a subscription, and the like, and of course, include other services, and may also extend more types of services, only some of which are listed here.
In particular, the term "other services" refers to services compatible with existing services, which are independently deployed at interfaces of a server, which have no generality or are more complex and difficult to maintain secondarily, and if the services are identified as other services, subsequent steps such as service checking and preprocessing may not be required to be performed, while the remaining services refer to steps capable of performing unified data processing, and are more general interfaces capable of uniformly performing service checking, preprocessing, query execution and data output.
The service verification may refer to verifying the access instruction, and the verification method may include multiple types of service verification plug-ins each packaged as a corresponding service verification plug-in, for example, the service verification plug-in includes plug-ins such as a filter chain, service authentication, cache, service policy, and the like, and the corresponding service verification plug-in may be invoked for verification according to configuration parameters configured by the user in the access instruction.
The checking method is packaged in a plug-in mode, so that the maintenance of the checking method can be facilitated, the checking method can be added, deleted, changed and checked in the plug-in mode at any time, meanwhile, a user can conveniently call the checking method in a parameter configuration mode, an interface is not bound with checking, and the checking method can be configured at will according to requirements.
And step S203, after the verification is passed, extracting the processing type configured by the user in the access instruction, and calling a preprocessing plug-in matched with the processing type to preprocess the access instruction to obtain the query type.
In the application, after the verification is passed, the access instruction needs to be preprocessed by adopting a corresponding processing method, so that the preparation work before the interface is called is realized. The preprocessing is to process the request information of interface calling for calling, and each processing method in the preprocessing is packaged into a corresponding preprocessing plug-in, for example, the preprocessing plug-in includes plug-ins such as SQL assembly, assembly parameters, whether caching processing is performed, subscription push processing and the like, and the corresponding preprocessing plug-in can be called for processing according to configuration parameters configured by a user in an access instruction. The processing type and the preprocessing plug-in are in a mapping relation, and the corresponding preprocessing plug-in can be called based on the processing type.
The processing method is packaged into a plug-in form, so that the processing method can be maintained, the processing method can be added, deleted, changed and checked in the plug-in form at any time, meanwhile, a user can conveniently call the processing method in a parameter configuration mode, an interface is not bound with the processing method any more, and the processing method can be configured at will according to requirements.
And step S204, calling the query execution plug-in matched with the query type to execute the query operation, and feeding back the result of the query operation.
In the application, the execution query is an actual action theme called by an interface, and the execution query can be in butt joint with the database, so that corresponding data can be queried in the database. For executing query, different query engines need to be used for different databases, and therefore, each query engine is packaged as a corresponding query plug-in, for example, the query plug-in includes a MySQL engine plug-in, a StarRocks engine plug-in, a model plug-in, an Application Programming Interface (API) plug-in, and the like, and the corresponding query plug-in may be called to execute query operation according to a query type obtained from the access instruction. The query type and the query plug-in are in a mapping relation, and the corresponding query plug-in can be called based on the query type.
The query engine is packaged in a plug-in form, so that the maintenance of the query engine can be facilitated, the query engine can be added, deleted, changed and checked in the plug-in form at any time so as to deal with different databases, meanwhile, a user can conveniently call the query engine in a parameter configuration mode, an interface is not bound with the query engine any more, and the query engine can be configured at will according to requirements.
The plug-in units can be repeatedly used, so that the utilization rate is improved, and resource waste caused by idling is avoided.
Optionally, after the query operation is executed by invoking the query execution plug-in matching the query type, the method further includes:
extracting an output type configured by a user in the access instruction;
the result of the feedback query operation includes:
and calling a data output plug-in matched with the output type to output the result of the query operation.
The user can adjust the output mode of the data obtained by querying after the interface is called according to the requirement, such as data conversion, data format setting and the like.
The output modes of the data are packaged into corresponding data output plug-ins, such as a data output plug-in package format engine plug-in, a data conversion plug-in and the like, and the corresponding data output plug-ins can be called to output according to the output types obtained from the access instructions. The output type and the data output plug-in are in a mapping relation, and the corresponding data output plug-in can be called based on the output type.
The output mode of the data is packaged into a plug-in form, so that the output mode can be maintained, the increase, deletion, modification and check can be performed in the form of plug-ins at any time, different customer requirements can be met, meanwhile, a user can conveniently call the output mode in a parameter configuration mode, an interface is not bound with the output mode, the output mode can be configured at will according to requirements, and multiplexing and expansion of the output mode can be better achieved.
Optionally, the interface service management platform further includes a log management layer, and the method further includes:
recording a call log of the interface call layer responding to the access instruction by using a log management layer, and sending the call log to a message queue;
and detecting the logs in the message queue, and generating alarm information if errors exist in the logs in the message queue.
And a log management layer is also arranged in the interface service management platform so as to realize functions of log collection and the like. And recording the log of each calling interface, sending the log to a message queue such as kafka, consuming the log in the message queue by different services in real time, and if the log is called by mistake, triggering an alarm to inform the relevant responsible person.
Optionally, the interface service calling method includes:
recording other logs except the call log by using a log management layer, and storing the other logs to a data warehouse;
and counting other logs in the data warehouse according to the statistical rule to generate a log statistical table.
And other logs can be stored in a data warehouse for processing, so that data meeting the requirements of the interface bulletin board and statistical analysis are generated and stored in a table of the interface service management platform.
Optionally, after the logging management layer records a call log of the interface call layer responding to the access instruction and sends the call log to the message queue, the method further includes:
feeding the call logs back to the configuration management layer, and analyzing the call logs by the configuration management layer to obtain an analysis result;
and updating the access frequency, the abnormal constant and the hit cache number of the called interface corresponding to the access instruction according to the analysis result.
The configuration management layer can manage and analyze the call log so as to determine whether the call is abnormal, whether the call hits the cache and other information. The use information of the called structure can be updated by using the part of the information, so that the use information can be seen by the outside.
The invention solves the problem that the existing system can not carry out unified monitoring and management on a plurality of independently deployed interface services, completes the development of the interface through configuration, and improves the development efficiency of the interface and the reuse rate of the interface services; in the method, the five steps of interface calling are based on a plug-in development mode, so that the functions of the system can be flexibly expanded, and more customized requirements of a calling party can be met; in the process of collecting and processing the logs in real time, the state of the interface is judged in time, if abnormal, an alarm is given in time, the load of the server is analyzed and judged according to the log statistical result, and resources are adjusted in time to meet the interface calling requirement.
The embodiment of the application is used for an interface service management platform, which comprises a configuration management layer and an interface calling layer, the configuration management layer is used for obtaining configuration parameters configured by a user, an access instruction is generated according to the configuration parameters, the interface calling layer is used for carrying out service identification on the access instruction, a corresponding service type is determined, a service verification plug-in matched with the service type is called for verifying the access instruction, after the verification is passed, the processing type configured by the user in the access instruction is extracted, the preprocessing plug-in matched with the processing type is called for preprocessing the access instruction, the query type is obtained, an execution query plug-in matched with the query type is called for executing query operation, and the result of the query operation is fed back, so that the interface is called in a plug-in form.
Corresponding to the interface service invoking method of the foregoing embodiment, fig. 3 shows a block diagram of a microservice-based interface service invoking device provided in the third embodiment of the present application, where the interface service invoking device is applied to an interface service management platform, and the interface service management platform includes a configuration management layer and an interface invoking layer. The configuration management layer and the interface calling layer are constructed based on a micro-service framework, service functions can be modularized, and therefore management efficiency is improved. For convenience of explanation, only portions related to the embodiments of the present application are shown.
Referring to fig. 3, the interface service invoking device includes:
the configuration management module 31 is configured to obtain configuration parameters configured by a user by using a configuration management layer, and generate an access instruction according to the configuration parameters;
the interface calling module 32 is used for performing service identification on the access instruction by using an interface calling layer, determining a corresponding service type, and calling a service verification plug-in matched with the service type to verify the access instruction; after the verification is passed, extracting a processing type configured by a user in the access instruction, and calling a preprocessing plug-in matched with the processing type to preprocess the access instruction to obtain a query type; and calling an execution query plug-in matched with the query type to execute the query operation, and feeding back the result of the query operation.
Optionally, the interface service invoking device further includes:
the output type extraction unit is used for extracting the output type configured by the user in the access instruction after the query operation is executed by calling the query execution plug-in matched with the query type;
the interface calling module comprises:
and the output plug-in calling unit is used for calling the data output plug-in matched with the output type to output the result of the query operation.
Optionally, the interface service management platform further includes a log management layer, and the interface call module device further includes:
the log management module 33 is configured to record, by using a log management layer, a call log of the interface call layer in response to the access instruction, and send the call log to a message queue; and detecting the logs in the message queue, and generating alarm information if errors exist in the logs in the message queue.
Optionally, the interface calling module apparatus includes:
the log storage unit is used for recording other logs except the call log by using the log management layer and storing the other logs to the data warehouse;
and the log counting unit is used for counting other logs in the data warehouse according to the counting rule to generate a log counting table.
Optionally, the interface call module apparatus further includes:
the log feedback unit is used for recording a call log of the interface call layer responding to the access instruction by using the log management layer, sending the call log to the message queue, feeding the call log back to the configuration management layer, and analyzing the call log by the configuration management layer to obtain an analysis result;
and the calling result updating unit is used for updating the access frequency, the abnormal constant and the hit cache number of the called interface corresponding to the access instruction according to the analysis result.
Optionally, the interface call module apparatus further includes:
the interface information acquisition unit is used for acquiring configuration parameters configured by a user by using the configuration management layer, and acquiring configuration information of at least one historical interface when the configuration management layer acquires interface viewing operation of the user before generating an access instruction according to the configuration parameters;
the trigger instruction acquisition unit is used for displaying the configuration information of each historical interface and acquiring a multiplexing trigger instruction of a user to any historical interface;
the historical parameter modifying unit is used for displaying the parameters of the historical interface corresponding to the multiplexing trigger instruction and adopting the modifying parameters of the user to the parameters of the historical interface;
and the parameter configuration unit is used for taking the modification parameters as configuration parameters configured by a user.
Optionally, the interface call module apparatus further includes:
the using information acquiring unit is used for acquiring the using information of each historical interface after acquiring the configuration information of at least one historical interface, wherein the using information comprises the access frequency, the abnormal constant and the hit cache number of the interface;
and the using information display unit is used for displaying the access frequency, the abnormal constant and the hit cache number of the corresponding historical interface when a detailed information checking instruction of a user to any historical interface is acquired.
It should be noted that, because the contents of information interaction, execution process, and the like between the modules are based on the same concept as that of the embodiment of the method of the present application, specific functions and technical effects thereof may be specifically referred to a part of the embodiment of the method, and details are not described here.
Fig. 4 is a schematic structural diagram of an interface service management platform according to a fourth embodiment of the present application. As shown in fig. 4, the interface service management platform includes: at least one processor (only one shown in fig. 4), a memory, and a computer program stored in the memory and executable on the at least one processor, the processor implementing the steps of any of the various interface service invocation method embodiments described above when executing the computer program.
The interface service management platform may include, but is not limited to, a processor, a memory. It will be understood by those skilled in the art that fig. 4 is merely an example of an interface service management platform and does not constitute a limitation of the interface service management platform, and that the interface service management platform may include more or less components than those shown, or some components may be combined, or different components may be included, such as a network interface and input device, etc.
The Processor may be a CPU, or other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory includes readable storage medium, internal memory, etc., wherein the internal memory may be the internal memory of the interface service management platform, and the internal memory provides an environment for the operation system and the execution of the computer readable instructions in the readable storage medium. The readable storage medium may be a hard disk of the interface service management platform, and in other embodiments, may also be an external storage device of the interface service management platform, for example, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the interface service management platform. Further, the memory may also include both an internal storage unit of the interface service management platform and an external storage device. The memory is used for storing an operating system, application programs, a BootLoader (BootLoader), data, and other programs, such as program codes of a computer program, and the like. The memory may also be used to temporarily store data that has been output or is to be output.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules, so as to perform all or part of the functions described above. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. For the specific working processes of the units and modules in the above-mentioned apparatus, reference may be made to the corresponding processes in the foregoing method embodiments, which are not described herein again. The integrated unit, if implemented in the form of a software functional unit and sold or used as a separate product, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow of the method of the embodiments described above can be implemented by a computer program, which can be stored in a computer readable storage medium and can implement the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer readable medium may include at least: any entity or device capable of carrying computer program code, recording medium, computer Memory, read-Only Memory (ROM), random Access Memory (RAM), electrical carrier signals, telecommunications signals, and software distribution media. Such as a usb-disk, a removable hard disk, a magnetic or optical disk, etc. In some jurisdictions, computer-readable media may not be an electrical carrier signal or a telecommunications signal in accordance with legislative and proprietary practices.
When the computer program product runs on the interface service management platform, the steps in the method embodiments can be realized when the interface service management platform is executed.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
In the embodiments provided in the present application, it should be understood that the disclosed device/interface service management platform and method may be implemented in other ways. For example, the above-described embodiments of the device/interface service management platform are merely illustrative, and for example, a module or a unit may be divided into only one logical function, and may be implemented in other ways, for example, multiple units or components may be combined or integrated into another system, or some features may be omitted, or not implemented. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be through some interfaces, indirect coupling or communication connection of devices or units, and may be in an electrical, mechanical or other form.
Units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above embodiments are only used to illustrate the technical solutions of the present application, and not to limit the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application and are intended to be included within the scope of the present application.

Claims (10)

1. An interface service calling method based on micro service is characterized in that the interface service calling method is applied to an interface service management platform, the interface service management platform comprises a configuration management layer and an interface calling layer, and the method comprises the following steps:
acquiring configuration parameters configured by a user by using the configuration management layer, and generating an access instruction according to the configuration parameters;
using the interface calling layer to perform service identification on the access instruction, determining a corresponding service type, and calling a service verification plug-in matched with the service type to verify the access instruction; after the verification is passed, extracting the processing type configured by the user in the access instruction, and calling a preprocessing plug-in matched with the processing type to preprocess the access instruction to obtain a query type; and calling an execution query plug-in matched with the query type to execute the query operation, and feeding back the result of the query operation.
2. The interface service calling method according to claim 1, after the executing query plug-in matching the query type is called to execute the query operation, further comprising:
extracting the output type configured by the user in the access instruction;
feeding back the results of the query operation includes:
and calling a data output plug-in matched with the output type to output the result of the query operation.
3. The interface service invocation method according to claim 1, wherein said interface service management platform further includes a log management layer, said method further comprising:
recording a call log of the interface call layer responding to the access instruction by using the log management layer, and sending the call log to a message queue;
and detecting the logs in the message queue, and generating alarm information if the logs in the message queue are detected to have errors.
4. The interface service invocation method according to claim 3, characterized in that the method comprises:
recording other logs except the call log by using the log management layer, and storing the other logs to a data warehouse;
and counting other logs in the data warehouse according to the statistical rule to generate a log statistical table.
5. The interface service calling method according to claim 3, further comprising, after recording a call log of the interface call layer in response to the access instruction using the log management layer and sending the call log to a message queue:
feeding the call log back to the configuration management layer, and analyzing the call log by the configuration management layer to obtain an analysis result;
and updating the access frequency, the abnormal constant and the hit cache number of the called interface corresponding to the access instruction according to the analysis result.
6. The interface service invoking method according to any one of claims 1 to 5, further comprising, before obtaining configuration parameters configured by a user using the configuration management layer and generating an access instruction according to the configuration parameters:
the configuration management layer acquires configuration information of at least one historical interface when acquiring interface viewing operation of a user;
displaying the configuration information of each historical interface, and acquiring a multiplexing trigger instruction of the user to any historical interface;
displaying parameters of a historical interface corresponding to the multiplexing trigger instruction, and adopting the parameters of the historical interface modified by the user;
and taking the modification parameters as the configuration parameters configured by the user.
7. The interface service invocation method according to claim 6, further comprising, after obtaining configuration information of at least one historical interface:
acquiring use information of each historical interface, wherein the use information comprises the access frequency, an abnormal constant and a hit cache number of the interface;
and when the detailed information viewing instruction of the user to any historical interface is acquired, displaying the access frequency, the abnormal constant and the hit cache number of the corresponding historical interface.
8. An interface service calling device based on micro service, characterized in that, the interface service calling device is applied to an interface service management platform, the interface service management platform includes a configuration management layer and an interface calling layer, the device includes:
the configuration management module is used for acquiring configuration parameters configured by a user by using the configuration management layer and generating an access instruction according to the configuration parameters;
the interface calling module is used for carrying out service identification on the access instruction by using the interface calling layer, determining a corresponding service type, and calling a service verification plug-in matched with the service type to verify the access instruction; after the verification is passed, extracting the processing type configured by the user in the access instruction, and calling a preprocessing plug-in matched with the processing type to preprocess the access instruction to obtain a query type; and calling an execution query plug-in matched with the query type to execute the query operation, and feeding back the result of the query operation.
9. An interface service management platform, characterized in that the interface service management platform comprises a processor, a memory, and a computer program stored in the memory and executable on the processor, the processor implementing the interface service invocation method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, in which a computer program is stored, which, when being executed by a processor, implements the interface service invocation method according to any one of claims 1 to 7.
CN202210712732.8A 2022-06-22 2022-06-22 Interface service calling method, device, management platform and medium based on micro service Pending CN115202750A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210712732.8A CN115202750A (en) 2022-06-22 2022-06-22 Interface service calling method, device, management platform and medium based on micro service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210712732.8A CN115202750A (en) 2022-06-22 2022-06-22 Interface service calling method, device, management platform and medium based on micro service

Publications (1)

Publication Number Publication Date
CN115202750A true CN115202750A (en) 2022-10-18

Family

ID=83576138

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210712732.8A Pending CN115202750A (en) 2022-06-22 2022-06-22 Interface service calling method, device, management platform and medium based on micro service

Country Status (1)

Country Link
CN (1) CN115202750A (en)

Similar Documents

Publication Publication Date Title
CN111752799B (en) Service link tracking method, device, equipment and storage medium
CN113489713B (en) Network attack detection method, device, equipment and storage medium
CN112491602B (en) Behavior data monitoring method and device, computer equipment and medium
CN112040429B (en) Short message management system and method based on distributed storage
CN111740868B (en) Alarm data processing method and device and storage medium
CN111723313A (en) Page jump processing method, device, equipment and storage medium
US20080021696A1 (en) System and method of providing a fast path link for an identified set of data
CN109740129B (en) Report generation method, device and equipment based on blockchain and readable storage medium
CN114595201A (en) Method, equipment and storage medium for inquiring acquisition record of interface access log
CN110941530A (en) Method and device for acquiring monitoring data, computer equipment and storage medium
CN113407511A (en) Log aggregation method, log aggregation equipment and computer program product
CN113836237A (en) Method and device for auditing data operation of database
CN115408193A (en) Method and device for processing error codes among multiple modules
CN114697232A (en) Skywalking probe index data acquisition system and method and electronic equipment
CN111611276A (en) Data query method, device and storage medium
CN107885634B (en) Method and device for processing abnormal information in monitoring
CN108650123B (en) Fault information recording method, device, equipment and storage medium
CN113360210A (en) Data reconciliation method and device, computer equipment and storage medium
CN113076112A (en) Database deployment method and device and electronic equipment
CN112187509A (en) Multi-architecture cloud platform execution log management method, system, terminal and storage medium
CN111752838A (en) Question checking method and device, server and storage medium
CN115496470A (en) Full-link configuration data processing method and device and electronic equipment
CN115202750A (en) Interface service calling method, device, management platform and medium based on micro service
CN113448985A (en) API (application program interface) interface generation method, calling method and device and electronic equipment
CN110413496B (en) Method for realizing componentized collection of electronic license operation data

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