CN117032573A - Micro-service execution method, electronic device and readable storage medium - Google Patents

Micro-service execution method, electronic device and readable storage medium Download PDF

Info

Publication number
CN117032573A
CN117032573A CN202311000661.XA CN202311000661A CN117032573A CN 117032573 A CN117032573 A CN 117032573A CN 202311000661 A CN202311000661 A CN 202311000661A CN 117032573 A CN117032573 A CN 117032573A
Authority
CN
China
Prior art keywords
service
micro
storage area
data storage
temporary data
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
CN202311000661.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.)
China Mobile Communications Group Co Ltd
China Mobile Information Technology Co Ltd
Original Assignee
China Mobile Communications Group Co Ltd
China Mobile Information 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 China Mobile Communications Group Co Ltd, China Mobile Information Technology Co Ltd filed Critical China Mobile Communications Group Co Ltd
Priority to CN202311000661.XA priority Critical patent/CN117032573A/en
Publication of CN117032573A publication Critical patent/CN117032573A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0629Configuration or reconfiguration of storage systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/84Mapping; Conversion
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0602Interfaces specially adapted for storage systems specifically adapted to achieve a particular effect
    • G06F3/061Improving I/O performance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/06Digital input from, or digital output to, record carriers, e.g. RAID, emulated record carriers or networked record carriers
    • G06F3/0601Interfaces specially adapted for storage systems
    • G06F3/0628Interfaces specially adapted for storage systems making use of a particular technique
    • G06F3/0655Vertical data movement, i.e. input-output transfer; data movement between one or more hosts and one or more storage devices
    • G06F3/0656Data buffering arrangements
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/34Network arrangements or protocols for supporting network services or applications involving the movement of software or configuration parameters 
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/50Network services
    • H04L67/51Discovery or management thereof, e.g. service location protocol [SLP] or web services
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The application discloses a micro-service execution method, electronic equipment and a readable storage medium, and relates to the technical field of computers, wherein the micro-service execution method comprises the steps of responding to a micro-service execution instruction, checking whether a target service logic JAVA model corresponding to a micro-service to be executed exists in a temporary data storage area, wherein the target service logic JAVA model is determined according to service logic of the micro-service; and if the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the target service logic JAVA model is operated to execute the micro service. The application solves the problem of low execution efficiency of micro services in the prior art.

Description

Micro-service execution method, electronic device and readable storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a micro-service execution method, an electronic device, and a readable storage medium.
Background
With the rapid development of digital transformation, the traditional single architecture cannot adapt to the rapid change of the application in the cloud computing era, and faces more and more challenges, and the micro-service architecture is considered as the direction of building a new generation of distributed architecture application in the future, and by decomposing the application and the service into smaller and loosely coupled micro-services, the upgrade and expansion can be realized more easily, and under the micro-service architecture, each independent micro-service needs to be assembled through micro-service arrangement so as to realize a complete business process.
At present, after the micro-service arrangement is completed, the arranged micro-service is usually required to be executed by using the service logic model to verify whether the arranged micro-service can realize the corresponding service function, however, the micro-service is usually required to be executed for a plurality of times, and the service logic model is required to be repeatedly generated each time in the process of executing the micro-service, so that the execution efficiency of the current micro-service is low.
Disclosure of Invention
The application mainly aims to provide a micro-service execution method, a micro-service execution device, electronic equipment and a readable storage medium, and aims to solve the technical problem of low execution efficiency of micro-services in the prior art.
In order to achieve the above object, the present application provides a micro service execution method, including:
responding to a micro-service execution instruction, and checking whether a target service logic JAVA model corresponding to the micro-service to be executed exists in a temporary data storage area, wherein the target service logic JAVA model is determined according to service logic of the micro-service;
if yes, the target service logic JAVA model is operated to execute the micro service.
Optionally, before the step of checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the micro service execution method further includes:
Checking whether XML service attribute representing rules of the micro service exist in the temporary data storage area;
if yes, acquiring the XML service attribute representation rule from the temporary data storage area;
and analyzing the XML service attribute representation rule to convert the XML service attribute representation rule into a JAVA service attribute representation rule, wherein the service attribute rule is used for representing the configuration rule corresponding to the service attribute in the micro service.
Optionally, the checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area includes:
acquiring service request heads and service request parameters of the micro service, and acquiring request head configuration rules and request parameter configuration rules in the JAVA service attribute representation rules;
checking whether the service request header meets the request header configuration rule and whether the service request parameter meets the request parameter configuration rule;
and if the service request header meets the request header configuration rule and the service request parameter meets the request parameter configuration rule, checking whether a target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area.
Optionally, after the step of checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the micro service execution method further includes:
if the fact that the target service logic JAVA model corresponding to the micro service to be executed does not exist in the temporary data storage area is verified, acquiring an XML service logic file corresponding to the micro service from the temporary data storage area;
analyzing the XML service logic file to obtain a service logic JAVA model;
and storing the service logic JAVA model as the target service logic JAVA model to the temporary data storage area, and running the target service logic JAVA model to execute the step of micro-service.
Optionally, the acquiring the XML service logic file corresponding to the micro service from the temporary data storage area includes:
acquiring a check duration of a target service logic JAVA model corresponding to the micro service in a temporary data storage area;
judging whether the verification duration is greater than a preset verification duration threshold value or not;
if yes, the XML service logic file corresponding to the micro service is obtained from the temporary data storage area.
Optionally, after the step of executing the target service logic JAVA model to execute the micro service, the micro service execution method further includes:
generating a model behavior log, storing the model behavior log into the temporary data storage area, and writing each behavior log in the temporary data storage area into a preset message queue every preset time length.
Optionally, after the step of storing the model behavior log in the temporary data storage area and writing each behavior log in the temporary data storage area to a preset message queue every preset time period, the micro-service execution method further includes:
the model behavior log is read from the message queue based on a log exporter to write the model behavior log into a non-relational database.
Optionally, before the step of verifying whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area in response to the micro service execution instruction, the micro service execution method further includes:
acquiring service information of a service to be arranged based on a preset standard service attribute;
And arranging the service information according to a business process management 2.0 protocol to create the micro-service.
The present application also provides a micro service execution device, comprising:
the verification module is used for responding to the micro-service execution instruction and verifying whether a target service logic JAVA model corresponding to the micro-service to be executed exists in the temporary data storage area, wherein the target service logic JAVA model is determined according to the service logic of the micro-service;
and the execution model is used for running the target service logic JAVA model if yes so as to execute the micro service.
The application also provides an electronic device, which is entity equipment, comprising: at least one processor; and a memory communicatively coupled to the at least one processor; wherein the memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the micro-service execution method as described above.
The present application also provides a readable storage medium which is a computer readable storage medium having stored thereon a program for realizing the micro-service execution method, the program for realizing the micro-service execution method being executed by a processor to realize the steps of the micro-service execution method as described above.
The application also provides a computer program product comprising a computer program which, when executed by a processor, implements the steps of a micro-service execution method as described above.
After responding to a micro-service execution instruction, the method checks whether a target service logic JAVA model corresponding to the micro-service to be executed exists in a temporary data storage area, if the target service logic JAVA model corresponding to the micro-service exists in the temporary data storage area, the micro-service is not executed for the first time, and at the moment, because the target service logic JAVA model corresponding to the micro-service is stored in the temporary data storage area, the execution process of the micro-service can be completed directly by running the target service logic JAVA model without repeatedly generating the target service logic JAVA model when the micro-service is executed this time, so that the technical problem of low execution efficiency of the micro-service in the prior art is solved, and the micro-service execution efficiency is improved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the application and together with the description, serve to explain the principles of the application.
In order to more clearly illustrate the embodiments of the application or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
FIG. 1 is a schematic diagram of a micro-service orchestration execution system according to an embodiment of the present application;
FIG. 2 is a schematic diagram of an architecture of an extended meta-model in a micro-service orchestration execution system according to one embodiment of the present application;
FIG. 3 is a schematic diagram of a service logic execution engine in a micro-service orchestration execution system according to an embodiment of the present application;
FIG. 4 is a flowchart of a micro-service execution method according to an embodiment of the present application;
FIG. 5 is a flowchart of a micro-service execution method according to a second embodiment of the present application;
FIG. 6 is a schematic flow chart of a micro-service execution method according to a second embodiment of the present application;
FIG. 7 is a flowchart of a micro-service execution method according to a third embodiment of the present application;
FIG. 8 is a schematic block diagram of a micro-service execution device according to an embodiment of the present application;
fig. 9 is a schematic device structure diagram of a hardware running environment related to a micro-service execution method in an embodiment of the present application.
The achievement of the objects, functional features and advantages of the present application will be further described with reference to the accompanying drawings, in conjunction with the embodiments.
Detailed Description
In order to make the above objects, features and advantages of the present application more comprehensible, the following description of the embodiments accompanied with the accompanying drawings will be given in detail. It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Example 1
With the rapid development of digital transformation, the traditional single architecture cannot adapt to the rapid change of the application in the cloud computing era, and faces more and more challenges, and the micro-service architecture is considered as the direction of building a new generation of distributed architecture application in the future, and by decomposing the application and the service into smaller and loosely coupled micro-services, the upgrade and expansion can be realized more easily, and under the micro-service architecture, each independent micro-service needs to be assembled through micro-service arrangement so as to realize a complete business process.
At present, after the micro-service is arranged, the arranged micro-service is usually required to be executed by using a service logic model to verify whether the arranged micro-service can realize the corresponding service function, however, the micro-service is usually required to be executed for a plurality of times, and the service logic JAVA model is required to be repeatedly generated in the process of executing the micro-service each time, so that the execution efficiency of the current micro-service is low.
As an example, referring to fig. 1, fig. 1 provides a micro service orchestration execution system to which a micro service execution method is applied, where the micro service orchestration execution system includes a service manager 100, a service logic meta-model 200, a visual service orchestration designer 300, a service orchestration execution engine 400, and a gateway 500, where the service manager 100 is responsible for registration management of micro services, including orchestrated services and orchestrated services, standardizes service attributes, and each service provider registers service information according to standard service attributes, where the standardized service attributes include: service coding, request address, communication protocol, request mode, content type, path parameter, URL parameter, request header parameter, request body input parameter, response body output parameter, route information, flow control information, flow distribution information, authentication information and the like; the service logic meta-model 200 is composed of a BPMN2.0 (Business Process Managment, business process management) native meta-model 201 and an extension meta-model 202, wherein the BPMN2.0 native meta-model 201 mainly uses a start event, an end event, an exclusive gateway, a parallel gateway, a service task, a script task, a sub-process and a sequential flow, and the extension meta-model 202 is a meta-model designed by using the service task through a certain abstraction based on the service orchestration business scene, and is especially specific to the service orchestration scene. The extended meta-model 202 includes rest service calls, parameter verifiers, data converters, return parameter setters, variables, and the like; the service logic orchestration designer 300 is responsible for visually orchestrating service logic based on the service logic metamodel 200, consisting of a toolbar, metamodel, canvas, and configuration panel. The designer is designed based on a micro-kernel architecture, and the kernel is light in weight and strong in function expansibility; the service orchestration execution engine 400 is responsible for the execution of the orchestrated service, and is composed of an access agent 401 and a service logic execution engine 402, wherein the access agent 401 is responsible for analysis execution, including service attribute analysis, request mode verification, content type verification, request parameter verification and the like, and the service logic execution engine is composed of a service logic converter, an executor, a buffer, a log recorder and a log exporter; the gateway 500 is responsible for general functions such as service authentication, load balancing, routing, flow control, link tracking, etc. Note that, in this example, the configuration of the micro service orchestration execution system to which the micro service execution method is applied is not limited.
As an example, referring to fig. 2, the extended meta-model 202 includes a rest service call 221, a parameter checker 222, a data converter 223, a return parameter setter 224, and a variable 225, where the rest service call 221 is responsible for the call execution of the http protocol service, and the node attribute includes: code, name, service code, connection timeout time, socket timeout time, number of failed retries, request path parameter, request URL parameter, request header, request body parameter, whether the request parameter is saved as a variable, whether the response parameter is saved as a variable, etc.; the parameter checker 222 is responsible for validity check of input parameters, supports common data format check such as null check, length check, date format check, email and the like, attribute correlation check, expression checker and the like, and has expandable check rules, and node attributes thereof include: code, name, checked data, verifier, logical relationship, etc.; the data converter 223 is responsible for data conversion, such as date format conversion, text interception, etc., and node attributes thereof include: coding, names, parameters to be converted and converted parameters, wherein the parameters to be converted support spel expressions; the return parameter setter 224 is responsible for assembling output parameters according to the orchestration service output parameter definition, and its node attributes include: code, name, return parameter value fill; the variable 225 is responsible for storing data and data transfer in the execution process, and is divided into a system variable and a flow variable, wherein the system variable scope is the whole system, the flow variable scope is the flow instance, the system variable reference mode is # { var }, and the flow variable reference mode is $ { var }.
As an example, referring to fig. 3, the service logic execution engine 402 includes a service logic converter 421, an executor 422, a buffer 423, a log logger 424, and a log exporter 425, where the service logic converter 421 is responsible for converting a service logic definition file into a JAVA model; the executor 422 is responsible for executing the JAVA model; the buffer 423 is responsible for the buffer of the JAVA model, and supports various buffer implementations such as external centralized buffer, process level buffer, and combined buffer; the log logger 424 is responsible for log collection in the execution process, the logged log is cached first, and the log is written into the message queue periodically after the execution is finished; the log exporter 425 is responsible for exporting logs from the message queue to big data related components for subsequent execution process playback, problem localization, and statistical analysis.
Based on this, the present application proposes a micro service execution method of the first embodiment, referring to fig. 4, the micro service execution method includes:
step S10, responding to a micro-service execution instruction, and checking whether a target service logic JAVA model corresponding to the micro-service to be executed exists in a temporary data storage area, wherein the target service logic JAVA model is determined according to the service logic of the micro-service;
It should be noted that, the temporary data storage area refers to a temporary cache space for storing execution data of the micro services, in actual situations, a temporary cache space may be opened up for each micro service separately, or a total temporary cache space may be set up to cache execution data of a plurality of micro services, which is not limited in this embodiment. The micro-service is a software architecture, and the service logic model refers to a logic structure of execution data of the micro-service, and because the service logic model is generally composed of a plurality of meta-models, each meta-model corresponds to one execution flow of the micro-service, in actual situations, the execution process of the micro-service can be completed by running the behaviors and flows of each meta-model in the service logic model. The target service logic JAVA model refers to a service logic model represented in JAVA format corresponding to the micro service.
And step S20, if yes, running the target service logic JAVA model to execute the micro service.
It can be understood that if the target service logic JAVA model corresponding to the micro service exists in the temporary data storage area, it is indicated that the micro service is not executed for the first time, and at this time, since the target service logic JAVA model corresponding to the micro service is stored in the temporary data storage area, when the micro service is executed this time, it is unnecessary to repeatedly generate the target service logic JAVA model.
After responding to a micro-service execution instruction, the embodiment of the application checks whether a target service logic JAVA model corresponding to the micro-service to be executed exists in a temporary data storage area, if the target service logic JAVA model corresponding to the micro-service exists in the temporary data storage area, the micro-service is not executed for the first time, and at the moment, because the target service logic JAVA model corresponding to the micro-service is stored in the temporary data storage area, the execution process of the micro-service can be completed directly by running the target service logic JAVA model without repeatedly generating the target service logic JAVA model when the micro-service is executed, thereby solving the technical problem of low execution efficiency of the micro-service in the prior art and improving the execution efficiency of the micro-service.
In one possible implementation manner, before the step of checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the micro service execution method further includes:
step S11, checking whether XML service attribute representing rules of the micro service exist in the temporary data storage area;
Since the code of XML is clearly understood and can meet the registration requirement of the service, in order to improve the registration efficiency and the intuitiveness of the registration code in the process of registering the service, the service is registered by preferentially adopting the code of XML format, so the service attribute rule stored in the temporary data storage area is generally represented by XML format.
The XML service attribute expression rule refers to a service attribute rule expressed by an XML format, the service attribute rule refers to a configuration rule corresponding to each service attribute included in the micro service, the service attribute refers to an architecture composition of the micro service, and the service attribute may include a service code, a request address, a communication protocol, a request mode, a content type, a path parameter, a URL parameter, a request header parameter, a request body input parameter, a response body output parameter, routing information, flow control information, flow allocation information, authentication information, execution logic, and the like.
It will be appreciated that if the XML service attribute representation rule for the micro service does not exist in the temporary data store, indicating that the micro service has not yet been registered, or that the micro service has not yet been registered, it will be appreciated that the micro service does not exist at this time.
Step S12, if yes, acquiring the XML service attribute representation rule from the temporary data storage area;
it will be appreciated that if the XML service attribute representation rule for the micro service exists in the temporary data store, this will indicate that the micro service has completed registration.
And S13, analyzing the XML service attribute representation rule to convert the XML service attribute representation rule into a JAVA service attribute representation rule, wherein the service attribute rule is used for representing a configuration rule corresponding to the service attribute in the micro service.
The JAVA service attribute expression rule refers to a service attribute rule expressed in JAVA format, and the parsing process refers to converting the service attribute rule from XML format expression to JAVA format expression.
As an example, in the parsing process, the code corresponding to the XML service attribute representation rule may be subjected to string processing, and then the string processed XML service attribute representation rule is scanned by using a regular expression to determine a parsing algorithm, and the XML service attribute representation rule is converted into a JAVA service attribute representation rule by the parsing algorithm; the interface path corresponding to the XML service attribute representation rule may also be determined in a for-loop manner, and then the interface path is replaced with a JAVA parsed interface path, so that the XML service attribute representation rule may be converted into a JAVA service attribute representation rule, which is not specifically limited in this example.
In this embodiment, whether the micro service is registered or not may be determined by checking whether the XML service attribute representing rule of the micro service exists in the temporary data storage area, if the XML service attribute representing rule of the micro service exists in the temporary data storage area, it indicates that the micro service is registered, at this time, the XML service attribute representing rule corresponding to the micro service is obtained from the temporary data storage area, and then the XML service attribute representing rule is analyzed to convert the XML service attribute representing rule into the JAVA service attribute representing rule, if the XML service attribute representing rule of the micro service does not exist in the temporary data storage area, it indicates that the micro service is not registered yet, or if the micro service is not registered yet, at this time, continuous access to the temporary data storage area is stopped to stop occupation of the running resource space.
In one possible implementation manner, the checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area includes:
step S14, obtaining service request heads and service request parameters of the micro service, and obtaining request head configuration rules and request parameter configuration rules in the JAVA service attribute representation rules;
It should be noted that, the service request header is used for representing the request mode of the micro service, the service request header may include a request header name and a request header value, the service request parameter is used for representing the request content of the micro service, the service request parameter may include a request address, a request body input parameter, a response body output parameter, etc., the request header configuration rule refers to the request mode of the micro service when the request is legal, and the request parameter configuration rule refers to the request content of the micro service when the request is legal.
For example, assuming that the service request header is an identity authentication header, the micro service requires that the identity carried by the service request header is legal when the request is legal, and correspondingly, the micro service also requires that the field format carried by the service request parameter is required to satisfy the request parameter configuration rule when the request is legal, for example, the field format of a certain field in the request parameter may be included in the request parameter configuration rule is a digital type format.
In addition, when the service request header and the service request parameter of the micro service are acquired, the service request header and the service request parameter of the micro service may be acquired in the foreground data storage area, the service request header and the service request parameter of the micro service may be acquired in the middle data storage area, and the service request header and the service request parameter of the micro service may be acquired in the background data storage area, which is not limited in this embodiment.
As an example, after the XML service attribute representation rule is converted into the JAVA service attribute representation rule, the JAVA service attribute representation rule may be stored in a temporary data storage area, and at this time, a request header configuration rule and a request parameter configuration rule in the JAVA service attribute representation rule are acquired from the temporary data storage area.
Step S15, checking whether the service request header meets the request header configuration rule and whether the service request parameter meets the request parameter configuration rule;
step S16, if the service request header meets the request header configuration rule and the service request parameter meets the request parameter configuration rule, checking whether a target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area.
It will be appreciated that if the service request header satisfies the request header configuration rule and the service request parameter satisfies the request parameter configuration rule, it is indicated that the micro service registration is legal, and the micro service can be executed normally, that is, the service attribute programmed in the process of programming the micro service meets the execution standard of the micro service.
In this embodiment, firstly, a service request header and a service request parameter of a micro service are obtained, and a request header configuration rule and a request parameter configuration rule in a JAVA service attribute expression rule are obtained, and then, whether the service request header meets the request header configuration rule or not and whether the service request parameter meets the request parameter configuration rule or not are checked, if the service request header meets the request header configuration rule and the service request parameter meets the request parameter configuration rule, it is indicated that the micro service registration is legal, the micro service can be normally executed, and therefore, the execution legitimacy of the micro service is ensured.
In one possible implementation manner, after the step of verifying whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the micro service execution method further includes:
step S21, if the fact that the target service logic JAVA model corresponding to the micro service to be executed does not exist in the temporary data storage area is verified, an XML service logic file corresponding to the micro service is obtained from the temporary data storage area;
it can be understood that if the target service logic JAVA model corresponding to the micro service does not exist in the temporary data storage area, which indicates that the service orchestration execution engine executes the micro service for the first time, then when executing the micro service, the target service logic JAVA model corresponding to the micro service needs to be generated.
S22, analyzing the XML service logic file to obtain a service logic JAVA model;
the XML service logic file refers to a service logic file represented by an XML format, the service logic JAVA model refers to a service logic file represented by a JAVA format, the service logic file records a logic structure of execution data of the micro service, and the parsing process refers to converting the service logic file from the XML format representation to the JAVA format representation.
As an example, in the parsing process, each flow node in the XML service logic file may be first obtained, then the parsing algorithm corresponding to each flow node may be searched, so as to parse each flow node, and finally the service logic JAVA model may be obtained by integrating each flow node after parsing.
Step S23, the service logic JAVA model is stored into the temporary data storage area as the target service logic JAVA model, and the target service logic JAVA model is operated to execute the micro-service step.
It can be understood that, by storing the service logic JAVA model as the target service logic JAVA model in the temporary data storage area, when the micro service is repeatedly executed in the subsequent step, the target service logic JAVA model corresponding to the micro service can be found in the temporary data storage area, so that the service logic JAVA model does not need to be repeatedly generated, and the execution efficiency of the subsequent micro service is improved.
In order to improve the accuracy of the service logic JAVA model stored in the temporary data storage area, checking the service logic JAVA model once every time a certain number of calls is reached, if the number of calls of the first service logic JAVA model is greater than a preset number of calls threshold, when the target service needs to be called for next execution, a second service logic JAVA model corresponding to the target service needs to be synchronously generated, and checking whether the first service logic JAVA model and the second service logic JAVA model are matched, and if the first service logic JAVA model and the second service logic JAVA model are not matched, replacing the first service logic JAVA model with the second service logic JAVA model in the temporary data storage area is needed.
In this embodiment, if it is verified that the target service logic JAVA model corresponding to the micro service does not exist in the temporary data storage area, it is indicated that the service orchestration execution engine executes the micro service for the first time, at this time, it is required to obtain an XML service logic file corresponding to the micro service from the temporary data storage area, then analyze the XML service logic file, so as to convert the service logic file from an XML format representation mode to a JAVA format representation mode, obtain a service logic JAVA model, and then store the service logic JAVA model as the target service logic JAVA model in the temporary data storage area, so that when the micro service is repeatedly executed in the subsequent process, the target service logic JAVA model corresponding to the micro service can be found in the temporary data storage area, without repeatedly generating the service logic JAVA model, thereby improving the execution efficiency of the subsequent micro service.
In one possible implementation manner, the acquiring the XML service logic file corresponding to the micro service from the temporary data storage area includes:
step S211, obtaining a verification duration of verifying whether a target service logic JAVA model corresponding to the micro service exists in a temporary data storage area;
step S212, judging whether the verification duration is greater than a preset verification duration threshold;
and step S213, if yes, acquiring the XML service logic file corresponding to the micro service from the temporary data storage area.
In this embodiment, first, a verification duration of whether a target service logic JAVA model corresponding to a micro service exists in a temporary data storage area is obtained, then, whether the verification duration is greater than a preset verification duration threshold is verified, if the verification duration is greater than the preset verification duration threshold, it is indicated that a verification result cannot be obtained for a long time, at this time, the target service logic JAVA model corresponding to the micro service does not exist in the temporary data storage area by default, so that the execution efficiency of the micro service can be prevented from being affected due to overlong verification duration.
Example two
In another embodiment of the present application, the same or similar content as that of the first embodiment may be referred to the description above, and will not be repeated. On this basis, referring to fig. 5, after the step of executing the target service logic JAVA model to execute the micro service, the micro service execution method further includes:
Step S30, generating a model behavior log, storing the model behavior log into the temporary data storage area, and writing each behavior log in the temporary data storage area into a preset message queue every preset time length.
At present, a database is usually needed to be used in the process of data storage and calling, and newly generated data needs to be successfully written into the database and loaded into a cache before being acquired, however, because the data is written into a pot of the database slowly, a relevant person is blocked when using a relevant terminal to update the data, in addition, the database needs to be frequently read and written in the process of writing the data into the database and reading the data into the cache, so that the performance of the database is reduced, and the data updating efficiency is further affected.
It should be noted that, the model behavior log records the operation behavior and operation circulation of each meta-model in the target service logic JAVA model.
As an example, the step of storing the model behavior log in the temporary data storage area, and writing each behavior log in the temporary data storage area to a preset message queue every preset time period includes: and storing the model behavior log into the temporary data storage area based on a log recorder, and writing each behavior log in the temporary data storage area into a preset message queue based on the log recorder every preset time length.
In this embodiment, after the model behavior log is generated, the model behavior log is stored in the temporary data storage area, and each behavior log stored in the temporary data storage area is written into a preset message queue every time a preset time period is set, and each model behavior log is persisted into the message queue by using the distributed cache and the distributed message queue, so that a reading process of directly reading data from the database is reduced by pushing the data into the cache (temporary data storage area), and meanwhile, a process of writing the data into the database first is avoided by persisting the data into the message queue, and the data updating efficiency is improved.
At present, the execution after service arrangement depends on a traditional relational database, but because the relational database has poor high-efficiency reading and writing performance for carrying out a large amount of data and the operation space required by high concurrent reading and writing requirements is overlarge, the execution efficiency of micro services can be affected to a certain extent, and the phenomenon of blocking easily occurs in the micro service execution process due to the fact that the residual operation space available for the micro service execution engine to execute the services is too small.
In one possible implementation manner, after the step of storing the model behavior log in the temporary data storage area and writing each behavior log in the temporary data storage area to a preset message queue every a preset duration, the micro service execution method further includes:
Step S40, the model behavior log is read from the message queue based on a log exporter so as to write the model behavior log into a non-relational database.
It should be noted that the non-relational database is a Lucene-based search server, and has the advantages of expansibility and high availability.
It can be appreciated that after the model behavior log is written into the non-relational database, the service provider can conveniently browse, audit execution, problem analysis and positioning and the like of the model behavior log.
In this embodiment, the log exporter reads the model behavior log from the message queue to write the model behavior log into the non-relational database, so that the service execution after arrangement does not depend on the traditional relational database, the technical defect existing in the execution of the micro service by adopting the relational database is overcome, the execution efficiency of the micro service is improved, and the fluency of the micro service execution process is ensured.
For exemplary purposes, please refer to fig. 6, fig. 6 provides a schematic flow chart of micro-service execution, which is specifically as follows:
1. After service registration, the service attribute is written into a database (the non-relational database) and a cache (the temporary data storage area) at the same time, when the service is accessed, an access agent firstly reads a service attribute XML representation form (the XML service attribute representation rule) from the cache, and if the service cannot be read, the service is not registered, and the access is finished;
2. if the service attribute XML representation is read, the access agent converts the service attribute XML representation into a JAVA representation (the JAVA service attribute representation rule) which is converted into a service attribute JAVA model;
3. the access agent carries out corresponding verification on the request header and the request parameter of the service request according to the request header and the request parameter constraint rule defined in the service attribute JAVA model, and if the verification is unsuccessful, the access is ended;
4. if the verification is successful, giving control right to a service logic execution engine, and reading a service logic JAVA model, namely a JAVA expression form of the service logic, from a cache by the service logic execution engine;
4.1, if the service logic JAVA model is not read from the cache, the service execution engine reads the service logic XML representation from the cache and converts the service logic XML representation into the service logic JAVA model;
4.2, storing the service logic JAVA model into a cache, so that the service logic JAVA model can be conveniently and directly read from the cache later, and the reading speed is improved;
5. If the service logic JAVA model can be read from the cache, the service logic execution engine starts to execute the behavior and circulation of each meta-model in the service logic JAVA model;
6. generating an execution log by a log recorder in the meta-model execution process and caching the execution log into a memory;
7. the log recorder writes the log into the message queue regularly;
8. the log exporter is responsible for exporting logs from the message queue to an ES (Elastic Search, non-relational database) for subsequent log browsing, audit execution, problem analysis and localization.
It should be noted that the foregoing examples are only for understanding the present application, and are not meant to limit the micro service execution method of the present application, and more forms of simple transformation based on the technical concept are all within the scope of the present application.
Example III
In another embodiment of the present application, the same or similar content as that of the first embodiment may be referred to the description above, and will not be repeated. On this basis, referring to fig. 7, before the step of responding to the micro-service execution instruction and checking whether the target service logic JAVA model corresponding to the micro-service to be executed exists in the temporary data storage area, the micro-service execution method further includes:
Step S101, service information of a service to be arranged is obtained based on preset standard service attributes;
it can be understood that, by acquiring the service information of the service to be orchestrated based on the standard service attribute, the service provider can register the service according to the standard requirement, so that the service orchestration platform can be accessed without introducing the SDK (Software Development Kit ) provided by the orchestration platform, the access mode is simple, the switching of the orchestration engine and the migration of the flow definition are facilitated, and no invasion is caused to the code layer of the service provider.
It should be noted that, when the service information of the service to be scheduled is acquired, the service information of the service to be scheduled may be acquired from the foreground data storage area, or the service information of the service to be scheduled may be acquired from the background data storage area, which is not limited in this embodiment.
Step S102, arranging the service information according to a business process management 2.0 protocol to create the micro-service.
The atomic capacity is generally carried in a micro-service mode, in the prior art, an open-source micro-service orchestration engine or a flow engine is generally used for performing micro-service orchestration on the existing atomic capacity to realize service requirements, however, the micro-service orchestration engine is easy to bind technically by using a custom orchestration protocol, is unfavorable for the switching of the orchestration engine and the migration of the flow definition, has invasion to a code layer of a service provider, is easy to accumulate tasks, and affects the throughput and response time of a system; the open source flow engine has limited performance, and the provided node function can not meet the requirement of micro-service orchestration scene.
It can be appreciated that the micro-service created after the service information is organized according to the business process management 2.0 protocol can be compatible with the business process management 2.0 ecology, so that the service logic organization involves the replacement of the execution engine and is not easy to be bound technically.
Example IV
An embodiment of the present invention further provides a micro service execution device, referring to fig. 8, where the micro service execution device includes:
the verification module 10 is configured to verify whether a target service logic JAVA model corresponding to a micro service to be executed exists in the temporary data storage area in response to a micro service execution instruction, where the target service logic JAVA model is determined according to service logic of the micro service;
and the execution model 20 is used for running the target service logic JAVA model to execute the micro service if yes.
Optionally, the micro service execution device further includes:
checking whether XML service attribute representing rules of the micro service exist in the temporary data storage area;
if yes, acquiring the XML service attribute representation rule from the temporary data storage area;
and analyzing the XML service attribute representation rule to convert the XML service attribute representation rule into a JAVA service attribute representation rule, wherein the service attribute rule is used for representing the configuration rule corresponding to the service attribute in the micro service.
Optionally, the micro service execution device further includes:
acquiring service request heads and service request parameters of the micro service, and acquiring request head configuration rules and request parameter configuration rules in the JAVA service attribute representation rules;
checking whether the service request header meets the request header configuration rule and whether the service request parameter meets the request parameter configuration rule;
and if the service request header meets the request header configuration rule and the service request parameter meets the request parameter configuration rule, checking whether a target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area.
Optionally, the micro service execution device further includes:
if the fact that the target service logic JAVA model corresponding to the micro service to be executed does not exist in the temporary data storage area is verified, acquiring an XML service logic file corresponding to the micro service from the temporary data storage area;
analyzing the XML service logic file to obtain a service logic JAVA model;
and storing the service logic JAVA model as the target service logic JAVA model to the temporary data storage area, and running the target service logic JAVA model to execute the step of micro-service.
Optionally, the micro service execution device further includes:
acquiring a check duration of a target service logic JAVA model corresponding to the micro service in a temporary data storage area;
judging whether the verification duration is greater than a preset verification duration threshold value or not;
if yes, the XML service logic file corresponding to the micro service is obtained from the temporary data storage area.
Optionally, the micro service execution device further includes:
generating a model behavior log, storing the model behavior log into the temporary data storage area, and writing each behavior log in the temporary data storage area into a preset message queue every preset time length.
Optionally, the micro service execution device further includes:
the model behavior log is read from the message queue based on a log exporter to write the model behavior log into a non-relational database.
Optionally, the micro service execution device further includes:
acquiring service information of a service to be arranged based on a preset standard service attribute;
and arranging the service information according to a business process management 2.0 protocol to create the micro-service.
The micro-service execution device provided by the invention can solve the technical problem of low execution efficiency of the micro-service in the prior art by adopting the micro-service execution method in the first embodiment or the second embodiment. Compared with the prior art, the micro service execution device provided by the embodiment of the invention has the same beneficial effects as the micro service execution method provided by the embodiment, and other technical features in the micro service execution device are the same as those disclosed in the method of the previous embodiment, and are not described in detail herein.
Example five
The embodiment of the invention provides electronic equipment, which comprises: at least one processor; and a memory communicatively coupled to the at least one processor; the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the micro service execution method in the first embodiment.
Referring now to fig. 9, a schematic diagram of an electronic device suitable for use in implementing embodiments of the present disclosure is shown. The electronic devices in embodiments of the present disclosure may include, but are not limited to, mobile terminals such as mobile phones, notebook computers, digital broadcast receivers, PDAs (Personal Digital Assistant: personal digital assistants), PADs (Portable Application Description: tablet computers), PMPs (Portable Media Player: portable multimedia players), vehicle terminals (e.g., car navigation terminals), and the like, as well as stationary terminals such as digital TVs, desktop computers, and the like. The electronic device shown in fig. 9 is merely an example, and should not impose any limitations on the functionality and scope of use of embodiments of the present disclosure.
As shown in fig. 9, the electronic apparatus may include a processing device 1001 (e.g., a central processing unit, a graphics processor, or the like) that can perform various appropriate actions and processes according to a program stored in a Read Only Memory (ROM) 1002 or a program loaded from a storage device 1003 into a random access Memory (RAM: random Access Memory) 1004. In the RAM1004, various programs and data required for the operation of the electronic device are also stored. The processing device 1001, the ROM1002, and the RAM1004 are connected to each other by a bus 1005. An input/output (I/O) interface 1006 is also connected to the bus. In general, the following systems may be connected to the I/O interface 1006: input devices 1007 including, for example, a touch screen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, and the like; an output device 1008 including, for example, a liquid crystal display (LCD: liquid Crystal Display), a speaker, a vibrator, and the like; storage device 1003 including, for example, a magnetic tape, a hard disk, and the like; and communication means 1009. The communication means 1009 may allow the electronic device to communicate with other devices wirelessly or by wire to exchange data. While electronic devices having various systems are shown in the figures, it should be understood that not all of the illustrated systems are required to be implemented or provided. More or fewer systems may alternatively be implemented or provided.
In particular, according to embodiments of the present disclosure, the processes described above with reference to flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program embodied on a computer readable medium, the computer program comprising program code for performing the method shown in the flowcharts. In such an embodiment, the computer program may be downloaded and installed from a network through a communication device, or installed from the storage device 1003, or installed from the ROM 1002. The above-described functions defined in the method of the embodiment of the present disclosure are performed when the computer program is executed by the processing device 1001.
The electronic equipment provided by the invention adopts the micro-service execution method in the embodiment, and can solve the technical problem of low execution efficiency of the micro-service in the prior art. Compared with the prior art, the beneficial effects of the electronic device provided by the embodiment of the invention are the same as those of the micro-service execution method provided by the embodiment, and other technical features of the electronic device are the same as those disclosed by the method of the previous embodiment, so that the description is omitted herein.
It should be understood that portions of the present disclosure may be implemented in hardware, software, firmware, or a combination thereof. In the description of the above embodiments, particular features, structures, materials, or characteristics may be combined in any suitable manner in any one or more embodiments or examples.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that variations or substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.
Example six
An embodiment of the present invention provides a computer-readable storage medium having computer-readable program instructions stored thereon for executing the micro-service execution method of the first embodiment.
The computer readable storage medium according to the embodiments of the present invention may be, for example, a usb disk, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, or device, or a combination of any of the foregoing. More specific examples of the computer-readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access Memory (RAM: random Access Memory), a Read-Only Memory (ROM: read Only Memory), an erasable programmable Read-Only Memory (EPROM: erasable Programmable Read Only Memory or flash Memory), an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this embodiment, a computer-readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, or device. Program code embodied on a computer readable storage medium may be transmitted using any appropriate medium, including but not limited to: wire, fiber optic cable, RF (Radio Frequency), and the like, or any suitable combination of the foregoing.
The above-described computer-readable storage medium may be contained in an electronic device; or may exist alone without being assembled into an electronic device.
The computer-readable storage medium carries one or more programs that, when executed by an electronic device, cause the electronic device to: responding to a micro-service execution instruction, and checking whether a target service logic JAVA model corresponding to the micro-service to be executed exists in a temporary data storage area, wherein the target service logic JAVA model is determined according to service logic of the micro-service; if yes, the target service logic JAVA model is operated to execute the micro service.
Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, including an object oriented programming language such as Java, smalltalk, C ++ and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN: local Area Network) or a wide area network (WAN: wide Area Network), or may be connected to an external computer (for example, through the Internet using an Internet service provider).
The flowcharts and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present invention. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented in software or hardware. Wherein the name of the module does not constitute a limitation of the unit itself in some cases.
The readable storage medium provided by the application is a computer readable storage medium, and the computer readable storage medium stores computer readable program instructions for executing the micro-service execution method, so that the technical problem of low execution efficiency of the micro-service in the prior art can be solved. Compared with the prior art, the beneficial effects of the computer readable storage medium provided by the embodiment of the present application are the same as those of the micro service execution method provided by the first embodiment or the second embodiment, and are not described herein.
Example seven
The embodiment of the application also provides a computer program product, comprising a computer program which, when being executed by a processor, realizes the steps of the micro-service execution method as described above.
The computer program product provided by the application can solve the technical problem of low execution efficiency of micro services in the prior art. Compared with the prior art, the beneficial effects of the computer program product provided by the embodiment of the present application are the same as those of the micro service execution method provided by the first embodiment or the second embodiment, and are not described herein.
The foregoing description is only of the preferred embodiments of the present application, and is not intended to limit the scope of the application, but rather is intended to cover any equivalents of the structures or equivalent processes disclosed herein, or any application, directly or indirectly, within the scope of the application.

Claims (10)

1. A micro service execution method, characterized in that the micro service execution method comprises:
responding to a micro-service execution instruction, and checking whether a target service logic JAVA model corresponding to the micro-service to be executed exists in a temporary data storage area, wherein the target service logic JAVA model is determined according to service logic of the micro-service;
if yes, the target service logic JAVA model is operated to execute the micro service.
2. The micro service execution method according to claim 1, wherein before the step of checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the micro service execution method further comprises:
checking whether XML service attribute representing rules of the micro service exist in the temporary data storage area;
if yes, acquiring the XML service attribute representation rule from the temporary data storage area;
and analyzing the XML service attribute representation rule to convert the XML service attribute representation rule into a JAVA service attribute representation rule, wherein the service attribute rule is used for representing the configuration rule corresponding to the service attribute in the micro service.
3. The micro-service execution method as claimed in claim 2, wherein verifying whether the target service logic JAVA model corresponding to the micro-service to be executed exists in the temporary data storage area comprises:
acquiring service request heads and service request parameters of the micro service, and acquiring request head configuration rules and request parameter configuration rules in the JAVA service attribute representation rules;
checking whether the service request header meets the request header configuration rule and whether the service request parameter meets the request parameter configuration rule;
and if the service request header meets the request header configuration rule and the service request parameter meets the request parameter configuration rule, checking whether a target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area.
4. The micro service execution method according to claim 1, wherein after the step of checking whether the target service logic JAVA model corresponding to the micro service to be executed exists in the temporary data storage area, the micro service execution method further comprises:
if the fact that the target service logic JAVA model corresponding to the micro service to be executed does not exist in the temporary data storage area is verified, acquiring an XML service logic file corresponding to the micro service from the temporary data storage area;
Analyzing the XML service logic file to obtain a service logic JAVA model;
and storing the service logic JAVA model as the target service logic JAVA model to the temporary data storage area, and running the target service logic JAVA model to execute the step of micro-service.
5. The method for executing micro services according to claim 4, wherein the obtaining the XML service logic file corresponding to the micro services from the temporary data storage area includes:
acquiring a check duration of a target service logic JAVA model corresponding to the micro service in a temporary data storage area;
judging whether the verification duration is greater than a preset verification duration threshold value or not;
if yes, the XML service logic file corresponding to the micro service is obtained from the temporary data storage area.
6. The micro service execution method according to claim 1, wherein after the step of executing the target service logic JAVA model to execute the micro service, the micro service execution method further comprises:
generating a model behavior log, storing the model behavior log into the temporary data storage area, and writing each behavior log in the temporary data storage area into a preset message queue every preset time length.
7. The micro-service execution method of claim 6, wherein after the step of storing the model behavior log in the temporary data storage area and writing each behavior log in the temporary data storage area to a preset message queue every preset time period, the micro-service execution method further comprises:
the model behavior log is read from the message queue based on a log exporter to write the model behavior log into a non-relational database.
8. The micro service execution method according to any one of claims 1 to 7, wherein, before the step of verifying whether a target service logical JAVA model corresponding to the micro service to be executed exists in the temporary data storage area in response to the micro service execution instruction, the micro service execution method further comprises:
acquiring service information of a service to be arranged based on a preset standard service attribute;
and arranging the service information according to a business process management 2.0 protocol to create the micro-service.
9. An electronic device, the electronic device comprising:
at least one processor; the method comprises the steps of,
a memory communicatively coupled to the at least one processor; wherein,
The memory stores instructions executable by the at least one processor to enable the at least one processor to perform the steps of the micro service execution method of any one of claims 1 to 8.
10. A readable storage medium, characterized in that the readable storage medium is a computer-readable storage medium having stored thereon a program that implements a micro-service execution method, the program that implements the micro-service execution method being executed by a processor to implement the steps of the micro-service execution method according to any one of claims 1 to 8.
CN202311000661.XA 2023-08-09 2023-08-09 Micro-service execution method, electronic device and readable storage medium Pending CN117032573A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311000661.XA CN117032573A (en) 2023-08-09 2023-08-09 Micro-service execution method, electronic device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311000661.XA CN117032573A (en) 2023-08-09 2023-08-09 Micro-service execution method, electronic device and readable storage medium

Publications (1)

Publication Number Publication Date
CN117032573A true CN117032573A (en) 2023-11-10

Family

ID=88627492

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311000661.XA Pending CN117032573A (en) 2023-08-09 2023-08-09 Micro-service execution method, electronic device and readable storage medium

Country Status (1)

Country Link
CN (1) CN117032573A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579700A (en) * 2024-01-11 2024-02-20 中国人民解放军国防科技大学 General micro-service processing method, system and equipment based on message queue

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN117579700A (en) * 2024-01-11 2024-02-20 中国人民解放军国防科技大学 General micro-service processing method, system and equipment based on message queue
CN117579700B (en) * 2024-01-11 2024-04-02 中国人民解放军国防科技大学 General micro-service processing method, system and equipment based on message queue

Similar Documents

Publication Publication Date Title
US10963267B2 (en) Bootstrapping profile-guided compilation and verification
US20100077257A1 (en) Methods for disaster recoverability testing and validation
CN110674047B (en) Software testing method and device and electronic equipment
CN110955409B (en) Method and device for creating resources on cloud platform
CN111666497A (en) Application program loading method and device, electronic equipment and readable storage medium
CN112104709A (en) Intelligent contract processing method, device, medium and electronic equipment
CN117032573A (en) Micro-service execution method, electronic device and readable storage medium
CN109032693B (en) Method and device for loading display information, electronic equipment and readable storage medium
CN114048415A (en) Form generation method and device, electronic equipment and computer readable storage medium
CN113238739A (en) Plug-in development and data acquisition method, device, electronic equipment and medium
CN113778897A (en) Automatic test method, device, equipment and storage medium of interface
CN110188308B (en) Client automatic dotting reporting method, storage medium, equipment and system
CN111625291A (en) Automatic iteration method and device of data processing model and electronic equipment
CN116563007A (en) Credit risk prediction method, electronic equipment and readable storage medium
CN110717134A (en) Product description issuing method and device, storage medium and electronic equipment
CN115248680A (en) Software construction method, system, device, medium, and program product
CN114035864A (en) Interface processing method, interface processing device, electronic device, and storage medium
CN112394920A (en) Application software development method, platform and electronic equipment
CN113672200A (en) Microservice processing method and device, storage medium and electronic equipment
CN111949259A (en) Risk decision configuration method, system, electronic equipment and storage medium
CN115470292B (en) Block chain consensus method, device, electronic equipment and readable storage medium
CN116820539B (en) System software operation maintenance system and method based on Internet
CN112688863B (en) Gateway data processing method and device and electronic equipment
US11061988B2 (en) Reducing web page load times
CN116775957A (en) Data query method, electronic device and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination