Task execution method and device based on front-end page and electronic equipment

By receiving task execution requests on the front-end page, distributing task scripts to processing from data nodes, the problem of low micro-task execution efficiency is solved, multi-level linked task execution is realized, efficiency and convenience are improved, and learning costs and resource usage are reduced. .

CN119149036APending Publication Date: 2024-12-17TRAVELSKY TECHNOLOGY LIMITED
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411367773.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-27
Publication Date
2024-12-17

AI Technical Summary

Technical Problem

During the development and maintenance of application software systems, the execution efficiency of micro-tasks is low, especially when source data is distributed on multiple machines, the data copy time is long and the back-end server resources are insufficient, resulting in too long task execution time or fail.

Method used

By receiving task execution requests on the front-end page, determining the target task script, and distributing the function module to the corresponding slave data node for processing, generating execution results, realizing multi-level linked task execution and improving efficiency.

Benefits of technology

It improves the efficiency and convenience of task execution, avoids secondary development, reduces learning costs, and realizes centralized management of front-end page tools and optimized use of back-end server resources.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119149036A_ABST
    Figure CN119149036A_ABST
Patent Text Reader

Abstract

The invention discloses a task execution method and device based on a front-end page and electronic equipment, and relates to the technical field of front-end development.The task execution method comprises the steps that a task execution request initiated by a target terminal on a target front-end page is received, a target task script for executing a target task is determined based on a request path, and the target task script is executed based on a control instruction. And distributing each function module to the corresponding slave data node, and generating an execution result based on all the processing data. According to the method and the device, the technical problem of relatively low efficiency during task execution based on a front-end page in related technologies is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of front-end development, and in particular to a task execution method based on a front-end page, a device thereof, and an electronic device. Background Art

[0002] In the actual development and maintenance process of various application software systems, they will face various microtasks with relatively fixed patterns, such as various log information statistics, non-functional stress testing, functional difference comparison of different versions, etc. Microtasks are mainly characterized by diversified functions, small and trivial, and high reuse frequency. Although various microtasks do not directly improve the operating efficiency of the software system, they can ensure the smooth operation of the system and accurate logic.

[0003] However, when developing and maintaining application software systems, developers and maintainers spend most of their time on the development of various microtasks, which makes it difficult to spare a lot of time and energy to study core technical issues. In addition, since the functions of microtasks are diverse and independent, and the personnel involved in development are also different, the development languages ​​and tools used are also very different, which often results in the situation where one develops and uses it by oneself, or other personnel need to pay a certain learning cost when using it, and because the development tools are difficult to achieve centralized management, they are not easy to promote and use.

[0004] In the related art, various tools for developing the above-mentioned microtasks can be centrally managed through a web (webpage), and the corresponding tools can be triggered to execute through a front-end interface to realize the execution of the corresponding microtasks.

[0005] However, although various microtasks can be centrally managed through the front-end page in the related art, in actual use, some microtasks require source data to be processed not on the back-end server, but on other machines, and some source data is even distributed on multiple machines, so it is impossible to effectively execute microtasks by relying on only one back-end server. If the data is copied from other machines to the back-end server before execution, if the amount of data is too large, it will take a long time to copy the data, and the disk capacity of the back-end server may not be enough, resulting in a long execution time or execution failure of the microtask.

[0006] To address the above-mentioned problems, no effective solution has been proposed yet. Summary of the invention

[0007] The embodiment of the present invention provides a task execution method based on a front-end page, a device thereof, and an electronic device, so as to at least solve the technical problem of low efficiency in executing tasks based on a front-end page in the related art.

[0008] According to one aspect of an embodiment of the present invention, a front-end page-based task execution method is provided, comprising: receiving a task execution request initiated by a target terminal on a target front-end page, wherein the target front-end page corresponds to a target task; the task execution request comprises at least: task parameters, a request path; based on the request path, determining a target task script for executing the target task, wherein the target task script comprises: at least one function module, each of the function modules comprises at least: a control instruction; based on the control instruction, distributing each of the function modules to a corresponding slave data node, wherein each of the slave data nodes processes the function module and returns processed data; based on all the processed data, generating an execution result.

[0009] Furthermore, before receiving the task execution request initiated by the target terminal on the target front-end page, it also includes: configuring a configuration file for each business task and storing the configuration file to the master data node; based on the configuration file of each business task, generating a front-end page corresponding to each business task.

[0010] Furthermore, the step of configuring the configuration file of each business task includes: constructing a task script for the business task, wherein the task script includes: a feature program and a regular program; constructing a parameter mapping relationship between front-end parameters and back-end parameters; and generating the configuration file for the business task based on the task script and the parameter mapping relationship.

[0011] Furthermore, the step of constructing a task script for the business task includes: determining the characteristic tasks and routine tasks included in the business task, wherein the characteristic task is a task that is triggered to be executed by the master data node after the user terminal initiates a task execution request on the front-end page; the routine task includes: periodic tasks and initialization tasks, the periodic task is a task that is periodically executed by the master data node, and the initialization task is a task that is executed by the master data node during the initialization phase; based on the characteristic task, constructing the characteristic program, and based on the routine task, constructing the routine program, wherein the characteristic program includes: at least one function module, and the function module also includes: annotation instructions; characterizing the characteristic program and the routine program as the task script of the business task.

[0012] Furthermore, the step of constructing a parameter mapping relationship between front-end parameters and back-end parameters includes: determining the front-end parameters of the front-end page that need to be input by the user terminal; converting each of the front-end parameters into the back-end parameters according to a preset string format, and establishing a corresponding relationship between the front-end parameters and the back-end parameters to obtain the parameter mapping relationship; or, using a preset framework to generate a page file of the front-end page; based on the page file, generating a back-end file, wherein the master data node maps the front-end parameters input by the user terminal into the back-end parameters based on the back-end file.

[0013] Furthermore, before receiving the task execution request initiated by the target terminal on the target front-end page, it also includes: configuring the cluster information of the master data node, wherein the cluster information includes at least: a cluster identifier, a master data node address, and a port identifier; broadcasting the cluster information to all the slave data nodes in the target local area network where the master data node is located, wherein the slave data node determines whether to join the cluster indicated by the cluster identifier based on the local node configuration information, and after determining to join the cluster, establishes a connection with the master data node based on the data node address and the port identifier, and after successfully establishing a connection with the master data node, configures the master data node's access rights to each data directory; based on a preset interval period, sends a heartbeat data packet to each of the slave data nodes that establish a connection with the master data node, wherein if the slave data node does not receive the heartbeat data packet within a preset time period, the connection between the slave data node and the master data node is closed.

[0014] Furthermore, each of the slave data nodes establishes a communication connection with other slave data nodes in the cluster through the master data node, and the slave data nodes mount remote data directories to local devices through the communication connection, wherein the remote data directory is a data directory of the other slave data nodes in the cluster.

[0015] Furthermore, the step of each of the slave data nodes processing the function module and returning processed data includes: the slave data node accesses the remote data directory of the target slave data node indicated by the node address based on the annotation instruction in the function module or the node address in the control instruction, and obtains the target data; if the slave data node fails to obtain the target data, the slave data node distributes the function module to the target slave data node and receives the target data returned by the target slave data node; the slave data node represents the target data as the processed data and returns it to the master data node.

[0016] According to another aspect of an embodiment of the present invention, a task execution device based on a front-end page is also provided, including: a receiving unit, used to receive a task execution request initiated by a target terminal on a target front-end page, wherein the target front-end page corresponds to a target task; the task execution request includes at least: task parameters, request path; a determination unit, used to determine a target task script for executing the target task based on the request path, wherein the target task script includes: at least one function module, each of the function modules includes at least: a control instruction; a distribution unit, used to distribute each of the function modules to a corresponding slave data node based on the control instruction, wherein each of the slave data nodes processes the function module and returns processed data; a generation unit, used to generate an execution result based on all the processed data.

[0017] Furthermore, the task execution device includes: a first configuration module, used to configure the configuration file of each business task before receiving the task execution request initiated by the target terminal on the target front-end page, and store the configuration file to the main data node; a first generation module, used to generate the front-end page corresponding to each business task based on the configuration file of each business task.

[0018] Furthermore, the first configuration module includes: a first construction sub-module, used to construct a task script of the business task, wherein the task script includes: a feature program and a regular program; a second construction sub-module, used to construct a parameter mapping relationship between front-end parameters and back-end parameters; a first generation sub-module, used to generate the configuration file of the business task based on the task script and the parameter mapping relationship.

[0019] Furthermore, the first construction submodule includes: a first determination submodule, used to determine the characteristic tasks and routine tasks included in the business task, wherein the characteristic task is a task that is triggered to be executed by the master data node after the user terminal initiates a task execution request on the front-end page; the routine task includes: periodic tasks and initialization tasks, the periodic task is a task that is periodically executed by the master data node, and the initialization task is a task that is executed by the master data node during the initialization phase; a third construction submodule, used to construct the characteristic program based on the characteristic task, and to construct the routine program based on the routine task, wherein the characteristic program includes: at least one function module, and the function module also includes: annotation instructions; a first characterization submodule, used to characterize the characteristic program and the routine program as the task scripts of the business task.

[0020] Furthermore, the second construction submodule includes: a second determination submodule, used to determine the front-end parameters of the front-end page that need to be input by the user terminal; a first establishment submodule, used to convert each of the front-end parameters into the back-end parameters according to a preset string format, and establish a corresponding relationship between the front-end parameters and the back-end parameters to obtain the parameter mapping relationship; a second generation submodule, used to generate a page file of the front-end page using a preset framework; a third generation submodule, used to generate a back-end file based on the page file, wherein the master data node maps the front-end parameters input by the user terminal into the back-end parameters based on the back-end file.

[0021] Further, the task execution device includes: a second configuration module, used to configure the cluster information of the master data node before receiving the task execution request initiated by the target terminal on the target front-end page, wherein the cluster information at least includes: a cluster identifier, a master data node address, and a port identifier; a first broadcast module, used to broadcast the cluster information to all the slave data nodes in the target local area network where the master data node is located, wherein the slave data node determines whether to join the cluster indicated by the cluster identifier based on the local node configuration information, and after determining to join the cluster, establishes a connection with the master data node based on the data node address and the port identifier, and configures the master data node's access rights to each data directory after successfully establishing a connection with the master data node; a first sending module, used to send a heartbeat data packet to each of the slave data nodes that establish a connection with the master data node based on a preset interval period, wherein if the slave data node does not receive the heartbeat data packet within a preset time period, the connection between the slave data node and the master data node is closed.

[0022] Furthermore, the task execution device includes: a first establishment module, which is used for each of the slave data nodes to establish a communication connection with other slave data nodes in the cluster through the master data node, and the slave data nodes to mount the remote data directory to the local through the communication connection, wherein the remote data directory is the data directory of the other slave data nodes in the cluster.

[0023] Further, the distribution unit includes: a first acquisition module, used by the slave data node to access the remote data directory of the target slave data node indicated by the node address and acquire the target data based on the annotation instruction in the function module or the node address in the control instruction; a first receiving module, used by the slave data node to distribute the function module to the target slave data node and receive the target data returned by the target slave data node if the slave data node fails to acquire the target data; and a first return module, used by the slave data node to return the target data represented as the processed data to the master data node.

[0024] According to another aspect of an embodiment of the present invention, an electronic device is also provided, including one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement any one of the above-mentioned task execution methods based on the front-end page.

[0025] In the present invention, the master data node in the multi-level linkage task execution system receives the task execution request initiated by the target terminal on the target front-end page, determines the target task script for executing the target task based on the request path, distributes each function module to the corresponding slave data node based on the control instruction, and generates the execution result based on all the processed data, thereby solving the technical problem of low efficiency in task execution based on the front-end page in the related technology.

[0026] In the present invention, the master data node in the multi-level linkage task execution system can receive and parse the task execution request initiated by the target terminal on the front-end page, and then determine the target task script to be executed according to the request path contained in the task execution request, and distribute the multiple function modules contained in the target task script to the corresponding slave data nodes for processing according to the control instructions in the target task script. After the slave data nodes are processed, all processed data returned from the data nodes are collected and integrated to generate the final execution result, thereby realizing multi-level linkage task execution, which not only improves the convenience of task execution, but also effectively improves the task execution efficiency. BRIEF DESCRIPTION OF THE DRAWINGS

[0027] The drawings described herein are used to provide a further understanding of the present invention and constitute a part of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute an improper limitation of the present invention. In the drawings:

[0028] Figure 1 is a flowchart of an optional front-end page-based task execution method according to an embodiment of the present invention;

[0029] Figure 2 is a system logic diagram of an optional task execution method based on a front-end page according to an embodiment of the present invention;

[0030] Figure 3 is a schematic diagram of an optional task execution device based on a front-end page according to an embodiment of the present invention;

[0031] Figure 4 The present invention is a hardware structure block diagram of an electronic device (or mobile device) for a task execution method based on a front-end page according to an embodiment of the present invention. DETAILED DESCRIPTION

[0032] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings 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 should fall within the scope of protection of the present invention.

[0033] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0034] It should be noted that the relevant information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, displayed data, etc.) collected and involved in the present invention are all information and data authorized by the user or fully authorized by all parties, and the collection, storage, use, processing, transmission, provision, disclosure and application of relevant data are in compliance with the relevant laws, regulations and standards of the relevant regions, necessary confidentiality measures are taken, and public order and good customs are not violated, and corresponding operation entrances are provided for users to choose to authorize or refuse. For example, an interface is set between the system and the relevant users or organizations. Before obtaining relevant information, it is necessary to send an acquisition request to the aforementioned user or organization through the interface, and obtain relevant information after receiving the consent information fed back by the aforementioned user or organization.

[0035] In the present invention, the execution of the microtask tool (script or program) is triggered through the front-end interface, which can avoid the secondary development of the tool, and by marking explanations on each input item of the front-end page, the learning cost can be reduced. In addition, in order to reduce the cost of developing a web page (i.e., the front-end page) for each microtask, a configuration file containing front-end and back-end parameter mappings can be configured, so that the web page can be automatically generated according to the configuration file without increasing the development cost, thereby realizing the function of performing multi-level linkage task execution on the back-end server after submitting the task on the front-end page, and returning the execution result to the front-end.

[0036] In the present invention, a corresponding configuration file can be configured for each business task first. The configuration file includes the task script of the business task and the parameter mapping relationship between the front-end parameters and the back-end parameters. Then, the front-end page can be automatically generated based on the configuration file. When the target terminal initiates a task execution request on the front-end page, the master data node receives the task execution request. The task submitted on the front-end page can be distributed to the corresponding slave data node by the master data node according to the control instructions in the script. The slave data node can decide whether to join the master data node based on local configuration information, and then process the data from the slave data node, and finally return the processed data of the slave data node to the master data node, thereby realizing multi-level linkage task execution, being able to coordinate and cooperate with each slave data node, and improving task execution efficiency.

[0037] The present invention is described in detail below in conjunction with various embodiments.

[0038] Embodiment 1

[0039] According to an embodiment of the present invention, an embodiment of a task execution method based on a front-end page is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although the logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0040] Figure 1 is a flowchart of an optional task execution method based on a front-end page according to an embodiment of the present invention. Figure 1 As shown, the method comprises the following steps:

[0041] Step S101, receiving a task execution request initiated by a target terminal on a target front-end page, wherein the target front-end page corresponds to a target task; the task execution request at least includes: task parameters and a request path.

[0042] Optionally, the master data node in the multi-level linkage task execution system can receive a task execution request initiated by the target terminal on the target front-end page (i.e., the front-end page corresponding to the target task requested to be executed by the task execution request), and each task execution request carries task parameters and a request path, so that the master data node instantiates the function in the target task script to be executed according to the task parameters, and the master data node determines the target task script to be executed according to the request path.

[0043] It should be noted that the target task may be various microtasks such as log information statistics, non-functional stress testing, functional difference comparison of different versions, etc. For example, in a business scenario where the number of PATA requests in the log needs to be counted at regular intervals, the task parameters may include: selecting the time to start counting, the time to end counting, etc.

[0044] In an embodiment of the present invention, the target terminal may be a device or platform (such as a computer or a mobile phone) that initiates a request, and the task parameters are parameters input by the user through the target terminal on the front-end page. The user may enter the corresponding parameters according to the prompts on the front-end page to generate a task execution request based on these task parameters, and concatenate a URL (Uniform Resource Locator) address (i.e., the request path) on the task execution request.

[0045] Here, the master data node refers to the backend server that directly interacts with the frontend page, and the backend server can manage other machines (ie, slave data nodes).

[0046] Step S102, based on the request path, determine a target task script for executing the target task, wherein the target task script includes: at least one function module, and each function module includes at least: a control instruction.

[0047] In the embodiment of the present invention, different tasks correspond to different request paths, and the master data node may pre-store the request path corresponding to each task, so as to determine the corresponding task script according to the request path carried by the task execution request.

[0048] Optionally, the master data node can determine the target task script for executing the target task according to the request path carried by each task execution request, and execute the corresponding target task script. In this embodiment, the target task script can include multiple function modules, each function module carries a control instruction to execute the corresponding module task according to the control instruction.

[0049] In an embodiment of the present invention, a function module is a code block defined in a target task script, which is encapsulated into a function and can be repeatedly called to perform the same target task. The function module can include control instructions, which refer to API (Application Programming Interface) executable programs, and can work together to complete the target task through control instructions.

[0050] Exemplarily, the API executable programs include: RemoteSyncExcutor (synchronous remote execution module tasks, directly returning results), RemoteAsyncExcutor (asynchronous remote execution module tasks, asynchronous return results), RemoteAsyncResult (waiting for the completion of asynchronous module task execution and obtaining execution results), RemoteAsyncWait (waiting for all asynchronous module tasks to be completed), RemoteSync (synchronizing data between the local host and the target host at one time, downloading data to the local host or uploading data to the target host), etc.

[0051] Step S103, based on the control instruction, each function module is distributed to the corresponding slave data node, wherein each slave data node processes the function module and returns the processed data.

[0052] In an embodiment of the present invention, the master data node can automatically scan and parse the target task script, extract the function module part defined in the target task script, and distribute the function module to the corresponding slave data node according to the control instruction of each function module.

[0053] Optionally, the master data node can distribute multiple function modules contained in the target task script to the corresponding slave data nodes for processing according to the control instructions in the target task script. For example, the control instructions (such as RemoteSyncExcutor) can automatically transmit the function module (such as mainProcess) and the task parameters required by the function module (such as task-param1, task-param2, etc.) to the corresponding slave data node for execution. After that, the slave data node can process the function module and return the processed data.

[0054] In an embodiment of the present invention, the location of the constructed control instruction can be added to the PATH environment variable of the target task script, and the target task script can directly run and call the control instruction.

[0055] Here, the slave data node is a data node (eg, a server, a terminal, etc.) that is pre-joined in the cluster of the master data node and is managed by the master data node.

[0056] Step S104: Generate an execution result based on all processed data.

[0057] Optionally, after each slave data node completes its task, it sends the processed data back to the master data node. The master data node integrates all the processed data and generates a final execution result based on the integrated processed data, and finally displays the execution result on the target front-end page.

[0058] In this embodiment, the processing data may be some data required to execute the target task, such as log data, stress test cases, etc.

[0059] In the embodiment of the present invention, a specific algorithm or program may be used to integrate the data. For example, all data need to be standardized to ensure data consistency.

[0060] In summary, the master data node in the multi-level linkage task execution system can receive the task execution request initiated by the target terminal on the target front-end page, and determine the target task script for executing the target task based on the request path contained in the task execution request, and then distribute each function module that implements different functions to the corresponding slave data node according to the control instruction. Each slave data node processes the corresponding function module and returns the processed data. After that, the master data node generates an execution result based on the processed data to complete the execution task based on the front-end page. Not only can multi-level linkage task execution be realized, but also the execution efficiency of the task is effectively improved, thereby solving the technical problem of low efficiency in task execution based on the front-end page in related technologies.

[0061] In order to generate the front-end page more conveniently, in the task execution method based on the front-end page provided in the first embodiment of the present application, before receiving the task execution request initiated by the target terminal on the target front-end page, a configuration file for each business task can be configured and the configuration file can be stored in the main data node; based on the configuration file of each business task, a front-end page corresponding to each business task is generated.

[0062] Optionally, each independent business task will have a unique corresponding configuration file (for example, the configuration file corresponding to the log information statistics task may include the linkage task script triggered by the user submitting the task through the front-end web page, the display configuration of the front-end page, the front-end and back-end parameter mapping, etc.), and the configuration file will be stored in the main data node. Based on the configuration file, an independent front-end page can be automatically generated for each business task.

[0063] In the embodiment of the present invention, each independent front-end page can be centrally managed by the master data node and provide services to the outside (ie, display the page to the user terminal).

[0064] In the embodiment of the present invention, the configuration file may be a YAML (YAML Ain't Markup Language, i.e., a language for configuring files and data exchange) file, which is used to configure services and applications. In addition to providing services for front-end page generation, the master data node is also responsible for communicating with the slave data nodes, allocating tasks, etc.

[0065] In order to improve the accuracy of the configuration file, in the task execution method based on the front-end page provided in Example 1 of the present application, a task script for the business task is constructed, wherein the task script includes: a feature program and a regular program; a parameter mapping relationship between the front-end parameters and the back-end parameters is constructed; and based on the task script and the parameter mapping relationship, a configuration file for the business task is generated.

[0066] Optionally, the task script includes a feature program (i.e., a service program that is triggered to execute on the master data node after the user clicks submit on the front-end page) and a regular program (i.e., a timed periodic program, an initialization program, etc.), and the regular program is automatically run by the master data node at the corresponding trigger point (such as statistical log information every 3 days). In addition, by constructing a parameter mapping relationship between the front-end parameters and the back-end parameters, it can be ensured that the parameter data input on the front-end page can be correctly converted into the parameter format required by the back-end program, and based on the constructed parameter mapping relationship between the front-end parameters and the back-end parameters and the task script, a configuration file for the business task can be generated.

[0067] In order to accurately construct the task script, in the task execution method based on the front-end page provided in Example 1 of the present application, the feature tasks and routine tasks included in the business task are determined, wherein the feature task is a task that is triggered to be executed by the master data node after the user terminal initiates a task execution request on the front-end page; the routine tasks include: periodic tasks and initialization tasks, the periodic task is a task that is periodically executed by the master data node, and the initialization task is a task that is executed by the master data node during the initialization phase; based on the feature tasks, a feature program is constructed, and based on the routine tasks, a routine program is constructed, wherein the feature program includes: at least one function module, and the function module also includes: annotation instructions; the feature program and the routine program are characterized as task scripts for business tasks.

[0068] Optionally, a business task may include feature tasks and regular tasks. A feature task is a task that is triggered to be executed by the master data node after the user terminal initiates a task execution request on the front-end page. Regular tasks include periodic tasks and initialization tasks. Periodic tasks are tasks that are periodically executed by the master data node, and initialization tasks are tasks that are executed by the master data node during the initialization phase. Feature programs and regular programs may be constructed respectively based on feature tasks and regular tasks. A feature program may include one or more function modules, and each function module may include comment instructions (such as #cmd), which represent feature programs and regular programs as task scripts for business tasks. Task scripts describe in detail the steps that the program needs to execute, the required inputs, and the expected outputs, and are the concretization of business task requirements.

[0069] In the embodiment of the present invention, the comment instruction refers to the comment line starting with the # symbol in the module part of the task script. The parameters in the comment part are mainly non-task related parameters, for example, the default master data node address for executing the task (such as #cmd: target 10.22*.5.2 ** ).

[0070] In order to improve the accuracy of parameter mapping, in the task execution method based on the front-end page provided in Example 1 of the present application, the front-end parameters of the front-end page that need to be input by the user terminal are determined; each front-end parameter is converted into a back-end parameter according to a preset string format, and a corresponding relationship between the front-end parameter and the back-end parameter is established to obtain a parameter mapping relationship; or, a preset framework is used to generate a page file of the front-end page; based on the page file, a back-end file is generated, wherein the master data node maps the front-end parameters input by the user terminal into the back-end parameters based on the back-end file.

[0071] Optionally, the front-end parameters that the user terminal needs to input on the front-end page can be converted into back-end parameters through a preset string format (such as JSON (JavaScript Object Notation, a lightweight data exchange format)), and a one-to-one correspondence between the front-end parameters and the back-end parameters is established to obtain a mapping relationship. For example, the association between the front-end form data and the back-end feature task parameters is established through a custom pattern string. Parameter mapping can also be achieved using a preset framework (such as the vue front-end framework (Vue JavaScript framework, a progressive framework for building a user interface)). The preset framework can quickly generate a page file for the front-end page, and generate a back-end file based on the page file, and then the main data node maps the front-end parameters input by the user terminal into back-end parameters based on the back-end file. In this way, the parameters transmitted by the front-end page can be directly converted into the parameters required when the back-end executes the script, which is conducive to improving execution efficiency.

[0072] In an embodiment of the present invention, the preset framework may be a predefined development framework used in development, and the framework provides a set of standardized methods to generate page files and backend files. For example, the preset framework may be a vue front-end framework, which may preload a rich vue component library, which may include basic components (such as buttons, icons), form components (such as input boxes, switches, selectors), data display components (such as tables, labels, step bars), etc. The configuration file may directly configure the vue file as the front-end page, providing rich operability and professional interface design.

[0073] In order to improve the accuracy of the connection between the master data node and the slave data node, in the task execution method based on the front-end page provided in Example 1 of the present application, before receiving the task execution request initiated by the target terminal on the target front-end page, the cluster information of the master data node can be configured, wherein the cluster information includes at least: a cluster identifier, a master data node address, and a port identifier; the cluster information is broadcast to all slave data nodes in the target local area network where the master data node is located, wherein the slave data node determines whether to join the cluster indicated by the cluster identifier based on the local node configuration information, and after determining to join the cluster, establishes a connection with the master data node based on the data node address and the port identifier, and configures the master data node's access rights to each data directory after successfully establishing a connection with the master data node; based on a preset interval period, a heartbeat data packet is sent to each slave data node that establishes a connection with the master data node, wherein if the slave data node does not receive the heartbeat data packet within a preset time period, the connection between the slave data node and the master data node is closed.

[0074] Optionally, before starting the master data node, the cluster information of the master data node can be configured first, including: cluster identifier (such as ClusterA1, ClusterB1, etc.), master data node address (such as 10.22*.5*.9*), port identifier (such as 8080), etc. After starting the master data node, the master data node can actively broadcast cluster information to all slave data nodes in the target local area network where it is located, and then the slave data node determines whether to join the cluster indicated by the cluster identifier according to the configuration information of the local node, and after determining to join the cluster, according to the master data node address and port identifier in the cluster information, actively establish a connection with the master data node. After the slave data node successfully establishes a connection with the master data node, the master data node can configure the access rights of each data directory. At the same time, the master data node periodically (for example, 10s) sends a heartbeat data packet to the slave data node connected to it. If the slave data node does not receive a heartbeat data packet within the periodic duration, it is determined that the connection is invalid, and the connection between the slave data node and the master data node is actively closed, and then a new connection is re-established, ensuring the reliability and stability of data transmission.

[0075] In this embodiment, the cluster information broadcast by the master data node is pre-encrypted using a private key, and all slave data nodes in the target local area network where the master data node is located pre-store the public key corresponding to the private key. In this way, only the slave data nodes in the same local area network as the master data node can use the public key to correctly parse the cluster information, thereby ensuring the security of the information.

[0076] Here, the configuration information of the slave data node may include pre-configured cluster identifiers, the number of clusters that can be joined, etc., and may also include access permissions for the data directory set for each cluster.

[0077] In an embodiment of the present invention, a heartbeat data packet is a mechanism for detecting and maintaining connection status in network communications. It can be a simple ICMP (Internet Control Message Protocol) echo request / reply. The ping command (a network diagnostic tool) can be used to send an ICMP echo request to a target host (a slave data node). The target host confirms receipt of the message and sends back an ICMP echo reply message, indicating that the network connection is successful. The heartbeat data packet can also be a data packet in a specific format for a specific protocol. The data packet format may include a sequence number, a timestamp, status information, etc.

[0078] Exemplarily, before starting the Master (master data node), the Master cluster name, ID (identification) and other information are configured. After the Master is started, it actively sends a broadcast message in the local area network. The message content includes: cluster name, ID, Master IP address, port and other service information. Then, the message content can be encrypted using an encryption algorithm and broadcast in the local area network. After the s1ave data node (slave data node) receives the message, it uses the public key to decrypt it, and then decides whether to join the cluster based on its own configuration information. If it joins the cluster, it actively establishes multiple connections with the Master based on the address information in the message, and then can receive the message packets sent by the Master on the connection. At the same time, the Master can periodically send health detection heartbeat data packets. If the slave data node does not receive the Master's heartbeat data packet for a long time, it determines that the connection is invalid, and actively closes the connection, and then re-establishes a new connection, so that the total number of valid connections established between the slave data node and the master remains unchanged.

[0079] In this embodiment, in order to save resources, the s1ave data node can be configured to receive invitations from multiple different cluster masters, and the slave can also configure the access rights of each data directory for each different cluster.

[0080] In this embodiment, if the Master exits abnormally, the s1ave data node cannot receive the heartbeat packet, and fails to reconnect after multiple attempts, it will actively exit the cluster and clear the cached cluster information. If the slave is loaded with the Master of other clusters, it will continue to provide services for other clusters, otherwise it will enter the waiting state and listen to the cluster's broadcast invitation message.

[0081] Another optional embodiment, if the slave data node is in an intranet environment, resulting in the inability to actively access the outside, the master data node can be characterized as a gateway. In an environment where the internal and external networks are isolated, the master data node provides data services to the outside. In this case, the slave data node can actively initiate a connection to the master data node, and the slave data node can join the cluster of master data nodes by configuring the IP (Internet Protocol) address and port of the master data node. Compared with the master actively sending broadcast messages in the local area network, the slave data node actively initiates a connection to the master data node, which can reduce the address information configuration. It should be noted that the IP address and port of the master data node can be pre-configured in the configuration information of the slave data node.

[0082] In order to improve the efficiency of data processing, in the task execution method based on the front-end page provided in Example 1 of the present application, each slave data node establishes a communication connection with other slave data nodes in the cluster through the master data node, and the slave data nodes mount the remote data directory to the local through the communication connection, wherein the remote data directory is the data directory of other slave data nodes in the cluster.

[0083] Optionally, each slave data node can obtain the address information of other slave data nodes from the master data node and establish communication connections with other slave data nodes. Moreover, through the communication connection between the slave data nodes, the data directories of other slave data nodes in the cluster can be mounted locally, and finally a fully connected cluster network topology is established to ensure that data can be quickly transmitted to the corresponding slave data nodes for processing.

[0084] In this embodiment, by mounting remote data directories (i.e., data directories of other slave data nodes in the cluster) between data nodes to local data, the slave data nodes can share these data directories, making it easier to obtain required data from these data directories in a timely manner.

[0085] For example, the slave data node obtains the address information of other slave data nodes through the Master node, and establishes communication connections with other slave data nodes, and finally establishes a fully connected cluster network topology. The slave data nodes can dynamically mount remote accessible data directories to the local machine, but cannot mount the data directory of the Master node. The Master node can mount the accessible data path of the slave data node (that is, the slave data nodes can share data with each other, but not the data of the master data node, and the master data node can access part of the data of the slave data node).

[0086] In order to return the processed data to the master data node, in the task execution method based on the front-end page provided in Example 1 of the present application, the slave data node accesses the remote data directory of the target slave data node indicated by the node address based on the annotation instruction in the function module or the node address in the control instruction, and obtains the target data; if the slave data node fails to obtain the target data, the slave data node distributes the function module to the target slave data node, and receives the target data returned by the target slave data node; the slave data node represents the target data as processed data and returns it to the master data node.

[0087] Optionally, the slave data node can access the remote data directory of the target slave data node of the node address according to the node address in the comment instruction or control instruction of the function module to obtain the target data. If the slave data node fails to obtain the target data, the slave data node can distribute the function module to other target slave data nodes that may have the target data. The target slave data node that receives the distribution request then attempts to obtain the target data and returns the target data to the slave data node of the original request. The slave data node receives the target data returned by the target slave data node and returns the target data returned by the target slave data node to the master data node. The master data node then generates an execution result and displays the execution result on the target front-end page, ensuring the integrity of the target data.

[0088] Figure 2 is a schematic diagram of an optional multi-level linkage task execution system based on a front-end page according to an embodiment of the present invention. Figure 2 As shown, the multi-level linkage task execution system includes: a front end, a back end / master (ie, a master data node) and multiple data nodes (ie, slave data nodes, for example, data node 1, data node 2 ... data node n).

[0089] exist Figure 2In the example, the front-end page is automatically generated by the configuration file of the specific business task. In addition to providing front-end services, the back-end master is also responsible for communicating with the slave data nodes, assigning tasks, etc. Each slave data node interacts with the back-end master and executes the tasks issued by the back-end master.

[0090] In an embodiment of the present invention, the multi-level linkage task execution system can implement the following steps:

[0091] (1) Construct micro-applications (i.e., front-end pages that can interact with the master data node). The front-end application page can be automatically generated by the configuration file. Each independent business task will correspond to a unique configuration file, that is, an independent front-end application page will be automatically generated and can be centrally managed by the master data node to provide services to the outside world.

[0092] (2) Cluster management. After the master data node is started, it automatically and intermittently detects the slave data nodes through the broadcast protocol. After receiving the detection message, the slave data node autonomously decides whether to join the cluster of the master data node based on the configuration information. Each slave data node can join the clusters of multiple different master data nodes at the same time. After the slave data node actively establishes a link with the master data node, the master data node maintains the heartbeat health detection.

[0093] (3) Multi-level linkage tasks: the user terminal submits tasks to the master data node through the front-end application page. After receiving the task, the master data node executes the program script associated with the configuration file. During the execution process, the task is distributed to multiple slave data nodes for execution according to the actual logic of the script. Finally, the master data node collects the results and returns them to the front-end page.

[0094] In an optional embodiment, the following may be used: Figure 2 The multi-level linkage task execution system shown executes a task execution method based on a front-end page.

[0095] In an embodiment of the present invention, multi-level linkage task execution is controlled by the front-end page. The front-end page can centrally manage and submit tasks. Tasks can be flexibly distributed to various slave data nodes for execution by the back-end service according to a custom script language, which can realize multi-level linkage task execution and effectively improve the convenience of operation, especially when the front-end page service and the data source are not on the same server. At the same time, all task tools (scripts) can be centrally managed for easy query, which can effectively avoid secondary development.

[0096] Another optional specific implementation is described in detail below.

[0097] In an embodiment of the present invention, a task execution request initiated by a target terminal on a target front-end page is received, and based on the request path of the task execution request, a target task script for executing the target task is determined. Based on a control instruction, each function module is distributed to a corresponding slave data node, the slave data node processes the function module, and returns the processed data, thereby achieving a multi-level linkage task execution effect and improving the convenience of operation. In particular, when the front-end page service and the data source are not on the same server, it is convenient to centrally manage all application tools, avoids secondary development, and solves the problem of low efficiency of task execution based on the front-end web page.

[0098] In this embodiment, it is assumed that the following application scenario exists: the application software needs to process many different types of user requests every day, and generate corresponding application logs in real time. The logs record detailed information of the requests, and the logs of the previous day are transferred to 10.22*.5.8*: / opt / applog / todeapp every day. The number of PATA requests in the logs needs to be counted at regular intervals.

[0099] The linkage task system Master is deployed on the 10.22*.5.9* machine, and a slave data node is started on the 10.22*.5.8* machine. The Master configuration information includes the Master name (Test-Env-2), port number (8080), the name of the successfully connected slave data node (CurrentNodes), etc. The 8080 port can be accessed through the http protocol. When a slave data node successfully joins the Master, the address, name and other information of the slave data node will be automatically displayed in CurrentNodes. The configuration information of the slave data node includes the name of the slave data node (SLaveName), the cluster that can be joined, the data path ( / opt / applog), etc. The name of the slave data node is 10-221-5-8. The data node can accept connection invitations from three clusters, namely Test-Env-1, Test-Env-2, and 10.221.5.22*:8699. Among them, the last one is the IP information. The slave data node can directly establish a connection with the Master through this address port.

[0100] After the linkage task system is started, the application configuration contro1.yam1 for the number of PATA requests in the statistics log can be placed in the apps / patacnts / path. The most important part of contro1.yam1 is the configuration of the entrypoint part, which includes the display configuration paramsinview and resultsinview of the front-end page, as well as the inline-shell linkage task script content triggered by submitting tasks through the front-end, such as:

[0101]

[0102]

[0103] After waiting for a few seconds, the system automatically detects the addition of a new application, automatically parses and builds the front-end code of the application, and saves the generated code to the following directory:

[0104]

[0105] Open the front-end page of the statistical application through the browser, set appropriate parameters according to the prompts, submit the task, and finally the linkage task will be distributed to the 10.22*.5.8* data node for execution through the Master, and the final execution results will be displayed according to the display structure configured by resultsinview.

[0106] In an embodiment of the present invention, a front-end page can be directly generated through a configuration file. There is no need to develop a front-end page for each task separately, thus avoiding multiple developments. Moreover, by submitting tasks through a web front-end, the tasks can be flexibly distributed to various data nodes for execution by the main data node according to a custom script language, thus realizing multi-level linkage task execution, optimizing the development process, and effectively solving the problem of low efficiency of task execution based on the front-end page.

[0107] The following is a detailed description in conjunction with another embodiment.

[0108] Embodiment 2

[0109] A task execution device based on a front-end page provided in this embodiment includes multiple implementation units, each of which corresponds to each implementation step in the above-mentioned embodiment 1.

[0110] Figure 3 is a schematic diagram of an optional task execution device based on a front-end page according to an embodiment of the present invention. Figure 3 As shown, the task execution device may include: a receiving unit 30 , a determining unit 31 , a distributing unit 32 , and a generating unit 33 .

[0111] The receiving unit 30 is used to receive a task execution request initiated by a target terminal on a target front-end page, wherein the target front-end page corresponds to a target task; the task execution request includes at least: task parameters and a request path;

[0112] The determination unit 31 is used to determine a target task script for executing the target task based on the request path, wherein the target task script includes: at least one function module, each function module includes at least: a control instruction;

[0113] The distribution unit 32 is used to distribute each function module to the corresponding slave data node based on the control instruction, wherein each slave data node processes the function module and returns the processed data;

[0114] The generating unit 33 is used to generate an execution result based on all the processed data.

[0115] The above-mentioned task execution device can receive the task execution request initiated by the target terminal on the target front-end page through the receiving unit 30, determine the target task script for executing the target task based on the request path through the determining unit 31, distribute each function module to the corresponding slave data node based on the control instruction through the distributing unit 32, and generate the execution result based on all the processed data through the generating unit 33. In the embodiment of the present invention, the target task script for executing the target task is determined according to the request path through the task execution request containing the request path initiated by the target terminal on the target front-end page, and then each function module is distributed to the corresponding slave data node for processing according to the control instruction or the annotation instruction, and the execution result is generated according to the processed data to complete the task execution based on the front-end page, which can not only avoid the development of the front-end page for many times, but also realize multi-level linkage, improve the efficiency of task execution, and thus solve the technical problem of low efficiency when executing tasks based on the front-end page in the related technology.

[0116] Optionally, the task execution device includes: a first configuration module, configured to configure a configuration file of each business task before receiving a task execution request initiated by a target terminal on a target front-end page, and store the configuration file in a master data node; a first generation module, configured to generate a front-end page corresponding to each business task based on the configuration file of each business task.

[0117] Optionally, the first configuration module includes: a first construction sub-module, used to construct a task script for a business task, wherein the task script includes: a feature program and a regular program; a second construction sub-module, used to construct a parameter mapping relationship between front-end parameters and back-end parameters; and a second generation sub-module, used to generate a configuration file for the business task based on the task script and the parameter mapping relationship.

[0118] Optionally, the first construction submodule includes: a first determination submodule, used to determine the characteristic tasks and routine tasks included in the business task, wherein the characteristic task is a task that is triggered to be executed by the master data node after the user terminal initiates a task execution request on the front-end page; routine tasks include: periodic tasks and initialization tasks, periodic tasks are tasks that are periodically executed by the master data node, and initialization tasks are tasks that are executed by the master data node during the initialization phase; a third construction submodule, used to construct a characteristic program based on the characteristic tasks, and to construct a routine program based on the routine tasks, wherein the characteristic program includes: at least one function module, and the function module also includes: annotation instructions; a first characterization submodule, used to characterize the characteristic program and the routine program as task scripts for business tasks.

[0119] Optionally, the second construction submodule includes: a second determination submodule, used to determine the front-end parameters of the front-end page that need to be input by the user terminal; a first establishment submodule, used to convert each front-end parameter into a back-end parameter according to a preset string format, and establish a corresponding relationship between the front-end parameters and the back-end parameters to obtain a parameter mapping relationship; or, a first generation submodule, used to generate a page file of the front-end page using a preset framework; a second generation submodule, used to generate a back-end file based on the page file, wherein the main data node maps the front-end parameters input by the user terminal into back-end parameters based on the back-end file.

[0120] Optionally, the task execution device includes: a second configuration module, used to configure the cluster information of the master data node before receiving the task execution request initiated by the target terminal on the target front-end page, wherein the cluster information includes at least: a cluster identifier, a master data node address, and a port identifier; a first broadcast module, used to broadcast the cluster information to all slave data nodes in the target local area network where the master data node is located, wherein the slave data node determines whether to join the cluster indicated by the cluster identifier based on the local node configuration information, and after determining to join the cluster, establishes a connection with the master data node based on the data node address and the port identifier, and after successfully establishing a connection with the master data node, configures the master data node's access rights to each data directory; a first sending module, used to send a heartbeat data packet to each slave data node that has established a connection with the master data node based on a preset interval period, wherein if the slave data node does not receive the heartbeat data packet within a preset time period, the connection between the slave data node and the master data node is closed.

[0121] Optionally, the task execution device includes: a first establishment module, used for each slave data node to establish a communication connection with other slave data nodes in the cluster through the master data node, and to mount the remote data directory to the local through the communication connection between the slave data nodes, wherein the remote data directory is the data directory of other slave data nodes in the cluster.

[0122] Optionally, the distribution unit includes: a first acquisition module, used to access the remote data directory of the target slave data node indicated by the node address and obtain the target data from the data node based on the comment instruction in the function module or the node address in the control instruction; a first receiving module, used to distribute the function module to the target slave data node from the data node and receive the target data returned by the target slave data node if the target data is not obtained from the data node; and a first return module, used to represent the target data as processed data from the data node and return it to the master data node.

[0123] The above-mentioned task execution device may also include a processor and a memory. The above-mentioned receiving unit 30, determining unit 31, distributing unit 32, generating unit 33, etc. are all stored in the memory as program units, and the processor executes the above-mentioned program units stored in the memory to realize corresponding functions.

[0124] The processor includes a kernel, which retrieves the corresponding program unit from the memory. One or more kernels can be set, and the execution results are generated based on all the processed data by adjusting the kernel parameters.

[0125] The above-mentioned memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM, and the memory includes at least one storage chip.

[0126] The present invention also provides a computer program product which, when executed on a data processing device, is suitable for executing a program that is initialized with the following method steps: receiving a task execution request initiated by a target terminal on a target front-end page, determining a target task script for executing the target task based on the request path, distributing each function module to a corresponding slave data node based on control instructions, and generating an execution result based on all processed data.

[0127] According to another aspect of an embodiment of the present invention, a computer-readable storage medium is also provided, the computer-readable storage medium including a stored computer program, wherein when the computer program is running, the device where the computer-readable storage medium is located is controlled to execute the above-mentioned task execution method based on the front-end page.

[0128] According to another aspect of an embodiment of the present invention, an electronic device is also provided, including one or more processors and a memory, the memory being used to store one or more programs, wherein when the one or more programs are executed by one or more processors, the one or more processors implement the above-mentioned task execution method based on the front-end page.

[0129] Figure 41 is a hardware structure block diagram of an electronic device (or mobile device) for a task execution method based on a front-end page according to an embodiment of the present invention. Figure 4 As shown, the electronic device may include one or more processors (e.g., Figure 4 The processor 402a, processor 402b, ..., processor 402n, etc., which may include but are not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA, etc.), a memory 404 for storing data. In addition, it may also include: a display, an input / output interface (I / 0 interface), a universal serial bus (USB) port (which may be included as one of the ports of the I / 0 interface), a network interface, a keyboard, a power supply and / or a camera. It can be understood by those skilled in the art that Figure 4 The structure shown is only for illustration and does not limit the structure of the above electronic device. Figure 4 More or fewer components as shown, or with Figure 4 Different configurations are shown.

[0130] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.

[0131] The embodiments or examples of the present disclosure are not exhaustive, but are only illustrative of some embodiments or examples, and are not intended to be specific limitations on the scope of protection of the present disclosure. In the absence of contradiction, each step in a certain embodiment or example can be implemented as an independent example, and the steps can be combined arbitrarily. For example, the scheme after removing some steps in a certain embodiment or example can also be implemented as an independent example, and the order of the steps in a certain embodiment or example can be arbitrarily exchanged. In addition, the optional methods or optional examples in a certain embodiment or example can be combined arbitrarily; in addition, the various embodiments or examples can be combined arbitrarily, for example, some or all steps of different embodiments or examples can be combined arbitrarily, and a certain embodiment or example can be combined arbitrarily with the optional methods or optional examples of other embodiments or examples.

[0132] In the above embodiments of the present invention, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0133] In the several embodiments provided by the present invention, it should be understood that the disclosed technical content can be implemented in other ways. Among them, the device embodiments described above are only schematic. For example, the division of the units can be a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of units or modules, which can be electrical or other forms.

[0134] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple units. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.

[0135] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.

[0136] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, server or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), mobile hard disk, magnetic disk or optical disk and other media that can store program codes.

[0137] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.

Claims

1. A task execution method based on a front-end page, characterized in that: The master data node used in the multi-level linkage task execution system includes: Receiving a task execution request initiated by a target terminal on a target front-end page, wherein the target front-end page corresponds to a target task; the task execution request at least includes: task parameters and a request path; Based on the request path, determining a target task script for executing the target task, wherein the target task script includes: at least one function module, each of the function modules includes at least: a control instruction; Based on the control instruction, each of the function modules is distributed to a corresponding slave data node, wherein each of the slave data nodes processes the function module and returns processed data; Based on all the processed data, an execution result is generated.

2. The task execution method according to claim 1, characterized in that: Before receiving the task execution request initiated by the target terminal on the target front-end page, it also includes: Configure a configuration file for each business task, and store the configuration file in the master data node; Based on the configuration file of each business task, a front-end page corresponding to each business task is generated.

3. The task execution method according to claim 2, characterized in that: The steps to configure the configuration file for each business task include: Constructing a task script of the business task, wherein the task script includes: a feature program and a regular program; Construct parameter mapping relationship between front-end parameters and back-end parameters; The configuration file of the business task is generated based on the task script and the parameter mapping relationship.

4. The task execution method according to claim 3, characterized in that: The steps of constructing the task script of the business task include: Determine the characteristic tasks and regular tasks included in the business tasks, wherein the characteristic tasks are tasks that are triggered to be executed by the master data node after the user terminal initiates a task execution request on the front-end page; the regular tasks include: periodic tasks and initialization tasks, wherein the periodic tasks are tasks that are periodically executed by the master data node, and the initialization tasks are tasks that are executed by the master data node during the initialization phase; Based on the characteristic task, the characteristic program is constructed, and based on the conventional task, the conventional program is constructed, wherein the characteristic program includes: at least one function module, and the function module further includes: annotation instructions; The feature program and the regular program are characterized as the task script of the business task.

5. The task execution method according to claim 4, characterized in that: The steps of constructing a parameter mapping relationship between front-end parameters and back-end parameters include: Determining the front-end parameters of the front-end page that need to be input by the user terminal; Convert each of the front-end parameters into the back-end parameters according to a preset string format, and establish a corresponding relationship between the front-end parameters and the back-end parameters to obtain the parameter mapping relationship; or, Using a preset framework to generate a page file of the front-end page; A backend file is generated based on the page file, wherein the master data node maps the frontend parameters input by the user terminal into the backend parameters based on the backend file.

6. The task execution method according to claim 1, characterized in that: Before receiving the task execution request initiated by the target terminal on the target front-end page, it also includes: Configure the cluster information of the master data node, wherein the cluster information at least includes: a cluster identifier, a master data node address, and a port identifier; Broadcasting the cluster information to all the slave data nodes in the target local area network where the master data node is located, wherein the slave data node determines whether to join the cluster indicated by the cluster identifier based on the local node configuration information, and after determining to join the cluster, establishes a connection with the master data node based on the data node address and the port identifier, and after successfully establishing a connection with the master data node, configures the master data node's access rights to each data directory; Based on a preset interval period, a heartbeat data packet is sent to each of the slave data nodes that have established a connection with the master data node, wherein if the slave data node does not receive the heartbeat data packet within a preset time period, the connection with the master data node is closed.

7. The task execution method according to claim 6, characterized in that: Each of the slave data nodes establishes a communication connection with other slave data nodes in the cluster through the master data node, and the slave data nodes mount remote data directories to local devices through the communication connection, wherein the remote data directory is the data directory of the other slave data nodes in the cluster.

8. The task execution method according to claim 1, characterized in that: Each of the slave data nodes processes the function module and returns the processed data, including: The slave data node accesses the remote data directory of the target slave data node indicated by the node address based on the comment instruction in the function module or the node address in the control instruction, and obtains the target data; In the case that the slave data node fails to obtain the target data, the slave data node distributes the function module to the target slave data node, and receives the target data returned by the target slave data node; The slave data node returns the target data represented as the processed data to the master data node.

9. A task execution device based on a front-end page, characterized in that: include: A receiving unit, configured to receive a task execution request initiated by a target terminal on a target front-end page, wherein the target front-end page corresponds to a target task; the task execution request at least includes: task parameters and a request path; A determination unit is used to determine a target task script for executing the target task based on the request path, wherein the target task script includes: at least one function module, each of which includes at least: Control instructions; A distribution unit, configured to distribute each of the function modules to a corresponding slave data node based on the control instruction, wherein each of the slave data nodes processes the function module and returns processed data; A generating unit is used to generate an execution result based on all the processing data.

10. An electronic device, characterized in that: It includes one or more processors and a memory, wherein the memory is used to store one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the front-end page-based task execution method described in any one of claims 1 to 8.