CN116382640A - Method, device, equipment and storage medium for managing micro-service - Google Patents

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

Info

Publication number
CN116382640A
CN116382640A CN202211686366.XA CN202211686366A CN116382640A CN 116382640 A CN116382640 A CN 116382640A CN 202211686366 A CN202211686366 A CN 202211686366A CN 116382640 A CN116382640 A CN 116382640A
Authority
CN
China
Prior art keywords
service
information
heterogeneous
interface
service interface
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
CN202211686366.XA
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.)
Shanghai Pudong Development Bank Co Ltd
Original Assignee
Shanghai Pudong Development Bank Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shanghai Pudong Development Bank Co Ltd filed Critical Shanghai Pudong Development Bank Co Ltd
Priority to CN202211686366.XA priority Critical patent/CN116382640A/en
Publication of CN116382640A publication Critical patent/CN116382640A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/22Parsing or analysis of headers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/54Interprogram communication
    • G06F9/547Remote procedure calls [RPC]; Web services
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L41/00Arrangements for maintenance, administration or management of data switching networks, e.g. of packet switching networks
    • H04L41/02Standardisation; Integration
    • H04L41/0246Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols
    • H04L41/0273Exchanging or transporting network management information using the Internet; Embedding network management web servers in network elements; Web-services-based protocols using web services for network management, e.g. simple object access protocol [SOAP]
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Data Exchanges In Wide-Area Networks (AREA)

Abstract

The invention discloses a method, a device, equipment and a storage medium for managing micro-services, wherein the method comprises the following steps: service definition is carried out according to the service access file uploaded by the micro service provider, and a defined service interface is obtained; determining a heterogeneous mapping relation of a message format according to a service call request sent by a micro-service consumer; the service interface is configured in a heterogeneous gateway according to the heterogeneous mapping relation; and testing the service interfaces configured in the heterogeneous gateway based on the test message. By utilizing the method, the accuracy of service management can be improved, the timeliness of service definition and development test can be improved, and the online integrated service management of users can be realized.

Description

Method, device, equipment and storage medium for managing micro-service
Technical Field
The embodiment of the invention relates to the technical field of Internet, in particular to a method, a device, equipment and a storage medium for managing micro services.
Background
Service governance refers to the definition, implementation, operation, retirement and other full life cycle processes of services in a service-oriented architecture system to make standard specifications and execute. The service management process of the enterprise-level micro-service platform is that service identification and service definition are carried out under the online condition of a service management group, an interface developer manually logs in a heterogeneous gateway server for transaction information deployment after configuration information and query sentences are exported by the service management platform, and the mode has high manual requirements. And with the continuous expansion of the service, the service scene is continuously increased, and the number of service interfaces is increased in geometric multiples, so that service definition, deployment and test node elongation of online transaction are caused, and the reworking problem caused by manual errors also exists.
Disclosure of Invention
The embodiment of the invention provides a micro-service treatment method, device, equipment and storage medium, which provide user on-line service definition and realize user on-line integrated service treatment by establishing a complete on-line service treatment process.
In a first aspect, an embodiment of the present invention provides a method for administering a micro service, where the method includes:
service definition is carried out according to the service access file uploaded by the micro service provider, and a defined service interface is obtained;
determining a heterogeneous mapping relation of a message format according to a service call request sent by a micro-service consumer;
the service interface is configured in a heterogeneous gateway according to the heterogeneous mapping relation;
and testing the service interfaces configured in the heterogeneous gateway based on the test message.
In a second aspect, an embodiment of the present invention further provides a device for administering a micro service, where the device includes:
the service definition module is used for carrying out service definition according to the service access file uploaded by the micro service provider and obtaining a defined service interface;
the heterogeneous mapping module is used for determining the heterogeneous mapping relation of the message format according to the service call request sent by the micro-service consumer;
the service interface configuration module is used for configuring the service interface in the heterogeneous gateway according to the heterogeneous mapping relation;
and the service interface test module is used for testing the service interfaces configured in the heterogeneous gateway based on the test message.
In a third aspect, embodiments of the present disclosure further provide an electronic device, including:
one or more processors;
storage means for storing one or more programs,
the one or more programs, when executed by the one or more processors, cause the one or more processors to implement a method of governance of micro services provided by embodiments of the present disclosure.
In a fourth aspect, the presently disclosed embodiments also provide a storage medium containing computer-executable instructions that, when executed by a computer processor, are used to perform a abatement method for implementing the micro-services provided by the presently disclosed embodiments.
The invention discloses a method, a device, equipment and a storage medium for managing micro-services, wherein the method comprises the following steps: service definition is carried out according to the service access file uploaded by the micro service provider, and a defined service interface is obtained; determining a heterogeneous mapping relation of a message format according to a service call request sent by a micro-service consumer; the service interface is configured in a heterogeneous gateway according to the heterogeneous mapping relation; and testing the service interfaces configured in the heterogeneous gateway based on the test message. By utilizing the method, the accuracy of service management can be improved, the timeliness of service definition and development test can be improved, and the online integrated service management of users can be realized.
Drawings
The above and other features, advantages, and aspects of embodiments of the present disclosure will become more apparent by reference to the following detailed description when taken in conjunction with the accompanying drawings. The same or similar reference numbers will be used throughout the drawings to refer to the same or like elements. It should be understood that the figures are schematic and that elements and components are not necessarily drawn to scale.
FIG. 1 is a flow chart of a method for remediation of a micro-service provided in an embodiment of the present disclosure;
FIG. 2 is a schematic diagram of a micro-service treatment device according to an embodiment of the disclosure;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure have been shown in the accompanying drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but are provided to provide a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are for illustration purposes only and are not intended to limit the scope of the present disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order and/or performed in parallel. Furthermore, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "including" and variations thereof as used herein are intended to be open-ended, i.e., including, but not limited to. The term "based on" is based at least in part on. The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments. Related definitions of other terms will be given in the description below.
It should be noted that the terms "first," "second," and the like in this disclosure are merely used to distinguish between different devices, modules, or units and are not used to define an order or interdependence of functions performed by the devices, modules, or units.
It should be noted that references to "one", "a plurality" and "a plurality" in this disclosure are intended to be illustrative rather than limiting, and those of ordinary skill in the art will appreciate that "one or more" is intended to be understood as "one or more" unless the context clearly indicates otherwise.
The names of messages or information interacted between the various devices in the embodiments of the present disclosure are for illustrative purposes only and are not intended to limit the scope of such messages or information.
It will be appreciated that prior to using the technical solutions disclosed in the embodiments of the present disclosure, the user should be informed and authorized of the type, usage range, usage scenario, etc. of the personal information related to the present disclosure in an appropriate manner according to the relevant legal regulations.
For example, in response to receiving an active request from a user, a prompt is sent to the user to explicitly prompt the user that the operation it is requesting to perform will require personal information to be obtained and used with the user. Thus, the user can autonomously select whether to provide personal information to software or hardware such as an electronic device, an application program, a server or a storage medium for executing the operation of the technical scheme of the present disclosure according to the prompt information.
As an alternative but non-limiting implementation, in response to receiving an active request from a user, the manner in which the prompt information is sent to the user may be, for example, a popup, in which the prompt information may be presented in a text manner. In addition, a selection control for the user to select to provide personal information to the electronic device in a 'consent' or 'disagreement' manner can be carried in the popup window.
It will be appreciated that the above-described notification and user authorization process is merely illustrative and not limiting of the implementations of the present disclosure, and that other ways of satisfying relevant legal regulations may be applied to the implementations of the present disclosure.
It will be appreciated that the data (including but not limited to the data itself, the acquisition or use of the data) involved in the present technical solution should comply with the corresponding legal regulations and the requirements of the relevant regulations.
Example 1
Fig. 1 is a flowchart of a method for managing a micro service according to an embodiment of the present disclosure, where the embodiment of the present disclosure is applicable to a case of providing an online service definition of a user, where the method may be performed by a device for managing the micro service, where the device may be implemented in software and/or hardware, and optionally, implemented by an electronic device, where the electronic device may be a mobile terminal, a PC side, a server, or the like.
As shown in fig. 1, a method for managing micro services provided in an embodiment of the present disclosure may specifically include the following steps:
s110, service definition is carried out according to the service access file uploaded by the micro service provider, and a defined service interface is obtained.
It should be noted that a unified service access template of the enterprise (such as a financial enterprise) is established in the enterprise-level micro-service platform service management platform, a Chinese-English word library is established, and the matching relation between the Chinese and metadata Chinese of all original interfaces is counted as a history matching relation library.
In this embodiment, the micro service provider may be a micro service provider invoked by other micro services. The service access file is a document file formed according to the service access template, wherein the document file can comprise data information to be transmitted, and the service interface is a connection point for exchanging information by the micro-service. The service definition may be a process of acquiring service interface information of the service provider.
Specifically, firstly, the platform checks the file according to the format and the content of the service access file uploaded by the micro service provider, and if the check condition is matched with the format and the content of the service template, the check is passed. And acquiring a message format according to the service access file after verification, and performing automatic service definition according to different message formats to acquire a defined service interface. The message format can be divided into two formats, namely a standard job program (StandardOperatingProcedure, SOP) and a Simple object access protocol (Simple ObjectAccessProtocol, SOAP).
On the basis of the above embodiment, the embodiment of the present disclosure may perform service definition on a service access file uploaded according to a micro service provider, and obtaining a defined service interface may specifically include the following steps:
a1 The format and content of the service access file are checked.
b1 If the verification is passed, the first message format of the service access file is obtained.
c1 And performing service definition according to the first message format and the service access file to obtain a defined service interface.
In this embodiment, the verification condition is whether the verification condition matches the format and content of the service template. The first message format may include both SOP and SOAP message formats. The platform checks the file according to the format and the content of the service access file uploaded by the micro service provider, and if the check condition is met, the check is passed. Acquiring a first message format according to the service access file after verification, and performing automatic service definition according to different first message formats to acquire the completed service interface information
Based on the foregoing embodiments, the embodiments of the present disclosure may perform service definition according to a first message format and a service access file, and obtaining a defined service interface may specifically include the following steps:
c11 If the first message format is the first type message format, analyzing the service access file to obtain first service interface information; storing the first service interface information to obtain a defined service interface;
c12 If the first message format is the second type message format, extracting second service interface information in the service access file.
c13 A correspondence relationship between the second service interface information and the metadata information is established.
c14 Storing the corresponding relation to obtain the defined service interface.
It should be appreciated that metadata may be understood as data describing data attribute information and/or index information to support functions such as indicating storage locations, history data, resource lookups, file records, etc. Metadata is an electronic catalog, and in order to achieve the purpose of cataloging, the contents or characteristics of data are described and collected, so that the purpose of assisting in data retrieval is achieved.
In this embodiment, if the first message format is the first type of message format, that is, the SOP message format, service interface information obtained by analyzing the service access file is used as first service interface information, where the information may include information such as an interface name and a field, and the information is stored, and the above process completes definition of a service interface, and obtains a defined service interface. And if the first message format is the second type message format, namely the SOAP message format, extracting service interface information in the service access file as second service interface information. And matching the second service interface information with the metadata information, and storing the matched corresponding relation to obtain the defined service interface. The second service interface information may be information such as chinese and length describing the service interface.
On the basis of the above embodiment, the embodiment of the present disclosure may specifically include the following steps for establishing a correspondence between the second service interface information and the metadata information:
c131 Matching the second service interface information with the metadata information in the metadata database, and establishing a corresponding relation between the matched metadata information and the second service interface information.
In this embodiment, the whole word matching is performed between the second service interface information and the metadata information in the metadata database, a corresponding relationship between the Chinese and metadata in the second service interface information is established, and the matched corresponding relationship is stored to obtain the defined service interface.
c132 If the metadata information is not matched in the metadata database, the second service interface information is matched with the history corresponding relation, and the corresponding relation between the matched metadata information and the second service interface information is established.
Specifically, if the metadata information is not matched with the full word matching from the metadata database, matching the second service interface information with the history corresponding relation in the history matching relation library preset by the platform, which is equivalent to matching the service interface information with the Chinese of the original interface information, finding the corresponding metadata, and establishing the corresponding relation with the second service interface information.
c133 If the metadata information is not matched in the history corresponding relation, performing word segmentation on the second service interface information to obtain a plurality of sub-interface information.
Specifically, if the metadata information is still not matched in the history correspondence, word segmentation processing is performed on the second service interface information, and long segments or sentences are divided into a plurality of words or words, so as to obtain a plurality of sub-interface information.
c134 Sub-interface information semantically similar to the plurality of sub-interface information is acquired as target sub-interface information.
c135 And determining metadata information corresponding to the second service interface information according to the metadata information corresponding to the target sub-interface information.
Specifically, the plurality of sub-interface information are respectively matched in semantic similarity, and the sub-interface information is regarded as target sub-interface information which is similar to the sub-interface information in semantic. And matching the target sub-interface information with the metadata information in the metadata database, combining a plurality of metadata information corresponding to the target sub-interface information into metadata information, and establishing a corresponding relation with the second service interface information. If the matching method cannot be successfully matched, the newly added metadata is automatically translated to the sub-interface information, and the service definition of SOAP is completed.
S120, determining the heterogeneous mapping relation of the message format according to the service call request sent by the micro-service consumer.
In this embodiment, a micro-service consumer may refer to a caller of a service, i.e. a service that depends on other services. The service invocation request may include specific data information that needs to be invoked. And determining a message format according to a service call request sent by the micro-service consumer, and if the message format is different from that of the service party, establishing a mapping relation between fields in a request interface and a service definition interface. For example, if the consumer is in SOP format, the server is in SOAP format, or if the consumer is in SOAP format, the server is in SOP format, then a mapping relationship between the fields in the request interface and the service definition interface is established.
Based on the above embodiments, the determining, according to the embodiment of the present disclosure, a heterogeneous mapping relationship in a format according to a service call request sent by a micro service consumer may include the following steps:
a2 A second message format corresponding to the service call request is obtained.
b2 If the second message format is different from the first message format, extracting second field information in the second message format and first field information in the first message format.
c2 A mapping relation between the first field information and the second field information is established, and a heterogeneous mapping relation is obtained.
In this embodiment, the message format is determined to be the second message format according to the service call request sent by the micro-service consumer, and if the second message format is different from the first message format of the service party, the second field information in the second message format and the first field information in the first message format are extracted, and a mapping relationship between the first field information and the second field information is established as the heterogeneous mapping relationship. Illustratively, the consumer is in SOP format and the server is in SOAP format; or alternatively; and if the consumer is in the SOAP format and the server is in the SOP format, establishing a mapping relation between fields in the request interface and the service definition interface.
S130, configuring the service interface in the heterogeneous gateway according to the heterogeneous mapping relation.
Specifically, heterogeneous gateways can be networks of different types, are connected to a core network through a gateway, and finally are connected to an internet network, and finally are integrated into a whole. The platform carries out heterogeneous mapping of interface fields according to the message format of the consumer and the message format of the server, and the service governance platform automatically configures the heterogeneous mapping relationship to the heterogeneous gateway.
Based on the foregoing embodiments, the embodiments of the present disclosure may specifically include the following steps for configuring a service interface in a heterogeneous gateway according to a heterogeneous mapping relationship:
a3 A structured query statement corresponding to the service interface is obtained.
b3 The heterogeneous mapping relation and the structured query statement are configured in the heterogeneous gateway to realize the configuration of the service interface.
Specifically, the structured query language (StructuredQueryLanguage, SQL) is a database query and programming language for accessing data and querying, updating and managing relational database systems. And obtaining a structured query statement corresponding to the service interface, and configuring the heterogeneous mapping relation and the structured query statement in a heterogeneous gateway to realize the configuration of the service interface.
In the technical scheme, after the user online service definition is completed, the service management platform automatically transmits the online interface information to the heterogeneous gateway, so that the online interface is developed and validated in real time, and the timeliness of interface deployment is improved.
And S140, testing the service interfaces configured in the heterogeneous gateway based on the test message.
Specifically, a plurality of test messages are generated according to the second message format, and the test messages are sent to the heterogeneous gateway so as to test the service interface, and if the received content accords with the content requested in the test messages, the test result can be considered to be good.
Based on the above embodiments, the embodiment of the present disclosure may specifically test a service interface configured in a heterogeneous gateway based on a test packet, which may include the following steps:
a4 A plurality of test messages are generated according to the second message format.
b4 Transmitting the test message to the heterogeneous gateway to test the service interface.
Specifically, the format of the test message generation can generate a plurality of test messages according to the second message format (namely, the message format corresponding to the consumer), the test messages are sent to the heterogeneous gateway for testing, if the received content accords with the content requested in the test message, the test result can be considered to be good, and if the received content does not accord with the content, the problems in the process are detected.
In the technical scheme, the service management platform automatically assembles the test message and sends the test message to the heterogeneous gateway so as to ensure that the information deployed to the service gateway is correct, realize the automatic test of the online interface, verify the connectivity of the interface in real time and expose the joint debugging problem in advance.
The embodiment of the disclosure provides a method for managing micro services, which comprises the following steps: service definition is carried out according to the service access file uploaded by the micro service provider, and a defined service interface is obtained; determining a heterogeneous mapping relation of a message format according to a service call request sent by a micro-service consumer; the service interface is configured in a heterogeneous gateway according to the heterogeneous mapping relation; and testing the service interfaces configured in the heterogeneous gateway based on the test message. By utilizing the method, the accuracy of service management can be improved, the timeliness of service definition and development test can be improved, and the online integrated service management of users can be realized.
Example two
FIG. 2 is a schematic structural diagram of a micro-service treatment device according to an embodiment of the present invention, where, as shown in FIG. 2, the device includes: service definition module 210, heterogeneous mapping module 220, service interface configuration module 230, and service interface test module 240.
The service definition module 210 is configured to perform service definition according to the service access file uploaded by the micro service provider, and obtain a defined service interface;
the heterogeneous mapping module 220 is configured to determine a heterogeneous mapping relationship of a message format according to a service call request sent by a micro service consumer;
a service interface configuration module 230, configured to configure the service interface in a heterogeneous gateway according to the heterogeneous mapping relationship;
the service interface testing module 240 is configured to test the service interfaces configured in the heterogeneous gateway based on a test packet.
By using the technical scheme provided by the embodiment of the disclosure, the accuracy of service treatment can be improved, the timeliness of service definition and development test can be improved, and the online integrated service treatment of users can be realized.
Further, the service definition module 210 may be configured to:
verifying the format and the content of the service access file;
if the verification is passed, a first message format of the service access file is obtained;
and carrying out service definition according to the first message format and the service access file to obtain a defined service interface.
Further, the service definition module 210 may be further configured to:
if the first message format is a first type message format, analyzing the service access file to obtain first service interface information;
storing the first service interface information to obtain a defined service interface;
if the first message format is a second type message format, extracting second service interface information in the service access file;
establishing a corresponding relation between the second service interface information and the metadata information;
and storing the corresponding relation to obtain the defined service interface.
Further, the service definition module 210 may be further configured to:
matching the second service interface information with metadata information in a metadata database, and establishing a corresponding relation between the matched metadata information and the second service interface information;
if the metadata information is not matched in the metadata database, matching the second service interface information with the history corresponding relation, and establishing a corresponding relation between the matched metadata information and the second service interface information;
if the metadata information is not matched in the history corresponding relation, performing word segmentation on the second service interface information to obtain a plurality of sub-interface information;
acquiring sub-interface information semantically similar to the plurality of sub-interface information, and taking the sub-interface information as target sub-interface information;
and determining metadata information corresponding to the second service interface information according to the metadata information corresponding to the target sub-interface information.
Further, the heterogeneous mapping module 220 may be configured to:
acquiring a second message format corresponding to the service call request;
if the second message format is different from the first message format, extracting second field information in the second message format and first field information in the first message format;
and establishing a mapping relation between the first field information and the second field information to obtain a heterogeneous mapping relation.
Further, the service interface test module 240 may also be configured to:
generating a plurality of test messages according to the second message format;
and sending the test message to the heterogeneous gateway to test the service interface.
Further, the service interface configuration module 230 may also be configured to:
obtaining a structured query statement corresponding to the service interface;
and configuring the heterogeneous mapping relation and the structured query statement in the heterogeneous gateway to realize the configuration of the service interface.
The device can execute the method provided by all the embodiments of the invention, and has the corresponding functional modules and beneficial effects of executing the method. Technical details not described in detail in this embodiment can be found in the methods provided in all the foregoing embodiments of the invention.
Example III
Fig. 3 shows a schematic diagram of an electronic device 10 that may be used to implement an embodiment of the present invention. Electronic devices are intended to represent various forms of digital computers, such as laptops, desktops, workstations, personal digital assistants, servers, blade servers, mainframes, and other appropriate computers. Electronic equipment may also represent various forms of mobile devices, such as personal digital processing, cellular telephones, smartphones, wearable devices (e.g., helmets, glasses, watches, etc.), and other similar computing devices. The components shown herein, their connections and relationships, and their functions, are meant to be exemplary only, and are not meant to limit implementations of the inventions described and/or claimed herein.
As shown in fig. 3, the electronic device 10 includes at least one processor 11, and a memory, such as a Read Only Memory (ROM) 12, a Random Access Memory (RAM) 13, etc., communicatively connected to the at least one processor 11, wherein the memory stores a computer program executable by the at least one processor, and the processor 11 may perform various suitable actions and processes according to the computer program stored in the Read Only Memory (ROM) 12 or the computer program loaded from the storage unit 18 into the Random Access Memory (RAM) 13. In the RAM13, various programs and data required for the operation of the electronic device 10 may also be stored. The processor 11, the ROM12 and the RAM13 are connected to each other via a bus 14. An input/output (I/O) interface 15 is also connected to bus 14.
Various components in the electronic device 10 are connected to the I/O interface 15, including: an input unit 16 such as a keyboard, a mouse, etc.; an output unit 17 such as various types of displays, speakers, and the like; a storage unit 18 such as a magnetic disk, an optical disk, or the like; and a communication unit 19 such as a network card, modem, wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information/data with other devices via a computer network, such as the internet, and/or various telecommunication networks.
The processor 11 may be a variety of general and/or special purpose processing components having processing and computing capabilities. Some examples of processor 11 include, but are not limited to, a Central Processing Unit (CPU), a Graphics Processing Unit (GPU), various specialized Artificial Intelligence (AI) computing chips, various processors running machine learning model algorithms, digital Signal Processors (DSPs), and any suitable processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as the remediation method of the microservice.
In some embodiments, the remediation method of the microservice may be implemented as a computer program tangibly embodied on a computer readable storage medium, such as storage unit 18. In some embodiments, part or all of the computer program may be loaded and/or installed onto the electronic device 10 via the ROM12 and/or the communication unit 19. When the computer program is loaded into RAM13 and executed by processor 11, one or more steps of the above-described method of administering a microservice may be performed. Alternatively, in other embodiments, processor 11 may be configured to perform the remediation method of the microservice in any other suitable manner (e.g., by means of firmware).
Various implementations of the systems and techniques described here above may be implemented in digital electronic circuitry, integrated circuit systems, field Programmable Gate Arrays (FPGAs), application Specific Integrated Circuits (ASICs), application Specific Standard Products (ASSPs), systems On Chip (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and/or combinations thereof. These various embodiments may include: implemented in one or more computer programs, the one or more computer programs may be executed and/or interpreted on a programmable system including at least one programmable processor, which may be a special purpose or general-purpose programmable processor, that may receive data and instructions from, and transmit data and instructions to, a storage system, at least one input device, and at least one output device.
A computer program for carrying out methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus, such that the computer programs, when executed by the processor, cause the functions/acts specified in the flowchart and/or block diagram block or blocks to be implemented. The computer program may execute entirely on the machine, partly on the machine, as a stand-alone software package, partly on the machine and partly on a remote machine or entirely on the remote machine or server.
In the context of the present invention, a computer-readable storage medium may be a tangible medium that can contain, or store a computer program for use by or in connection with an instruction execution system, apparatus, or device. The computer readable storage medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. Alternatively, the computer readable storage medium may be a machine readable signal medium. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
To provide for interaction with a user, the systems and techniques described here can be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to a user; and a keyboard and a pointing device (e.g., a mouse or a trackball) through which a user can provide input to the electronic device. Other kinds of devices may also be used to provide for interaction with a user; for example, feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form, including acoustic input, speech input, or tactile input.
The systems and techniques described here can be implemented in a computing system that includes a background component (e.g., as a data server), or that includes a middleware component (e.g., an application server), or that includes a front-end component (e.g., a user computer having a graphical user interface or a web browser through which a user can interact with an implementation of the systems and techniques described here), or any combination of such background, middleware, or front-end components. The components of the system can be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: local Area Networks (LANs), wide Area Networks (WANs), blockchain networks, and the internet.
The computing system may include clients and servers. The client and server are typically remote from each other and typically interact through a communication network. The relationship of client and server arises by virtue of computer programs running on the respective computers and having a client-server relationship to each other. The server can be a cloud server, also called a cloud computing server or a cloud host, and is a host product in a cloud computing service system, so that the defects of high management difficulty and weak service expansibility in the traditional physical hosts and VPS service are overcome.
It should be appreciated that various forms of the flows shown above may be used to reorder, add, or delete steps. For example, the steps described in the present invention may be performed in parallel, sequentially, or in a different order, so long as the desired results of the technical solution of the present invention are achieved, and the present invention is not limited herein.
The above embodiments do not limit the scope of the present invention. It will be apparent to those skilled in the art that various modifications, combinations, sub-combinations and alternatives are possible, depending on design requirements and other factors. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method of administering a micro-service, comprising:
service definition is carried out according to the service access file uploaded by the micro service provider, and a defined service interface is obtained;
determining a heterogeneous mapping relation of a message format according to a service call request sent by a micro-service consumer;
the service interface is configured in a heterogeneous gateway according to the heterogeneous mapping relation;
and testing the service interfaces configured in the heterogeneous gateway based on the test message.
2. The method of claim 1, wherein performing service definition based on the service access file uploaded by the micro service provider to obtain the defined service interface comprises:
verifying the format and the content of the service access file;
if the verification is passed, a first message format of the service access file is obtained;
and carrying out service definition according to the first message format and the service access file to obtain a defined service interface.
3. The method of claim 2, wherein performing service definition according to the first message format and the service access file to obtain a defined service interface, comprises:
if the first message format is a first type message format, analyzing the service access file to obtain first service interface information;
storing the first service interface information to obtain a defined service interface;
if the first message format is a second type message format, extracting second service interface information in the service access file;
establishing a corresponding relation between the second service interface information and the metadata information;
and storing the corresponding relation to obtain the defined service interface.
4. A method according to claim 3, wherein establishing a correspondence between the second service interface information and metadata information comprises:
matching the second service interface information with metadata information in a metadata database, and establishing a corresponding relation between the matched metadata information and the second service interface information;
if the metadata information is not matched in the metadata database, matching the second service interface information with the history corresponding relation, and establishing a corresponding relation between the matched metadata information and the second service interface information;
if the metadata information is not matched in the history corresponding relation, performing word segmentation on the second service interface information to obtain a plurality of sub-interface information;
acquiring sub-interface information semantically similar to the plurality of sub-interface information, and taking the sub-interface information as target sub-interface information;
and determining metadata information corresponding to the second service interface information according to the metadata information corresponding to the target sub-interface information.
5. The method of claim 2, wherein determining the heterogeneous mapping of the format from the service invocation request sent by the micro-service consumer comprises:
acquiring a second message format corresponding to the service call request;
if the second message format is different from the first message format, extracting second field information in the second message format and first field information in the first message format;
and establishing a mapping relation between the first field information and the second field information to obtain a heterogeneous mapping relation.
6. The method of claim 5, wherein testing the service interface configured to the heterogeneous gateway based on test messages comprises:
generating a plurality of test messages according to the second message format;
and sending the test message to the heterogeneous gateway to test the service interface.
7. The method of claim 1, wherein configuring the service interface in a heterogeneous gateway according to the heterogeneous mapping relationship comprises:
obtaining a structured query statement corresponding to the service interface;
and configuring the heterogeneous mapping relation and the structured query statement in the heterogeneous gateway to realize the configuration of the service interface.
8. A micro-service administration device, comprising:
the service definition module is used for carrying out service definition according to the service access file uploaded by the micro service provider and obtaining a defined service interface;
the heterogeneous mapping module is used for determining the heterogeneous mapping relation of the message format according to the service call request sent by the micro-service consumer;
the service interface configuration module is used for configuring the service interface in the heterogeneous gateway according to the heterogeneous mapping relation;
and the service interface test module is used for testing the service interfaces configured in the heterogeneous gateway based on the test message.
9. An electronic device, the electronic device comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor; wherein, the liquid crystal display device comprises a liquid crystal display device,
the memory stores a computer program executable by the at least one processor to enable the at least one processor to perform the method of remediation of a microservice of any one of claims 1 to 7.
10. A computer readable storage medium storing computer instructions for causing a processor to perform the method of administering a microservice of any one of claims 1 to 7.
CN202211686366.XA 2022-12-26 2022-12-26 Method, device, equipment and storage medium for managing micro-service Pending CN116382640A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211686366.XA CN116382640A (en) 2022-12-26 2022-12-26 Method, device, equipment and storage medium for managing micro-service

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211686366.XA CN116382640A (en) 2022-12-26 2022-12-26 Method, device, equipment and storage medium for managing micro-service

Publications (1)

Publication Number Publication Date
CN116382640A true CN116382640A (en) 2023-07-04

Family

ID=86977450

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211686366.XA Pending CN116382640A (en) 2022-12-26 2022-12-26 Method, device, equipment and storage medium for managing micro-service

Country Status (1)

Country Link
CN (1) CN116382640A (en)

Similar Documents

Publication Publication Date Title
CN106649488B (en) Method and device for calling multi-data-source interactive interface
CN110858172A (en) Automatic test code generation method and device
CN114116065B (en) Method and device for acquiring topological graph data object and electronic equipment
CN115587575A (en) Data table creation method, target data query method, device and equipment
CN115617888A (en) Data import method, device, equipment, storage medium and product
CN112084179A (en) Data processing method, device, equipment and storage medium
CN108959294B (en) Method and device for accessing search engine
CN116611411A (en) Business system report generation method, device, equipment and storage medium
CN116382640A (en) Method, device, equipment and storage medium for managing micro-service
CN114443802A (en) Interface document processing method and device, electronic equipment and storage medium
CN110471708B (en) Method and device for acquiring configuration items based on reusable components
CN113362111A (en) Content sending method and device and electronic equipment
CN117252180B (en) Report generation method and device, electronic equipment and storage medium
CN112465619B (en) Tax handling method and device based on data conversion and one-key input tax three-period system
CN117670236A (en) Mobile-terminal-based to-be-handled flow approval method, device, equipment and medium
CN114860312A (en) Mobile terminal adaptation method, device, equipment and medium based on credit business
CN113297087A (en) Test method and device
CN116737535A (en) Interface test method, device, computer equipment and storage medium
CN117332773A (en) Method, device, equipment and medium for cascading document design results
CN115757145A (en) Method, device, equipment and storage medium for developing client interface
CN115525614A (en) Data access method, device, equipment, system and storage medium
CN117931506A (en) Document verification method, device, equipment and storage medium
CN116939040A (en) Data processing method, device, gateway and readable storage medium
CN115421809A (en) File processing method and device, electronic equipment and computer readable medium
CN116841982A (en) Database migration method, device, equipment, storage medium and program product

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