CN117608599A - REST service release method and device for power transformation panoramic page and computer equipment - Google Patents

REST service release method and device for power transformation panoramic page and computer equipment Download PDF

Info

Publication number
CN117608599A
CN117608599A CN202311579962.2A CN202311579962A CN117608599A CN 117608599 A CN117608599 A CN 117608599A CN 202311579962 A CN202311579962 A CN 202311579962A CN 117608599 A CN117608599 A CN 117608599A
Authority
CN
China
Prior art keywords
rest service
script
service
rest
execution result
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
CN202311579962.2A
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.)
State Grid Corp of China SGCC
Original Assignee
State Grid Corp of China SGCC
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 State Grid Corp of China SGCC filed Critical State Grid Corp of China SGCC
Priority to CN202311579962.2A priority Critical patent/CN117608599A/en
Publication of CN117608599A publication Critical patent/CN117608599A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Abstract

The invention relates to the technical field of computers, and discloses a REST service release method and device for a transformation panoramic page and computer equipment, wherein the method comprises the following steps: acquiring a REST service script uploaded by a developer, wherein the REST service script is realized by using an extensible markup language and a custom script language; and configuring a REST service label for the REST service script so that a service calling party calls a corresponding REST service script based on the REST service label. Compared with the development by using java and other languages, the development period and the code quantity are greatly shortened, and the release of the REST service is realized by uploading the REST service script to the template analysis engine service without restarting a back-end server.

Description

REST service release method and device for power transformation panoramic page and computer equipment
Technical Field
The invention relates to the technical field of computers, in particular to a REST service release method and device for a transformation panoramic page and computer equipment.
Background
Representational state transfer (Representational State Transfer, REST) is a style of software architecture. It suggests the use of a set of constraints and principles to design a web application program interface (Application Program Interface, API). These include uniform identification of resources, stateless communication, operating resources based on standardized HTTP (e.g., GET, POST, PUT, DELETE) methods, and the like.
Currently, when enterprises develop REST services, languages such as java, python, node, net and the like are generally used for implementation. These languages require a certain programming experience, have a certain technical threshold, and have a long development period. And when the enterprise issues the developed REST service, the back-end server is usually restarted to issue the REST service, so that the application scene that the REST service needs to be rapidly developed and issued in the power transformation panoramic page view is not met.
Disclosure of Invention
In view of the above, the invention provides a REST service release method and device for a transformation panoramic page and computer equipment, so as to solve the problem of long REST service period in current development and release.
In a first aspect, the present invention provides a REST service publishing method for a transformation panorama page, which is applied to a template parsing engine service, and the method includes:
acquiring a REST service script uploaded by a developer, wherein the REST service script is realized by using an extensible markup language and a custom script language;
and configuring a REST service label for the REST service script, wherein the REST service label corresponds to the REST service script one by one, so that a service calling party calls the corresponding REST service script based on the REST service label.
According to the method and the system, the REST service script uploaded by the developer is obtained through the template analysis engine, the REST service script is realized by using the extensible markup language and the custom script language, compared with the mode of developing the REST service by using java and other languages, the development period and the code quantity are greatly shortened, and the REST service script is only required to be uploaded to the template analysis engine service, and the REST service labels corresponding to the REST service script one by one are configured, so that the release of the REST service is realized, the back-end server is not required to be restarted, the effect of rapidly developing and releasing the REST service is realized, and the application scene that the REST service is required to be rapidly developed and released by the panoramic page view is met.
In an alternative embodiment, the method further comprises:
receiving a call request of a service calling party, and responding to the call request to acquire a REST service tag and a REST service entry in the call request;
acquiring a REST service script corresponding to the REST service label according to the REST service label;
executing the REST service script corresponding to the REST service label according to the REST service entry, and obtaining an execution result;
and returning the execution result to the service calling party.
According to the embodiment, the corresponding REST service script is directly called through the REST service tag, and the REST service script is executed according to the REST service parameter, so that an execution result is obtained, and the efficiency of calling the REST service by a developer is improved.
In an optional implementation manner, the executing the REST service script corresponding to the REST service tag according to the REST service entry, to obtain an execution result, includes:
analyzing the REST service script corresponding to the REST service label by using a template analysis engine analyzer to obtain the logic of the REST service in the REST service script;
and precompiling the REST service entry into the REST service script, and executing the REST service script according to the REST service logic in the REST service script to obtain an execution result.
According to the embodiment, the REST service script corresponding to the REST service label is analyzed by the template analysis engine analyzer, so that the REST service logic in the REST service script is obtained, the development speed is increased, and the development period is shortened.
In an alternative embodiment, before the preprocessing the REST service entry into the REST service script, the method further includes:
loading logic of REST service in the REST service script into a context;
the step of pre-compiling the REST service entry into the REST service script, and executing the REST service script according to the REST service logic in the REST service script to obtain an execution result, including:
and precompiling the REST service entry into the REST service script, and executing the REST service script according to the REST service logic in the context to obtain an execution result.
According to the embodiment, the REST service script can be quickly acquired and executed by extracting and preloading the logic in the REST service script into the context, so that the time consumption of analysis and execution is reduced, and the response speed and the execution efficiency of the system are improved.
In an alternative embodiment, the returning the execution result to the service caller includes:
packaging the execution result to obtain a packaged execution result;
and returning the encapsulated execution result to the service calling party.
In an alternative embodiment, the method further comprises:
and storing the REST service script in a database, and indexing according to the REST service label corresponding to the REST service script.
The embodiment realizes the dynamic configuration and management of the REST service script. The REST service script can be updated and modified by the developer at any time without recompilation or restarting of the server.
In an alternative embodiment, the REST service logic includes: business logic of REST service, data encapsulation logic of REST service and external request logic of REST service.
In a second aspect, the present invention provides a REST service publishing device for a transformation panorama page, where the REST service publishing device includes:
the REST service script acquisition module is used for acquiring the REST service script uploaded by the developer, wherein the REST service script is realized by using an extensible markup language and a custom script language;
and the REST service label configuration module is used for configuring REST service labels for the REST service scripts, wherein the REST service labels are in one-to-one correspondence with the REST service scripts, so that a service calling party calls the corresponding REST service scripts based on the REST service labels.
In a third aspect, the present invention provides a computer device comprising: the power transformation panorama page-oriented REST service issuing method comprises a memory and a processor, wherein the memory and the processor are in communication connection, the memory stores computer instructions, and the processor executes the computer instructions, so that the REST service issuing method for the power transformation panorama page according to the first aspect or any corresponding implementation mode is executed.
In a fourth aspect, the present invention provides a computer readable storage medium, where computer instructions are stored on the computer readable storage medium, where the computer instructions are configured to cause a computer to execute the REST service issuing method for the transformation panorama page according to the first aspect or any one of the embodiments corresponding to the first aspect.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings that are needed in the description of the embodiments or the prior art will be briefly described, and it is obvious that the drawings in the description below are some embodiments of the present invention, and other drawings can be obtained according to the drawings without inventive effort for a person skilled in the art.
Fig. 1 is a flow diagram of a REST service publishing method for a power transformation panoramic page according to an embodiment of the invention;
FIG. 2 is a flow diagram of another REST service publishing method for a power transformation panoramic page according to an embodiment of the invention;
FIG. 3 is a flowchart of another REST service publishing method for a power transformation panorama page according to an embodiment of the present invention;
FIG. 4 is a schematic diagram of interaction of a template parsing engine with a developer according to an embodiment of the invention;
fig. 5 is a block diagram of a REST service issuing apparatus for a power transformation panorama page according to an embodiment of the present invention;
fig. 6 is a schematic diagram of a hardware structure of a computer device according to an embodiment of the present invention.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Representational state transfer (Representational State Transfer, REST) is a style of software architecture. It suggests the use of a set of constraints and principles to design a web application program interface (Application Program Interface, API). These include uniform identification of resources, stateless communication, operating resources based on standardized HTTP (e.g., GET, POST, PUT, DELETE) methods, and the like.
Currently, when enterprises develop REST services, languages such as java, python, node, net and the like are generally used for implementation. These languages require a certain programming experience, have a certain technical threshold, and have a long development period. When the enterprise issues the developed REST service, the back-end server is usually restarted to issue the REST service, and the application scene that the panoramic page view needs to rapidly develop and issue the REST service is not satisfied.
In order to solve the problems of the related art, the embodiment of the invention provides the REST service release method for the transformation panoramic page, which achieves the effect of rapidly developing and releasing the REST service and meets the application scene that the transformation panoramic view needs to rapidly develop and release the REST service.
According to an embodiment of the present invention, there is provided an embodiment of a REST service issuing method for a transformation panorama page, and it should be noted that, the steps illustrated in the flowchart of the drawings may be performed in a computer system such as a set of computer executable instructions, and, although a logical order is illustrated in the flowchart, in some cases, the steps illustrated or described may be performed in an order different from that herein.
In this embodiment, a REST service publishing method for a transformation panorama page is provided, which may be used for the above mobile terminal, such as a central processing unit, a server, etc., fig. 1 is a flowchart of a REST service publishing method according to an embodiment of the present invention, and as shown in fig. 1, the flowchart includes the following steps:
step S101, obtaining REST service scripts uploaded by developers.
The REST service script is realized by using an extensible markup language and a custom script language.
And uploading the REST service script to a template analysis engine when a developer completes the REST service script to be issued by using the extensible markup language and the custom script language. The user-defined scripting language is a scripting language which is user-defined and set by a technician on the basis of the existing language.
It should be noted that, the developer downloads the custom script from the template parsing engine, where the custom script is a script template with a certain format, and the format is set by the template parsing engine developer. After finishing the downloading of the self-defined script from the template analysis engine, the developer writes the logic of the REST service in the self-defined script according to the REST service which the developer wants to issue, and the REST service script is obtained after the writing is finished.
Illustratively, the custom script template defines a func node in XML as the root node of the REST service.
A func node includes a business-logic node.
One func node contains a plurality of sql nodes and an external-service (external service node).
The this.in key can be used to obtain the set of parameters of the current node in the business-logic node, the this.out key can be used to obtain parameters, and the script of each node can be called by @ node name ("node ID", parameter.
Among external-service nodes, this is.in key may be used to obtain the set of parameters of the current node, this is.out key may be used to obtain the parameters, and this is.httpclient may be used to obtain the HttpClient object.
Illustratively, the custom script overall architecture may be as follows:
illustratively, the business logic label may be as follows:
illustratively, the SQL script may be as follows:
illustratively, the external service tag may be as follows:
step S102, a REST service label is configured for the REST service script, wherein the REST service label corresponds to the REST service script one by one, so that the service calling party calls the corresponding REST service script based on the REST service label.
It can be understood that the template parsing engine service includes REST service scripts uploaded by a plurality of developers, and a corresponding REST service tag is configured for each REST service script for the convenience of service invoker. That is, the REST service script and REST service tag are in one-to-one binding relation.
Illustratively, the REST service tag corresponding to the REST service script is rest_id.
After the corresponding REST service labels are configured for the REST service scripts, the release of REST services is completed. The service caller may use the REST service tag to call the REST service script that it wants to call.
According to the REST service release method for the transformation panorama page, the REST service script uploaded by a developer is obtained through the template analysis engine, the REST service script is realized by using the extensible markup language and the custom script language, compared with the mode of developing the REST service by using the java and other languages, the development period and the code quantity are greatly shortened, and the REST service script is only required to be uploaded to the template analysis engine service, the corresponding REST service label is configured for the REST service script, so that the release of the REST service is realized, the back-end server is not required to be restarted, the effect of rapidly developing and releasing the REST service is realized, and the application scene that the REST service is required to be rapidly developed and released for the transformation panorama view is met.
In this embodiment, a REST service publishing method for a transformation panorama page is provided, which may be used in the above mobile terminal, such as a central processing unit, a server, etc., and fig. 2 is a flowchart of a REST service publishing method for a transformation panorama page according to an embodiment of the present invention, as shown in fig. 2, where the flowchart includes the following steps:
step S201, obtaining REST service scripts uploaded by developers.
The REST service script is realized by using an extensible markup language and a custom script language.
Please refer to step S101 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S202, a REST service label is configured for the REST service script, wherein the REST service label corresponds to the REST service script one by one, so that the service calling party calls the corresponding REST service script based on the REST service label.
Please refer to step S102 in the embodiment shown in fig. 1 in detail, which is not described herein.
Step S203, receiving a call request of a service calling party, and responding to the call request, and acquiring a REST service tag and a REST service entry in the call request.
After the REST service is published, the service caller may call the published REST service.
It should be noted that, the service caller needs to send the REST service tag to be invoked and the REST service entry to call the REST service.
Step S204, obtaining the REST service script corresponding to the REST service label according to the REST service label.
After receiving the REST service label sent by the calling service side, the template analysis engine service acquires a corresponding REST service script based on the REST service label.
Step S205, executing the REST service script corresponding to the REST service label according to the REST service entry, and obtaining an execution result.
After the template analysis engine service obtains the REST service script corresponding to the label, executing the corresponding REST service script based on the REST service entry sent by the service calling party, and obtaining an execution result after the REST service script is executed.
Specifically, the step S205 includes:
step S2051, a template analysis engine analyzer is utilized to analyze the REST service script corresponding to the REST service label, and the logic of the REST service in the REST service script is obtained.
The template analysis engine service obtains a corresponding REST service script according to the REST service label sent by the calling service side. And analyzing the REST service script by using a self-contained analyzer of the template analysis engine service, and extracting the logic of the REST service from the REST service script.
Note that logic of REST service includes: business logic, data encapsulation logic, and external request logic for REST services.
Step S2052, the REST service entry is precompiled into the REST service script, and the REST service script is executed according to the REST service logic in the REST service script, so that an execution result is obtained.
It can be understood that after the logic of the REST service is obtained, the REST service is input into the REST service script in a precompiled manner, the REST service script is executed according to the logic of the REST service, and after the execution is finished, the parameter output, namely the execution result, of the REST service script is obtained.
Step S206, the execution result is returned to the service calling party.
After obtaining the execution result of the REST service, the template analysis engine service returns the execution result to the service calling party to complete the call of the REST service.
According to the REST service release method for the transformation panoramic page, the existing function resolvers are used for flexibly resolving business logic, data encapsulation logic, external request logic and the like in the script template, so that development speed is increased, and development period is shortened.
It should be noted that, a developer can customize the parsing process according to the actual requirement, so as to satisfy various complex service scenarios, and make the development and release of REST services more flexible and expandable.
In this embodiment, a REST service publishing method for a transformation panorama page is provided, which may be used in the above mobile terminal, such as a central processing unit, a server, etc., and fig. 3 is a flowchart of a REST service publishing method for a transformation panorama page according to an embodiment of the present invention, as shown in fig. 3, where the flowchart includes the following steps:
step 301, obtaining REST service scripts uploaded by a developer.
The REST service script is realized by using an extensible markup language and a custom script language.
The template resolution engine service may be a FreeMarker template resolution engine service.
Please refer to step S201 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S302, a REST service label is configured for the REST service script, wherein the REST service label corresponds to the REST service script one by one, so that the service calling party calls the corresponding REST service script based on the REST service label.
Please refer to step S202 in the embodiment shown in fig. 2, which is not described herein.
Step S303, receiving a call request of a service calling party, and responding to the call request to acquire a REST service tag and a REST service entry in the call request.
Please refer to step S203 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S304, obtaining the REST service script corresponding to the REST service label according to the REST service label.
Please refer to step S204 in the embodiment shown in fig. 2 in detail, which is not described herein.
Step S305, executing the REST service script corresponding to the REST service label according to the REST service entry, and obtaining an execution result.
Please refer to step S205 in the embodiment shown in fig. 2 in detail, which is not described herein.
Specifically, the step S305 includes:
and step S3051, analyzing the REST service script corresponding to the REST service label by using a template analysis engine analyzer to acquire the logic of the REST service in the REST service script.
Please refer to step S2051 in the embodiment shown in fig. 2, which is not described herein.
Step S3052, loading the logic of REST service in REST service script to the context.
As shown in fig. 4, it should be noted that, in order to facilitate data and status transfer between each component and reduce the coupling degree between components, in this embodiment, logic of REST service is loaded into a context, and a service caller does not need to perform IO operations multiple times when calling a REST service script.
The logic of REST service is loaded into the context for delivering application related information, configuration and state.
When the service calling party calls the REST service script again, the analysis is not needed, and the logic of the REST service is directly acquired from the context.
Step S3053, the REST service entry is precompiled into the REST service script, and the REST service script is executed according to the logic of the REST service in the context, so that an execution result is obtained.
It can be understood that after loading the logic of the REST service into the context, precompiling the REST service into the REST service script, as shown in fig. 4, reading the logic of the REST service from the context, executing the REST service script according to the logic of the REST service, and obtaining the parameter output, i.e. the execution result, of the REST service script after the execution is completed.
The type of REST service script, the release state of REST service script, and whether the REST service script can be executed can be obtained from the logic of REST service.
It may be appreciated that if the REST service script is issued, the REST service script may be executed.
And step S306, returning the execution result to the service calling party.
Specifically, the step S306 includes:
and step 3061, packaging the execution result to obtain a packaged execution result.
And after the execution result is obtained, packaging the execution result.
And step S3062, returning the encapsulated execution result to the service calling party.
After the execution result is packaged, the packaged execution result is returned to the service calling party to complete the call of the REST service script. In fig. 4, a developer is taken as an example of a service caller.
According to the REST service release method for the transformation panoramic page, the logic in the REST service script is preloaded into the context, so that the corresponding script can be quickly acquired and executed, the time consumption for analysis and execution is reduced, and the response speed and the execution efficiency of the template analysis engine service are improved.
In an alternative embodiment, the method further comprises:
and storing the REST service script in a database, and indexing according to the REST service label corresponding to the REST service script.
The embodiment realizes dynamic configuration and management of REST service scripts. The developer can update and modify the script templates at any time without having to recompile or restart the server.
The embodiment also provides a REST service issuing device for the transformation panorama page, which is used for realizing the embodiment and the preferred implementation, and is not described in detail. As used below, the term "module" may be a combination of software and/or hardware that implements a predetermined function. While the means described in the following embodiments are preferably implemented in software, implementation in hardware, or a combination of software and hardware, is also possible and contemplated.
The embodiment provides a REST service issuing device for a transformation panoramic page, as shown in fig. 5, including:
the REST service script obtaining module 501 is configured to obtain a REST service script uploaded by a developer, where the REST service script is implemented by using an extensible markup language and a custom scripting language.
The REST service tag configuration module 502 is configured to configure REST service tags for REST service scripts, where the REST service tags correspond to the REST service scripts one by one, so that the service calling party calls the corresponding REST service scripts based on the REST service tags.
In some alternative embodiments, the apparatus further comprises:
the call request receiving module is used for receiving a call request of a service calling party, and responding to the call request, and acquiring a REST service tag and a REST service entry in the call request.
And the REST service acquisition module is used for acquiring the REST service script corresponding to the REST service label according to the REST service label.
And the execution result acquisition module is used for executing the REST service script corresponding to the REST service label according to the REST service entry, and obtaining an execution result.
And the execution result returning module is used for returning the execution result to the service calling party.
In some alternative embodiments, the execution result acquisition module includes:
the service logic obtaining unit is used for analyzing the REST service script corresponding to the REST service label by using the template analysis engine analyzer to obtain the logic of REST service in the REST service script.
And the execution result acquisition subunit is used for pre-compiling the REST service into the REST service script, executing the REST service script according to the logic of the REST service in the REST service script, and obtaining an execution result.
In some alternative embodiments, the execution result acquisition module further includes:
and the context loading unit is used for loading the logic of the REST service in the REST service script to the context.
And the execution result acquisition subunit is further used for pre-compiling the REST service into the REST service script, and executing the REST service script according to the REST service logic in the context to obtain an execution result.
In some alternative embodiments, the execution result return module includes:
and the execution result return subunit is used for packaging the execution result, obtaining the packaged execution result and returning the packaged execution result to the service calling party.
In some alternative embodiments, the apparatus further comprises:
and the REST service script storage module is used for storing the REST service script in the database and indexing according to the REST service label corresponding to the REST service script.
Further functional descriptions of the above respective modules and units are the same as those of the above corresponding embodiments, and are not repeated here.
The REST service issuing device for the transformation panorama page in this embodiment is presented in the form of functional units, where the units refer to ASIC (Application Specific Integrated Circuit ) circuits, processors and memories executing one or more software or fixed programs, and/or other devices that can provide the above functions.
The embodiment of the invention also provides computer equipment, which is provided with the REST service issuing device facing the transformation panorama page shown in the figure 5.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a computer device according to an alternative embodiment of the present invention, as shown in fig. 6, the computer device includes: one or more processors 601, memory 602, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The various components are communicatively coupled to each other using different buses and may be mounted on a common motherboard or in other manners as desired. The processor may process instructions executing within the computer device, including instructions stored in or on memory to display graphical information of the GUI on an external input/output device, such as a display device coupled to the interface. In some alternative embodiments, multiple processors and/or multiple buses may be used, if desired, along with multiple memories and multiple memories. Also, multiple computer devices may be connected, each providing a portion of the necessary operations (e.g., as a server array, a set of blade servers, or a multiprocessor system). One processor 601 is illustrated in fig. 6.
The processor 601 may be a central processor, a network processor, or a combination thereof. The processor 601 may further comprise a hardware chip, among other things. The hardware chip may be an application specific integrated circuit, a programmable logic device, or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general-purpose array logic, or any combination thereof.
Wherein the memory 602 stores instructions executable by the at least one processor 601 to cause the at least one processor 601 to perform a method for implementing the embodiments described above.
The memory 602 may include a storage program area and a storage data area, wherein the storage program area may store an operating system, at least one application program required for a function; the storage data area may store data created according to the use of the computer device, etc. In addition, the memory 602 may include high-speed random access memory, and may also include non-transitory memory, such as at least one magnetic disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, memory 602 may optionally include memory located remotely from processor 601, such remote memory being connectable to the computer device through a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The memory 602 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk, or solid state disk; the memory 602 may also include a combination of the types of memory described above.
The computer device also includes a communication interface 603 for the computer device to communicate with other devices or communication networks.
The embodiments of the present invention also provide a computer readable storage medium, and the method according to the embodiments of the present invention described above may be implemented in hardware, firmware, or as a computer code which may be recorded on a storage medium, or as original stored in a remote storage medium or a non-transitory machine readable storage medium downloaded through a network and to be stored in a local storage medium, so that the method described herein may be stored on such software process on a storage medium using a general purpose computer, a special purpose processor, or programmable or special purpose hardware. The storage medium can be a magnetic disk, an optical disk, a read-only memory, a random access memory, a flash memory, a hard disk, a solid state disk or the like; further, the storage medium may also comprise a combination of memories of the kind described above. It will be appreciated that a computer, processor, microprocessor controller or programmable hardware includes a storage element that can store or receive software or computer code that, when accessed and executed by the computer, processor or hardware, implements the methods illustrated by the above embodiments.
Although embodiments of the present invention have been described in connection with the accompanying drawings, various modifications and variations may be made by those skilled in the art without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope of the invention as defined by the appended claims.

Claims (10)

1. The REST service release method for the power transformation panoramic page is characterized by being applied to a template analysis engine service, and comprises the following steps:
acquiring a REST service script uploaded by a developer, wherein the REST service script is realized by using an extensible markup language and a custom script language;
and configuring a REST service label for the REST service script, wherein the REST service label corresponds to the REST service script one by one, so that a service calling party calls the corresponding REST service script based on the REST service label.
2. The method according to claim 1, wherein the method further comprises:
receiving a call request of a service calling party, and responding to the call request to acquire a REST service tag and a REST service entry in the call request;
acquiring a REST service script corresponding to the REST service label according to the REST service label;
executing the REST service script corresponding to the REST service label according to the REST service entry, and obtaining an execution result;
and returning the execution result to the service calling party.
3. The method of claim 2, wherein the executing the REST service script corresponding to the REST service tag according to the REST service entry to obtain an execution result includes:
analyzing the REST service script corresponding to the REST service label by using a template analysis engine analyzer to obtain the logic of the REST service in the REST service script;
and precompiling the REST service entry into the REST service script, and executing the REST service script according to the REST service logic in the REST service script to obtain an execution result.
4. The method of claim 3, wherein prior to precompiling the REST service entry into the REST service script, further comprising:
loading logic of REST service in the REST service script into a context;
the step of pre-compiling the REST service entry into the REST service script, and executing the REST service script according to the REST service logic in the REST service script to obtain an execution result, including:
and precompiling the REST service entry into the REST service script, and executing the REST service script according to the REST service logic in the context to obtain an execution result.
5. The method of claim 2, wherein the returning the execution result to the service caller comprises:
packaging the execution result to obtain a packaged execution result;
and returning the encapsulated execution result to the service calling party.
6. The method according to claim 1, wherein the method further comprises:
and storing the REST service script in a database, and indexing according to the REST service label corresponding to the REST service script.
7. The method of claim 3, wherein the logic of the REST service comprises: business logic of REST service, data encapsulation logic of REST service and external request logic of REST service.
8. The utility model provides a REST service issuing device towards transformer panorama page which characterized in that, the device includes:
the REST service script acquisition module is used for acquiring the REST service script uploaded by the developer, wherein the REST service script is realized by using an extensible markup language and a custom script language;
and the REST service label configuration module is used for configuring REST service labels for the REST service scripts, wherein the REST service labels are in one-to-one correspondence with the REST service scripts, so that a service calling party calls the corresponding REST service scripts based on the REST service labels.
9. A computer device, comprising:
a memory and a processor, the memory and the processor are in communication connection with each other, the memory stores computer instructions, and the processor executes the computer instructions, thereby executing the REST service issuing method for the transformation panorama page according to any one of claims 1 to 7.
10. A computer-readable storage medium, wherein computer instructions for causing a computer to execute the REST service issuing method for the transformation panorama page according to any one of claims 1 to 7 are stored on the computer-readable storage medium.
CN202311579962.2A 2023-11-24 2023-11-24 REST service release method and device for power transformation panoramic page and computer equipment Pending CN117608599A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311579962.2A CN117608599A (en) 2023-11-24 2023-11-24 REST service release method and device for power transformation panoramic page and computer equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311579962.2A CN117608599A (en) 2023-11-24 2023-11-24 REST service release method and device for power transformation panoramic page and computer equipment

Publications (1)

Publication Number Publication Date
CN117608599A true CN117608599A (en) 2024-02-27

Family

ID=89954286

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311579962.2A Pending CN117608599A (en) 2023-11-24 2023-11-24 REST service release method and device for power transformation panoramic page and computer equipment

Country Status (1)

Country Link
CN (1) CN117608599A (en)

Similar Documents

Publication Publication Date Title
US11210109B2 (en) Method and system for loading resources
CN104866383B (en) Interface calling method and device and terminal
US10956179B1 (en) Third party integration of plugins and widgets
US11042387B2 (en) Deploying cross-platform applications on mobile devices with native and web components
CN111625452A (en) Flow playback method and system
CN108964968B (en) Service access management method and system in container cloud environment
CN111858727B (en) Multi-data source data export system and method based on template configuration
US20210329100A1 (en) System and method for use of remote procedure call with a microservices environment
CN110825430A (en) API document generation method, device, equipment and storage medium
CN113703862A (en) Configuration-based interface calling method, device, equipment and storage medium
CN110457132B (en) Method and device for creating functional object and terminal equipment
CN111240772A (en) Data processing method and device based on block chain and storage medium
US20230409295A1 (en) Building base applications with user interface micro frontends
CN107239265B (en) Binding method and device of Java function and C function
CN117608599A (en) REST service release method and device for power transformation panoramic page and computer equipment
CN116339694A (en) Extension method and device of low-code platform assembly, electronic equipment and storage medium
CN116107623A (en) Software development method and device and electronic equipment
CN107092601B (en) Resource file construction method, resource file application method and device
CN112965767A (en) Job processing method and apparatus, electronic device, and storage medium
CN113626001A (en) API dynamic editing method and device based on script
CN114301970A (en) Service calling method and device, electronic equipment and storage medium
CN111880786A (en) Multi-application sharing method, system, device, electronic equipment and storage medium
CN116074622B (en) Implementation method, device, equipment and medium for multi-protocol control USB camera
CN115242764B (en) Multi-terminal communication method, system, equipment and storage medium for front end
CN116501458A (en) Task execution method, device and computer 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