CN110908867A - Task completion judgment method and device, storage medium and electronic equipment - Google Patents

Task completion judgment method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN110908867A
CN110908867A CN201911151540.9A CN201911151540A CN110908867A CN 110908867 A CN110908867 A CN 110908867A CN 201911151540 A CN201911151540 A CN 201911151540A CN 110908867 A CN110908867 A CN 110908867A
Authority
CN
China
Prior art keywords
node
task
sub
determining
leaf
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
CN201911151540.9A
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 ByteDance Network Technology Co Ltd
Original Assignee
Beijing ByteDance Network 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 ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN201911151540.9A priority Critical patent/CN110908867A/en
Publication of CN110908867A publication Critical patent/CN110908867A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3055Monitoring arrangements for monitoring the status of the computing system or of the computing system component, e.g. monitoring if the computing system is on, off, available, not available
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3093Configuration details thereof, e.g. installation, enabling, spatial arrangement of the probes
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3089Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents
    • G06F11/3096Monitoring arrangements determined by the means or processing involved in sensing the monitored data, e.g. interfaces, connectors, sensors, probes, agents wherein the means or processing minimize the use of computing system or of computing system component resources, e.g. non-intrusive monitoring which minimizes the probe effect: sniffing, intercepting, indirectly deriving the monitored data from other directly available data

Abstract

The disclosure relates to a method, a device, a storage medium and an electronic device for judging task completion, wherein the method comprises the following steps: acquiring progress information of a task; and determining whether the task is completed or not according to the progress information and a task judgment tree, wherein the sub-conditions for completing the task respectively correspond to leaf nodes of the task judgment tree. Through the technical scheme, on one hand, when the task sub-conditions need to be modified, the leaf nodes corresponding to the sub-conditions can be modified, the workload of task completion condition updating is effectively reduced, the task sub-conditions are managed through the task judgment tree, and updating iteration and post-maintenance of the task completion conditions can be facilitated. On the other hand, whether the task is completed or not is judged through the task judgment tree, and the judgment efficiency of task completion can be effectively improved.

Description

Task completion judgment method and device, storage medium and electronic equipment
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a method and an apparatus for determining task completion, a storage medium, and an electronic device.
Background
With the increase of various tasks in the task system, the task management in the task system is gradually complicated, the user interaction conditions are increased, and meanwhile, the judgment of task completion is also more complicated.
In the prior art, whether a task is completed or not usually needs to be judged through multiple conditions. However, the multi-condition decision may no longer be applicable to the business system as the business system is updated, and at this time, the multi-condition decision of the task needs to be modified to match the update of the business system. The above process usually requires background staff to rewrite scripts or program codes to update the multi-condition judgment, which is heavy in workload and not beneficial to update iteration and post-maintenance of task management.
Disclosure of Invention
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used to limit the scope of the claimed subject matter.
In a first aspect, the present disclosure provides a method for determining completion of a task, where the method includes:
acquiring progress information of a task;
and determining whether the task is completed or not according to the progress information and a task judgment tree, wherein the sub-conditions for completing the task respectively correspond to leaf nodes of the task judgment tree.
In a second aspect, the present disclosure provides a task completion determination apparatus, the apparatus including:
the acquisition module is used for acquiring progress information of the task;
and the determining module is used for determining whether the task is completed according to the progress information and the task judging tree, wherein the task completing sub-conditions respectively correspond to leaf nodes of the task judging tree.
In a third aspect, the disclosure is directed to a computer readable medium having stored thereon a computer program that, when executed by a processing device, performs the steps of the method of the first aspect.
In a fourth aspect, an electronic device is provided, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method of the first aspect.
In the above technical solution, when the completion condition of the task is determined, the determination is performed based on the task determination tree, and each sub-condition for task completion corresponds to a leaf node in the task determination tree, so on one hand, when the sub-condition of the task needs to be modified, the leaf node corresponding to the sub-condition can be modified, thereby effectively reducing the workload of task completion condition update, and the sub-condition of the task is managed through the task determination tree, which is also convenient for update iteration and post-maintenance of the condition for task completion. On the other hand, whether the task is completed or not is judged through the task judgment tree, and the judgment efficiency of task completion can be effectively improved.
Additional features and advantages of the disclosure will be set forth in the detailed description which follows.
Drawings
The above and other features, advantages and aspects of various embodiments of the present disclosure will become more apparent by referring to the following detailed description when taken in conjunction with the accompanying drawings. Throughout the drawings, the same or similar reference numbers refer to the same or similar elements. It should be understood that the drawings are schematic and that elements and features are not necessarily drawn to scale. In the drawings:
FIG. 1 is a flow diagram of a method for determining task completion provided in accordance with one embodiment of the present disclosure;
FIG. 2 is a flow diagram of task decision tree generation provided in accordance with one embodiment of the present disclosure;
FIG. 3A is a schematic illustration of a front-end interface provided in accordance with an embodiment of the present disclosure;
FIG. 3B is a schematic illustration of a front-end interface provided in accordance with an embodiment of the present disclosure;
FIG. 4 is a schematic diagram of a task decision tree provided in accordance with one embodiment of the present disclosure;
FIG. 5 is a block diagram of a task completion determination device provided in accordance with one embodiment of the present disclosure;
fig. 6 is a schematic structural diagram of an electronic device provided according to an embodiment of the present disclosure.
Detailed Description
Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is to be understood that the present disclosure may be embodied in various forms and should not be construed as limited to the embodiments set forth herein, but rather are provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the disclosure are for illustration purposes only and are not intended to limit the scope of the disclosure.
It should be understood that the various steps recited in the method embodiments of the present disclosure may be performed in a different order, and/or performed in parallel. Moreover, method embodiments may include additional steps and/or omit performing the illustrated steps. The scope of the present disclosure is not limited in this respect.
The term "include" and variations thereof as used herein are open-ended, i.e., "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Relevant definitions for other terms will be given in the following description.
It should be noted that the terms "first", "second", and the like in the present disclosure are only used for distinguishing different devices, modules or units, and are not used for limiting the order or interdependence relationship of the functions performed by the devices, modules or units.
It is noted that references to "a", "an", and "the" modifications in this disclosure are intended to be illustrative rather than limiting, and that those skilled in the art will recognize that "one or more" may be used unless the context clearly dictates otherwise.
The names of messages or information exchanged between devices in the embodiments of the present disclosure are for illustrative purposes only, and are not intended to limit the scope of the messages or information.
Fig. 1 is a flowchart of a task completion determination method according to an embodiment of the present disclosure, and as shown in fig. 1, the method includes:
in S11, progress information of the task is acquired, wherein the progress information of the task indicates the current attribute information of the task. Illustratively, taking the live room task as an example, the schedule information may include, but is not limited to, live time duration information, audience rating information of the live room, live room interactive message information, live room gift information, and the like.
At S12, it is determined whether the task is completed according to the progress information and a task determination tree, where the sub-conditions of task completion correspond to leaf nodes of the task determination tree, respectively, and the task determination tree is pre-generated according to the sub-conditions of task completion.
In the above technical solution, when the completion condition of the task is determined, the determination is performed based on the task determination tree, and each sub-condition for task completion corresponds to a leaf node in the task determination tree, so on one hand, when the sub-condition of the task needs to be modified, the leaf node corresponding to the sub-condition can be modified, thereby effectively reducing the workload of task completion condition update, and the sub-condition of the task is managed through the task determination tree, which is also convenient for update iteration and post-maintenance of the condition for task completion. On the other hand, whether the task is completed or not is judged through the task judgment tree, and the judgment efficiency of task completion can be effectively improved.
Alternatively, as shown in fig. 2, the task decision tree is generated by:
in S21, configuration information for a task input by a user is received, where the configuration information includes each sub-condition for completion of the task and an association relationship between each sub-condition.
Illustratively, the user may configure through the front-end interface. For example, the front-end interface may be integrated with sub-condition information required for task completion, as shown in fig. 3A, where column a is used to display the sub-condition information, which is exemplified as follows: the method comprises the steps of live broadcasting time length information, audience popularity information of a live broadcasting room, audience grade information of the live broadcasting room, live broadcasting room interactive message information, live broadcasting room gift message information and the like.
Illustratively, the column B is used for the user to select the constraint corresponding to the corresponding sub-condition, and the column C is used for the user to set the constraint information corresponding to the sub-condition. Fig. 3A is only an exemplary illustration, and when the sub-conditions are displayed, the sub-conditions may be displayed in a pull-down menu manner, that is, each sub-condition is initially in a hidden state, and a user may select the corresponding sub-condition from the pull-down menu and display the corresponding sub-condition in the front-end interface.
Based on the mode, the user can select the required sub-condition information to set the sub-conditions corresponding to the task through the front-end interface according to the requirements of the actual service system, and set the association relation between the sub-conditions.
As an example, as shown in fig. 3B, the conditions required for completion of the corresponding task for the anchor level upgrade may be as follows:
condition 1: the direct seeding time is longer than 1 hour;
condition 2: audience rating greater than 2000;
condition 3: users with audience ratings including VIP ratings;
condition 4: the interactive message is greater than 5000;
condition 5: the gift message is greater than 100.
For example, if the user does not select a constraint in column B and/or does not set constraint information in column C, in one case, the sub-condition information may not be a sub-condition for task completion; in another case, the sub-condition for completing the task may be determined according to the default constraint and the default constraint information corresponding to the sub-condition information, and may be set according to an actual usage scenario.
After the user sets the sub-conditions, the association relationship between the sub-conditions may be further set, for example, the user may set the association relationship between the respective sub-conditions through the front-end interface, for example, the relationship between condition 1 AND condition 2 is an OR relationship, the relationship between condition 4AND condition 5 is an AND relationship, AND the like.
In this way, the user may trigger the configuration information based on the front-end page, and after receiving the configuration information input by the user, in S22, a regular expression is generated according to each sub-condition and the association relationship between each sub-condition.
The regular expression may be generated according to the association relationship in the configuration information, for example, when the association relationship between the condition 1 and the condition 2 is an OR relationship, the logical relationship between the condition 1 and the condition 2 in the generated regular expression is an OR, for example, the regular expression is 1OR 2. Illustratively, the generated configuration relationship generates a regular expression of ((1OR 2) AND 3) OR (4AND 5).
In another embodiment, a user may directly input a regular expression corresponding to the association relationship between the respective sub-conditions, that is, the regular expression as the association relationship may be included in the configuration information, and when the regular expression is generated, the regular expression may be directly obtained from the configuration information.
At S23, a task decision Tree is generated according to the regular expression, wherein the task decision Tree is generated based on an Abstract Syntax Tree (AST).
And generating a syntax tree based on the AST according to the regular expression, wherein the generated syntax tree is the task judgment tree.
In the technical scheme, the task judgment tree is generated to uniformly manage each sub-condition of task completion, so that on one hand, modification of task conditions is facilitated, codes or scripts do not need to be rewritten, high requirements on technicians are reduced, on the other hand, maintenance of the task completion conditions is facilitated, and the workload is reduced.
Optionally, an embodiment of determining whether the task is completed according to the progress information and the task decision tree is as follows, and the step may include:
and aiming at non-leaf nodes in the task decision tree, determining the node states of the non-leaf nodes according to the node states of the child nodes of the non-leaf nodes, wherein the non-leaf nodes comprise the root nodes.
For example, one embodiment of determining the node status of the non-leaf node according to the node statuses of the child nodes of the non-leaf node may include:
if the node type of the non-leaf node is an OR type, determining that the node state of the non-leaf node is finished when determining that the node state of any child node of the non-leaf node is finished;
if the node type of the non-leaf node is an AND type, determining that the node state of the non-leaf node is complete when determining that the node states of all the child nodes of the non-leaf node are complete, wherein if the node state of any child node of the non-leaf node is determined to be incomplete, determining that the node state of the non-leaf node is incomplete.
Determining whether sub-conditions corresponding to the leaf nodes are met or not according to the progress information aiming at the leaf nodes in the task judgment tree;
if the sub-conditions corresponding to the leaf nodes are met, determining that the node state of the leaf nodes is finished; and if the sub-conditions corresponding to the leaf nodes are not satisfied, determining that the node states of the leaf nodes are unfinished.
If the node state of the root node is completion, determining that the task is completed; and if the node state of the root node is unfinished, determining that the task is unfinished.
Wherein, whether the sub-condition corresponding to the leaf node is met can be determined according to the progress information, exemplarily, the obtained progress information includes: the live broadcast time is 1.5 hours, the audience number is 1000, the audience level does not include the user of the VIP level, the interactive message is 5500, and the gift message is 120. If the condition corresponding to the leaf node is that the live broadcast time length is greater than 1 hour, the sub-condition corresponding to the leaf node can be determined to be satisfied according to the 'live broadcast time length is 1.5 hours' contained in the progress information, and then the node state of the leaf node is determined to be completed. The determination manner of the node states of other leaf nodes is similar to that, and is not described herein again.
In an embodiment, the node states of the leaf nodes in the task determination tree may be respectively determined based on the progress information, and then, according to the determined node states of the leaf nodes, the states of parent nodes (i.e., non-leaf nodes) of the leaf nodes are determined until the node state of the root node is determined, so as to determine whether the task is completed according to the node states of the root node.
In another embodiment, in determining the node states of nodes in a task decision tree, where whether a task is complete is determined based on the node state of the root node, the node states may be determined starting from the root node of the task decision tree. As shown in FIG. 4, an example task decision tree is first determined for the root node P1, wherein node P1 is an OR type node, and then when the node status of any child node of the non-leaf node is determined to be complete, the node status of the non-leaf node is determined to be complete.
At this point, any child node of node P1 may be selected to determine the node status of that child node. For example, the node status of the non-leaf node P2 may be determined first, AND the node type of the node P2 is an AND type, so that when the node statuses of all the child nodes of the non-leaf node are determined to be complete, the node status of the non-leaf node needs to be determined to be complete, that is, the node status of the node P2 needs to be determined according to the node statuses of the nodes P4 AND P5. For example, if it is determined from the obtained progress information that the sub-condition 3 corresponding to the node P5 is not satisfied, the node state of the node P5 is incomplete, and at this time, it may be determined that the node state of the node P2 is incomplete. And the node P1 is of the OR type, when the node state of the node P2 is determined to be incomplete, the node state of the node P3 can be continuously determined, so that the node state of the node P1 is determined.
In the technical scheme, the hierarchy judgment is carried out on the task completion sub-conditions through the task judgment tree, the node state of the node can be determined timely and quickly, unnecessary resource waste caused by matching and determining the task completion sub-conditions can be effectively avoided, and the task judgment efficiency and accuracy are improved.
Optionally, an exemplary manner of determining the node status of the non-leaf node according to the node status of the child node of the non-leaf node is as follows, which may include:
and determining the depth of a subtree corresponding to each child node of the non-leaf node, wherein the depth of the subtree corresponding to the child node is the depth of the determined tree when the child node is taken as the root node of the tree.
And determining the node states of the sub-nodes according to the sequence of the depths from small to large so as to determine the node states of the non-leaf nodes until the node state of the root node is determined.
For example, as shown in fig. 4, the depth corresponding to the root node is illustrated as 1. When determining the node states of the children nodes of the node P1, the depths of the sub-trees corresponding to the children nodes P2 and P3 may be determined, respectively, so that the depth of the sub-tree corresponding to the node P2 is 3, and the depth of the sub-tree corresponding to the node P3 is 2, and at this time, when determining the node state of the node P1, the node state of the node P3 may be determined first.
When the node state of the node P3 is determined, the child nodes of the node P3 are the nodes P6 and P7, respectively, and the depths of the subtrees corresponding to the nodes P6 and P7 are all 1, and at this time, one child node can be randomly selected to determine the node state. In connection with the above example, it may be determined from the progress information that the sub-condition 4 corresponding to the node P6 is satisfied, AND the node P3 is an AND type node, which needs to determine that the node state of the node P3 is complete when the node states of all the sub-nodes of the node P3 are determined to be complete. It may continue to be determined that the node state of node P7 is complete and then the node state of node P3 is determined to be complete.
When the node state of the node P3 is determined to be completed, since the node P1 is an OR type node, the state of the node P1 can be directly determined to be completed, that is, the state of the root node of the task determination tree is determined to be completed, that is, the task is determined to be completed. It should be noted that when it is determined that the state of the non-leaf node is complete or incomplete, the node state of the child node of the non-leaf node whose node state is not determined does not need to be determined, so that the efficiency of determining the completion of the task is improved, and the data processing amount is effectively reduced.
In the technical scheme, when the node state of the non-leaf node is determined according to the node state of the child node of the non-leaf node, the node state of the child node with the minimum depth of the corresponding sub-tree can be preferentially determined, so that the data processing amount can be reduced to a certain extent according to the determined node state, unnecessary occupation of computing resources is avoided, meanwhile, the task completion can be accurately and quickly judged, the task completion judgment efficiency is improved, and the stability and the fluency of a service system corresponding to the task are improved.
The present disclosure also provides a task completion determination apparatus, as shown in fig. 5, where the apparatus 10 includes:
an obtaining module 100, configured to obtain progress information of a task;
a determining module 200, configured to determine whether the task is completed according to the progress information and a task decision tree, where the sub-conditions for completing the task correspond to leaf nodes of the task decision tree, respectively.
Optionally, the task decision tree is generated by:
receiving configuration information aiming at the task, which is input by a user, wherein the configuration information comprises each sub-condition for completing the task and an incidence relation between the sub-conditions;
generating a regular expression according to each sub-condition and the incidence relation among the sub-conditions;
and generating the task decision tree according to the regular expression, wherein the task decision tree is generated based on an abstract syntax tree.
Optionally, the determining module includes:
a first determining submodule, configured to determine, for a non-leaf node in the task decision tree, a node state of the non-leaf node according to a node state of a child node of the non-leaf node, where the non-leaf node includes the root node;
the second determining submodule is used for determining whether the sub-conditions corresponding to the leaf nodes are met or not according to the progress information aiming at the leaf nodes in the task judging tree;
a third determining submodule, configured to determine that a node state of the leaf node is complete when the sub-condition corresponding to the leaf node is satisfied;
a fourth determining submodule, configured to determine that the task is completed when the node state of the root node is complete; and determining that the task is not completed when the node state of the root node is not completed.
Optionally, the first determining sub-module includes:
a fifth determining submodule, configured to determine that a node state of the non-leaf node is complete when determining that a node state of any child node of the non-leaf node is complete when the node type of the non-leaf node is an OR type;
a sixth determining submodule, configured to determine that the node states of the non-leaf nodes are complete when it is determined that the node states of all the child nodes of the non-leaf nodes are complete, when the node type of the non-leaf node is an AND type.
Optionally, the first determining sub-module includes:
a seventh determining submodule, configured to determine depths of subtrees corresponding to respective child nodes of the non-leaf nodes;
and the eighth determining submodule is used for determining the node states of the sub-nodes according to the sequence of the depths from small to large so as to determine the node states of the non-leaf nodes.
Referring now to FIG. 6, a block diagram of an electronic device 600 suitable for use in implementing embodiments of the present disclosure is shown. The terminal device in the embodiments of the present disclosure may include, but is not limited to, a mobile terminal such as a mobile phone, a notebook computer, a digital broadcast receiver, a PDA (personal digital assistant), a PAD (tablet computer), a PMP (portable multimedia player), a vehicle terminal (e.g., a car navigation terminal), and the like, and a stationary terminal such as a digital TV, a desktop computer, and the like. The electronic device shown in fig. 6 is only an example, and should not bring any limitation to the functions and the scope of use of the embodiments of the present disclosure.
As shown in fig. 6, electronic device 600 may include a processing means (e.g., central processing unit, graphics processor, etc.) 601 that may perform various appropriate actions and processes in accordance with a program stored in a Read Only Memory (ROM)602 or a program loaded from a storage means 608 into a Random Access Memory (RAM) 603. In the RAM 603, various programs and data necessary for the operation of the electronic apparatus 600 are also stored. The processing device 601, the ROM 602, and the RAM 603 are connected to each other via a bus 604. An input/output (I/O) interface 605 is also connected to bus 604.
Generally, the following devices may be connected to the I/O interface 605: input devices 606 including, for example, a touch screen, touch pad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; output devices 607 including, for example, a Liquid Crystal Display (LCD), a speaker, a vibrator, and the like; storage 608 including, for example, tape, hard disk, etc.; and a communication device 609. The communication means 609 may allow the electronic device 600 to communicate with other devices wirelessly or by wire to exchange data. While fig. 6 illustrates an electronic device 600 having various means, it is to be understood that not all illustrated means are required to be implemented or provided. More or fewer devices may alternatively be implemented or provided.
In particular, according to an embodiment of the present disclosure, the processes described above with reference to the flowcharts may be implemented as computer software programs. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer readable medium, the computer program containing program code for performing the method illustrated by the flow chart. In such an embodiment, the computer program may be downloaded and installed from a network via the communication means 609, or may be installed from the storage means 608, or may be installed from the ROM 602. The computer program, when executed by the processing device 601, performs the above-described functions defined in the methods of the embodiments of the present disclosure.
It should be noted that the computer readable medium in the present disclosure can be a computer readable signal medium or a computer readable storage medium or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: electrical wires, optical cables, RF (radio frequency), etc., or any suitable combination of the foregoing.
In some embodiments, the clients, servers may communicate using any currently known or future developed network protocol, such as HTTP (HyperText transfer protocol), and may be interconnected with any form or medium of digital data communication (e.g., a communications network). Examples of communication networks include a local area network ("LAN"), a wide area network ("WAN"), the Internet (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network.
The computer readable medium may be embodied in the electronic device; or may exist separately without being assembled into the electronic device.
The computer readable medium carries one or more programs which, when executed by the electronic device, cause the electronic device to: acquiring progress information of a task; and determining whether the task is completed or not according to the progress information and a task judgment tree, wherein the sub-conditions for completing the task respectively correspond to leaf nodes of the task judgment tree.
Computer program code for carrying out operations for the present disclosure may be written in any combination of one or more programming languages, including but not limited to an object oriented programming language such as Java, Smalltalk, C + +, and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or the connection may be made to an external computer (for example, through the Internet using an Internet service provider).
The flowchart and block diagrams in the figures illustrate the architecture, functionality, and operation of possible implementations of systems, methods and computer program products according to various embodiments of the present disclosure. In this regard, each block in the flowchart or block diagrams may represent a module, segment, or portion of code, which comprises one or more executable instructions for implementing the specified logical function(s). It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or the blocks may sometimes be executed in the reverse order, depending upon the functionality involved. It will also be noted that each block of the block diagrams and/or flowchart illustration, and combinations of blocks in the block diagrams and/or flowchart illustration, can be implemented by special purpose hardware-based systems which perform the specified functions or acts, or combinations of special purpose hardware and computer instructions.
The modules described in the embodiments of the present disclosure may be implemented by software or hardware. The name of a module does not in some cases constitute a limitation of the module itself, and for example, the acquiring module may also be described as a "module that acquires progress information of a task".
The functions described herein above may be performed, at least in part, by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field Programmable Gate Arrays (FPGAs), Application Specific Integrated Circuits (ASICs), Application Specific Standard Products (ASSPs), systems on a chip (SOCs), Complex Programmable Logic Devices (CPLDs), and the like.
In the context of this disclosure, a machine-readable medium may be a tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of a machine-readable storage medium would include an electrical connection based on one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
According to one or more embodiments of the present disclosure, there is provided a method for determining completion of a task, including:
acquiring progress information of a task;
and determining whether the task is completed or not according to the progress information and a task judgment tree, wherein the sub-conditions for completing the task respectively correspond to leaf nodes of the task judgment tree.
According to one or more embodiments of the present disclosure, there is provided a task completion determination method, in which the task determination tree is generated by:
receiving configuration information aiming at the task, which is input by a user, wherein the configuration information comprises each sub-condition for completing the task and an incidence relation between the sub-conditions;
generating a regular expression according to each sub-condition and the incidence relation among the sub-conditions;
and generating the task decision tree according to the regular expression, wherein the task decision tree is generated based on an abstract syntax tree.
According to one or more embodiments of the present disclosure, a method for determining task completion is provided, where the determining whether the task is completed according to the progress information and a task determination tree includes:
determining a node state of a non-leaf node according to node states of child nodes of the non-leaf node aiming at the non-leaf node in the task decision tree, wherein the non-leaf node comprises the root node;
determining whether sub-conditions corresponding to the leaf nodes are met or not according to the progress information aiming at the leaf nodes in the task judgment tree;
if the sub-conditions corresponding to the leaf nodes are met, determining that the node state of the leaf nodes is finished;
if the node state of the root node is completion, determining that the task is completed; and if the node state of the root node is unfinished, determining that the task is unfinished.
According to one or more embodiments of the present disclosure, a method for determining task completion is provided, where the determining a node state of the non-leaf node according to a node state of a child node of the non-leaf node includes:
if the node type of the non-leaf node is an OR type, determining that the node state of the non-leaf node is finished when determining that the node state of any child node of the non-leaf node is finished;
AND if the node type of the non-leaf node is an AND type, determining that the node state of the non-leaf node is finished when determining that the node states of all the child nodes of the non-leaf node are finished.
According to one or more embodiments of the present disclosure, a method for determining task completion is provided, where the determining a node state of the non-leaf node according to a node state of a child node of the non-leaf node includes:
determining the depth of a sub-tree corresponding to each sub-node of the non-leaf node;
and determining the node states of the sub-nodes according to the sequence of the depths from small to large so as to determine the node states of the non-leaf nodes.
According to one or more embodiments of the present disclosure, there is provided a task completion determination apparatus including:
the acquisition module is used for acquiring progress information of the task;
and the determining module is used for determining whether the task is completed according to the progress information and the task judging tree, wherein the task completing sub-conditions respectively correspond to leaf nodes of the task judging tree.
According to one or more embodiments of the present disclosure, there is provided a task completion determination apparatus, wherein the task determination tree is generated by:
receiving configuration information aiming at the task, which is input by a user, wherein the configuration information comprises each sub-condition for completing the task and an incidence relation between the sub-conditions;
generating a regular expression according to each sub-condition and the incidence relation among the sub-conditions;
and generating the task decision tree according to the regular expression, wherein the task decision tree is generated based on an abstract syntax tree.
According to one or more embodiments of the present disclosure, there is provided a task completion determination apparatus, wherein the determination module includes:
a first determining submodule, configured to determine, for a non-leaf node in the task decision tree, a node state of the non-leaf node according to a node state of a child node of the non-leaf node, where the non-leaf node includes the root node;
the second determining submodule is used for determining whether the sub-conditions corresponding to the leaf nodes are met or not according to the progress information aiming at the leaf nodes in the task judging tree;
a third determining submodule, configured to determine that a node state of the leaf node is complete when the sub-condition corresponding to the leaf node is satisfied;
a fourth determining submodule, configured to determine that the task is completed when the node state of the root node is complete; and determining that the task is not completed when the node state of the root node is not completed.
According to one or more embodiments of the present disclosure, there is provided a task completion determination apparatus, wherein the first determination submodule includes:
a fifth determining submodule, configured to determine that a node state of the non-leaf node is complete when determining that a node state of any child node of the non-leaf node is complete when the node type of the non-leaf node is an OR type;
a sixth determining submodule, configured to determine that the node states of the non-leaf nodes are complete when it is determined that the node states of all the child nodes of the non-leaf nodes are complete, when the node type of the non-leaf node is an AND type.
According to one or more embodiments of the present disclosure, there is provided a task completion determination apparatus, wherein the first determination submodule includes:
a seventh determining submodule, configured to determine depths of subtrees corresponding to respective child nodes of the non-leaf nodes;
and the eighth determining submodule is used for determining the node states of the sub-nodes according to the sequence of the depths from small to large so as to determine the node states of the non-leaf nodes.
According to one or more embodiments of the present disclosure, there is provided a computer-readable medium on which a computer program is stored, the program, when executed by a processing apparatus, implementing the steps of the above-described task completion determination method.
According to one or more embodiments of the present disclosure, there is provided an electronic device including:
a storage device having a computer program stored thereon;
and a processing device for executing the computer program in the storage device to realize the steps of the task completion judging method.
The foregoing description is only exemplary of the preferred embodiments of the disclosure and is illustrative of the principles of the technology employed. It will be appreciated by those skilled in the art that the scope of the disclosure herein is not limited to the particular combination of features described above, but also encompasses other embodiments in which any combination of the features described above or their equivalents does not depart from the spirit of the disclosure. For example, the above features and (but not limited to) the features disclosed in this disclosure having similar functions are replaced with each other to form the technical solution.
Further, while operations are depicted in a particular order, this should not be understood as requiring that such operations be performed in the particular order shown or in sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Likewise, while several specific implementation details are included in the above discussion, these should not be construed as limitations on the scope of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable subcombination.
Although the subject matter has been described in language specific to structural features and/or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims. With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

Claims (10)

1. A method for determining completion of a task, the method comprising:
acquiring progress information of a task;
and determining whether the task is completed or not according to the progress information and a task judgment tree, wherein the sub-conditions for completing the task respectively correspond to leaf nodes of the task judgment tree.
2. The method of claim 1, wherein the task decision tree is generated by:
receiving configuration information aiming at the task, which is input by a user, wherein the configuration information comprises each sub-condition for completing the task and an incidence relation between the sub-conditions;
generating a regular expression according to each sub-condition and the incidence relation among the sub-conditions;
and generating the task decision tree according to the regular expression, wherein the task decision tree is generated based on an abstract syntax tree.
3. The method of claim 1, wherein determining whether the task is complete based on the progress information and a task decision tree comprises:
determining a node state of a non-leaf node according to node states of child nodes of the non-leaf node aiming at the non-leaf node in the task decision tree, wherein the non-leaf node comprises the root node;
determining whether sub-conditions corresponding to the leaf nodes are met or not according to the progress information aiming at the leaf nodes in the task judgment tree;
if the sub-conditions corresponding to the leaf nodes are met, determining that the node state of the leaf nodes is finished;
if the node state of the root node is completion, determining that the task is completed; and if the node state of the root node is unfinished, determining that the task is unfinished.
4. The method of claim 3, wherein determining the node status of the non-leaf node based on the node statuses of the children of the non-leaf node comprises:
if the node type of the non-leaf node is an OR type, determining that the node state of the non-leaf node is finished when determining that the node state of any child node of the non-leaf node is finished;
AND if the node type of the non-leaf node is an AND type, determining that the node state of the non-leaf node is finished when determining that the node states of all the child nodes of the non-leaf node are finished.
5. The method of claim 3, wherein determining the node status of the non-leaf node based on the node statuses of the children of the non-leaf node comprises:
determining the depth of a sub-tree corresponding to each sub-node of the non-leaf node;
and determining the node states of the sub-nodes according to the sequence of the depths from small to large so as to determine the node states of the non-leaf nodes.
6. An apparatus for determining completion of a task, the apparatus comprising:
the acquisition module is used for acquiring progress information of the task;
and the determining module is used for determining whether the task is completed according to the progress information and the task judging tree, wherein the task completing sub-conditions respectively correspond to leaf nodes of the task judging tree.
7. The apparatus of claim 6, wherein the task decision tree is generated by:
receiving configuration information aiming at the task, which is input by a user, wherein the configuration information comprises each sub-condition for completing the task and an incidence relation between the sub-conditions;
generating a regular expression according to each sub-condition and the incidence relation among the sub-conditions;
and generating the task decision tree according to the regular expression, wherein the task decision tree is generated based on an abstract syntax tree.
8. The apparatus of claim 6, wherein the determining module comprises:
a first determining submodule, configured to determine, for a non-leaf node in the task decision tree, a node state of the non-leaf node according to a node state of a child node of the non-leaf node, where the non-leaf node includes the root node;
the second determining submodule is used for determining whether the sub-conditions corresponding to the leaf nodes are met or not according to the progress information aiming at the leaf nodes in the task judging tree;
a third determining submodule, configured to determine that a node state of the leaf node is complete when the sub-condition corresponding to the leaf node is satisfied;
a fourth determining submodule, configured to determine that the task is completed when the node state of the root node is complete; and determining that the task is not completed when the node state of the root node is not completed.
9. A computer-readable medium, on which a computer program is stored, characterized in that the program, when being executed by processing means, carries out the steps of the method of any one of claims 1 to 5.
10. An electronic device, comprising:
a storage device having a computer program stored thereon;
processing means for executing the computer program in the storage means to carry out the steps of the method according to any one of claims 1 to 5.
CN201911151540.9A 2019-11-21 2019-11-21 Task completion judgment method and device, storage medium and electronic equipment Pending CN110908867A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911151540.9A CN110908867A (en) 2019-11-21 2019-11-21 Task completion judgment method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911151540.9A CN110908867A (en) 2019-11-21 2019-11-21 Task completion judgment method and device, storage medium and electronic equipment

Publications (1)

Publication Number Publication Date
CN110908867A true CN110908867A (en) 2020-03-24

Family

ID=69818741

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911151540.9A Pending CN110908867A (en) 2019-11-21 2019-11-21 Task completion judgment method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN110908867A (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108874396A (en) * 2018-05-31 2018-11-23 苏州蜗牛数字科技股份有限公司 The cross-compiler and Compilation Method of multi-platform multiple target language based on HLSL
US20190163533A1 (en) * 2017-11-27 2019-05-30 Promontory Financial Group Llc Computing task management using tree structures
CN109902251A (en) * 2019-01-17 2019-06-18 平安城市建设科技(深圳)有限公司 Scheme Choice method, apparatus, terminal and readable storage medium storing program for executing based on decision tree
CN110390493A (en) * 2019-07-31 2019-10-29 北京字节跳动网络技术有限公司 Task management method, device, storage medium and electronic equipment
CN110413367A (en) * 2019-07-31 2019-11-05 北京字节跳动网络技术有限公司 Task creation method, apparatus, storage medium and electronic equipment

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20190163533A1 (en) * 2017-11-27 2019-05-30 Promontory Financial Group Llc Computing task management using tree structures
CN108874396A (en) * 2018-05-31 2018-11-23 苏州蜗牛数字科技股份有限公司 The cross-compiler and Compilation Method of multi-platform multiple target language based on HLSL
CN109902251A (en) * 2019-01-17 2019-06-18 平安城市建设科技(深圳)有限公司 Scheme Choice method, apparatus, terminal and readable storage medium storing program for executing based on decision tree
CN110390493A (en) * 2019-07-31 2019-10-29 北京字节跳动网络技术有限公司 Task management method, device, storage medium and electronic equipment
CN110413367A (en) * 2019-07-31 2019-11-05 北京字节跳动网络技术有限公司 Task creation method, apparatus, storage medium and electronic equipment

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
周泽湘等: "工业机器人解释器的研究与设计", 《机械设计与制造》 *

Similar Documents

Publication Publication Date Title
CN110781373B (en) List updating method and device, readable medium and electronic equipment
CN110390493B (en) Task management method and device, storage medium and electronic equipment
CN109726217B (en) Database operation method, device, equipment and storage medium
CN112395253B (en) Index file generation method, terminal device, electronic device and medium
CN109408481B (en) Log collection rule updating method and device, electronic equipment and readable medium
CN110795446A (en) List updating method and device, readable medium and electronic equipment
CN111857720B (en) User interface state information generation method and device, electronic equipment and medium
CN111324342A (en) Method, device, medium and electronic equipment for generating interface layer code
CN114035879A (en) Page theme color changing method and device, electronic equipment and computer readable medium
CN110413367B (en) Task creation method and device, storage medium and electronic equipment
CN111309304A (en) Method, device, medium and electronic equipment for generating IDL file
CN113220281A (en) Information generation method and device, terminal equipment and storage medium
CN110704050A (en) Module initialization method, device, electronic equipment and computer readable storage medium
CN112507676B (en) Method and device for generating energy report, electronic equipment and computer readable medium
CN110908867A (en) Task completion judgment method and device, storage medium and electronic equipment
CN112000667B (en) Method, apparatus, server and medium for retrieving tree data
CN112035256A (en) Resource allocation method, device, electronic equipment and medium
CN113472565B (en) Method, apparatus, device and computer readable medium for expanding server function
CN111382389B (en) Multi-theme page generation method and device, electronic equipment and storage medium
CN111399902B (en) Client source file processing method and device, readable medium and electronic equipment
CN115221178B (en) Data table binding method, device, electronic equipment and computer readable medium
CN112311833B (en) Data updating method and device
CN115374320B (en) Text matching method and device, electronic equipment and computer medium
CN116483808B (en) Data migration method, device, electronic equipment and computer readable medium
CN117132245B (en) Method, device, equipment and readable medium for reorganizing online article acquisition business process

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