CN115756483A - Compiling method, compiling apparatus, computer device, and storage medium - Google Patents

Compiling method, compiling apparatus, computer device, and storage medium Download PDF

Info

Publication number
CN115756483A
CN115756483A CN202211433695.3A CN202211433695A CN115756483A CN 115756483 A CN115756483 A CN 115756483A CN 202211433695 A CN202211433695 A CN 202211433695A CN 115756483 A CN115756483 A CN 115756483A
Authority
CN
China
Prior art keywords
script
compiling
memory
interface
loading
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
CN202211433695.3A
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.)
Zhongdian Jinxin Software Co Ltd
Original Assignee
Zhongdian Jinxin Software 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 Zhongdian Jinxin Software Co Ltd filed Critical Zhongdian Jinxin Software Co Ltd
Priority to CN202211433695.3A priority Critical patent/CN115756483A/en
Publication of CN115756483A publication Critical patent/CN115756483A/en
Pending legal-status Critical Current

Links

Images

Abstract

The present application relates to a compiling method, apparatus, computer device, storage medium and computer program product. The compiling method comprises the following steps: extracting a target script from a first memory through identification information based on the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation; compiling the target script in a compiling environment corresponding to the service container through a compiling interface to obtain a compiled target script; and loading the compiled target script through a loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment. By adopting the method, the scripts can be updated in real time in the memory, the newly added scripts can be compiled in real time, the compiling efficiency of the scripts is improved, and the high-performance and high-concurrency decision-making application scenes can be met through the compiled scripts.

Description

Compiling method, compiling apparatus, computer device, and storage medium
Technical Field
The present application relates to the field of computer technologies, and in particular, to a compiling method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
With the trend of digital transformation and the development of information construction technology, various requirements of various services can be realized through script codes. Generally, the business requirement may be a predetermined periodic event requirement, so that program codes may be developed according to the predetermined periodic event requirement, and online script compiling may be performed through an online script engine to meet the requirement in the business scenario.
In the related art, the process of online script compilation is to convert script codes into an execution file, start the execution file, and perform compilation. With the development of services, various real-time requirements appear, and at the moment, script codes need to be uploaded again. However, each re-upload of script code requires a restart of the file, resulting in inefficient script compilation.
Disclosure of Invention
In view of the above, it is necessary to provide a compiling method, an apparatus, a computer device, a computer readable storage medium and a computer program product capable of improving efficiency of script compiling.
In a first aspect, the present application provides a compiling method, which is applied to a service container, where the service container includes a first memory, a second memory, a compiling interface, and a loading interface, and the method includes:
extracting a target script from the first memory based on the identification information of the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation;
compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment.
In one embodiment, the method further comprises:
and configuring the initial memory based on the environment configuration parameters corresponding to the service container to obtain a second memory.
In one embodiment, the service container comprises a script execution class;
the method further comprises the following steps:
configuring the service interface as a subclass of the script execution class;
and responding to the calling operation of the script execution class, and calling the service interface through a parent-child node relationship.
In one embodiment, the first memory is a distributed memory; the method further comprises the following steps:
and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container.
In one embodiment, the service container further comprises a gateway device and a deployment interface;
the issuing the target script to the distributed memory corresponding to each service container in response to the script issuing operation includes:
receiving, by the gateway device, a target script sent by the deployment interface, and determining at least one target service container based on a registration address list corresponding to the gateway device;
and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container through the gateway equipment.
In one embodiment, the loading the compiled target script through the loading interface to generate a service interface corresponding to the target script includes:
and loading the compiled target script in the execution memory through the loading interface to generate a service interface corresponding to the target script.
In one embodiment, the preset language compiling parameters include a compiling environment class parameter and a compiling loading parameter; the method further comprises the following steps:
configuring the compiling environment type parameters into a memory text virtual compiling environment;
and configuring the compiling loading parameter into a character file loading mode.
In a second aspect, the present application further provides a script compiling apparatus, which is applied to a service container, where the service container includes a first memory, a second memory, a compiling interface, and a loading interface, and the apparatus includes:
the extracting module is used for extracting a target script from the first memory based on the identification information of the script, wherein the target script is pre-stored in the first memory in response to script issuing operation;
the compiling module is used for compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and the loading module is used for loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, and the service interface is used for being called by external equipment.
In one embodiment, the apparatus further comprises:
and the first configuration module is used for configuring the initial memory based on the environment configuration parameters corresponding to the service container to obtain a second memory.
In one embodiment, the service container includes a script execution class;
the device further comprises:
the second configuration module is used for configuring the service interface into a subclass of the script execution class;
and the calling module is used for responding to the calling operation of the script execution class and calling the service interface through the parent-child node relation.
In one embodiment, the first memory is a distributed memory; the device further comprises:
and the issuing module is used for responding to the script issuing operation and issuing the target script to the distributed memory corresponding to each target service container.
In one embodiment, the service container further comprises a gateway device and a deployment interface;
the publishing module is specifically configured to: receiving, by the gateway device, a target script sent by the deployment interface, and determining at least one target service container based on a registration address list corresponding to the gateway device; and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container through the gateway equipment.
In one embodiment, the loading module is specifically configured to:
and loading the compiled target script in the execution memory through the loading interface to generate a service interface corresponding to the target script.
In one embodiment, the preset language compiling parameters include a compiling environment class parameter and a compiling loading parameter; the device further comprises:
the third configuration module is used for configuring the compiling environment type parameters into a memory text virtual compiling environment;
and the fourth configuration module is used for configuring the compiling and loading parameters into a character file loading mode.
In a third aspect, the application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
extracting a target script from the first memory based on the identification information of the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation;
compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
extracting a target script from the first memory based on the identification information of the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation;
compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
extracting a target script from the first memory based on the identification information of the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation;
compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment.
The compiling method, the compiling apparatus, the computer device, the storage medium and the computer program product are characterized in that the compiling method comprises the following steps: extracting a target script from a first memory through identification information based on the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation; compiling the target script in a compiling environment corresponding to the service container through a compiling interface to obtain a compiled target script; and loading the compiled target script through a loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment. By adopting the method, the script can be updated in real time in the memory, the newly added script can be compiled in real time, the compiling efficiency of the script is improved, and the high-performance and high-concurrency decision-making application scene can be met through the compiled script.
Drawings
FIG. 1 is a flow diagram illustrating a compilation method in one embodiment;
FIG. 2 is a flow diagram illustrating the steps invoked in one embodiment;
FIG. 3 is a schematic flow diagram of the loading step in one embodiment;
FIG. 4 is a flowchart illustrating a compiling method according to another embodiment;
FIG. 5 is a block diagram showing the structure of a compiling apparatus according to one embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
In an embodiment, as shown in fig. 1, a compiling method is provided, and this embodiment is illustrated by applying this method to a terminal, it is to be understood that this method may also be applied to a server, and may also be applied to a system including a terminal and a server, and implemented by interaction between the terminal and the server, where the terminal may be, but is not limited to, various personal computers, notebook computers, smart phones, and the like, and the server may be implemented by an independent server or a server cluster formed by a plurality of servers. In this embodiment, the compiling method is applied to a service container, where the service container includes a first memory, a second memory, a compiling interface, and a loading interface, and the compiling method includes the following steps:
and 102, extracting a target script from the first memory based on the identification information of the script.
The target script is pre-stored in a first memory in response to a script publishing operation, identification information of the script may be code information of the script, that is, a name of the script, a service container may be a Spring group service container based on a java language, the first memory may be a distributed memory (redis) corresponding to a main thread in the service container, one service container corresponds to one memory in the distributed memory, and the Spring group service: it is just a microservice using a spring framework.
In the embodiment, the terminal acquires a newly added script for meeting a newly added requirement as a target script; in this way, the terminal can store the acquired target script to the first memory of the service container based on the identification information of the target script through the deployment interface of the service container. In this way, the terminal may extract the target script corresponding to the identification information of the target script from the first memory based on the identification information of the target script.
And 104, compiling the target script in a compiling environment corresponding to the service container through a compiling interface to obtain a compiled target script.
In this embodiment, the terminal may publish the extracted target script to a compiling environment corresponding to the service container through a compiling interface. In this way, in the compiling environment corresponding to the service container, the terminal can compile the target script depending on the compiling environment corresponding to the service container to obtain the compiled target script.
And 106, loading the compiled target script through a loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment.
In this embodiment, the service container may obtain the compiled script through the loading interface, so that the service container may load the compiled script into an execution memory of the service container, and package the compiled target script in the execution memory to obtain a packaged target script, that is, a service interface corresponding to the target script, where the service interface may be used for being called by an external device of a third party, so as to provide a service.
In the compiling method, the target script is extracted from the first memory by the identification information based on the script, and the target script is pre-stored in the first memory in response to the script issuing operation. And compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script. And loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment. By adopting the method, the script can be updated in real time in the memory, and the compiling efficiency and the service capability of the script are improved.
In one embodiment, the service container further comprises an execution memory; the compiling method further comprises the following steps:
and configuring the initial memory based on the environment configuration parameters corresponding to the service container to obtain the execution memory.
In this embodiment, the environment configuration parameter of the service container may be a parameter in the compilation environment of the service container, for example, a parameter of each API interface, and the like. The initial memory may be a memory corresponding to a main thread of the service container; thus, the service container may configure the memory of the main thread of the service container based on the environment configuration parameters, to obtain the memory adapted to the service container and the execution memory of the service container.
Based on the scheme, the compiling environment of the service container and the memory of the service container can be synchronized, and the real-time compiling of the newly added script is realized.
In one embodiment, the service container includes a script execution class.
As shown in fig. 2, the compiling method further includes:
step 202, configure the service interface as a subclass of the script execution class.
In this embodiment, the service container may configure the service interface corresponding to the target script as a subclass of the script execution class of the service container, that is, the script execution class is a parent class, and the generated service interface is a subclass of the parent class.
And step 204, responding to the calling operation of the script execution class, and calling a service interface through the parent-child node relationship.
In this embodiment, the external device may perform a call operation on the script execution class, and thus, the service container may call a subclass of the class in response to the call operation on the script execution class and perform processing based on logic inside the subclass. Specifically, after receiving the step of calling the script execution class, the service container may determine a subclass of the script execution class based on a parent-child relationship of the class, and call a service interface in the subclass, so as to perform processing through the service interface.
In an example, the target script obtains a service interface of the target script through processes of deployment, compilation, loading, publishing, and the like, that is, the encapsulation process may be performed, and a rest service is obtained, and the rest service may be used for an external device to perform an operation such as calling. The service container is internally configured with a script execution class (i.e., a parent class for executing script execution), and all target scripts in the service container can be configured as subclasses of the parent class. Therefore, after the script is completed, the rest interface in the service container can instantiate the script, the code segment of the target script in the subclass is called through the parent class, and the decision service is provided based on the running of the code segment.
In the embodiment, efficient execution of the script can be realized, and the flexibility of script execution is improved.
In one embodiment, the first memory is a distributed memory; the compiling method further comprises the following steps:
and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container.
In this embodiment, each service container is configured with a distributed memory, so that the target script can be issued to the distributed memory through a script issuing operation corresponding to the target script based on a distributed structure of the distributed memory, that is, the target script is issued to the distributed memory, thereby achieving an effect of issuing the target script to multiple service containers.
In one embodiment, the service container further comprises a gateway device and a deployment interface;
the issuing the target script to the distributed memory corresponding to each service container in response to the script issuing operation includes:
receiving, by the gateway device, a target script sent by the deployment interface, and determining at least one target service container based on a registration address list corresponding to the gateway device; and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container through the gateway equipment.
In this embodiment, the gateway device may receive a target script sent by another service container through the deployment interface, so that after the gateway device receives the target script, the service container may determine an address list of the service container that is registered on the gateway device and is already registered, and determine that the service container is the target service container. In this way, the service container can issue the target script to the distributed memory through the gateway device based on the received script issuing operation, that is, the target script is issued to the distributed memory, so that the effect of issuing the target script to a plurality of service containers is achieved.
In an embodiment, the loading, through the loading interface, the compiled target script, and generating a service interface corresponding to the target script includes:
and loading the compiled target script in the execution memory through the loading interface to generate a service interface corresponding to the target script.
In this embodiment, the service container may obtain the compiled target script through the loading interface, and load the compiled target script in the execution memory of the service container, so as to implement the use of the target script in the service.
In the embodiment, the target script can be used, and the usability of the target script is improved.
In one embodiment, the preset language compiling parameters comprise a compiling environment class parameter and a compiling loading parameter. As shown in fig. 3, the compiling method further includes:
step 302, configuring the compiling environment type parameters into a memory text virtual compiling environment.
In this embodiment, a specific process of language compilation parameters in the service container may be that, first, a tools toolkit is loaded, and the compilation environment is formulated and the settings of the dependency package are performed according to java compilation parameters, so as to complete the setting of the script compilation environment of the service container. The service container can rewrite the compiling environment type in the tool kit, namely the compiling environment type parameters are configured into a memory text virtual compiling environment, and the conversion from compiling only by adopting files to compiling by adopting scripts stored in a memory is realized.
Step 304, configuring the compiling loading parameter into a character file loading mode.
In this embodiment, the compiled load parameter may be a parameter for describing the load content. The service container can rewrite the compiling and loading mode through the re-realization of the compiling and loading parameters. For example, the compiling and loading parameters may be configured as a character file loading mode, so as to implement loading of characters.
In one example, the service container may configure the compiling and loading parameters as a String Java File management custom class, where the custom class may convert characters in the script into a File and use the converted File as a loading target of a loading class object, so that the characters may be loaded, and the compiled script and the loaded target script may be stored in the memory together for saving.
In the embodiment, the compiling of the script in the memory and the loading of the characters in the script can be realized, and the compiling efficiency and the loading efficiency of the script are improved.
As shown in fig. 4, the specific implementation of the compiling method is described in detail below with reference to an embodiment:
in an exemplary embodiment, with the trend of digital transformation, transformation of information construction, and scene needs of a service are artificially determined by phase events, and are transformed into real-time service scene needs, so that performance needs required by service decisions are also improved.
Therefore, it is necessary to construct a service container that can perform script compilation and script loading in real time, for example, a service container that can perform script compilation and script loading in real time based on java language. Thus, a deployment interface, a compiling interface, a loading interface and a publishing interface of the script are provided, and the interfaces can be packaged in a JAVA mode to provide a calling service. The deployment interface can transmit script content through name information of a transmission script CODE, namely, the script content is issued to a distributed memory (Redis) for storage; the compiling interface can acquire script contents from the distributed memory based on the name information of the script, compile the script by depending on the environment of the Spring Cloud service container and store the compiled script contents into the memory of the Spring Cloud service container; the loading interface can acquire the compiled script from the Spring Cloud service container through the name information of the script and load the compiled script into an execution memory of the Spring Cloud service container so that the script can be used in the service; the issuing interface can dynamically issue the compiled script content to generate a web (Result) service for external calling through the script CODE, and the web service is used for external calling by other third-party applications. Therefore, the memory storage script and the script resource container can be provided for temporary memory storage of the script, and the capability of immediately providing external decision service after the script is loaded can be provided.
In one example, the spring closed service container can load tools, jar and a compiling environment of scripts of the service container, and the compiling environment is formulated and the dependent package is set directly according to java compiling parameters; rewriting the compiling environment class in the java tools toolkit, setting a memory text virtual compiling environment, and rewriting the compiling and loading mode in the java tools to realize the loading of characters; dynamically acquiring the dependent parameters of the compiling dependent environment to set codes, customizing java loading classes, and loading a compiling script of the text stream; acquiring a container object of the execution main thread of the whole spring cluster, performing a loader for loading a self-defined text stream by a container thread according to a script compiled in a system environment, enabling the script to be completely integrated with the container environment, and performing script splicing in the script by adopting a mode of inheriting a parent class. In this case, the external device may directly call the execution method of the parent class, and call the internal logic of the different scripts.
Based on the scheme, the user-defined memory character stream compiling memory can be realized, the character stream can be compiled, and after the compiling is finished, the character stream is stored in the container memory, and the container thread is loaded; and the user-defined character stream compiling file class loader loads and encapsulates the character stream in the memory into a class loader, and the class loader is used for loading the compiled character stream script in the memory by the container thread loader so that the character stream script and the container can be integrated for external calling. After the loading is finished, the high-performance high-concurrency decision-making application scene can be directly met through the spring group distributed service capability.
That is, on the one hand. The service container can perform custom script subclass operation on the script, namely, the execution method in the script is repeated to obtain the script character stream, and therefore the script character stream can be added into the memory compiling file set. On the other hand, the script character stream compiling environment can be set by the compiling environment of the script character stream compiling environment through the Java tools, and the script character stream in the memory compiling file set is sent to the script memory character stream loader through the reset compiling environment. The service container can be a container provided by spring closed micro service, the service container can acquire a container thread environment, obtain script container integration based on the container thread environment and a script memory character stream loader, and realize loading and compiling of the script based on specific decision rule logic. And an execution method in the script parent class can be called through a service interface, so that the loading and compiling of the script are realized.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a compiling apparatus for implementing the compiling method mentioned above. The implementation scheme for solving the problem provided by the apparatus is similar to the implementation scheme described in the above method, so specific limitations in one or more compiling apparatus embodiments provided below may refer to the limitations for the compiling method in the foregoing, and details are not described herein again.
In one embodiment, as shown in fig. 5, a script compiling apparatus 500 is applied to a service container, where the service container includes a first memory, a second memory, a compiling interface, and a loading interface, and the compiling apparatus 500 includes:
an extracting module 501, configured to extract, based on the identification information of the script, a target script in a first memory, where the target script is pre-stored in the first memory in response to a script issuing operation.
And the compiling module 502 is configured to compile the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script.
The loading module 503 is configured to load the compiled target script through a loading interface, and generate a service interface corresponding to the target script, where the service interface is used for being called by an external device.
In one embodiment, the apparatus further comprises:
and the first configuration module is used for configuring the initial memory based on the environment configuration parameters corresponding to the service container to obtain a second memory.
In one embodiment, the service container includes a script execution class;
the device further comprises:
the second configuration module is used for configuring the service interface into a subclass of the script execution class;
and the calling module is used for responding to the calling operation of the script execution class and calling the service interface through a parent-child node relationship.
In one embodiment, the first memory is a distributed memory; the device further comprises:
and the issuing module is used for responding to the script issuing operation and issuing the target script to the distributed memory corresponding to each target service container.
In one embodiment, the service container further comprises a gateway device and a deployment interface;
the publishing module is specifically configured to: receiving, by the gateway device, a target script sent by the deployment interface, and determining at least one target service container based on a registered address list corresponding to the gateway device; and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container through the gateway equipment.
In one embodiment, the loading module is specifically configured to:
and loading the compiled target script in the execution memory through the loading interface to generate a service interface corresponding to the target script.
In one embodiment, the preset language compiling parameters include a compiling environment class parameter and a compiling loading parameter; the device further comprises:
the third configuration module is used for configuring the compiling environment type parameters into a memory text virtual compiling environment;
and the fourth configuration module is used for configuring the compiling and loading parameters into a character file loading mode.
The modules in the compiling apparatus 500 may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store the XX data. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a compiling method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is further provided, which includes a memory and a processor, the memory stores a computer program, and the processor implements the steps of the above method embodiments when executing the computer program.
In an embodiment, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
In an embodiment, a computer program product is provided, comprising a computer program which, when being executed by a processor, carries out the steps of the above-mentioned method embodiments.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), magnetic Random Access Memory (MRAM), ferroelectric Random Access Memory (FRAM), phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A script compiling method is applied to a service container, wherein the service container comprises a first memory, a compiling interface and a loading interface, and the method comprises the following steps:
extracting a target script from the first memory based on identification information of the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation;
compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, wherein the service interface is used for being called by external equipment.
2. The method of claim 1, wherein the service container further comprises execution memory, the method further comprising:
and configuring the initial memory based on the environment configuration parameters corresponding to the service container to obtain an execution memory.
3. The method of claim 1, wherein the service container comprises a script execution class;
the method further comprises the following steps:
configuring the service interface as a subclass of the script execution class;
and responding to the calling operation of the script execution class, and calling the service interface through a parent-child node relationship.
4. The method of claim 1, wherein the first memory is a distributed memory; the method further comprises the following steps:
and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container.
5. The method of claim 1, wherein the service container further comprises a gateway device and a deployment interface;
the issuing the target script to the distributed memory corresponding to each service container in response to the script issuing operation includes:
receiving, by the gateway device, a target script sent by the deployment interface, and determining at least one target service container based on a registration address list corresponding to the gateway device;
and responding to the script issuing operation, and issuing the target script to the distributed memory corresponding to each target service container through the gateway equipment.
6. The method according to claim 2, wherein the loading the compiled target script through the loading interface to generate a service interface corresponding to the target script includes:
and loading the compiled target script in the execution memory through the loading interface to generate a service interface corresponding to the target script.
7. The method according to claim 1, wherein the preset language compiling parameters comprise a compiling environment class parameter and a compiling loading parameter; the method further comprises the following steps:
configuring the compiling environment type parameters into a memory text virtual compiling environment;
and configuring the compiling loading parameter into a character file loading mode.
8. A script compiling device applied to a service container, wherein the service container comprises a first memory, a compiling interface and a loading interface, and the device comprises:
the extracting module is used for extracting a target script from the first memory based on the identification information of the script, wherein the target script is pre-stored in the first memory in response to a script issuing operation;
the compiling module is used for compiling the target script in a compiling environment corresponding to the service container through the compiling interface to obtain a compiled target script;
and the loading module is used for loading the compiled target script through the loading interface to generate a service interface corresponding to the target script, and the service interface is used for being called by external equipment.
9. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 7.
CN202211433695.3A 2022-11-16 2022-11-16 Compiling method, compiling apparatus, computer device, and storage medium Pending CN115756483A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211433695.3A CN115756483A (en) 2022-11-16 2022-11-16 Compiling method, compiling apparatus, computer device, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211433695.3A CN115756483A (en) 2022-11-16 2022-11-16 Compiling method, compiling apparatus, computer device, and storage medium

Publications (1)

Publication Number Publication Date
CN115756483A true CN115756483A (en) 2023-03-07

Family

ID=85372003

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211433695.3A Pending CN115756483A (en) 2022-11-16 2022-11-16 Compiling method, compiling apparatus, computer device, and storage medium

Country Status (1)

Country Link
CN (1) CN115756483A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250199A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The dynamic micro services call method of a kind of multilingual cloud compiling and device
US20200065124A1 (en) * 2018-08-22 2020-02-27 International Business Machines Corporation Shortening just-in-time code warm up time of docker containers
CN111381830A (en) * 2020-03-10 2020-07-07 腾讯科技(深圳)有限公司 Data request processing method and device in program and computer equipment
CN112256278A (en) * 2020-11-09 2021-01-22 Oppo广东移动通信有限公司 Compiling method, device, equipment and storage medium
CN113434146A (en) * 2021-06-22 2021-09-24 青岛海尔科技有限公司 Code compiling method, device, storage medium and electronic device
CN113986256A (en) * 2021-11-08 2022-01-28 中电金信软件有限公司 Method and device for issuing application program, electronic equipment and storage medium
CN114116117A (en) * 2021-08-23 2022-03-01 网宿科技股份有限公司 Service deployment method, electronic device and storage medium

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106250199A (en) * 2016-07-26 2016-12-21 北京北森云计算股份有限公司 The dynamic micro services call method of a kind of multilingual cloud compiling and device
US20200065124A1 (en) * 2018-08-22 2020-02-27 International Business Machines Corporation Shortening just-in-time code warm up time of docker containers
CN111381830A (en) * 2020-03-10 2020-07-07 腾讯科技(深圳)有限公司 Data request processing method and device in program and computer equipment
CN112256278A (en) * 2020-11-09 2021-01-22 Oppo广东移动通信有限公司 Compiling method, device, equipment and storage medium
CN113434146A (en) * 2021-06-22 2021-09-24 青岛海尔科技有限公司 Code compiling method, device, storage medium and electronic device
CN114116117A (en) * 2021-08-23 2022-03-01 网宿科技股份有限公司 Service deployment method, electronic device and storage medium
CN113986256A (en) * 2021-11-08 2022-01-28 中电金信软件有限公司 Method and device for issuing application program, electronic equipment and storage medium

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
孔宪光: "普通高等学校十四五规划智能制造工程专业精品教材 工业互联网技术及应用", 华中科技大学出版社, pages: 167 - 173 *

Similar Documents

Publication Publication Date Title
CN108958714B (en) Business component type development method and device, computer equipment and storage medium
US20230057335A1 (en) Deployment of self-contained decision logic
US8332813B2 (en) Service re-factoring method and system
US10594800B2 (en) Platform runtime abstraction
CN111563220A (en) Business website project construction method and device, computer equipment and storage medium
CN108363564A (en) Entry modularization implementation method, device, terminal device and storage medium
CN114531477B (en) Method and device for configuring functional components, computer equipment and storage medium
US10838774B2 (en) Method and a system for facilitating multitenancy of services
Harzenetter et al. Pattern-based deployment models revisited: automated pattern-driven deployment configuration
CN113867600A (en) Development method and device for processing streaming data and computer equipment
US20200274758A1 (en) Provisioning hybrid cloud resources in an operating environment
CN103677842A (en) Software tool configuration type integrated expansion calling method and system
CN115269040B (en) Tenant business application expanding method, device and system
CN115756483A (en) Compiling method, compiling apparatus, computer device, and storage medium
CN113157754B (en) Method, device and equipment for displaying flow form data and storage medium
CN111857662B (en) Programming method for describing specific constitution of object based on MAP and interface
CN115202673A (en) Application construction method and device based on cloud server and computer equipment
CN112564979A (en) Execution method and device for construction task, computer equipment and storage medium
Makki et al. Scalable and manageable customization of workflows in multi-tenant saas offerings
CN113608801A (en) Interface calling method and device, computer equipment and storage medium
CN117829497A (en) Service deployment method, device, computer equipment and storage medium
CN114219452A (en) Workflow creating method and device, electronic equipment and storage medium
CN116032928A (en) Data collaborative computing method, device, system, electronic device and storage medium
CN115390862A (en) Application deployment method and device
CN115269065A (en) Call modification method and device, computer equipment and storage medium thereof

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