CN117453522A - Task execution method, device, electronic equipment and storage medium - Google Patents

Task execution method, device, electronic equipment and storage medium Download PDF

Info

Publication number
CN117453522A
CN117453522A CN202311100161.3A CN202311100161A CN117453522A CN 117453522 A CN117453522 A CN 117453522A CN 202311100161 A CN202311100161 A CN 202311100161A CN 117453522 A CN117453522 A CN 117453522A
Authority
CN
China
Prior art keywords
task
executed
execution
configuration information
target
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311100161.3A
Other languages
Chinese (zh)
Inventor
李连强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing QIYI Century Science and Technology Co Ltd
Original Assignee
Beijing QIYI Century Science and Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing QIYI Century Science and Technology Co Ltd filed Critical Beijing QIYI Century Science and Technology Co Ltd
Priority to CN202311100161.3A priority Critical patent/CN117453522A/en
Publication of CN117453522A publication Critical patent/CN117453522A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing
    • G06F11/3672Test management
    • G06F11/3688Test management for test execution, e.g. scheduling of test suites
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/36Preventing errors by testing or debugging software
    • G06F11/3668Software testing

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The method comprises the steps of obtaining a task to be executed, determining an operation of indicating execution of the task to be executed from a preset operation set, obtaining at least one target operation, determining an execution sequence identifier and operation configuration information of each target operation, determining an execution sequence of each target operation according to the execution sequence identifier, and executing each target operation according to the operation configuration information according to the execution sequence to obtain an execution result of the task to be executed; therefore, in the process of generating a corresponding test task for the functional module to be tested, the operation in the preset operation set is used as a basic unit of the test scheme, at least one target operation can be determined from the preset operation set according to requirements, the data test scheme, the data query statement and the like are not required to be redesigned every time of test, and the effects of time cost reduction and high labor cost are achieved.

Description

Task execution method, device, electronic equipment and storage medium
Technical Field
The present disclosure relates to the field of computers, and in particular, to a task execution method, a task execution device, an electronic device, and a storage medium.
Background
With the development of the internet, in order to meet different demands, various application programs or functional modules need to be sent out continuously, and the application programs or the functional modules need to be tested, and the application programs or the functional modules are determined to run normally through the test, or the problems in the running of the application programs or the functional modules are found through the test.
In the existing test process, each tester carries out design data test scheme, data query statement and the like according to business knowledge and professional skills aiming at an application program or a functional module to be tested, so as to generate a corresponding test task for the functional module to be tested, and the task is executed to play a role in testing; because the testing processes of the functional modules of the same type are relatively close, the testing tasks designed by different testers are relatively close, and are usually only the parameter difference or the subtle difference of the testing task process, but if each test needs to redesign a data testing scheme, a data query statement and the like for an application program or the functional module to be tested, the problems of high time cost and high labor cost exist.
Disclosure of Invention
In order to solve the technical problems, the application provides a task execution method, a task execution device, electronic equipment and a storage medium.
In a first aspect, the present application provides a task execution method, applied to a server, where the method includes:
acquiring a task to be executed, wherein the task to be executed is used for indicating to execute at least one operation;
determining the operation of the task instruction to be executed from a preset operation set to obtain at least one target operation;
determining an execution sequence identifier and operation configuration information of each target operation, wherein the operation configuration information represents configuration information in the process of executing the target operation;
determining the execution sequence of each target operation according to the execution sequence identification;
and executing each target operation according to the operation configuration information according to the execution sequence to obtain an execution result of the task to be executed.
Optionally, the task to be executed is obtained in the following manner:
acquiring user input information;
determining a task set to be executed based on the user input information, wherein the task set to be executed comprises at least one task to be executed;
acquiring an execution state of the server, wherein the execution state represents whether the server is executing a task;
and under the condition that the execution state indicates that the task is not being executed, traversing and acquiring each task to be executed in the task set to be executed.
Optionally, the acquiring the execution state of the server further includes:
outputting first prompt information under the condition that the execution state indicates that a task is being executed, wherein the first prompt information indicates that the server side is executing the task;
acquiring a switching instruction, wherein the switching instruction represents an instruction which is input based on the first prompt information and is used for indicating whether to switch the execution state;
and terminating the task being executed by the server under the condition that the switching instruction indicates switching of the execution state.
Optionally, executing each target operation according to the operation configuration information according to the execution sequence to obtain an execution result of the task to be executed, where the execution result includes:
determining the operation type of each target operation;
determining an operation step sequence corresponding to the operation type, wherein the operation step sequence represents at least one step sequence for executing the operation;
and executing each target operation according to the execution sequence by combining the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed.
Optionally, the executing each target operation according to the execution sequence and combining the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed includes:
determining whether the operation configuration information of each target operation is matched with the operation steps;
under the condition that the operation configuration information of each target operation is matched with the operation step sequence, executing each target operation according to the execution sequence by combining the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed;
and outputting second prompt information under the condition that the operation configuration information of the target operation is not matched with the operation steps, wherein the second prompt information indicates that the operation configuration information is not matched with the operation steps.
Optionally, the process of executing the target operation according to the operation configuration information is as follows:
determining a first parameter and a second parameter contained in the operation configuration information, wherein the first parameter is used for indicating input data of the target operation, and the second parameter is used for indicating an output object of an output result of the target operation;
performing the target operation based on the input data indicated by the first parameter;
and outputting an output result obtained by executing the target operation to an output object indicated by the second parameter.
Optionally, the operation type is a query type or a check type; the method comprises the steps of,
the determining the operation steps corresponding to the operation types comprises the following steps:
under the condition that the operation type is the query type, determining a preset query step sequence as an operation step sequence corresponding to the operation type, wherein the preset query step sequence represents a preset step sequence for realizing query operation;
and under the condition that the operation type is the check type, determining a preset check step sequence as an operation step sequence corresponding to the operation type, wherein the preset check step sequence represents a preset step sequence for realizing check operation.
In a second aspect, the present application provides a task execution device, which is applied to a server, and the device includes:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a task to be executed, and the task to be executed is used for indicating to execute at least one operation;
the first determining module is used for determining the operation of the task instruction execution to be executed from a preset operation set to obtain at least one target operation;
the second determining module is used for determining the execution sequence identification of each target operation and operation configuration information, wherein the operation configuration information represents configuration information in the process of executing the target operation;
the third determining module is used for determining the execution sequence of each target operation according to the execution sequence identification;
and the execution module is used for executing each target operation according to the execution sequence and the operation configuration information to obtain an execution result of the task to be executed.
In a third aspect, an electronic device is provided, including a processor, a communication interface, a memory, and a communication bus, where the processor, the communication interface, and the memory complete communication with each other through the communication bus;
a memory for storing a computer program;
a processor, configured to implement the method according to any one of the embodiments of the first aspect when executing a program stored on a memory.
In a fourth aspect, a computer-readable storage medium is provided, on which a computer program is stored which, when being executed by a processor, implements a method according to any one of the embodiments of the first aspect.
Compared with the prior art, the technical scheme provided by the embodiment of the application has the following advantages:
according to the method provided by the embodiment of the application, the task to be executed is used for indicating to execute at least one operation, the operation of the task to be executed is determined from the preset operation set to obtain at least one target operation, the execution sequence identification and the operation configuration information of each target operation are determined, the operation configuration information represents the configuration information in the process of executing the target operation, the execution sequence of each target operation is determined according to the execution sequence identification, and therefore each target operation is executed according to the execution sequence and the operation configuration information, and the execution result of the task to be executed is obtained; therefore, in the process of generating a corresponding test task for the functional module to be tested, the operation in the preset operation set is used as a basic unit of the test scheme, at least one target operation can be determined from the preset operation set according to requirements, the data test scheme, the data query statement and the like are not required to be redesigned every time of test, and the effects of time cost reduction and high labor cost are achieved.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention.
In order to more clearly illustrate the embodiments of the invention or the technical solutions of the prior art, the drawings which are used in the description of the embodiments or the prior art will be briefly described, and it will be obvious to a person skilled in the art that other drawings can be obtained from these drawings without inventive effort.
Fig. 1 is a schematic flow chart of a task execution method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of a task execution device according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For the purposes of making the objects, technical solutions and advantages of the embodiments of the present application more clear, the technical solutions of the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it is apparent that the described embodiments are some embodiments of the present application, but not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present application based on the embodiments herein.
In the existing test process, similar test operations such as data setting, data query and data verification are generally included, and for different test requirements, test operations such as data setting, data query and data verification may be required for a tester, or in the case that a test scheme is not changed greatly, for example, only parameters are changed, the tester also needs to perform steps such as redesign coding for a test flow, so that time cost and labor cost required for each test are relatively high.
Fig. 1 is a flow chart of a task execution method according to an embodiment of the present application.
As shown in fig. 1, an embodiment of the present disclosure provides a task execution method, which is applied to a server, and the method includes:
s110: and acquiring a task to be executed, wherein the task to be executed is used for indicating to execute at least one operation.
In this embodiment, the tasks to be executed represent tasks for performing tests of application programs or functional modules, where each task to be executed may be used to instruct to perform at least one operation, for example, in the tasks to be executed for checking whether the play duration statistics are accurate, the operations for instructing to perform may include: the method comprises the steps of obtaining a counted playing time length, obtaining an actual playing time length, and comparing the counted playing time length with the actual playing time length.
In an embodiment, the acquisition manner of the task to be executed in S110 may be as follows:
acquiring user input information;
determining a task set to be executed based on user input information, wherein the task set to be executed comprises at least one task to be executed;
acquiring an execution state of the server, wherein the execution state represents whether the server is executing a task;
and traversing and acquiring each task to be executed in the task set to be executed under the condition that the execution state indicates that the task is not being executed.
In this embodiment, first, user input information is obtained, where the user input information may be an option instruction input by a user in a front-end interface according to a requirement, that is, a preset task set and a preset operation set for selection by the user may be displayed through the front-end interface, for example, the preset task set may include: checking whether the watching duration statistics is normal, judging whether the user is a stable user task, and the like, wherein the user can select one or more tasks to form a task set to be executed according to the requirements; then, determining a task set to be executed based on user input information, wherein the task set to be executed comprises at least one task to be executed, for example, determining a set of each selected task indicated by a selection instruction of a user as the task set to be executed, and for each process of each selected task, indicating each selected preset operation through the selection instruction, so as to determine each task to be executed, for example, the preset task A to be executed comprises an operation A1, an operation A2 and an operation A3, and the task A to be executed, which can be determined according to the selection instruction, only comprises an operation A2 and an operation A3; then, in order to avoid the problem that the user submits to the plurality of execution tasks of the server side to enable the server side to simultaneously execute the plurality of tasks, so as to cause conflict errors in the task execution process or confusion of execution results, before executing the task to be executed, the embodiment can acquire the execution state of the server side, wherein the execution state indicates whether the server side is executing the task or not, so that the function of judging whether the server side is executing the task or not through the execution state is achieved; finally, under the condition that the execution state indicates that the task is not being executed, the current server side is free, and at the moment, each task to be executed in the task set to be executed can be traversed and obtained; therefore, the server side can only execute the tasks in one task set to be executed at the same time, and the problem of task execution conflict or confusion is avoided.
In an embodiment, the obtaining the execution state of the server further includes:
outputting first prompt information under the condition that the execution state indicates that the task is being executed, wherein the first prompt information indicates that the service end is executing the task;
acquiring a switching instruction, wherein the switching instruction represents an instruction which is input based on the first prompt information and is used for indicating whether to switch the execution state;
in the case where the switch instruction indicates a switch execution state, the task being executed by the server is terminated.
In this embodiment, when the execution state indicates that a task is being executed, it is described that the current server side is executing tasks in other task sets to be executed, and in order to avoid a problem of task execution conflict or confusion, first prompt information may be output, where the first prompt information indicates that the server side is executing a task, and the first prompt information may be a prompt manner such as a text prompt or a language prompt, and specific prompt content may be whether the task in the other task sets to be executed needs to be terminated or withdrawn by the current server side; then, after the user checks the first prompt information, a switching instruction, for example, an instruction for stopping the current execution task, an instruction for keeping executing the current execution task, and the like, can be input according to the requirement, that is, the service end can acquire a switching instruction which is input by the user based on the first prompt information and is used for indicating whether to switch the execution state, wherein the switching instruction represents an instruction which is input based on the first prompt information and is used for indicating whether to switch the execution state; then, in the case that the switching instruction indicates switching of the execution state, for example, an instruction to terminate a currently executed task, at this time, a task being executed by the server may be terminated, and then each task to be executed in the set of tasks to be executed may be obtained by traversal.
S120: and determining the operation of the task to be executed, which is indicated to be executed, from the preset operation set, and obtaining at least one target operation.
In this embodiment, the preset operation set represents a preset operation set, and since there are many common test operations in different test processes, such as data setting, data query, and data verification, and the common test operations are used as basic operation units, and the operations in the embodiment are formed by performing pre-coding and packaging, after determining that the task to be executed is obtained, the operation of indicating to be executed by the task to be executed can be determined from the preset operation set according to the task to be executed, so as to obtain at least one target operation, where the target operation represents the operation of indicating to be executed by the task to be executed, that is, the operation of indicating to be executed by the task to be executed can be directly determined from the preset operation set without redesigning the data test scheme and the data query statement according to the test requirement, thereby realizing the effects of reducing the time cost and the labor cost.
S130: and determining the execution sequence identification and operation configuration information of each target operation, wherein the operation configuration information represents the configuration information in the process of executing the target operation in the embodiment.
In this embodiment, since the process of executing the task to be executed needs to execute each target operation in the task to be executed according to the preset sequence, after determining that the task to be executed indicates the operation to be executed, and obtaining at least one target operation, it is necessary to determine the execution sequence identifier of each target operation, where the execution sequence identifier indicates the execution sequence of each target operation, so that the execution sequence of each target operation can be determined by the execution sequence identifier; different parameters, data formats and other configurations are designed in the process of executing each target operation, for example, the date parameter which needs to be clearly acquired in the operation of acquiring the viewing time length can be included in the operation configuration information, so that the operation configuration information can be combined with the date parameter in the operation configuration information to play a role of assisting in executing the operation in the process of executing the operation of acquiring the viewing time length.
S140: and determining the execution sequence of each target operation according to the execution sequence identification.
In this embodiment, after determining the execution sequence identifier, the execution sequence of each target operation may be determined, where the execution sequence identifier may be an identifier configured by default for each target operation by each task to be executed, or may be an identifier adjusted by a user according to a requirement, for example, in a process of determining a task to be executed, the user may input the execution sequence identifier for the selected task when selecting the task, so as to obtain the task to be executed.
S150: and executing each target operation according to the operation configuration information according to the execution sequence to obtain an execution result of the task to be executed.
In this embodiment, each target operation in the task to be executed needs to be executed when the task to be executed is executed, so that each target operation is executed sequentially according to the execution sequence of each target operation; and finishing the process of executing the target operation by combining the operation configuration information, so as to traverse and execute each target operation according to the execution sequence and obtain the execution result of the task to be executed.
Since the target operations are operations in the preset operation set, that is, operations which are pre-configured and completed, each target operation takes a common test operation as a basic operation unit in advance, wherein when the operation is formed by pre-encoding and packaging, the operation steps are only encoded and packaged, for example, the data verification operation comprises the operation steps of acquiring expected data, acquiring verification data, comparing the expected data and the verification data, wherein the targets for acquiring the expected data and the verification data have no explicit indication, and the targets for acquiring the expected data and the verification data can be determined by combining operation configuration information.
In an embodiment, according to the execution sequence, executing each target operation according to the operation configuration information to obtain an execution result of the task to be executed, including:
determining the operation type of each target operation;
determining an operation step sequence corresponding to the operation type, wherein the operation step sequence represents at least one step sequence for executing the target operation;
and executing each target operation according to the execution sequence by combining the operation configuration information and the operation steps to obtain an execution result of the task to be executed.
In this embodiment, the operation type represents the type of the target operation, such as a setting type, a query type and a check type, and the steps executed by the operations of each type are the same, so that when the operations of the same type are executed, different operation configuration information is used to control different inputs to obtain different outputs, that is, in the process of executing each target operation, the operation type of each target operation needs to be determined first, and then the operation steps corresponding to the operation type are determined, for example, the operation steps of the check type include acquiring expected data, acquiring check data, comparing the expected data and the check data; and then executing each target operation according to the execution sequence and combining the operation configuration information and the operation steps, and obtaining the execution result of the task to be executed after executing the complete target operation. And taking the target operation as a basic execution unit, under the condition of different test requirements, only determining that different target operations form a task to be executed, and determining or adjusting parameter setting through operation configuration information to realize the effect of not redesigning a data test scheme and a data query statement according to the test requirements.
Since the operations in the preset operation set are operations of a plurality of operation types set in advance, the format of operation configuration information required in executing each operation is fixed, for example, an operation of a check type, the operation configuration information of which needs to include an acquisition target or an acquisition mode for indicating acquisition of desired data and acquisition of check data, and therefore if a target operation to be executed by a task instruction to be executed includes a target operation of a check type, but there is no format information for indicating acquisition targets or acquisition modes for acquiring desired data and acquisition of check data in the operation configuration information, there is obviously a problem that the operation configuration information does not match the target operation, and at this time, the target operation cannot be executed.
In an embodiment, according to an execution sequence, executing each target operation in combination with the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed, including:
determining whether operation configuration information of each target operation is matched with an operation step sequence;
under the condition that the operation configuration information of each target operation is matched with the operation step sequence, executing each target operation according to the execution sequence by combining the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed;
and outputting second prompt information under the condition that the operation configuration information of the target operation is not matched with the operation steps, wherein the second prompt information indicates that the operation configuration information is not matched with the operation steps.
In this embodiment, it is determined whether the operation configuration information of each target operation is matched with the operation step, that is, it is determined whether the operation configuration information includes information required by the operation step, for example, the operation step of the inspection type, and information required for indicating the acquisition target or the acquisition mode for acquiring the desired data and the acquired inspection data is needed, at this time, it is determined whether information for indicating the acquisition target or the acquisition mode for acquiring the desired data and the acquired inspection data exists in the operation configuration information, each target operation is determined, and when the operation configuration information of each target operation is matched with the operation step, it is described that each target operation of the task to be executed can be executed by integrating the operation configuration information and the operation step, at this time, each target operation is executed according to the execution sequence by combining the operation configuration information and the operation step, so as to obtain the execution result of the task to be executed; if the operation configuration information of the target operation is not matched with the operation steps, the fact that the information required by the execution of the operation steps is not contained in the operation configuration information of at least one target operation is indicated, namely the target operation cannot be executed, and at the moment, second prompt information can be output, the second prompt information indicates that the operation configuration information is not matched with the operation steps, so that a user is prompted through the second prompt information, the problem that the current operation configuration information is not matched is solved, and the user can conveniently adjust the operation configuration information according to the second prompt information.
Since the task to be executed includes at least one target operation, in the case of a plurality of target operations, there may be a case where an input of one of the target operations needs to be obtained from an output of other operations, or an output result after the target operation is executed needs to be output to the other operations.
In one embodiment, the process of executing the target operation according to the operation configuration information is as follows:
determining a first parameter and a second parameter contained in the operation configuration information, wherein the first parameter is used for indicating input data of a target operation, and the second parameter is used for indicating an output object of an output result of the target operation;
performing a target operation based on the input data indicated by the first parameter;
and outputting an output result obtained by executing the target operation to an output object indicated by the second parameter.
The first parameter in this embodiment is used to indicate input data of a target operation, where the input data may be preset data, real-time data, and output results of other operations, for example, preset fixed parameters, real-time date or time, and output results of other operations performed before the target operation is performed, and it should be noted that the first parameter only plays a role of indicating data and does not include specific data, so that when different target operations are performed, different input data may be obtained as input according to the indication of different first parameters; the second parameter is used for indicating an output object of an output result of the target operation, the output object may be other operations, other tasks to be executed, etc., so that after the output result obtained by the target operation is executed, the output result is output to the output object indicated by the second parameter, for example, the task to be executed includes a target operation a, a target operation B, and a target operation C, the second parameter of the target operation a indicates the target operation B, the first parameter of the target operation B indicates the output result of the target operation a, the second parameter of the target operation B indicates the target operation C, and when the specific execution is performed, the output result of the target operation a is output to the target operation B, the output result of the target operation a is executed as an input, and the output result of the target operation B is output to the target operation C; according to the method, the data transmission relation between each target operation or the task to be executed is established by determining the input acquisition mode of the target operation and the output mode of the output result through the first parameter and the second parameter.
In one embodiment, the operation type is a query type or a check type; the method comprises the steps of,
determining an operation step sequence corresponding to the operation type, including:
under the condition that the operation type is the query type, determining a preset query step as an operation step corresponding to the operation type, wherein the preset query step represents a preset step for realizing query operation;
and under the condition that the operation type is the check type, determining a preset check step as an operation step corresponding to the operation type, wherein the preset check step represents a preset step for realizing check operation.
In the embodiment, a query type or a check type is taken as an example to describe the operation steps corresponding to the operation type, and in the process of determining the operation steps corresponding to the operation type, the corresponding operation steps are determined according to different operation types, for example, when the operation type is the query type, a preset query step is determined as the operation step corresponding to the operation type, the preset query step represents the preset step for realizing the query operation, and the preset step at this time can include steps of acquiring the query date, determining the query target, outputting the query result and the like; and when the operation type is a check type, determining a preset check step as an operation step corresponding to the operation type, wherein the preset check step represents a preset step for realizing check operation, and the preset step at this time may include steps of acquiring expected data, acquiring check data, comparing the expected data with the check data, and the like.
As shown in fig. 2, the present application further discloses an embodiment, which provides a task execution device, applied to a server, where the device includes:
an obtaining module 210, configured to obtain a task to be executed, where the task to be executed is used to instruct to execute at least one operation;
a first determining module 220, configured to determine, from a preset operation set, an operation to be performed by the task instruction to be performed, so as to obtain at least one target operation;
a second determining module 230, configured to determine an execution sequence identifier of each target operation and operation configuration information, where the operation configuration information represents configuration information during execution of the target operation;
a third determining module 240, configured to determine an execution sequence of each target operation according to the execution sequence identifier;
the execution module 250 is configured to execute each target operation according to the operation configuration information according to the execution sequence, so as to obtain an execution result of the task to be executed.
In an embodiment, the task to be executed is obtained as follows:
acquiring user input information;
determining a task set to be executed based on user input information, wherein the task set to be executed comprises at least one task to be executed;
acquiring an execution state of the server, wherein the execution state represents whether the server is executing a task;
and traversing and acquiring each task to be executed in the task set to be executed under the condition that the execution state indicates that the task is not being executed.
In an embodiment, the obtaining module 210 may further include:
the first output unit is used for outputting first prompt information when the execution state indicates that the task is being executed, wherein the first prompt information indicates that the server side is executing the task;
the first acquisition unit is used for acquiring a switching instruction, wherein the switching instruction represents an instruction which is input based on the first prompt information and is used for indicating whether to switch the execution state;
and the switching unit is used for terminating the task being executed by the server side under the condition that the switching instruction indicates the switching execution state.
In one embodiment, the execution module 250 includes:
a first determination unit configured to determine an operation type of each target operation;
a second determining unit, configured to determine an operation step corresponding to the operation type, where the operation step represents at least one step of executing the operation;
the first execution unit is used for executing each target operation according to the execution sequence and combining the operation configuration information and the operation steps to obtain an execution result of the task to be executed.
In an embodiment, the first execution unit may include:
a first determining subunit, configured to determine whether the operation configuration information of each target operation matches with the operation procedure;
the first execution subunit is used for executing each target operation according to the execution sequence by combining the operation configuration information and the operation step sequence under the condition that the operation configuration information of each target operation is matched with the operation step sequence, so as to obtain an execution result of the task to be executed;
the first output subunit is used for outputting second prompt information when the operation configuration information of the target operation is not matched with the operation steps, wherein the second prompt information indicates that the operation configuration information is not matched with the operation steps.
In one embodiment, the execution module 250 may include:
a third determining unit configured to determine a first parameter and a second parameter included in the operation configuration information, the first parameter being used to indicate input data of the target operation, the second parameter being used to indicate an output object of an output result of the target operation;
a first input unit for performing a target operation based on input data indicated by the first parameter;
and the first output unit is used for outputting an output result obtained by executing the target operation to an output object indicated by the second parameter.
In one embodiment, the operation type is a query type or a check type; the method comprises the steps of,
the second determination unit may include:
the second determining subunit is configured to determine, when the operation type is a query type, a preset query step as an operation step corresponding to the operation type, where the preset query step represents a preset step for implementing a query operation;
and the third determining subunit is used for determining a preset checking step sequence as an operation step sequence corresponding to the operation type under the condition that the operation type is the checking type, wherein the preset checking step sequence represents a preset step sequence for realizing checking operation.
The implementation process of the functions and roles of each module in the above device is specifically shown in the implementation process of the corresponding steps in the above method, and will not be described herein again.
As shown in fig. 3, the embodiment of the present application provides an electronic device, which includes a processor 310, a communication interface 320, a memory 330, and a communication bus 340, wherein the processor 310, the communication interface 320, and the memory 330 perform communication with each other through the communication bus 340,
a memory 330 for storing a computer program;
in one embodiment of the present application, the processor 310 is configured to implement the method provided in any one of the foregoing method embodiments when executing the program stored on the memory 330.
The present application also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, implements a method as provided in any of the method embodiments described above.
It should be noted that in this document, relational terms such as "first" and "second" and the like are used solely to distinguish one entity or action from another entity or action without necessarily requiring or implying any actual such relationship or order between such entities or actions. Moreover, the terms "comprises," "comprising," or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but may include other elements not expressly listed or inherent to such process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one … …" does not exclude the presence of other like elements in a process, method, article, or apparatus that comprises the element.
The foregoing description has been directed to specific embodiments of this specification. Other embodiments are within the scope of the following claims. In some cases, the actions or steps recited in the claims can be performed in a different order than in the embodiments and still achieve desirable results. In addition, the processes depicted in the accompanying figures do not necessarily require the particular order shown, or sequential order, to achieve desirable results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
The foregoing is only a specific embodiment of the invention to enable those skilled in the art to understand or practice the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims (10)

1. A method for executing a task, the method being applied to a server, the method comprising:
acquiring a task to be executed, wherein the task to be executed is used for indicating to execute at least one operation;
determining the operation of the task instruction to be executed from a preset operation set to obtain at least one target operation;
determining an execution sequence identifier and operation configuration information of each target operation, wherein the operation configuration information represents configuration information in the process of executing the target operation;
determining the execution sequence of each target operation according to the execution sequence identification;
and executing each target operation according to the operation configuration information according to the execution sequence to obtain an execution result of the task to be executed.
2. The method according to claim 1, wherein the task to be performed is obtained by the following manner:
acquiring user input information;
determining a task set to be executed based on the user input information, wherein the task set to be executed comprises at least one task to be executed;
acquiring an execution state of the server, wherein the execution state represents whether the server is executing a task;
and under the condition that the execution state indicates that the task is not being executed, traversing and acquiring each task to be executed in the task set to be executed.
3. The method of claim 2, wherein the obtaining the execution state of the server further comprises:
outputting first prompt information under the condition that the execution state indicates that a task is being executed, wherein the first prompt information indicates that the server side is executing the task;
acquiring a switching instruction, wherein the switching instruction represents an instruction which is input based on the first prompt information and is used for indicating whether to switch the execution state;
and terminating the task being executed by the server under the condition that the switching instruction indicates switching of the execution state.
4. The method according to claim 1, wherein the executing each of the target operations according to the operation configuration information in the execution order to obtain the execution result of the task to be executed includes:
determining the operation type of each target operation;
determining an operation step sequence corresponding to the operation type, wherein the operation step sequence represents at least one step sequence for executing the operation;
and executing each target operation according to the execution sequence by combining the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed.
5. The method of claim 4, wherein the step of executing each of the target operations in the execution order in combination with the operation configuration information and the operation procedure to obtain an execution result of the task to be executed includes:
determining whether the operation configuration information of each target operation is matched with the operation steps;
under the condition that the operation configuration information of each target operation is matched with the operation step sequence, executing each target operation according to the execution sequence by combining the operation configuration information and the operation step sequence to obtain an execution result of the task to be executed;
and outputting second prompt information under the condition that the operation configuration information of the target operation is not matched with the operation steps, wherein the second prompt information indicates that the operation configuration information is not matched with the operation steps.
6. The method of claim 1, wherein the performing the target operation in accordance with the operation configuration information is performed as follows:
determining a first parameter and a second parameter contained in the operation configuration information, wherein the first parameter is used for indicating input data of the target operation, and the second parameter is used for indicating an output object of an output result of the target operation;
performing the target operation based on the input data indicated by the first parameter;
and outputting an output result obtained by executing the target operation to an output object indicated by the second parameter.
7. The method of claim 4, wherein the operation type is a query type or a check type; the method comprises the steps of,
the determining the operation steps corresponding to the operation types comprises the following steps:
under the condition that the operation type is the query type, determining a preset query step sequence as an operation step sequence corresponding to the operation type, wherein the preset query step sequence represents a preset step sequence for realizing query operation;
and under the condition that the operation type is the check type, determining a preset check step sequence as an operation step sequence corresponding to the operation type, wherein the preset check step sequence represents a preset step sequence for realizing check operation.
8. A task execution device, applied to a server, the device comprising:
the system comprises an acquisition module, a control module and a control module, wherein the acquisition module is used for acquiring a task to be executed, and the task to be executed is used for indicating to execute at least one operation;
the first determining module is used for determining the operation of the task instruction execution to be executed from a preset operation set to obtain at least one target operation;
the second determining module is used for determining the execution sequence identification of each target operation and operation configuration information, wherein the operation configuration information represents configuration information in the process of executing the target operation;
the third determining module is used for determining the execution sequence of each target operation according to the execution sequence identification;
and the execution module is used for executing each target operation according to the execution sequence and the operation configuration information to obtain an execution result of the task to be executed.
9. The electronic equipment is characterized by comprising a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory are communicated with each other through the communication bus;
a memory for storing a computer program;
a processor for implementing the method of any of claims 1-7 when executing a program stored on a memory.
10. A computer readable storage medium, on which a computer program is stored, which computer program, when being executed by a processor, implements the method according to any of claims 1-7.
CN202311100161.3A 2023-08-29 2023-08-29 Task execution method, device, electronic equipment and storage medium Pending CN117453522A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311100161.3A CN117453522A (en) 2023-08-29 2023-08-29 Task execution method, device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311100161.3A CN117453522A (en) 2023-08-29 2023-08-29 Task execution method, device, electronic equipment and storage medium

Publications (1)

Publication Number Publication Date
CN117453522A true CN117453522A (en) 2024-01-26

Family

ID=89595499

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311100161.3A Pending CN117453522A (en) 2023-08-29 2023-08-29 Task execution method, device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN117453522A (en)

Similar Documents

Publication Publication Date Title
CN108563214B (en) Vehicle diagnosis method, device and equipment
US9465724B2 (en) Method, program, and system for generating test cases
US20070180326A1 (en) Software test method and software test apparatus
US20080082964A1 (en) Method and system for data preparation and communication between software applications
CN109359045A (en) A kind of test method, device, equipment and storage medium
CN113133041B (en) Method and device for testing vehicle-to-vehicle communication function in dynamic interval train control vehicle
CN117453522A (en) Task execution method, device, electronic equipment and storage medium
CN110830796B (en) Television application testing method, television application testing device and readable storage medium
CN116860322A (en) Front-end data source processing method, device, equipment and storage medium
CN112416735A (en) Application program detection method and device, terminal equipment and storage medium
CN112346994B (en) Test information association method, device, computer equipment and storage medium
CN115062571A (en) Dynamic selection method, system, equipment and computer readable storage medium for data area of integrated circuit device
CN109739752B (en) Built-in resource testing method and device, electronic equipment and readable storage medium
US7844408B2 (en) System and method for time domain reflectometry testing
CN112180890A (en) Test case generation method, device and equipment
CN111427783A (en) RTE interface testing method, device, equipment and storage medium
CN106604129B (en) The method and apparatus for detecting video broadcasting condition
CN113225717B (en) Control method and device of Bluetooth equipment and computer readable storage medium
CN112100077B (en) Transaction testing method and device
JP4967861B2 (en) Output data control device and output data control method
CN113110996B (en) Test method and device
KR20070029972A (en) Apparatus and method for capturing test picture
CN117554791A (en) Test environment generation method and device and test equipment
CN116125181A (en) Automobile intelligent cabin testing method, device and equipment
KR100782648B1 (en) Apparatus and method for displaying window for the purpose of requesting for confirming test result

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination