CN112988131A - Computing engine task execution method and device and readable storage medium - Google Patents

Computing engine task execution method and device and readable storage medium Download PDF

Info

Publication number
CN112988131A
CN112988131A CN202110213649.1A CN202110213649A CN112988131A CN 112988131 A CN112988131 A CN 112988131A CN 202110213649 A CN202110213649 A CN 202110213649A CN 112988131 A CN112988131 A CN 112988131A
Authority
CN
China
Prior art keywords
script
programming language
layer
language type
service layer
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
CN202110213649.1A
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.)
Weikun Shanghai Technology Service Co Ltd
Original Assignee
Weikun Shanghai Technology Service 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 Weikun Shanghai Technology Service Co Ltd filed Critical Weikun Shanghai Technology Service Co Ltd
Priority to CN202110213649.1A priority Critical patent/CN112988131A/en
Publication of CN112988131A publication Critical patent/CN112988131A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/31Programming languages or programming paradigms

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computing Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The invention relates to the technical field of cloud computing, and discloses a computing engine task execution method, a device and a readable storage medium, wherein the method comprises the following steps: the service layer obtains an expression to be calculated and obtains a first programming language type; the first programming language type is a programming language type corresponding to the expression to be calculated; the service layer searches and selects one script executor from at least two script executors of the calculation layer based on the first programming language type to obtain a target script executor; the service layer transmits the expression to be calculated to the target script executor; and the computation layer computes the expression to be computed based on the target script executor to obtain a computation result, and returns the computation result to the service layer. The invention ensures that a user does not need to master various programming languages when using the calculation engine, thereby reducing the cost of calculating the expression to be calculated by using the calculation engine and improving the convenience of calculating the expression to be calculated by using the calculation engine.

Description

Computing engine task execution method and device and readable storage medium
Technical Field
The invention relates to the technical field of cloud computing, in particular to a computing engine task execution method, computing engine task execution equipment and a readable storage medium.
Background
During software development, scenarios are often encountered that require the calculation of expressions. To meet various business computing needs, software development companies design their own computing engines. When the calculation engine is used, firstly, calculation rules are configured into the calculation engine through a script, and then the calculation engine executes an expression of the script to output a calculation result when running.
However, the computing engine in the industry generally only supports one programming language, for example, only supports a single programming language such as python, groovy, javascript or lua, and for a user who does not have the programming language, certain learning cost and communication cost are brought. In addition, when the programming language of the expression is different from that of the calculation engine, the existing logic of the expression needs to be migrated to the calculation engine, which faces the problem of programming language conversion, and when the access to the calculation engine needs to be modified, certain programming language migration cost is brought.
It follows that users are very costly and inconvenient to compute expressions using a compute engine that supports only a single language.
Disclosure of Invention
The invention mainly aims to provide a computing engine task execution method, a device and a readable storage medium, and aims to solve the technical problems of high cost and low convenience of computing an expression to be computed by using a computing engine by the existing user.
In order to achieve the above object, the present invention provides a method for executing a task of a compute engine, which is applied to a compute engine, wherein the compute engine at least comprises a service layer and a compute layer, and the method for executing the task of the compute engine comprises the steps of:
the service layer acquires an expression to be calculated and acquires a first programming language type; the first programming language type is a programming language type corresponding to the expression to be calculated;
the service layer searches and selects one script executor from at least two script executors of the calculation layer based on the first programming language type to obtain a target script executor;
the service layer transmits the expression to be calculated to the target script executor;
and the calculation layer calculates the expression to be calculated based on the target script executor to obtain a calculation result, and returns the calculation result to the service layer.
Optionally, the computing engine further includes a script executor constructing layer, where the service layer searches and selects a script executor from at least two script executors of the computing layer based on the first programming language type, and before obtaining a target script executor, the method includes:
the script executor constructing layer acquires the calculation service requirement;
the script executor constructing layer constructs a script executor group in the computing layer based on the computing service requirement; the script executor group comprises at least two script executors.
Optionally, the script executor constructing layer constructs a script executor group in the computation layer based on the computation service requirement, including:
the script executor constructing layer generates a constructing factory corresponding to the script executor group;
the script executor constructing layer constructs the script executor group based on the build factory.
Optionally, after the script executor constructing layer constructs the script executor group based on the build factory, the method includes:
the script executor constructing layer acquires the identity information of the script executors in the script executor group;
and the script executor constructing layer sends the identity information to the service layer so as to complete the registration of the identity information.
Optionally, the step of the service layer finding and selecting one script executor from at least two script executors of the computation layer based on the first programming language type to obtain a target script executor includes:
the service layer searches the name of each script server in the script server group;
the service layer searches and selects a third programming language type which is the same as the first programming language type in the second programming language type based on the name; each programming language type in the second programming language type corresponds to the name of each script server one by one;
the service layer determines a class full path corresponding to the name corresponding to the third programming language type based on a preset mapping relation;
and the service layer selects the script executer corresponding to the class full path to obtain a target script executor.
Optionally, the service layer finding and selecting a third programming language type in the second programming language type, which is the same as the first programming language type, based on the name includes:
the service layer determines a name searching sequence based on a preset name searching priority;
and the service layer searches a third programming language type which is the same as the first programming language type in the second programming language type based on the name searching sequence.
Optionally, the determining, by the service layer, a name lookup order based on a preset name lookup priority includes:
the service layer acquires the historical selection times of each script executor;
and the service layer sorts the searching sequence of the names of the script executors based on the historical selection times to obtain the name searching sequence.
Optionally, the service layer determines a name lookup order based on a preset name lookup priority, and further includes:
the service layer acquires the searching and updating time of each script executor;
and the service layer sorts the searching sequence of the names of the script executors based on the searching and updating time to obtain the name searching sequence.
Further, to achieve the above object, the present invention also provides a computing engine task execution device including a memory, a processor, and a computing engine task execution program stored on the memory and executable on the processor, the computing engine task execution program, when executed by the processor, implementing the steps of the computing engine task execution method as described above.
Further, to achieve the above object, the present invention also provides a computer readable storage medium having stored thereon a calculation engine task execution program which, when executed by a processor, implements the steps of the calculation engine task execution method as described above.
The method comprises the steps of obtaining an expression to be calculated through a service layer, and obtaining a first programming language type; the first programming language type is a programming language type corresponding to the expression to be calculated; the service layer searches and selects one script executor from at least two script executors of the calculation layer based on the first programming language type to obtain a target script executor; the service layer transmits the expression to be calculated to the target script executor; and the calculation layer calculates the expression to be calculated based on the target script executor to obtain a calculation result, and returns the calculation result to the service layer. The invention realizes that after the service layer obtains the expression to be calculated, the script executor corresponding to the programming language type is searched and selected from at least two script executors through the programming language type corresponding to the expression to be calculated, so as to calculate the expression to be calculated through the script executor, and a user does not need to master multiple programming languages or convert the programming language of the expression to be calculated when using a calculation engine, thereby reducing the cost of calculating the expression to be calculated by using the calculation engine and improving the convenience of calculating the expression to be calculated by using the calculation engine.
Drawings
FIG. 1 is a schematic flow chart diagram illustrating a first embodiment of a method for performing tasks by a compute engine according to the present invention;
FIG. 2 is a flowchart illustrating a task execution method of a compute engine according to a second embodiment of the present invention;
fig. 3 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
The implementation, functional features and advantages of the objects of the present invention will be further explained with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The invention provides a method for executing a computing engine task, and referring to fig. 1, fig. 1 is a schematic flow diagram of a first embodiment of the method for executing the computing engine task.
While a logical order is shown in the flow chart, in some cases, the steps shown or described may be performed in an order different than presented herein. The computing engine task execution method can be applied to a server, and comprises the following steps:
step S110, the service layer obtains an expression to be calculated and obtains a first programming language type; the first programming language type is a programming language type corresponding to the expression to be calculated.
Specifically, the calculation engine obtains an expression to be calculated, which is input by a user, and obtains the expression to be calculated for a service layer of the calculation engine and obtains a first programming language type, which is a programming language type corresponding to the expression to be calculated.
It should be noted that, for different expressions to be computed, because there is more than one programming language, such as python, groovy, lua, etc., different expressions to be computed may be written by different programming languages, and therefore, the type of the programming language corresponding to the expression to be computed received by the service layer may also be different. For expressions to be calculated of different programming language types, the corresponding calculation engines have different response processes, so that it can be understood that different programming languages have different programming logics, and the expression forms of the expressions to be calculated obtained by the different programming languages are different, so that the processing modes for processing the different expressions to be calculated are different, and the response processes are different.
Step S120, the service layer searches and selects a script executor from at least two script executors of the computation layer based on the first programming language type, so as to obtain a target script executor.
Specifically, the service layer searches and selects one script executor from at least two script executors of the computation layer one by one based on the first programming language type to obtain a target script executor. It is understood that the target script executor corresponds to a programming language type that is the same as the first programming language type.
It should be noted that the work of the calculation engine for calculating the expression to be calculated is completed by corresponding script executors in the calculation layer, the calculation layer includes at least two script executors, each script executor corresponds to each programming language type one to one, that is, different script executors correspond to different programming languages.
The above-mentioned calculation engine also includes a script executor constructing layer, and the above-mentioned service layer searches and selects a script executor from at least two script executors of the calculation layer based on the first programming language type, and before obtaining the target script executor, includes:
step a, the construction layer of the script executor acquires the calculation service requirement.
Specifically, the script executor constructing layer obtains a computation service requirement, which is a requirement for computing a script executor corresponding to an expression to be computed that may be input by a user.
It should be noted that the computing service requirement is specifically determined by the service environment of the computing engine, and it can be understood that the service environment corresponding to the computing engine determines the type of the programming language of the script executor that needs to provide the service, and the implementation of the computing service requirement is embodied in the type and number of the script executor. For example, a compute engine is used to support the computing services of various heterogeneous technology stacks within a company, the computing business needs can be determined by gathering the programming languages used by employees of the company to provide the same variety and number of script executors as the variety and number of programming languages.
B, the script executor constructing layer constructs a script executor group in the computing layer based on the computing service requirement; the script executor group comprises at least two script executors.
Specifically, the script executor constructing layer constructs a script executor group in the computing layer based on the computing service requirement, wherein the script executor group comprises at least two script executors.
The above-mentioned script executor constructs the script executor group in the said computation layer based on the said computation business requirement, including:
and b1, the script executor constructing layer generates a building factory corresponding to the script executor group.
Specifically, the script executor constructing layer generates a building factory corresponding to the script executor group. Wherein the construction factory is an implementation class of a javascript. Namely, the generation process of the construction factory is realized by realizing a jdk (software development kit in Java language) defined javascript. That is, the javascript.script engine interface is modified to make the javascript.script engine interface in a state required for constructing a script executor, for example, in a process of implementing the javascript.script engine interface, a name and a version of the script executor need to be set, for example, a name of the script executor corresponding to the programming language "python" exists in a construction plant corresponding to the programming language "python", a name of the script executor corresponding to the programming language "groovy" exists in a construction plant corresponding to the programming language "groovy", and the like, where names of script executors in the script executor group may be used to distinguish construction plants of script executors in the script executor group.
Step b2, the script executor constructing layer constructs the script executor group based on the build factory.
Specifically, the script executor build layer builds a script executor group based on a build factory. The script executor group is a combination of a plurality of script executors.
It should be noted that the construction process is a process of constructing a script execution group, that is, creating an object of each build factory by initializing each build factory. It can be understood that the Java programming language is an object-oriented programming language, and when a service layer needs to call (including the above-mentioned search and selection process, which includes that the service layer receives an expression to be computed, searches and selects a script executor, transmits the expression to be computed to the script executor, and receives a computation result returned by the script executor) a script executor, a build factory corresponding to the script executor cannot directly provide computation service for the service layer, but needs to create an object of the build factory corresponding to the script executor, and can use a computation function in the build factory corresponding to the script executor through the object. After the construction of the script executor group is completed, the construction of a calculation layer is basically completed, and when a user calls a calculation engine to calculate an expression to be calculated, a service layer can call a corresponding script executor in the calculation layer through a jdk standard interface layer (javascript. script Engine manager).
After the script executor constructing layer constructs the script executor group based on the construction factory, the method comprises the following steps:
and c, the script executor constructing layer acquires the identity information of the script executors in the script executor group.
Specifically, the script executor constructing layer acquires the identity information of the script executors in the script executor group. The identity information comprises the name of the script executor and a class full path corresponding to the script executor.
And d, the script executor constructing layer sends the identity information to the service layer to complete the registration of the identity information.
Specifically, the script executor constructing layer sends the identity information to the service layer to complete the registration of the identity information, so that the service layer can be called through the identity information when calling the script executor.
The service layer searches and selects a script executor from at least two script executors based on the first programming language type to obtain a target script executor, and the method comprises the following steps:
and e, the service layer searches the names of all script servers in the script server group.
Specifically, the process of calling the computation layer by the service layer includes that after the service layer receives an expression to be computed input by an upstream caller (user) of the computation engine, the service layer searches the name of each script server in the script server group. It should be noted that, for the invocation, the Java spi technology is used, and a specific use process is to write the full path of the class into a javascript.
Step f, the service layer searches and selects a third programming language type which is the same as the first programming language type in the second programming language type based on the name; each programming language type in the second programming language type corresponds to a name of each script server.
Specifically, the service layer searches and selects a third programming language type which is the same as the first programming language type in the second programming language type based on the name, wherein the second programming language type is a set of programming language types corresponding to the script executor group, and it can be understood that each script executor corresponds to one programming language type, that is, each programming language type in the second programming language type corresponds to the name of each script server one by one.
And g, the service layer determines a class full path corresponding to the name corresponding to the third programming language type based on a preset mapping relation.
Specifically, the service layer determines a class full path corresponding to a name corresponding to the third programming language type based on a preset mapping relationship. For the preset mapping relationship, a mapping relationship is established between the name of the script executor and the class full path corresponding to the script executor, for example, the name of the script executor, "python script executor" can be mapped to the class full path corresponding to the python script executor, and the name of the script executor, "groovy script executor" can be mapped to the class full path corresponding to the groovy script executor.
It should be noted that the preset mapping relationship can simplify the process of the service layer invoking the script executor in the computation layer, i.e. increase the running speed of the computation engine, and it can be understood that the byte size corresponding to the name (small number of characters) of the script executor is much smaller than the byte size of the class full path (large number of characters) corresponding to the script executor, and the process of invoking the script executor by the name of the script executor is faster than the process of directly invoking the script executor by the class full path corresponding to the script executor.
And h, the service layer selects the script executer corresponding to the class full path to obtain a target script executor.
Specifically, the service layer selects the script executor corresponding to the full path to obtain the target script executor, i.e., the process of searching and selecting the script executor is completed.
For example, if the language type is python, then the script executor with "python" in the names of the script executors in the script executor group is found and selected by the character "python". And after the searching and the selecting are finished, obtaining a selection result, obtaining a class full path corresponding to the script executor through the selection result and a preset mapping relation, then receiving the class full path by the javascript.
Step S130, the service layer transmits the expression to be calculated to the target script executor.
Specifically, after completing the search and selection of the target script executor, the service layer transmits the expression to be calculated to the target script executor, so that the target script executor calculates the expression to be calculated.
Step S140, the calculation layer calculates the expression to be calculated based on the target script executor to obtain a calculation result, and returns the calculation result to the service layer.
Specifically, the computation layer computes the expression to be computed based on the target script executor to obtain a computation result, and returns the computation result to the service layer, so that the service layer returns the computation result to an upstream caller.
Specifically, after receiving the expression to be calculated transmitted by the service layer through the javascript.
The embodiment obtains the expression to be calculated through the service layer, and obtains a first programming language type; the first programming language type is a programming language type corresponding to the expression to be calculated; the service layer searches and selects one script executor from at least two script executors of the calculation layer based on the first programming language type to obtain a target script executor; the service layer transmits the expression to be calculated to the target script executor; and the calculation layer calculates the expression to be calculated based on the target script executor to obtain a calculation result, and returns the calculation result to the service layer. After the service layer obtains the expression to be calculated, the script executor corresponding to the programming language type is searched and selected from the at least two script executors through the programming language type corresponding to the expression to be calculated, so that the expression to be calculated is calculated through the script executor, a user does not need to master multiple programming languages or convert the programming language of the expression to be calculated when using a calculation engine, the cost of the user for calculating the expression to be calculated by using the calculation engine is reduced, and the convenience of the user for calculating the expression to be calculated by using the calculation engine is improved.
Further, referring to fig. 2, a second embodiment is proposed based on the first embodiment of the computing engine task execution method of the present invention, in which the service layer finds and selects a third programming language type, which is the same as the first programming language type, in the second programming language type based on the name, including:
step S210, the service layer determines a name lookup sequence based on a preset name lookup priority.
Specifically, the service layer determines a name lookup order based on a preset name lookup priority.
It should be noted that, in the process of searching for the name of each script server in the script server group, because there are at least two types of script executors, there is a certain sequence in the process of searching for the name of each script executor.
It can be understood that, for the names of the script executors, the process of searching the names of the script executors can be sequenced in sequence by presetting name searching priorities, that is, the higher the preset name searching priority of the names of the script executors is, the higher the name searching priority is; the lower the preset name lookup priority of the names of the script executors, the later in the process of looking up the names of the script executors. For example, if the preset name lookup priority of the python script executor is higher than the preset name lookup priority of the groovy script executor, the python script executor is first looked up and then the groovy script executor is looked up in the lookup process. Wherein, the result of the sequencing is the name searching sequence.
Step S220, the service layer searches for a third programming language type in the second programming language type that is the same as the first programming language type based on the name search sequence.
Specifically, the service layer looks up a third programming language type in the second programming language type that is the same as the first programming language type based on the name lookup order. For example, the name search sequence is a python script executor, a groovy script executor, a lua script executor, etc., when the name of each script server needs to be searched, the python script executor is searched first, when the python script executor is not matched with the language type, the groovy script executor is searched, when the groovy script executor is matched with the language type, the name search process of each script server is stopped, and the service layer selects the groovy script executor as the target script executor; and if the groovy script executor is still not matched with the language type, searching the lua script executor until the names of all the script servers are searched and selected.
It can be understood that the name search order is determined by presetting the name search priority, and the search and selection of the third programming language type in the second programming language type, which is the same as the first programming language type, are completed according to the name search order, so that the efficiency of the search and selection process is improved, namely, the number of names of script executors which need to be searched and selected before the search and selection of the third programming language type is reduced.
The service layer determines a name searching sequence based on a preset name searching priority, and the method comprises the following steps:
and i, the service layer acquires the historical selection times of each script executor.
Specifically, the service layer obtains the historical selection times of each script executor.
The historical selection times are historical times for selecting a script executor by the service layer, for example, the historical times for selecting a groovy script executor is 2000 times, the historical times for selecting a python script executor is 20000 times, and the historical times for selecting a lua script executor is 200 times.
And j, sequencing the searching sequence of the names of the script executors by the service layer based on the historical selection times to obtain the name searching sequence.
Specifically, the service layer sorts the search sequence of the names of the script executors based on the historical selection times to obtain a name search sequence.
Specifically, after obtaining the historical selection times of each script executor, the service layer sequentially sorts the historical selection times from high to low. It can be understood that the larger the historical selection times is, the more frequently the script executor is called, and further, when the programming language type corresponding to the expression to be computed input by the upstream caller is predicted, the higher the matching probability of the programming language type and the script executor with the large historical selection times is.
The service layer determines a name searching sequence based on a preset name searching priority, and further comprises:
and k, the service layer acquires the searching and updating time of each script executor.
Specifically, the service layer obtains the search update time of each script executor.
The search update time is a time interval between the time when the service layer last searched each script executor and the current time, for example, the time interval for selecting a groovy script executor is 5 minutes, the time interval for selecting a python script executor is 10 minutes, and the time interval for selecting a lua script executor is 20 minutes. Specifically, when the service layer selects a script executor multiple times, only the time when the service layer selects the script executor whose search time is the latest time from the current time is counted, for example, the time interval for selecting the groovy script executor includes 5 minutes, 30 minutes, and 60 minutes, and then only 5 minutes is counted.
And step l, the service layer sequences the searching sequence of the names of the script executors based on the searching updating time to obtain the name searching sequence.
Specifically, the service layer sorts the search sequence of the names of the script executors based on the search update time to obtain a name search sequence.
After obtaining the historical selection times of each script executor, the service layer sorts the historical selection times in sequence from high to low. It can be understood that the larger the historical selection times is, the more frequently the script executor is called, and further, when the programming language type corresponding to the expression to be computed input by the upstream caller is predicted, the higher the matching probability of the programming language type and the script executor with the large historical selection times is.
And after obtaining the searching and updating time of each script executor, the service layer sequences the searching and updating time from large to small in sequence. It can be understood that the smaller the search update time is, the closer the time for selecting the script executor is to the time for selecting the script executor this time is, the more likely the upstream caller selecting the script executor this time is to be the same user as the upstream caller searching the script executor with the smaller update time is, and the higher the probability that the same user uses the same programming language is, and further when the programming language type corresponding to the expression to be calculated input by the upstream caller is predicted, the higher the probability that the programming language type is successfully matched with the script executor with the smaller update time is.
In this embodiment, the service layer determines a name lookup sequence based on a preset name lookup priority; and the service layer searches a third programming language type which is the same as the first programming language type in the second programming language type based on the name searching sequence. The names of the script executors corresponding to the second programming language type are sequenced through the preset name searching priority, so that the name searching sequence is obtained, and the process efficiency of searching and selecting the script executors according to the name searching sequence is higher.
In addition, the invention also provides a computing engine task execution device. As shown in fig. 3, fig. 3 is a schematic structural diagram of a hardware operating environment according to an embodiment of the present invention.
It should be noted that fig. 3 is a schematic structural diagram of a hardware operating environment of the computing engine task execution device.
As shown in fig. 3, the compute engine task execution device may include: a processor 1001, such as a CPU, a memory 1005, a user interface 1003, a network interface 1004, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display screen (Display), an input unit such as a Keyboard (Keyboard), and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., WI-FI interface). The memory 1005 may be a high-speed RAM memory or a non-volatile memory (e.g., a magnetic disk memory). The memory 1005 may alternatively be a storage device separate from the processor 1001.
Optionally, the computing engine task performing device may further include RF (Radio Frequency) circuits, sensors, audio circuits, WiFi modules, and the like.
Those skilled in the art will appreciate that the computing engine task execution device configuration shown in FIG. 3 does not constitute a limitation of computing engine task execution devices, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
As shown in fig. 3, a memory 1005, which is a kind of computer storage medium, may include therein an operating system, a network communication module, a user interface module, and a calculation engine task execution program. The operating system is a program for managing and controlling hardware and software resources of the computing engine task execution device, and supports the running of the computing engine task execution program and other software or programs.
In the computing engine task execution device shown in fig. 3, the user interface 1003 is mainly used for connecting a terminal and performing data communication with the terminal; the network interface 1004 is mainly used for the background server and performs data communication with the background server; the processor 1001 may be used to invoke a compute engine task execution program stored in the memory 1005 and perform the steps of the compute engine task execution method as described above.
The specific implementation of the computing engine task execution device of the present invention is substantially the same as the embodiments of the computing engine task execution method described above, and is not described herein again.
Furthermore, an embodiment of the present invention further provides a computer-readable storage medium, where a computing engine task execution program is stored on the computer-readable storage medium, and when executed by a processor, the computing engine task execution program implements the steps of the computing engine task execution method described above.
The specific implementation of the computer-readable storage medium of the present invention is substantially the same as the embodiments of the calculation engine task execution method described above, and is not described herein again.
It should be noted that, in this document, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising an … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The above-mentioned serial numbers of the embodiments of the present invention are merely for description and do not represent the merits of the embodiments.
Through the above description of the embodiments, those skilled in the art will clearly understand that the method of the above embodiments can be implemented by software plus a necessary general hardware platform, and certainly can also be implemented by hardware, but in many cases, the former is a better implementation manner. Based on such understanding, the technical solutions of the present invention may be embodied in the form of a software product, which is stored in a storage medium (such as ROM/RAM, magnetic disk, optical disk) and includes instructions for enabling a terminal device (such as a mobile phone, a computer, a server, a device, or a network device) to execute the method according to the embodiments of the present invention.
The above description is only for the preferred embodiment of the present invention and is not intended to limit the scope of the present invention, and all modifications of equivalent structures and equivalent processes, which are made by the contents of the present specification and the accompanying drawings, or directly or indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A task execution method of a computing engine is applied to the computing engine, the computing engine at least comprises a service layer and a computing layer, and the task execution method of the computing engine comprises the following steps:
the service layer acquires an expression to be calculated and acquires a first programming language type; the first programming language type is a programming language type corresponding to the expression to be calculated;
the service layer searches and selects one script executor from at least two script executors of the calculation layer based on the first programming language type to obtain a target script executor;
the service layer transmits the expression to be calculated to the target script executor;
and the calculation layer calculates the expression to be calculated based on the target script executor to obtain a calculation result, and returns the calculation result to the service layer.
2. The method of claim 1, wherein the compute engine further comprises a script executor constructing layer, the service layer finding and selecting a script executor from at least two script executors of the compute layer based on the first programming language type, before obtaining a target script executor, comprising:
the script executor constructing layer acquires the calculation service requirement;
the script executor constructing layer constructs a script executor group in the computing layer based on the computing service requirement; the script executor group comprises at least two script executors.
3. The method of claim 2, wherein the script executor constructing layer constructs a set of script executors in the compute layer based on the compute service requirements, comprising:
the script executor constructing layer generates a constructing factory corresponding to the script executor group;
the script executor constructing layer constructs the script executor group based on the build factory.
4. The method of claim 3, wherein the script executor construct layer, after constructing the set of script executors based on the build factory, comprises:
the script executor constructing layer acquires the identity information of the script executors in the script executor group;
and the script executor constructing layer sends the identity information to the service layer so as to complete the registration of the identity information.
5. The method of claim 4, wherein the service layer finding and selecting a script executor from at least two script executors of the compute layer based on the first programming language type to obtain a target script executor, comprising:
the service layer searches the name of each script server in the script server group;
the service layer searches and selects a third programming language type which is the same as the first programming language type in the second programming language type based on the name; each programming language type in the second programming language type corresponds to the name of each script server one by one;
the service layer determines a class full path corresponding to the name corresponding to the third programming language type based on a preset mapping relation;
and the service layer selects the script executer corresponding to the class full path to obtain a target script executor.
6. The method of claim 5, wherein the service layer finding and selecting a third programming language type in the second programming language type that is the same as the first programming language type based on the name comprises:
the service layer determines a name searching sequence based on a preset name searching priority;
and the service layer searches a third programming language type which is the same as the first programming language type in the second programming language type based on the name searching sequence.
7. The method of claim 6, wherein the service layer determines a name lookup order based on a preset name lookup priority, comprising:
the service layer acquires the historical selection times of each script executor;
and the service layer sorts the searching sequence of the names of the script executors based on the historical selection times to obtain the name searching sequence.
8. The method of claim 6, wherein the service layer determines a name lookup order based on a preset name lookup priority, further comprising:
the service layer acquires the searching and updating time of each script executor;
and the service layer sorts the searching sequence of the names of the script executors based on the searching and updating time to obtain the name searching sequence.
9. A computing engine task execution device comprising a memory, a processor, and a computing engine task execution program stored on the memory and executable on the processor, the computing engine task execution program when executed by the processor implementing the steps of the computing engine task execution method according to any one of claims 1 to 8.
10. A computer-readable storage medium having stored thereon a compute engine task execution program which, when executed by a processor, implements the steps of the compute engine task execution method of any of claims 1 to 8.
CN202110213649.1A 2021-02-25 2021-02-25 Computing engine task execution method and device and readable storage medium Pending CN112988131A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110213649.1A CN112988131A (en) 2021-02-25 2021-02-25 Computing engine task execution method and device and readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110213649.1A CN112988131A (en) 2021-02-25 2021-02-25 Computing engine task execution method and device and readable storage medium

Publications (1)

Publication Number Publication Date
CN112988131A true CN112988131A (en) 2021-06-18

Family

ID=76350820

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110213649.1A Pending CN112988131A (en) 2021-02-25 2021-02-25 Computing engine task execution method and device and readable storage medium

Country Status (1)

Country Link
CN (1) CN112988131A (en)

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080208364A1 (en) * 2007-02-27 2008-08-28 Rockwell Automation Technologies, Inc. Language-based organization of controller engine instances
US20120284685A1 (en) * 2011-05-06 2012-11-08 Microsoft Corporation Heterogeneous language data typing without executable regeneration
CN109739663A (en) * 2018-12-29 2019-05-10 深圳前海微众银行股份有限公司 Job processing method, device, equipment and computer readable storage medium
CN110704130A (en) * 2019-10-10 2020-01-17 深圳前海微众银行股份有限公司 Data processing method and device
CN111736923A (en) * 2020-07-27 2020-10-02 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and readable storage medium
CN112256414A (en) * 2020-10-19 2021-01-22 浪潮天元通信信息系统有限公司 Method and system for connecting multiple computing storage engines

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20080208364A1 (en) * 2007-02-27 2008-08-28 Rockwell Automation Technologies, Inc. Language-based organization of controller engine instances
US20120284685A1 (en) * 2011-05-06 2012-11-08 Microsoft Corporation Heterogeneous language data typing without executable regeneration
CN109739663A (en) * 2018-12-29 2019-05-10 深圳前海微众银行股份有限公司 Job processing method, device, equipment and computer readable storage medium
CN110704130A (en) * 2019-10-10 2020-01-17 深圳前海微众银行股份有限公司 Data processing method and device
CN111736923A (en) * 2020-07-27 2020-10-02 腾讯科技(深圳)有限公司 Data processing method and device, electronic equipment and readable storage medium
CN112256414A (en) * 2020-10-19 2021-01-22 浪潮天元通信信息系统有限公司 Method and system for connecting multiple computing storage engines

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
TAO, YUZHENG等: "Stargate: A data source connector based on Spark SQL", 《ACM》, 1 January 2015 (2015-01-01) *
刘磊: "复杂逻辑与计算推理引擎的设计及其在函数问题的应用", 《中国优秀硕士学位论文全文数据库(信息科技辑)》, no. 2, 15 February 2018 (2018-02-15) *
肖波等: "基于 JAVA 的描述语言应用", 《电脑学习》, no. 2 *
苏国忠;程荣;易宇荤;: "基于动态语言的通用型EDI转换引擎设计与实现", 软件, no. 04 *
苏国忠;程荣;易宇荤;: "基于动态语言的通用型EDI转换引擎设计与实现", 软件, no. 04, 15 April 2011 (2011-04-15) *

Similar Documents

Publication Publication Date Title
CN111258565B (en) Method, system, server and storage medium for generating applet
CN112787999B (en) Cross-chain calling method, device, system and computer readable storage medium
CN116541497A (en) Task type dialogue processing method, device, equipment and storage medium
CN111858083A (en) Remote service calling method and device, electronic equipment and storage medium
CN114116149A (en) Task scheduling method, device, equipment and medium
CN110941655B (en) Data format conversion method and device
CN110933188A (en) Remote service calling method, system, server and storage medium
CN114443076A (en) Mirror image construction method, device, equipment and storage medium
CN113448650A (en) Live broadcast function plug-in loading method, device, equipment and storage medium
KR101286284B1 (en) QoS-aware Web Service Composition method using On-the-fly Learning-based Search
CN112988131A (en) Computing engine task execution method and device and readable storage medium
CN116302448A (en) Task scheduling method and system
CN115934076A (en) Cross-platform client micro-service providing device and method and electronic equipment
CN113760487B (en) Service processing method and device
CN114036250A (en) High-precision map task processing method and device, electronic equipment and medium
CN114139079A (en) API request processing method, device, equipment and storage medium
CN114510334A (en) Class instance calling method and device, electronic equipment and automatic driving vehicle
CN109726009B (en) Big data computing method, device, equipment and computer readable storage medium
CN112905270A (en) Workflow implementation method, device, platform, electronic equipment and storage medium
CN115437627A (en) Method, device and equipment for developing learning object and storage medium
CN113364775B (en) Calling method and device of microservice and server
CN106570143B (en) Method and device for sending response object
CN112817813B (en) Data collection method, device and equipment based on reaction hops
US20230110520A1 (en) Ui service package generation and registration method and apparatus, and ui service loading method and apparatus
CN113781697B (en) Automatic numbering method, device and 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