Code execution method and device
By configuring the task creation environment and assigning access rights in the task management system, the code submitted by the user is directly executed, which solves the problem of cumbersome traditional code execution methods and achieves efficient code execution and improved development efficiency.
Patent Information
- Application Number
- CN202110863426.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-07-29
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2041-07-29
Smart Images

Figure CN113568681B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a code execution method and device. Background Art
[0002] Code is the basis for supporting computers to automatically execute various business functions. The traditional code execution plan is that users write the code, then compile and package the code, and finally publish the compiled and packaged code to the server for execution. The code can only be executed after going through the processes of writing, compiling, packaging and publishing.
[0003] When executing code using the traditional method, after modifying the code, it is necessary to repeat the steps of encoding, packaging and publishing before the code can be executed. The repeated steps of compiling, packaging and publishing make the process of executing the code cumbersome and reduce the efficiency of developing the code. Summary of the invention
[0004] In view of this, the present invention provides a task execution method and device, which are used to simplify the process of executing code, shorten the time required for executing code, and improve the efficiency of developing code.
[0005] To achieve the above objectives, the embodiments of the present invention provide the following technical solutions:
[0006] The first aspect of the present application discloses a code execution method, comprising:
[0007] When a user logs in to the task management system, configuring each task creation environment and assigning access rights for the user;
[0008] Acquire the code submitted by the user, perform task processing on the code based on each task creation environment, and obtain a task corresponding to each task creation environment;
[0009] When receiving the task execution instruction sent by the user, determining the task corresponding to the task execution instruction as the target task;
[0010] The execution parameters of the target task are acquired, and based on the execution parameters and the access permission, the code in the target task is executed to obtain the execution result of the code in the target task.
[0011] In the above method, optionally, obtaining the execution parameters of the target task includes:
[0012] Obtaining configuration parameters input by the user through a parameter configuration page;
[0013] The configuration parameters and the common parameters of the target task are used as execution parameters of the target task.
[0014] Optionally, the method of executing the code in the target task based on the execution parameter and the access permission to obtain the execution result of the code in the target task includes:
[0015] Parsing the code in the target task to determine a code parameter library corresponding to the code in the target task;
[0016] Based on the access permission, determining whether the user has permission to access the code parameter library;
[0017] If it is determined that the user does not have the authority to access the code parameter library, access failure information is generated, and the access failure information is used as the execution result of the code in the target task;
[0018] If it is determined that the user has the authority to access the code parameter library, the code parameter library is accessed to obtain the code parameters corresponding to the code in the target task, and based on the code parameters and the execution parameters, the code in the target task is executed to obtain the execution result of the code in the target task.
[0019] The above method may optionally further include:
[0020] The preset monitoring interface is called to monitor the status of the target task, and the status of the target task is updated in the task status display page.
[0021] In the above method, optionally, configuring each task creation environment and assigning access rights to the user includes:
[0022] Acquire task creation information of the user, and configure each task creation environment for the user based on the task creation information;
[0023] The user information of the user is obtained, and access rights are allocated to the user based on the user information.
[0024] The second aspect of the present application discloses a code execution device, comprising:
[0025] A configuration unit, used to configure each task creation environment and assign access rights for the user when the user logs in to the task management system;
[0026] An acquisition unit, used for acquiring the code submitted by the user, performing task processing on the code based on each task creation environment, and obtaining a task corresponding to each task creation environment;
[0027] a determination unit, configured to, upon receiving a task execution instruction sent by the user, determine a task corresponding to the task execution instruction as a target task;
[0028] The execution unit is used to obtain the execution parameters of the target task, and execute the code in the target task based on the execution parameters and the access permission to obtain the execution result of the code in the target task.
[0029] In the above device, optionally, the execution unit includes:
[0030] An acquisition subunit, used to acquire the configuration parameters input by the user through the parameter configuration page;
[0031] A determination subunit is used to use the configuration parameters and the common parameters of the target task as execution parameters of the target task.
[0032] In the above device, optionally, the execution unit includes:
[0033] A parsing subunit, used for parsing the code in the target task to determine a code parameter library corresponding to the code in the target task;
[0034] A judging subunit, configured to judge whether the user has the authority to access the code parameter library based on the access authority;
[0035] A generating subunit, configured to generate access failure information if it is determined that the user does not have the authority to access the code parameter library, and use the access failure information as the execution result of the code in the target task;
[0036] An access subunit is used to access the code parameter library if it is determined that the user has the authority to access the code parameter library, obtain code parameters corresponding to the code in the target task, execute the code in the target task based on the code parameters and the execution parameters, and obtain the execution result of the code in the target task.
[0037] The above device may optionally further include:
[0038] The calling unit is used to call a preset monitoring interface to monitor the status of the target task, and update the status of the target task in a task status display page.
[0039] In the above device, optionally, the configuration unit includes:
[0040] A configuration subunit, configured to obtain task creation information of the user, and configure various task creation environments for the user based on the task creation information;
[0041] The allocation subunit is used to obtain the user information of the user and allocate access rights to the user based on the user information.
[0042] The embodiment of the present invention provides a code execution method and device, the method comprising: when a user logs in to a task management system, configuring each task creation environment and assigning access rights for the user; obtaining the code submitted by the user, performing task-based processing on the code based on each task creation environment, and obtaining the task corresponding to each task creation environment; upon receiving the task execution instruction sent by the user, determining the task corresponding to the task execution instruction as the target task; obtaining the execution parameters of the target task, and executing the code in the target task based on the execution parameters and access rights, and obtaining the execution result of the code in the target task. Based on each task creation environment assigned to the user, performing task-based processing on the code, obtaining each task, upon receiving the task execution instruction sent by the user, determining the target task, and executing the code in the target task based on the execution parameters of the target task and the user's access rights, so that the code does not need to be compiled, packaged, and released before execution, thereby simplifying the code execution process, shortening the time required for code execution, and improving the efficiency of code development. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0044] Figure 1 A method flow chart of a task execution method provided by an embodiment of the present invention;
[0045] Figure 2 A flowchart of another method of a task execution method provided by an embodiment of the present invention;
[0046] Figure 3 A flowchart of another method of a task execution method provided by an embodiment of the present invention;
[0047] Figure 4 Another method flow chart of a task execution method provided by an embodiment of the present invention;
[0048] Figure 5 A schematic diagram of the structure of a task execution device provided by an embodiment of the present invention;
[0049] Figure 6 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0050] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0051] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.
[0052] The present invention can be used in many general or special computing device environments or configurations, such as personal computers, server computers, handheld or portable devices, tablet devices, multi-processor devices, distributed computing environments including any of the above devices or devices, etc.
[0053] As can be seen from the background technology, the traditional code execution solution is to compile and package the written code, and then execute it after publishing. This process is relatively cumbersome, and after the code is modified, it is necessary to repeat the process of compiling, packaging and publishing. This process takes a long time from simple to complex, resulting in a decrease in the efficiency of developers in developing code. In order to solve this problem, the present application provides a new code execution method, which shortens the code execution process, saves the time spent in the code execution process, and improves the efficiency of developers in developing code.
[0054] The embodiment of the present invention provides a code execution method, which is applied to a task management system. The task management system is composed of a computer terminal or a distributed intelligent computing device. The execution subject of the present invention is a processor or a server of the task management system. Figure 1 , is a method flow chart of a code execution method provided by an embodiment of the present invention, and is specifically described as follows:
[0055] S101. When a user logs in to a task management system, each task creation environment is configured for the user and access rights are allocated.
[0056] The task management system is used to manage the code submitted by users. The task management system is built using Spark Repl technology. Users can use the task management system to write code and execute the code. Furthermore, a dynamic code interpreter is set up in the task management system. After using the dynamic code interpreter, the code can be executed without compiling, packaging, and publishing the code.
[0057] The task management system requires login before it can be used. Users can use pre-registered account information to log in to the task management system. Furthermore, if the user has not registered in the task management system, the user can choose to use the task management system as a visitor. When the user uses the task management system as a visitor, temporary login information will be randomly assigned to the user, and the user can use the temporary login information to log in to the task management system.
[0058] In the method provided in the embodiment of the present invention, referring to Figure 2 , which is a flow chart of a method for configuring each task creation environment and allocating access rights for a user according to an embodiment of the present invention, and is specifically described as follows:
[0059] S201: Obtain task creation information of a user, and configure various task creation environments for the user based on the task creation information.
[0060] S202: Obtain user information of the user, and assign access rights to the user based on the user information.
[0061] In the method provided by the embodiment of the present invention, the task creation environment can also be understood as the execution environment of the code, wherein there are multiple task creation environments, such as SQL environment, Kafka environment and code enhancement environment, wherein SQL refers to structured query statements, Kafka refers to a high-throughput distributed publish-subscribe messaging system, and different task creation environments implement different functions. The task creation information specifically includes information about the environment required by the user, and the user can input the task creation information through the visual interface of the task management system.
[0062] The user information includes the user's login information, such as the user's account information. The user's level is determined based on the user information, and the user is assigned access rights based on the user's level. For example, when the user is a visitor, the user's level is determined to be primary, and the access rights assigned to the user are primary access rights. If the user is a registered user in the system and the user is a primary development engineer, the access rights assigned to the user are secondary access rights. If the user is a registered user in the system and the user is an intermediate development engineer, the access rights assigned to the user are third-level access rights. If the user is a registered user in the system and the user is a senior development engineer, the access rights assigned to the user are fourth-level access rights. The access rights of different levels can access different contents. The higher the level of the access rights, the more contents can be accessed. Furthermore, the first-level access rights are the lowest, the second-level access rights are higher than the first-level access rights, the third-level access rights are higher than the second-level access rights, and the fourth-level access rights are higher than the third-level access rights. In the method provided in the embodiment of the present invention, when the user information of the user indicates that the user is an administrator, the user is assigned administrator access rights, and the administrator access rights are the highest level of anti-counterfeiting rights.
[0063] In the method provided by the embodiment of the present invention, by assigning task creation environments and access rights to users, users with different access rights can access different content, thereby managing user access in an orderly manner, thereby improving the security of data access.
[0064] S102: Obtain the code submitted by the user, perform task processing on the code based on each task creation environment, and obtain a task corresponding to each task creation environment.
[0065] The user edits the code through the visual editing page and submits the code after the code editing is completed, thereby the task management system obtains the code submitted by the user.
[0066] After obtaining the code provided by the user, the code is tasked based on each task creation environment to obtain tasks corresponding to each task creation environment. Specifically, the task creation environment configured for the user includes an SQL environment and a code enhancement environment. The code is tasked based on the SQL environment to obtain tasks corresponding to the SQL environment, and the code is tasked based on the code enhancement environment to obtain tasks corresponding to the code enhancement environment.
[0067] When the code is task-processed based on each task creation environment, the code can be task-processed based on the environmental data in each task creation environment, thereby obtaining the task corresponding to each task creation environment. The task in the embodiment of the present invention is composed of code submitted by the user, and executing the task is to execute the code in the task. After the task provided by the present invention is successfully executed, the computer can complete the work associated with the task or realize the function corresponding to the task.
[0068] S103: When receiving a task execution instruction sent by a user, determine the task corresponding to the task execution instruction as a target task.
[0069] After the code submitted by the user is processed into tasks, each task is obtained, and the task information of each task can be displayed to the user through a task display interface, wherein the task display interface includes information such as the job name, creation time, and task number.
[0070] When a user needs to execute a task, he / she inputs the task execution instruction through the visual interface of the task execution. The task execution instruction includes a task identifier, which is a unique identifier of the task. The task identifier may be composed of a task name and a task number. The target task is determined based on the task identifier.
[0071] S104: Obtain execution parameters of the target task, and execute the code in the target task based on the execution parameters and access rights to obtain the execution result of the code in the target task.
[0072] In the method provided in the embodiment of the present invention, before executing the code in the target task, it is necessary to obtain the execution parameters of the target task, referring to Figure 3 , which is a flow chart of a method for determining execution parameters of a past target task provided by an embodiment of the present invention, is specifically described as follows:
[0073] S301. Obtain configuration parameters input by a user through a parameter configuration page.
[0074] S302: Use the configuration parameters and the common parameters of the target task as execution parameters of the target task.
[0075] In the method provided by the embodiment of the present invention, the user can input configuration parameters through the parameter configuration page, wherein the configuration parameters are external input parameters, such as execution date, email address for receiving execution results, and other parameters.
[0076] The common parameters in the target task are the basic parameters of the task, such as the parameters of the function that needs to be called when executing, the parameters of the database that needs to be accessed when executing the task, etc. The configuration parameters and the common parameters in the target task are used as the execution parameters of the target task, so that the execution parameters can be used to execute the target task.
[0077] In the method provided by the embodiment of the present invention, the user inputs configuration parameters through the parameter configuration page, thereby making the execution parameters of the target task change according to the needs of the user, thereby improving the flexibility of the execution of the target task, and further improving the applicability of the target task, so that the execution parameters of the target task can be changed according to different application scenarios and different needs of users, reducing the work of the development user to redevelop the code.
[0078] In the method provided by the embodiment of the present invention, in order to enable the user to know the status of the target task in real time, the user can also call the monitoring interface in the task management system to monitor the status of the target task, and update the status of the target task in the task status display page, so that the user can know the status of the target task in real time. Specifically, the status of the target task can be in progress, successful execution, or failed execution.
[0079] In the method provided in the embodiment of the present invention, referring to Figure 4 , which is a flowchart of a method for executing the code in the target task based on the execution parameters and access rights provided by an embodiment of the present invention to obtain the execution result of the code in the target task, and the specific description is as follows:
[0080] S401: parse the code in the target task to determine the code parameter library corresponding to the code in the target task.
[0081] Parse the code in the target task to obtain the type information of the code, and determine the code parameter library corresponding to the code based on the type information; different types of code correspond to different code parameter libraries, and the code parameter library stores multiple code parameters. Specifically, the code parameter can be a function object or a class with different functions.
[0082] S402. Based on the access rights, determine whether the user has the right to access the code parameter library; if it is determined that the user does not have the right to access the code parameter library, execute S403; if it is determined that the user has the right to access the code parameter library, execute S404.
[0083] Obtain the permission information of the code parameter library, determine the permission level of the code parameter library based on the permission information of the code parameter library, compare the user's access rights with the permission level of the code parameter library, and determine whether the user's access rights meet the permission level of the code parameter library. When the user's access rights meet the permission level of the code parameter library, determine that the user has the permission to access the code parameter library; when the user's access rights do not meet the permission level of the code parameter library, determine that the user does not have the permission to access the code parameter library.
[0084] S403: Generate access failure information, and use the access failure information as the execution result of the code in the target task.
[0085] When it is determined that the user does not have permission to access the code parameter library, the user cannot access the code parameter library corresponding to the code in the target task, and thus, cannot execute the code in the target task. As a result, access failure information representing the failure to access the code parameter library is generated, and the access failure information is used as the execution result of the code in the target task. Further, the execution result at this time represents the failure to execute the code in the target task.
[0086] S404: Access a code parameter library to obtain code parameters corresponding to the code in the target task, execute the code in the target task based on the code parameters and execution parameters, and obtain an execution result of the code in the target task.
[0087] When the user has permission to access the code parameter library, the system accesses the code parameter library through an interface to obtain code parameters corresponding to the code in the target task, and executes the code in the target task according to the code parameters and execution parameters, thereby obtaining the execution result of the code in the target task, wherein the execution result may indicate that the execution of the code in the target task failed, or may indicate that the execution of the code in the target task was successful.
[0088] In the method provided by the embodiment of the present invention, by checking whether the user has the authority to access the code parameter library, the code parameter library can be prevented from being accessed by illegal elements, thereby ensuring that a safe execution environment is provided for the target task.
[0089] In the method provided by the embodiment of the present invention, when a user logs in to the task management system, each task creation environment is configured for the user and access rights are allocated; the code submitted by the user is obtained, and the code is task-processed based on each task creation environment to obtain the task corresponding to each task creation environment; when a task execution instruction sent by the user is received, the task corresponding to the task execution instruction is determined as the target task; the execution parameters of the target task are obtained, and based on the execution parameters and the access rights, the code in the target task is executed to obtain the execution result of the code in the target task. After receiving the code provided by the user, the code is task-processed based on each task creation environment allocated to the user to obtain the task, and after receiving the task execution instruction sent by the user, the target task is determined, and the code in the target task is executed according to the execution parameters of the target task and the user access rights, thereby executing the code without the need to compile, package, and publish the code, thereby shortening the code execution process, improving the code execution efficiency, and further improving the work efficiency of developers.
[0090] and Figure 1 Corresponding to the method shown in FIG. 1 , an embodiment of the present invention provides a code execution device for supporting Figure 1 The method shown is applied in real life, and the device is applied in a computer device. Figure 5 , is a schematic diagram of the structure of a code execution device provided by an embodiment of the present invention, and the specific description is as follows:
[0091] The configuration unit 501 is used to configure each task creation environment and assign access rights for the user when the user logs in to the task management system;
[0092] An acquisition unit 502 is used to acquire the code submitted by the user, perform task processing on the code based on each task creation environment, and obtain a task corresponding to each task creation environment;
[0093] A determination unit 503 is configured to, upon receiving a task execution instruction sent by the user, determine a task corresponding to the task execution instruction as a target task;
[0094] The execution unit 504 is used to obtain the execution parameters of the target task, and execute the code in the target task based on the execution parameters and the access permission to obtain the execution result of the code in the target task.
[0095] In the device provided by the embodiment of the present invention, when a user logs in to the task management system, each task creation environment is configured for the user and access rights are allocated; the code submitted by the user is obtained, and the code is task-processed based on each task creation environment to obtain the task corresponding to each task creation environment; when a task execution instruction sent by the user is received, the task corresponding to the task execution instruction is determined as the target task; the execution parameters of the target task are obtained, and based on the execution parameters and the access rights, the code in the target task is executed to obtain the execution result of the code in the target task. After receiving the code provided by the user, the code is task-processed based on each task creation environment allocated to the user to obtain the task, and after receiving the task execution instruction sent by the user, the target task is determined, and the code in the target task is executed according to the execution parameters of the target task and the user access rights, thereby executing the code without the need to compile, package, and publish the code, thereby shortening the code execution process, improving the code execution efficiency, and further improving the work efficiency of developers.
[0096] In the device provided by the embodiment of the present invention, the execution unit 504 may be configured as follows:
[0097] An acquisition subunit, used to acquire the configuration parameters input by the user through the parameter configuration page;
[0098] A determination subunit is used to use the configuration parameters and the common parameters of the target task as execution parameters of the target task.
[0099] In the device provided by the embodiment of the present invention, the execution unit 504 may be configured as follows:
[0100] A parsing subunit, used for parsing the code in the target task to determine a code parameter library corresponding to the code in the target task;
[0101] A judging subunit, configured to judge whether the user has the authority to access the code parameter library based on the access authority;
[0102] A generating subunit, configured to generate access failure information if it is determined that the user does not have the authority to access the code parameter library, and use the access failure information as the execution result of the code in the target task;
[0103] An access subunit is used to access the code parameter library if it is determined that the user has the authority to access the code parameter library, obtain code parameters corresponding to the code in the target task, execute the code in the target task based on the code parameters and the execution parameters, and obtain the execution result of the code in the target task.
[0104] The device provided in the embodiment of the present invention is further configured as follows:
[0105] The calling unit is used to call a preset monitoring interface to monitor the status of the target task, and update the status of the target task in a task status display page.
[0106] In the device provided by the embodiment of the present invention, the configuration unit 501 may be configured as follows:
[0107] A configuration subunit, configured to obtain task creation information of the user, and configure various task creation environments for the user based on the task creation information;
[0108] The allocation subunit is used to obtain the user information of the user and allocate access rights to the user based on the user information.
[0109] An embodiment of the present invention further provides a storage medium, wherein the storage medium includes stored instructions, wherein when the instructions are executed, a device where the storage medium is located is controlled to perform the following operations:
[0110] When a user logs in to the task management system, configuring each task creation environment and assigning access rights for the user;
[0111] Acquire the code submitted by the user, perform task processing on the code based on each task creation environment, and obtain a task corresponding to each task creation environment;
[0112] When receiving the task execution instruction sent by the user, determining the task corresponding to the task execution instruction as the target task;
[0113] The execution parameters of the target task are acquired, and based on the execution parameters and the access permission, the code in the target task is executed to obtain the execution result of the code in the target task.
[0114] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 6 As shown, it specifically includes a memory 601 and one or more instructions 602, wherein the one or more instructions 602 are stored in the memory 601 and are configured to be executed by one or more processors 603 to perform the following operations:
[0115] When a user logs in to the task management system, configuring each task creation environment and assigning access rights for the user;
[0116] Acquire the code submitted by the user, perform task processing on the code based on each task creation environment, and obtain a task corresponding to each task creation environment;
[0117] When receiving the task execution instruction sent by the user, determining the task corresponding to the task execution instruction as the target task;
[0118] The execution parameters of the target task are acquired, and based on the execution parameters and the access permission, the code in the target task is executed to obtain the execution result of the code in the target task.
[0119] The specific implementation processes and derivative methods of the above-mentioned embodiments are all within the protection scope of the present invention.
[0120] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can refer to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system or system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can refer to the partial description of the method embodiment. The system and system embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without creative work.
[0121] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0122] The above description of the disclosed embodiments enables one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A code execution method, characterized in that: include: When a user logs in to the task management system, configuring each task creation environment and assigning access rights for the user; Acquire the code submitted by the user, perform task processing on the code based on each task creation environment, and obtain a task corresponding to each task creation environment; Upon receiving a task execution instruction sent by the user, determining a task corresponding to the task execution instruction as a target task, wherein the task execution instruction includes a task identifier; Obtaining configuration parameters input by the user through a parameter configuration page, wherein the configuration parameters include an execution date and an email address for receiving execution results; The configuration parameters and the common parameters of the target task are used as execution parameters of the target task, and based on the execution parameters and the access rights, the code in the target task is executed to obtain the execution result of the code in the target task, wherein the common parameters are basic parameters of the task, and the common parameters include parameters of the function called when executing the task and parameters of the database accessed when executing the task.
2. The method according to claim 1, characterized in that: The executing the code in the target task based on the execution parameter and the access permission to obtain the execution result of the code in the target task includes: Parsing the code in the target task to determine a code parameter library corresponding to the code in the target task; Based on the access permission, determining whether the user has permission to access the code parameter library; If it is determined that the user does not have the authority to access the code parameter library, access failure information is generated, and the access failure information is used as the execution result of the code in the target task; If it is determined that the user has the authority to access the code parameter library, the code parameter library is accessed to obtain the code parameters corresponding to the code in the target task, and based on the code parameters and the execution parameters, the code in the target task is executed to obtain the execution result of the code in the target task.
3. The method according to claim 1, characterized in that Also includes: The preset monitoring interface is called to monitor the status of the target task, and the status of the target task is updated in the task status display page.
4. The method according to claim 1, characterized in that: The step of configuring each task creation environment and assigning access rights to the user includes: Acquire task creation information of the user, and configure each task creation environment for the user based on the task creation information; The user information of the user is obtained, and access rights are allocated to the user based on the user information.
5. A code execution device, characterized in that: include: A configuration unit, used to configure each task creation environment and assign access rights for the user when the user logs in to the task management system; An acquisition unit, used for acquiring the code submitted by the user, performing task processing on the code based on each task creation environment, and obtaining a task corresponding to each task creation environment; a determination unit, configured to, upon receiving a task execution instruction sent by the user, determine a task corresponding to the task execution instruction as a target task, wherein the task execution instruction includes a task identifier; An execution unit, used to obtain an execution parameter of the target task, and execute the code in the target task based on the execution parameter and the access permission, to obtain an execution result of the code in the target task; The execution unit comprises: An acquisition subunit, used to acquire the configuration parameters input by the user through the parameter configuration page, wherein the configuration parameters include an execution date and an email address for receiving execution results; A determination subunit is used to use the configuration parameters and the common parameters of the target task as execution parameters of the target task, wherein the common parameters are basic parameters of the task, and the common parameters include parameters of the function called when executing the task and parameters of the database accessed when executing the task.
6. The device according to claim 5, characterized in that The execution unit comprises: A parsing subunit, used for parsing the code in the target task to determine a code parameter library corresponding to the code in the target task; A judging subunit, configured to judge whether the user has the authority to access the code parameter library based on the access authority; A generating subunit, configured to generate access failure information if it is determined that the user does not have the authority to access the code parameter library, and use the access failure information as the execution result of the code in the target task; An access subunit is used to access the code parameter library if it is determined that the user has the authority to access the code parameter library, obtain code parameters corresponding to the code in the target task, execute the code in the target task based on the code parameters and the execution parameters, and obtain the execution result of the code in the target task.
7. The device according to claim 5, characterized in that Also includes: The calling unit is used to call a preset monitoring interface to monitor the status of the target task, and update the status of the target task in a task status display page.
8. The device according to claim 5, characterized in that The configuration unit comprises: A configuration subunit, configured to obtain task creation information of the user, and configure various task creation environments for the user based on the task creation information; The allocation subunit is used to obtain the user information of the user and allocate access rights to the user based on the user information.
