CN113051069A - Data analysis method and device based on multiple tasks and terminal equipment - Google Patents

Data analysis method and device based on multiple tasks and terminal equipment Download PDF

Info

Publication number
CN113051069A
CN113051069A CN201911384716.5A CN201911384716A CN113051069A CN 113051069 A CN113051069 A CN 113051069A CN 201911384716 A CN201911384716 A CN 201911384716A CN 113051069 A CN113051069 A CN 113051069A
Authority
CN
China
Prior art keywords
analysis
result
task
analysis task
tasks
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.)
Granted
Application number
CN201911384716.5A
Other languages
Chinese (zh)
Other versions
CN113051069B (en
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.)
Huawei Technologies Co Ltd
Original Assignee
Huawei Technologies 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 Huawei Technologies Co Ltd filed Critical Huawei Technologies Co Ltd
Priority to CN201911384716.5A priority Critical patent/CN113051069B/en
Priority to PCT/CN2020/125221 priority patent/WO2021129143A1/en
Publication of CN113051069A publication Critical patent/CN113051069A/en
Application granted granted Critical
Publication of CN113051069B publication Critical patent/CN113051069B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5038Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering the execution order of a plurality of tasks, e.g. taking priority or time dependency constraints into consideration
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]

Abstract

The application provides a data analysis method, a data analysis device and terminal equipment based on multiple tasks, which are suitable for the technical field of artificial intelligence, and the method comprises the following steps: after data to be processed is obtained, a plurality of parallel analysis tasks are triggered; acquiring a first result generated by a first analysis task, and judging whether a second analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the first analysis task is an analysis task which generates an analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate an analysis result in the plurality of parallel analysis tasks; and if the fact that the second analysis task does not need to be waited for generating the analysis result is judged according to the preset strategy, the first result with the highest priority is used as the output result corresponding to the data to be processed. The embodiment of the application reduces the total waiting time of the parallel tasks and improves the efficiency of a processing model in the field of artificial intelligence when the processing model uses multiple parallel analysis tasks to perform data analysis.

Description

Data analysis method and device based on multiple tasks and terminal equipment
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a data analysis method and device based on multiple tasks and terminal equipment.
Background
When the existing processing model performs data analysis and result output, in order to improve the accuracy of an output result, a plurality of parallel analysis tasks are often started, each analysis task independently analyzes data to be processed and obtains a corresponding analysis result, then the processing model performs comprehensive analysis on all analysis results, and one optimal result is selected as a final output result.
Although the accuracy of the final output result can be improved by multi-analysis task parallel data analysis, the time consumption of each final analysis task is greatly different due to different factors such as the analysis principle, the dependent resources, the data transmission condition and the like of each analysis task, so that the time consumption of data analysis of a processing model is long, and the efficiency is low.
Disclosure of Invention
In view of this, embodiments of the present application provide a data analysis method and apparatus based on multiple tasks, and a terminal device, which can solve the problem in the field of artificial intelligence that a processing model has low efficiency in analyzing data of multiple analysis tasks with long time consumption.
A first aspect of an embodiment of the present application provides a data analysis method based on multiple tasks, including:
after data to be processed is obtained, triggering a plurality of parallel analysis tasks, wherein the analysis tasks are used for analyzing the data to be processed;
acquiring a first result generated by a first analysis task, and judging whether a second analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the first analysis task is an analysis task which generates an analysis result in the plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate an analysis result in the plurality of parallel analysis tasks;
and if the fact that the second analysis task does not need to wait for generating an analysis result is judged according to a preset strategy, the first result is subjected to priority ranking, and the result with the highest priority is used as the output result corresponding to the data to be processed.
In the embodiment of the application, a policy is preset for evaluating whether an analysis task which does not generate an analysis result is worth waiting. After a plurality of parallel analysis tasks are triggered, when a real analysis result generated by the analysis tasks is obtained each time, whether the analysis tasks which do not generate the analysis results need to be waited or not is judged by using a preset strategy. If the judgment result is that waiting is not needed, the embodiment of the application can directly perform priority ranking on the real analysis results, and the real analysis result with the highest priority is used as the final output result. In the embodiment of the application, the waiting of some analysis tasks can be selectively abandoned according to the preset strategy, so that the total waiting time of the parallel tasks is reduced, and the data analysis efficiency of the multi-analysis task in data analysis is improved.
In a first possible implementation manner of the first aspect, the determining, by the preset policy, whether it is necessary to wait for the second analysis task to generate an analysis result includes:
and if the second analysis task does not contain a third analysis task, determining that the second analysis task does not need to wait for the second analysis task to generate an analysis result, wherein the third analysis task is an analysis task which does not have a preset label in the second analysis task, and the preset label is a label added to the second analysis task after the second analysis task is subjected to result prediction and when the priority of a prediction result corresponding to the second analysis task is lower than the priority of at least one first result.
The embodiment of the application can realize automatic identification of whether the analysis result which is not generated needs to be abandoned or not, and determine the condition of no waiting, thereby greatly reducing the waiting time of the abandoned task and improving the efficiency of data analysis.
In a second possible implementation manner of the first aspect, the determining, by the preset policy, whether it is necessary to wait for the second analysis task to generate an analysis result includes:
obtaining a second result obtained by predicting the result of the second analysis task;
performing priority ranking on the second result and the first result to obtain a corresponding ranking result;
and if the result with the highest priority in the sequencing results is the first result, judging that the second analysis task does not need to wait for generating an analysis result.
According to the embodiment of the application, when the real result is the highest priority result, the waiting of the remaining analysis tasks can be directly finished, and the waiting time is greatly shortened.
On the basis of the foregoing various possible implementation manners of the first aspect, in a third possible implementation manner of the first aspect, the predicted result and the second result are both analysis results with the highest priority among all analysis results corresponding to the second analysis task.
In the embodiment of the application, the analysis result with the highest priority is used as the prediction result, so that the rejected tasks can be accurately and reliably screened.
On the basis of the first possible implementation manner of the first aspect, in a fourth possible implementation manner of the first aspect, the obtaining a first result generated by the first analysis task, and determining whether it is necessary to wait for the second analysis task to generate an analysis result according to a preset policy includes:
and if the first result generated by the first analysis task is acquired and the first analysis task generating the first result does not carry the preset label, executing the operation of judging whether to wait for a second analysis task to generate an analysis result according to a preset strategy.
According to the embodiment of the application, the preset strategy is triggered by only responding to the non-abandoned task, so that the occupation of the processor resource of the terminal equipment can be reduced.
On the basis of the first possible implementation manner of the first aspect, in a fifth possible implementation manner of the first aspect, the method further includes:
and if the priority of the predicted result corresponding to the second analysis task is lower than the priority of at least one first result, sending a termination instruction to the second analysis task, wherein the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
In the embodiment of the application, the abandoning task does not return any analysis result by sending the termination instruction to the rejected task, so that the terminal equipment does not need to process the analysis result corresponding to the abandoning task, and the occupation of the processor resource of the terminal equipment can be reduced.
On the basis of the foregoing various possible implementation manners of the first aspect, in a sixth possible implementation manner of the first aspect, the prioritizing the second result and the first result includes:
and performing priority ordering on the second result and the first result generated by a fourth analysis task, wherein the fourth analysis task is an analysis task which does not have the preset label in the first analysis task.
In the embodiment of the application, only the predicted result and the real result generated by the non-rejection task are subjected to priority sequencing, so that the occupation of the processor resource of the terminal equipment can be reduced.
On the basis of the foregoing various possible implementation manners of the first aspect, in a seventh possible implementation manner of the first aspect, the prioritizing the first results, and taking a result with a highest priority as an output result corresponding to the data to be processed includes:
and performing priority ranking on the first results generated by a fourth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the fourth analysis task is an analysis task which does not have the preset label in the first analysis task.
In the embodiment of the application, only the real results generated by the non-abandoned tasks are subjected to priority sequencing, and the output results are screened, so that the occupation of the processor resources of the terminal equipment can be reduced.
A second aspect of an embodiment of the present application provides a data analysis method based on multiple tasks, including:
after data to be processed is obtained, triggering at least one first analysis task and at least one second analysis task which are parallel, wherein the first analysis task and the second analysis task are both used for analyzing the data to be processed;
if first results generated by all the first analysis tasks are acquired, acquiring second results generated by a third analysis task, and judging whether the fourth analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the third analysis task is an analysis task which generates an analysis result in the at least one second analysis task, and the fourth analysis task is an analysis task which does not generate an analysis result in the at least one second analysis task;
and if the fact that the fourth analysis task does not need to be waited for generating an analysis result is judged according to a preset strategy, the first result and the second result are subjected to priority ranking, and the result with the highest priority is used as the output result corresponding to the data to be processed.
In the embodiment of the application, a policy is preset for evaluating whether an analysis task which does not generate an analysis result is worth waiting. Meanwhile, in order to prevent the analysis tasks with higher importance degree from being abandoned and excessive workload from being brought to the terminal device, the analysis tasks are divided into the first analysis task which needs to be waited and the second analysis task which needs to be waited according to the preset strategy. After a plurality of parallel first analysis tasks and second analysis tasks are triggered, when a real analysis result generated by the second analysis task is obtained each time, whether the second analysis task which does not generate the analysis result needs to be waited or not is judged by using a preset strategy according to the embodiment of the application. If the judgment result is that waiting is not needed, the embodiment of the application can directly perform priority ranking on the real analysis results, and the real analysis result with the highest priority is used as the final output result. Therefore, according to the embodiment of the application, waiting for some analysis tasks can be selectively abandoned according to the preset strategy, so that the total waiting time for the parallel tasks is reduced, and the data analysis efficiency of the multi-analysis task in data analysis is improved.
In a first possible implementation manner of the second aspect, the determining, by the preset policy, whether it is necessary to wait for the fourth analysis task to generate an analysis result includes:
if the fourth analysis task does not contain a fifth analysis task, determining that it is not necessary to wait for the fourth analysis task to generate an analysis result, wherein the fifth analysis task is an analysis task that does not have a preset tag in the fourth analysis task, and the preset tag is a tag added to the fourth analysis task after the fourth analysis task is subjected to result prediction and when the priority of a prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result.
The embodiment of the application can realize automatic identification of whether the analysis result which is not generated needs to be abandoned or not, and determine the condition of no waiting, thereby greatly reducing the waiting time of the abandoned task and improving the efficiency of data analysis.
In a second possible implementation manner of the second aspect, the determining, by the preset policy, whether it is necessary to wait for the fourth analysis task to generate an analysis result includes:
obtaining a third result obtained by predicting the result of the fourth analysis task;
performing priority ranking on the first result, the second result and the third result to obtain corresponding ranking results;
and if the result with the highest priority in the sequencing results is the first result or the second result, judging that the second analysis task does not need to wait for generating an analysis result.
According to the embodiment of the application, when the real result is the highest priority result, the waiting of the remaining analysis tasks can be directly finished, and the waiting time is greatly shortened.
On the basis of the foregoing various possible implementation manners of the second aspect, in a third possible implementation manner of the second aspect, the predicted result and the third result are both analysis results with the highest priority among all analysis results corresponding to the fourth analysis task.
In the embodiment of the application, the analysis result with the highest priority is used as the prediction result, so that the rejected tasks can be accurately and reliably screened.
On the basis of the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, obtaining a second result generated by the third analysis task, and determining whether it is necessary to wait for the fourth analysis task to generate an analysis result according to a preset policy, includes:
and if the second result generated by the third analysis task is acquired and the third analysis task generating the second result is not provided with the preset label, executing the operation of judging whether to wait for the fourth analysis task to generate an analysis result according to a preset strategy.
According to the embodiment of the application, the preset strategy is triggered by only responding to the non-abandoned task, so that the occupation of the processor resource of the terminal equipment can be reduced.
On the basis of the first possible implementation manner of the second aspect, in a fifth possible implementation manner of the second aspect, the method further includes:
and if the priority of the prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result, sending a termination instruction to the fourth analysis task, wherein the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
In the embodiment of the application, the abandoning task does not return any analysis result by sending the termination instruction to the rejected task, so that the terminal equipment does not need to process the analysis result corresponding to the abandoning task, and the occupation of the processor resource of the terminal equipment can be reduced.
On the basis of the foregoing various possible implementations of the second aspect, in a sixth possible implementation of the second aspect, the prioritizing the first result, the second result, and the third result includes:
and performing priority ordering on the first result, the third result and the second result generated by a sixth analysis task, wherein the sixth analysis task is an analysis task which does not have the preset label in the third analysis task.
In the embodiment of the application, only the predicted result and the real result generated by the non-rejection task are subjected to priority sequencing, so that the occupation of the processor resource of the terminal equipment can be reduced.
On the basis of the foregoing various possible implementation manners of the second aspect, in a seventh possible implementation manner of the second aspect, the prioritizing the first result and the second result, and taking a result with a highest priority as an output result corresponding to the to-be-processed data includes:
and performing priority ranking on the first result and the second result generated by a sixth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the sixth task is an analysis task which does not have the preset label in the third analysis task.
In the embodiment of the application, only the real results generated by the non-abandoned tasks are subjected to priority sequencing, and the output results are screened, so that the occupation of the processor resources of the terminal equipment can be reduced.
A third aspect of an embodiment of the present application provides a multitask-based data analysis device, including:
the task triggering module is used for triggering a plurality of parallel analysis tasks after the data to be processed is obtained, and the analysis tasks are used for analyzing the data to be processed;
the waiting judgment module is used for acquiring a first result generated by a first analysis task and judging whether to wait for a second analysis task to generate an analysis result according to a preset strategy, wherein the first analysis task is an analysis task which generates an analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate an analysis result in the plurality of parallel analysis tasks;
and the result determining module is used for carrying out priority sequencing on the first result and taking the result with the highest priority as the output result corresponding to the data to be processed if the second analysis task does not need to be waited to generate the analysis result according to the preset strategy.
A fourth aspect of an embodiment of the present application provides a multitask-based data analysis device, including:
the task triggering module is used for triggering at least one first analysis task and at least one second analysis task which are parallel after the data to be processed are obtained, and the first analysis task and the second analysis task are both used for analyzing the data to be processed;
the waiting judgment module is used for acquiring a second result generated by a third analysis task if the first results generated by all the first analysis tasks are acquired, and judging whether the fourth analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the third analysis task is an analysis task which generates an analysis result in at least one second analysis task, and the fourth analysis task is an analysis task which does not generate an analysis result in at least one second analysis task;
and the result determining module is used for carrying out priority sequencing on the first result and the second result if the fourth analysis task is judged not to be waited to generate the analysis result according to the preset strategy, and taking the result with the highest priority as the output result corresponding to the data to be processed.
A fifth aspect of embodiments of the present application provides a terminal device, where the terminal device includes a memory and a processor, where the memory stores a computer program that is executable on the processor, and the processor implements the steps of the multitask-based data analysis method according to any one of the first aspect and the second aspect when executing the computer program.
A sixth aspect of embodiments of the present application provides a computer-readable storage medium, comprising: there is stored a computer program, characterized in that the computer program, when being executed by a processor, realizes the steps of the multitask based data analyzing method according to any of the first or second aspects.
A seventh aspect of embodiments of the present application provides a computer program product, which, when run on a terminal device, causes the terminal device to execute the multitask-based data analysis method according to any one of the first aspect and the second aspect.
It is to be understood that, for the beneficial effects of the second to seventh aspects, reference may be made to the description of the first aspect or the second aspect, and details are not repeated here.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed to be used in the embodiments or the prior art descriptions will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without inventive exercise.
FIG. 1 is a schematic flow chart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 2 is a flowchart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 3 is a flowchart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 7 is a flowchart illustrating an implementation of a multitask-based data analysis method according to an embodiment of the present application;
FIG. 8 is a schematic diagram of an application scenario provided by an embodiment of the present application;
FIG. 9 is a schematic structural diagram of a multitask-based data analysis device according to an embodiment of the present application;
FIG. 10 is a schematic structural diagram of a multitask-based data analysis device according to an embodiment of the present application;
fig. 11 is a schematic diagram of a terminal device provided in an embodiment of the present application.
Detailed Description
In the following description, for purposes of explanation and not limitation, specific details are set forth, such as particular system structures, techniques, etc. in order to provide a thorough understanding of the embodiments of the present application. It will be apparent, however, to one skilled in the art that the present application may be practiced in other embodiments that depart from these specific details. In other instances, detailed descriptions of well-known systems, devices, circuits, and methods are omitted so as not to obscure the description of the present application with unnecessary detail.
In order to explain the technical solution described in the present application, the following description will be given by way of specific examples.
For the convenience of understanding, the embodiments of the present application will be briefly described herein:
when the existing processing model carries out multi-task parallel data analysis, all parallel analysis tasks are waited to generate corresponding analysis results, then all the analysis results are subjected to priority sequencing uniformly, and finally the analysis result with the highest priority is taken as a final output result. For example in a process model for human-machine conversation. When the user conversation content is acquired, the conversation content is used as data to be processed to synchronously start a plurality of conversation analysis tasks, the analysis results are subjected to priority ranking after the analysis results of all the conversation analysis tasks are acquired, and finally the analysis result with the highest priority is used as an output result to perform subsequent analysis of user conversation response.
Although the accuracy of the final output result can be improved by the existing multi-analysis task parallel data analysis, in practical application, it is found that certain differences may exist among the analysis principles of the parallel analysis tasks, the dependent resources, the data transmission conditions and other factors, so that certain differences also exist among different analysis tasks in time consumption for finally generating the analysis result. For example, when there are both analysis tasks in the multianalysis task that are handled by the terminal device itself and analysis tasks that are handled by third-party devices. For the analysis task for which the third-party device is responsible, the time consumption is long in two parts: data network transmission is time consuming and data analysis is time consuming. In practical applications, it is found that in most cases, the time consumed for data network transmission is greater than the time consumed for actual data analysis, and therefore, in practical cases, the time consumed for the analysis task in charge of the third-party device is often greater than the time consumed for the analysis task in charge of the terminal device itself. For the processing model, the total time for performing data analysis is equal to the longest analysis task time, so the existing multi-analysis task parallel data analysis method directly results in longer data analysis time of the processing model and lower efficiency.
Although the accuracy of the final output result can be improved by the multi-analysis task parallel data analysis, in practical application, it is found that, on one hand, each analysis task has a certain difference in assistance for improving the accuracy of the final output result. Under different scenes, the difference can be reflected in the importance of the analysis task, and can also be reflected in the degree of influence of the analysis result generated by the analysis task on the final output result. For analysis tasks which are less helpful or even not helpful for improving the accuracy of the final output result, if the analysis tasks are continuously waited for, the practical significance is small, the waiting time of the tasks is greatly increased, and therefore the waiting value of the analysis tasks is small. On the other hand, for many scenarios, both the accuracy and the real-time performance (i.e., the time consumption of data analysis) of the final output result of the processing model are very important performance indicators. For example, in some real-time human-computer conversation scenes, if the user conversation cannot be responded in time, even if the final response result is very accurate, the meaning is lost at the moment. Therefore, in these scenarios with high real-time requirements, in order to meet the requirements of shortening the waiting time and achieving real-time performance, some analysis tasks with long time consumption and some tasks with weak help for improving the accuracy of the final output result are tasks with low waiting value. Based on the above principle, the embodiment of the present application may preset a policy for evaluating whether an analysis task that has not generated an analysis result is worth waiting. After a plurality of parallel analysis tasks are triggered, when a real analysis result generated by the analysis tasks is obtained each time, the embodiment of the application judges whether the analysis tasks which do not generate the analysis result need to be waited or not by using a preset strategy. If the judgment result is that waiting is not needed, the embodiment of the application can directly perform priority ranking on the real analysis results, and the real analysis result with the highest priority is used as the final output result. Therefore, according to the embodiment of the application, the waiting of some analysis tasks can be selectively abandoned according to the preset strategy, so that the total waiting time of the parallel tasks is reduced, and the data analysis efficiency of the multi-analysis task in data analysis is improved.
Meanwhile, the execution main body of the data analysis method based on the multiple tasks in the embodiment of the application is the terminal device which is provided with the processing model and can realize the operations of triggering the multiple parallel analysis tasks, outputting the analysis result and the like in the embodiment of the application. The specific device type of the terminal device is not limited herein, and needs to be determined according to an actual application scenario, for example, the terminal device may be a mobile terminal, a computer, a server, or other devices.
Fig. 1 shows a flowchart of an implementation of a multitask-based data analysis method according to an embodiment of the present application, which is detailed as follows:
s101, after the data to be processed is obtained, a plurality of parallel analysis tasks are triggered, and the analysis tasks are used for analyzing the data to be processed.
The data content, the data type, and other conditions of the data to be processed need to be determined according to the actual application scenario, which is not limited herein. For example, when the embodiment of the present application is applied to a scene of a human-computer conversation to implement a response to user conversation content, the data to be processed at this time may be the user conversation content, such as "what is the weather today" that the user asks. For example, the embodiment of the application is applied to commodity pushing of a user to realize personalized pushing of favorite commodities of the user, and at the moment, the data to be processed can be personal information of the user, historical consumption records and the like, such as sex, age and historical purchase records of the user in the last half year.
Meanwhile, under different application scenarios, the types and the number of analysis tasks actually required to be used may also have a certain difference, which may be specifically selected or set by a technician according to actual needs, and is not limited herein. For example, in a scene of a man-machine conversation, theoretically, the number of analysis tasks and the accuracy of a final analysis result are in a positive correlation relationship, so that technicians can set different numbers of parallel analysis tasks according to different accuracy requirements. Meanwhile, the analysis principles of the analysis tasks are different, so that the analysis angles which are good at respectively different analysis tasks may have certain differences, for example, some analysis tasks are good at continuous conversation analysis, and some analysis tasks are good at single conversation analysis. Therefore, in order to improve the comprehensiveness of the analysis result and further improve the accuracy of the final output result, a technician can set the actually triggered analysis task type according to the actual scene requirements.
In addition, under different application scenarios, the execution parties of the analysis tasks may have a certain difference, so that the corresponding trigger modes of the analysis tasks and the acquisition operations of the analysis results may also have a certain difference. For example, for the analysis task for which the terminal device itself is responsible, the executing party is the terminal device itself. Correspondingly, the triggering of the analysis task means that the terminal device starts to execute the corresponding analysis task, and the obtaining operation means obtaining an analysis result generated by the terminal device. For some analysis tasks that are handled by third-party devices, the executing party is the third-party device. Correspondingly, the triggering of the analysis task means that the to-be-processed data is sent to the corresponding third-party device to inform the third-party device to analyze the received to-be-processed data, and the obtaining operation means receiving an analysis result returned by the third-party device. Therefore, the embodiment of the present application does not limit the specific analysis task triggering manner, and needs to be determined according to the actual analysis task situation.
On the basis of the above description, when the to-be-processed data is acquired, the embodiment of the application triggers the corresponding multiple parallel analysis tasks, so that each analysis task independently performs data analysis on the to-be-processed data.
S102, a first result generated by a first analysis task is obtained, and whether it is necessary to wait for a second analysis task to generate an analysis result is judged according to a preset strategy, wherein the first analysis task is an analysis task which generates an analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate an analysis result in the plurality of parallel analysis tasks.
In the embodiment of the present application, all the analysis tasks that have generated the analysis results are collectively named as first analysis tasks, and all the analysis tasks that have not generated the analysis results are collectively named as second analysis tasks. The first result is the generated real analysis result (hereinafter referred to as the real result). As can be seen from the above description, in practical applications, there may be a large difference between the waiting values of different analysis tasks. In order to reduce the total waiting time of the analysis tasks and improve the data analysis efficiency, a strategy capable of evaluating whether the analysis tasks which do not generate the analysis results have the waiting value or not is preset in the embodiment of the application. On this basis, when a new real result is obtained each time, the embodiment of the application performs analysis and evaluation on analysis tasks which do not generate an analysis result by using the preset strategy, and determines whether to continue to wait for the analysis tasks to generate the analysis result. The specific analysis method used by the preset strategy is not limited herein, and can be selected or set by a technician.
In some alternative embodiments, a maximum waiting time may be set in order to meet the scenario requirement of high real-time performance. Setting a preset strategy to judge whether the current waiting total time length reaches the longest waiting time length; if so, judging that the analysis task which does not generate the analysis result does not need to wait; if not, the analysis task which does not generate the analysis result is judged to be continuously waited.
In other optional embodiments, a ratio threshold may also be preset, and the preset policy is set to calculate a ratio of the total number of analysis tasks that have generated the analysis result to the total number of triggered analysis tasks, and then determine a size relationship between the ratio and the ratio threshold; if the ratio is smaller than the proportional threshold, continuing to wait for an analysis task which does not generate an analysis result; and if the ratio is larger than or equal to the ratio threshold, judging that the analysis task which does not generate the analysis result does not need to wait.
In some alternative embodiments, it may also be configured to perform an analysis evaluation of the importance of the final output result for each analysis task that does not generate an analysis result. When the importance degree of each analysis task which does not generate the analysis result is lower, judging that the analysis task which does not generate the analysis result does not need to wait; if there is an analysis task that has a high degree of importance and does not generate an analysis result, it is determined to continue waiting for an analysis task that does not generate an analysis result. For example, the result prediction may be performed on the analysis task that does not generate the analysis result to obtain the analysis result that is most likely to be output. And comparing the priority of the predicted analysis result with the priority of the real result, and evaluating whether the final output result is influenced or not so as to judge the importance degree of the analysis tasks which do not generate the analysis result. Alternatively, the degree of importance of each analysis task may be marked in advance, and the degree of importance of each analysis task that does not generate an analysis result may be directly read.
Meanwhile, according to different analysis task executing parties, "obtaining a new real result" in the embodiment of the present application, and executing a preset policy may be divided into two cases:
in case a, for the analysis task executed by the terminal device itself, acquiring a new real result means that the terminal device itself completes the analysis task and generates a new real result.
And b, for the analysis task executed by the third-party equipment, acquiring a new real result, namely, after the third-party equipment generates and sends the new real result to the terminal equipment, receiving the new real result sent by the third-party equipment by the terminal equipment.
S103, if it is judged that the second analysis task does not need to be waited to generate the analysis result according to the preset strategy, the first result is subjected to priority ranking, and the result with the highest priority is used as the output result corresponding to the data to be processed.
When the final judgment result of the preset strategy is an analysis task without waiting for the analysis result which is not generated, the priority ranking of the existing real results can be directly carried out, and the result with the highest priority is used as the final output result corresponding to the data to be processed.
It should be noted that the embodiment of the present application is a method flow executed in a processing model, and it is considered that the prioritization of the analysis results in practical application may be very complex, and particularly in some scenes with strong real-time performance, the priority level itself is changed in real time. For example, in a recommendation scenario for a product to a user, the preference of the user for the product itself changes, and thus the priority level corresponding to each product changes in real time. In order to meet the requirement of prioritization under these scenarios, an independent prioritization model or functional module is often set in practical applications to perform prioritization operations of analysis results. Therefore, the embodiment of the present application does not limit the sorting manner of the analysis results, including but not limited to the following: and the processing model directly performs sequencing during data analysis, or the processing model cooperates with an independent sequencing model or function module, and the processing model outputs a first result to the sequencing model or function module for priority sequencing and returns the first result to the processing model.
Meanwhile, it should be noted that an output object of an output result in the embodiment of the present application needs to be determined according to an actual application situation to meet an actual application requirement, including but not limited to, for example: 1. other functional modules or layers of the process model itself. 2. Other models that cooperate with the process model. 3. Other devices than the terminal device as the execution subject. 4. And directly outputting the data to the user by the terminal equipment, such as voice broadcasting.
Although the accuracy of the final output result can be improved by the multi-analysis task parallel data analysis, in practical application, it is found that, on one hand, each analysis task has a certain difference in assistance for improving the accuracy of the final output result. Under different scenes, the difference can be reflected in the importance of the analysis task, and can also be reflected in the degree of influence of the analysis result generated by the analysis task on the final output result. For analysis tasks which are less helpful or even not helpful for improving the accuracy of the final output result, if the analysis tasks are continuously waited for, the practical significance is small, the waiting time of the tasks is greatly increased, and therefore the waiting value of the analysis tasks is small. On the other hand, for many scenarios, both the accuracy and the real-time performance (i.e., the time consumption of data analysis) of the final output result of the processing model are very important performance indicators. For example, in some real-time human-computer conversation scenes, if the user conversation cannot be responded in time, even if the final response result is very accurate, the meaning is lost at the moment. Therefore, in these scenarios with high real-time requirements, in order to meet the requirements of shortening the waiting time and achieving real-time performance, some analysis tasks with long time consumption and some tasks with weak help for improving the accuracy of the final output result are tasks with low waiting value. Based on the above principle, the embodiment of the present application may preset a policy for evaluating whether an analysis task that has not generated an analysis result is worth waiting. After a plurality of parallel analysis tasks are triggered, when a real analysis result generated by the analysis tasks is obtained each time, the embodiment of the application judges whether the analysis tasks which do not generate the analysis result need to be waited or not by using a preset strategy. If the judgment result is that waiting is not needed, the embodiment of the application can directly perform priority ranking on the real analysis results, and the real analysis result with the highest priority is used as the final output result. Therefore, according to the embodiment of the application, the waiting of some analysis tasks can be selectively abandoned according to the preset strategy, so that the total waiting time of the parallel tasks is reduced, and the data analysis efficiency of the multi-analysis task in data analysis is improved.
As a specific implementation manner of determining a preset policy in the embodiment shown in fig. 1, as shown in fig. 2, in the embodiment of the present application, the method for data analysis based on multiple tasks specifically includes:
s101, after the data to be processed is obtained, a plurality of parallel analysis tasks are triggered, and the analysis tasks are used for analyzing the data to be processed.
Reference may be made to the description of S101 in the embodiment shown in fig. 1, which is not repeated herein.
S201, a first result generated by the first analysis task is obtained, and a second result obtained by predicting the result of the second analysis task is obtained.
For the description of "obtaining the first result generated by the first analysis task", reference may be made to the description of S102 in the embodiment shown in fig. 1, which is not repeated herein. The second result is a predicted analysis result (hereinafter referred to as a predicted result) obtained by predicting an analysis result finally generated by an analysis task that does not generate an analysis result.
In practical situations, the multitask data analysis only selects an analysis result with the highest priority as a final output result, and although there may be many analysis results that may be generated by each analysis task, only a certain analysis result is finally generated to participate in the priority ranking of the final output result. On this basis, in the case where the terminal device has acquired one or more real results, there may be two cases for a single analysis task that does not generate an analysis result:
in case 1, the priority of the analysis result finally generated by the analysis task is higher than all the existing real results, which indicates that the analysis task may influence the final output result.
And 2, the priority of the analysis result finally generated by the analysis task is not higher than all the existing real results, namely, the real results with higher priorities exist, and the analysis task does not influence the final output result at the moment.
When the analysis task belongs to the case 2, it is described that on the basis of the existing real result, no matter whether the analysis result of the analysis task is waited for, the final output result is not affected. Based on the principle, in order to reduce the total time consumed by task waiting, when an analysis task generates a real result each time, the embodiment of the present application performs result prediction on each analysis task that does not generate an analysis result according to a preset strategy, so as to be used as reference data for subsequently determining whether to wait for the analysis task. The method for predicting the result is not limited in the embodiment of the application, and can be selected or set by a technician according to actual needs.
As an optional embodiment of the present application, in order to guarantee the reliability of the prediction result, the result prediction method in the embodiment of the present application includes two optional types:
and the type a is used for carrying out priority ranking on all possible analysis results corresponding to the analysis tasks, and the analysis result with the highest priority is used as a prediction result.
At this time, for a single analysis task, the generated prediction result is the analysis result with the highest priority selected after all the possible analysis results are subjected to priority ranking. The priority ranking rule is the same as the rule for performing final priority ranking on the analysis result, so that the reliability of the prediction result is guaranteed.
And b, analyzing the analysis task, and taking the analysis result which is most possibly generated as a prediction result.
In this case, for a single analysis task, the generated prediction result is the analysis result most likely to be output in the data analysis of the analysis task. The specific analysis method most likely to generate the result is not limited herein, and can be selected or set by the skilled person. For example, in some embodiments, a record of analysis results may be generated from an analysis task history to make an analysis prediction. In other embodiments, the analysis predictions may also be made based on the history of other tasks similar to the analysis task to generate analysis result records.
In the embodiment of the present application, any one of the above-described types of methods may be selected as the actually used result prediction method.
S202, the second result and the first result are subjected to priority ranking to obtain a corresponding ranking result.
After obtaining the prediction results corresponding to all the analysis tasks which do not generate the analysis results, the embodiment of the present application performs priority ordering on the prediction results and all the existing real results together to obtain priority data corresponding to each prediction result and each real result respectively.
Corresponding to two possible situations in S201, there may be two situations between the predicted result and the priority of the existing real result in the embodiment of the present application:
case 1': there are two sub-cases when the predicted result has priority over all the real results, which can be divided into two detailed sub-cases:
a. each predicted outcome is prioritized over all real outcomes. For example, assuming that there are 6 analysis results, the corresponding priorities are as follows from high to low: a predicted result A, a predicted result B, a predicted result C, a real result D, a real result E and a real result F. In this case, it is possible that each analysis task that does not generate an analysis result affects the final output result based on the existing actual result.
b. There is a partial predictor with priority over all real outcomes, while a partial predictor with priority is less than one or more real outcomes. For example, assuming that there are 6 analysis results, the corresponding priorities are as follows from high to low: a predicted result A, a real result D, a predicted result B, a real result E, a real result F and a predicted result C. In this case, for the predicted result with higher priority than all the real results, for example, the predicted result a in the above example, the analysis result finally generated by the corresponding analysis task may affect the final output result. For the predicted results with lower priority than one or more real results, such as the predicted result B and the predicted result C in the above example, because there is a real result with higher priority, the analysis result finally generated by the corresponding analysis task has lower priority, and on the basis of the existing real result, the analysis tasks cannot affect the final output result.
Case 2': the non-prediction result has higher priority than all real results, namely the analysis result with the highest priority in the sequencing results is a real result. Referring to the sub-case b, at this time, for each prediction result, there is a real result with a higher priority, so that the priority of the analysis result finally generated by the analysis task corresponding to each prediction result is not the highest, that is, the final output result is not affected.
In order to cope with the above case 2', as an embodiment of the present application, after obtaining the sorting result at S202, the embodiment of the present application includes:
and S206, if the result with the highest priority in the sequencing results is the first result, judging that the second analysis task does not need to wait for generating the analysis result. And taking the result with the highest priority as the output result corresponding to the data to be processed.
As can be seen from the above description of case 2', when the result with the highest priority in the sorted results is a real result, it is indicated that for all analysis tasks that do not generate an analysis result, the priority of the finally generated analysis result is inevitably lower than the real result with the highest priority, that is, the final output result is not affected. Therefore, in case 2', the embodiment of the present application directly determines that there is no need to wait for an analysis task that does not generate an analysis result. It should be noted that, since the sorting results of all the real results are already obtained in S202, if the embodiment of the present application is combined with the embodiment shown in fig. 1, S103 may not perform secondary priority sorting, but directly take the real result with the highest priority in S202 as the output result of the final data to be processed.
In the embodiment of the application, when the current existing real result and the predicted result obtained by prediction are determined to be ranked together and the result with the highest priority is the real result, the waiting of all analysis tasks which do not generate the analysis result is directly abandoned, and the real result with the highest priority is directly used as the final output result. Compared with the waiting of the full analysis tasks in the prior art, the analysis tasks without influence on the final output result can be quickly determined by the aid of the prediction result and priority sorting screening, a large amount of time consumed for waiting can be saved by giving up the waiting of the analysis results of the analysis tasks, and accordingly efficiency of the processing model in multi-analysis task data analysis is improved.
In order to cope with case 1' described above, as an embodiment of the present application, after obtaining the ranking result at S202, the embodiment of the present application includes:
and S203, if the result with the highest priority in the sequencing results is the second result, screening the target task corresponding to the target result from the third analysis tasks, and adding a preset label to the target task. The third analysis task is an analysis task without a preset label in the second analysis task, and the target result is a result of which the priority in the second result is lower than the priority of at least one first result.
As is clear from the above description of case 1', when the result with the highest priority is the predicted result, it is described that there is an analysis task that may affect the final output result among the analysis tasks that do not generate the analysis result. On the other hand, as can be seen from the above description of the sub-case b in case 1', if the priority of the predicted result is lower than that of one or more real results, it is indicated that some analysis tasks (hereinafter referred to as rejection tasks) exist among the analysis tasks that do not generate the analysis result, and that can directly reject the final output result without any influence. In the embodiment of the application, all analysis tasks which do not generate an analysis result are divided into a abandoning task and a non-abandoning task, and all abandoning tasks are named as a third analysis task in a unified way.
Since there are analysis tasks that may affect the final output result among the analysis tasks that do not generate the analysis result, in theory, the embodiment of the present application needs to continue to wait for the analysis tasks to generate the actual analysis result. However, it can be known from the above analysis that the continuous waiting of the discarding task does not improve the accuracy of the final output result, but increases the total waiting time. Therefore, in order to shorten the waiting time, in the embodiment of the present application, when the sorting result is the case 1', a target task with a predicted result priority lower than one or more real result priorities (the target task is a rejected task to which a preset tag is temporarily not added) is screened from among analysis tasks that do not generate an analysis result, and a preset tag is added to the target tasks at the same time, so as to help the processing model distinguish the rejected task from the non-rejected task, and perform a corresponding waiting operation. The specific data type and adding manner of the preset tag are not limited herein and can be set by a technician.
It should be noted that, if the processing model in the actual operation encounters the sub-case a in the case 1', all the analysis tasks that do not generate the analysis result are non-rejection tasks, so that the operation of "screening the target task corresponding to the target result from the third analysis task" in the corresponding S203 may not screen any target task.
As an optional implementation manner of S203 for screening out a target task from a third analysis task, an embodiment of the present application includes:
and traversing the positions of the second results corresponding to the third analysis tasks in the sequencing result, and screening out the target tasks corresponding to the target results according to the obtained positions.
Or screening the target result from the second result according to the sorting result, and screening the target task corresponding to the target result from the third analysis task.
Specifically, the skilled person can select any one of the ways to perform the screening of the target task, which is not limited herein.
As an optional embodiment of the present application, in order to further shorten the waiting time for the analysis task, on the basis of S203, the terminal device may allocate more processor resources to the non-discarded tasks corresponding to the prediction results with priorities higher than all the real results. Meanwhile, it may be set that the higher the priority is, the more resources are allocated. By allocating more processor resources to the non-abandoned tasks for task processing, the processing efficiency of the non-abandoned tasks can be improved, the waiting time of the non-abandoned tasks is shortened, and the data analysis efficiency is improved.
And S204, if the second analysis task does not comprise the third analysis task, judging that the second analysis task does not need to wait for generating an analysis result.
As can be seen from the above description, all parallel analysis tasks triggered in the embodiment of the present application can be divided into analysis tasks that have generated real results, and reject tasks and non-reject tasks that have not generated analysis results. On the basis of screening rejected tasks and adding preset labels, in the embodiment of the present application, when the sorting result of S202 is the above case 1', it is searched whether non-rejected tasks still exist in all triggered analysis tasks. When the non-rejection task does not exist, that is, it is described that only the analysis task and the rejection task which have generated the real result are left at present, at this time, the embodiment of the present application directly determines that the wait is not needed to be continued, and then the wait for the rejection task is ended.
As an embodiment of the present application, when the third analysis task is still included in the plurality of parallel analysis tasks, it is determined that it is necessary to wait for the second analysis task to generate an analysis result, and at this time, it is only necessary to return to the operation of S201.
S205, the first results are subjected to priority ranking, and the result with the highest priority is used as the output result corresponding to the data to be processed.
After the waiting is finished in S204, the embodiment of the present application performs priority ranking on all the existing real results, and further determines the final output result with the highest priority. For a detailed description of the sorting and outputting principle, reference may be made to the description of S103, which is not repeated herein.
As an alternative embodiment of the present application, it can be seen from the above description that whether the reject task will ultimately generate the analysis result and what analysis result will be generated specifically do not affect the final output result, so that it is not necessary to wait for the reject task to generate the analysis result. However, in the embodiment of the present application, only the rejection task is marked, and the execution of the rejection task itself is not affected, so theoretically, in the process of subsequently waiting for the non-rejection task to generate the analysis result, a real result generated by the rejection task may still be obtained. For the true result of the rejection task, theoretically, whether it participates in the prioritization in S202 and S103, it does not affect the final output result. Therefore, in the embodiment of the present application, the real results prioritized in S202 and S103 may or may not include the real results of the rejection tasks, and may be set by a technician. If the true result does not contain the discarding task, the true results participating in the priority ranking need to be screened, and the true results corresponding to the discarding task are removed.
In the embodiment of the application, when a new real analysis result is generated by an analysis result every time, result prediction is carried out on an analysis task which does not generate the analysis result, then the real result and the prediction result are subjected to the same sequencing, and whether a abandoning task which does not need to wait exists or not and whether a abandoning task which does not need to wait still exists or not are judged according to the sequencing result. For the case that there are non-rejection tasks, the embodiment of the present application adds a preset tag to the non-rejection tasks to perform labeling, and continuously waits for the non-rejection tasks to generate corresponding analysis results. And for the condition that no non-abandoning task exists, directly ending waiting, and taking the result with the highest priority in the real result as the final output result. The embodiment of the application can realize automatic identification of whether the analysis result which is not generated needs to be abandoned or not, and determine the condition of no waiting, thereby greatly reducing the waiting time of the abandoned task and improving the efficiency of data analysis.
Meanwhile, in practical application, it is found that when the processing model performs analysis task setting in many scenarios, some more important core tasks are selected to be executed in the terminal device, so as to ensure the security and stability of data, and some less important analysis tasks are handed over to the third-party device of the partner for processing. Due to problems such as network delay, the analysis tasks with relatively low importance usually take the longest time when the actual processing model waits for the analysis tasks. Practice proves that by analyzing the prediction result and evaluating the influence of the corresponding analysis task on the final output result in the embodiment of the application, the analysis task with lower importance, which is taken charge of by the third-party equipment, can be effectively marked as a abandon task, and the waiting time is greatly reduced.
As can be seen from the description of the embodiment shown in fig. 2, in the embodiment of the present application, the reject task having no influence on the final output result is screened out according to the priority level of the prediction result, and the wait for the analysis result of the reject task is abandoned. However, in the embodiment shown in fig. 2, only the rejection task is marked, and the execution of the rejection task itself is not affected, so theoretically, in the process of subsequently waiting for the non-rejection task to generate the analysis result, the real result generated by the rejection task may still be obtained. Therefore, in step S102 of the embodiment shown in fig. 1, the obtained new real result may be the real result generated by the discarding task.
For the case where the true result generated by the rejection task is acquired in S102. Since the actual results generated at this time (except the actual results of the rejection tasks) and the predicted result corresponding to the non-rejection tasks do not change. Therefore, even if the preset strategy is directly triggered at the moment, and the subsequent operations such as result prediction, sorting and screening and the like are carried out, all non-rejected tasks still need to be continuously waited, and the final output result cannot be influenced. Therefore, in order to save the processor resources of the terminal device, referring to fig. 3, in the embodiment of the present application, the triggering operation on the preset policy in S102 may be replaced with:
s301, if a first result generated by the first analysis task is obtained and the first analysis task generating the first result does not have a preset label, an operation of judging whether to wait for the second analysis task to generate an analysis result according to a preset strategy is executed.
In the embodiment of the application, even if a newly generated real result is obtained, the triggering of the preset strategy is not directly performed, but whether the analysis task generating the new real result is a rejection task with a preset label is judged. Meanwhile, the subsequent preset strategy is triggered to be executed only when the analysis task generating the new real result does not have the preset label, namely the analysis task is not a rejection task, so that the response to the real result generated by the rejection task is avoided, and the processor resource of the terminal equipment is saved.
As can be seen from the above description of the embodiment, the embodiment shown in fig. 2 only marks the discarding task, and does not affect the execution of the discarding task itself. Therefore, theoretically, in the process of subsequently waiting for the non-rejected task to generate the analysis result, the real result generated by the rejected task may still be obtained, so that the embodiment shown in fig. 1 and the embodiment shown in fig. 2 may respond to the real result of the rejected task, thereby causing resource waste of the terminal device. In order to avoid causing resource waste of the terminal device, referring to fig. 4 on the basis of the embodiment shown in fig. 2, after S203, the embodiment of the present application further includes:
s401, sending a termination instruction to the target task, wherein the termination instruction is used for instructing the analysis task to stop analyzing the data to be processed.
In the embodiment of the present invention, after the reject tasks requiring the addition of the preset tag are screened out in S203, a termination instruction is sent to the reject tasks to terminate the reject tasks. In the embodiment of the present application, the execution party of the abandoned task may be the terminal device itself or the task executed by the third-party device, and therefore, correspondingly, the sending object, the sending method, and the like of the termination instruction also need to be determined according to the actual situation of the execution party of the abandoned task, and may be specifically set by a technician according to the actual situation, which is not limited herein.
In the embodiment of the present application, the reject task screened each time can be directly terminated by sending the termination instruction, so that the real result generated by the reject task is no longer obtained in S102, and further in the embodiment shown in fig. 2, the situation of processor resource waste caused by responding to the real result generated by the reject task does not occur, and the processor resource of the terminal device is saved.
As can be seen from the foregoing description of the embodiment, in the embodiment shown in fig. 2, only the reject task is marked, and the execution of the reject task itself is not affected, so that theoretically, in the process of waiting for the non-reject task to generate the analysis result, a real result generated by the reject task may still be obtained. Therefore, when the real results and the predicted results are prioritized in S202, and when the real results are prioritized in S103, there is a possibility that the real results generated by the discarding task exist in the real results. Because the real result generated by the abandoning task does not influence the final output result theoretically, the resource of the processor of the terminal equipment is wasted by carrying out priority sequencing on the real result. In order to avoid the waste of terminal device processor resources, on the basis of the foregoing embodiments of the present application, with reference to fig. 5, the operation of S202 may be replaced with:
s501, the second result and the first result generated by the fourth analysis task are subjected to priority ranking, wherein the fourth analysis task is an analysis task which is not provided with a preset label in the first analysis task.
In the embodiment of the present application, of the analysis tasks that have generated the analysis result, all the analysis tasks that are not reject tasks are collectively named as fourth analysis tasks. Meanwhile, when the priority ranking of the S202 is performed, the embodiment of the present application only ranks the prediction results and the real results generated by the analysis tasks that are not the reject tasks, and obtains the corresponding ranking results, thereby reducing the workload of the priority ranking and saving the processor resources of the terminal device.
Meanwhile, as an alternative embodiment of the present application, on the basis of the above-described respective embodiments of the present application, with reference to fig. 6, the operation on S103 may be replaced with:
s601, performing priority ranking on a first result generated by a fourth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the fourth analysis task is an analysis task which does not have a preset label in the first analysis task.
In the embodiment of the present application, of the analysis tasks that have generated the analysis result, all the analysis tasks that are not reject tasks are collectively named as fourth analysis tasks. In the embodiment of the application, when the priority ranking of S103 is performed, only the real results generated by the analysis tasks that are not the reject tasks are ranked, and the real result with the highest priority is used as the final output result, so that the workload of the priority ranking is reduced, and the processor resource of the terminal device is saved.
Fig. 7 shows a flowchart of an implementation of the multitask-based data analysis method according to an embodiment of the present application, which is detailed as follows:
and S701, after the data to be processed is obtained, triggering at least one first analysis task and at least one second analysis task which are parallel, wherein the first analysis task and the second analysis task are both used for analyzing the data to be processed.
The specific operation details and principles of S701 are substantially the same as those of S101 in the embodiment shown in fig. 1, so that reference may be made to the description of S101, which is not repeated herein.
The difference from S101 is that, in consideration of the actual situation, even if the analysis tasks are parallel, the importance degree and the data analysis time consumption between different analysis tasks are greatly different. Therefore, although the embodiment shown in fig. 1 can realize the recognition of whether to continue waiting and the shortening of the waiting time, each parallel analysis task is treated indiscriminately, on one hand, some important analysis tasks are probably discarded; on the other hand, since the preset strategy is triggered once for processing each time a new real result is obtained, a large amount of workload is directly increased on the terminal device, and especially for some original time-consuming shorter analysis tasks, the actual effect of each preset strategy judgment is small, but a large amount of workload is increased.
In order to reduce the workload on the terminal equipment and simultaneously avoid discarding some more important analysis tasks. In the embodiment of the application, the analysis task is divided into a first analysis task which needs to be waited and a second analysis task which needs to be waited and judged by using a preset strategy in advance. The specific division rule is not limited herein, and can be labeled by a technician according to actual needs. For example, in some embodiments, the technician may distinguish between the importance levels of the analysis tasks in the actual scenario, and the analysis task with the importance level higher than a certain threshold may be labeled as the first analysis task. Meanwhile, the time consumption situation can be analyzed according to the data of each analysis task in the actual situation, so that some analysis tasks with short time consumption can be screened out and marked as the first analysis task.
And S702, if the first results generated by all the first analysis tasks are acquired, acquiring a second result generated by a third analysis task, and judging whether the fourth analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the third analysis task is an analysis task which generates an analysis result in at least one second analysis task, and the fourth analysis task is an analysis task which does not generate an analysis result in at least one second analysis task.
In the embodiment of the present application, in the second analysis task, all the analysis tasks that have generated the analysis result are collectively named as a third analysis task, and all the analysis tasks that have not generated the analysis result are collectively named as a fourth analysis task. The first result is a real analysis result (hereinafter referred to as a real result) generated by the first analysis task. The second result is the real result generated by the second analysis task.
The specific operation details, principles, and the like of S702 are substantially the same as those of S102 in the embodiment shown in fig. 1, so that reference may be made to the description of S102, which is not repeated herein.
The difference from S102 is that, in the embodiment of the present application, the preset policy is not triggered each time a new analysis result is obtained, but the first analysis task is first waited to generate a real result. On the basis that the real results are generated by all the first tasks, the preset strategy is triggered when the analysis result generated by the second analysis task is acquired each time.
And S703, if it is judged according to the preset strategy that the fourth analysis task is not required to be waited for generating an analysis result, performing priority ordering on the first result and the second result, and taking the result with the highest priority as an output result corresponding to the data to be processed.
The specific operation details, principles, and the like of S703 are substantially the same as those of S103 in the embodiment shown in fig. 1, so that reference may be made to the description of S103, which is not repeated herein. The difference from S103 is that in the embodiment of the present application, the real result includes two parts, i.e., the first result and the second result, and therefore, when performing the final priority sorting, the two parts need to be sorted together at the same time to ensure the accuracy of the final output result.
Although the accuracy of the final output result can be improved by the multi-analysis task parallel data analysis, in practical application, it is found that, on one hand, each analysis task has a certain difference in assistance for improving the accuracy of the final output result. Under different scenes, the difference can be reflected in the importance of the analysis task, and can also be reflected in the degree of influence of the analysis result generated by the analysis task on the final output result. For analysis tasks which are less helpful or even not helpful for improving the accuracy of the final output result, if the analysis tasks are continuously waited for, the practical significance is small, the waiting time of the tasks is greatly increased, and therefore the waiting value of the analysis tasks is small. On the other hand, for many scenarios, both the accuracy and the real-time performance (i.e., the time consumption of data analysis) of the final output result of the processing model are very important performance indicators. For example, in some real-time human-computer conversation scenes, if the user conversation cannot be responded in time, even if the final response result is very accurate, the meaning is lost at the moment. Therefore, in these scenarios with high real-time requirements, in order to meet the requirements of shortening the waiting time and achieving real-time performance, some analysis tasks with long time consumption and some tasks with weak help for improving the accuracy of the final output result are tasks with low waiting value.
Based on the above principle, the embodiment of the present application may preset a policy for evaluating whether an analysis task that has not generated an analysis result is worth waiting. Meanwhile, in order to prevent the analysis tasks with higher importance degree from being abandoned and excessive workload from being brought to the terminal device, the analysis tasks are divided into the first analysis task which needs to be waited and the second analysis task which needs to be waited according to the preset strategy. After a plurality of parallel first analysis tasks and second analysis tasks are triggered, when a real analysis result generated by the second analysis task is obtained each time, whether the second analysis task which does not generate the analysis result needs to be waited or not is judged by using a preset strategy according to the embodiment of the application. If the judgment result is that waiting is not needed, the embodiment of the application can directly perform priority ranking on the real analysis results, and the real analysis result with the highest priority is used as the final output result. Therefore, according to the embodiment of the application, the waiting of some analysis tasks can be selectively abandoned according to the preset strategy, so that the total waiting time of the parallel tasks is reduced, and the data analysis efficiency of the multi-analysis task in data analysis is improved.
As a specific implementation manner of determining the preset policy in the embodiment shown in fig. 7, in the embodiment of the present application, the process of determining the preset policy in S702 specifically includes:
and obtaining a third result obtained by predicting the result of the fourth analysis task.
And performing priority ranking on the first result, the second result and the third result to obtain corresponding ranking results.
And if the result with the highest priority in the sequencing results is the first result or the second result, judging that the second analysis task does not need to wait for generating the analysis result.
And if the result with the highest priority in the sequencing results is the third result, screening out the target task corresponding to the target result from the fifth analysis tasks, and adding a preset label to the target task. The fifth analysis task is an analysis task without a preset label in the fourth analysis task, and the target result is a result of which the priority in the third result is lower than the priority of at least one first result or second result. And the third result is a prediction result and is an analysis result with the highest priority in all analysis results corresponding to the fourth analysis task.
And if the plurality of parallel analysis tasks do not comprise the fifth analysis task, judging that the process of waiting for the fourth analysis task to generate the analysis result is not needed.
If the multiple parallel analysis tasks include the fifth analysis task, it is determined that it is necessary to wait for the fourth analysis task to generate an analysis result, and the operation of executing 702 is returned.
The specific operation details, principles, and the like of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 2, so that reference may be made to the description of the embodiment shown in fig. 2, which is not repeated herein.
In the embodiment of the application, on the basis that the first analysis task is completely completed, when a second analysis task has an analysis result to generate a new real analysis result each time, result prediction is performed on the analysis tasks which do not generate the analysis result, then the real result and the prediction result are subjected to the same sequencing, and whether a abandon task which does not need to wait exists or not and whether a non-abandon task still needs to wait are judged according to the sequencing result. For the case that there are non-rejection tasks, the embodiment of the present application adds a preset tag to the non-rejection tasks to perform labeling, and continuously waits for the non-rejection tasks to generate corresponding analysis results. And for the condition that no non-abandoning task exists, directly ending waiting, and taking the result with the highest priority in the real result as the final output result. The embodiment of the application can realize automatic identification of whether the analysis result which is not generated needs to be abandoned or not, and determine the condition of no waiting, thereby greatly reducing the waiting time of the abandoned task and improving the efficiency of data analysis.
Meanwhile, in practical application, it is found that when the processing model performs analysis task setting in many scenarios, some more important core tasks are selected to be executed in the terminal device, so as to ensure the security and stability of data, and some less important analysis tasks are handed over to the third-party device of the partner for processing. Due to problems such as network delay, the analysis tasks with relatively low importance usually take the longest time when the actual processing model waits for the analysis tasks. Practice proves that by analyzing the prediction result and evaluating the influence of the corresponding analysis task on the final output result in the embodiment of the application, the analysis task with lower importance, which is taken charge of by the third-party equipment, can be effectively marked as a abandon task, and the waiting time is greatly reduced.
As an alternative embodiment of the present application, the triggering operation of the preset policy by S702 may be replaced by:
and if a second result generated by the third analysis task is obtained and the third analysis task generating the second result does not carry a preset label, executing the operation of judging whether the fourth analysis task needs to be waited for generating the analysis result according to a preset strategy.
The specific operation details, principles, and the like of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 3, so that reference may be made to the description of the embodiment shown in fig. 3, which is not repeated herein.
In the embodiment of the application, even if a newly generated real result is obtained, the triggering of the preset strategy is not directly performed, but whether the analysis task generating the new real result is a rejection task with a preset label is judged. Meanwhile, the subsequent preset strategy is triggered to be executed only when the analysis task generating the new real result does not have the preset label, namely the analysis task is not a rejection task, so that the response to the real result generated by the rejection task is avoided, and the processor resource of the terminal equipment is saved.
As an optional embodiment of the present application, after the target task corresponding to the target result is screened from the fifth analysis task in the above embodiment, the embodiment of the present application further includes:
and sending a termination instruction to the target task, wherein the termination instruction is used for indicating the target task to stop analyzing the data to be processed.
The specific operation details, principles, and the like of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 4, so that reference may be made to the description of the embodiment shown in fig. 4, which is not repeated herein.
In the embodiment of the present application, the reject task screened each time can be directly terminated by sending the termination instruction, so that the real result generated by the reject task is no longer obtained in S702, and further in the embodiment shown in fig. 7, the situation of processor resource waste caused by responding to the real result generated by the reject task does not occur, and the processor resource of the terminal device is saved.
As an optional embodiment of the present application, in the above embodiment, the operation of prioritizing the first result, the second result, and the third result to obtain corresponding ranking results may be replaced with:
and performing priority ordering on the first result, the third result and a second result generated by a sixth analysis task, wherein the sixth task is an analysis task which is not provided with a preset label in the third analysis task.
The specific operation details, principles, and the like of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 5, so that reference may be made to the description of the embodiment shown in fig. 5, which is not repeated herein.
In the embodiment of the present application, of the analysis tasks that have generated the analysis result, all the analysis tasks that are not reject tasks are collectively named as fourth analysis tasks. Meanwhile, when the priority ranking is performed, only the predicted results and the real results generated by the analysis tasks which are not the abandon tasks are ranked, and the corresponding ranking results are obtained, so that the workload of the priority ranking is reduced, and the processor resources of the terminal equipment are saved.
Meanwhile, as an alternative embodiment of the present application, on the basis of the above embodiments of the present application, the operation on S703 may be replaced with:
and performing priority ranking on the first result and a second result generated by a sixth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the sixth analysis task is an analysis task which is not provided with a preset label in the third analysis task.
The specific operation details, principles, and the like of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 6, so that reference may be made to the description of the embodiment shown in fig. 6, which is not repeated herein.
In the embodiment of the present application, of the analysis tasks that have generated the analysis result, all the analysis tasks that are not reject tasks are collectively named as fourth analysis tasks. In the embodiment of the application, when the priority ranking of S703 is performed, only the real results generated by the analysis tasks that are not the reject tasks are ranked, and the real result with the highest priority is used as the final output result, so that the workload of the priority ranking is reduced, and the processor resources of the terminal device are saved.
As a specific embodiment of the present application, referring to fig. 8, the embodiment shown in fig. 2 is applied to a man-machine natural language dialogue model to realize timely and accurate response to dialogue contents of a user.
In the embodiment of the present application, it is assumed that the data to be processed is a dialog content "how is the weather today? ", including in combination: the method comprises the following steps of three-party language processing 1, three-party language processing 2, question and answer analysis, system skill discovery, hierarchical classifiers, skill search and multi-round discovery of 7 parallel analysis tasks, wherein an output object is a subsequent execution layer in a human-computer natural language dialogue model by using skill discovery based on user dialogue content, and the execution layer controls an output system to respond so as to complete continuous conversation. The three-party Language Processing 1 and the three-party Language Processing 2 are Natural Language Processing (NLP) tasks which are handled by third-party equipment, and the rest of the analysis tasks are tasks which are handled by a human-computer Natural Language dialogue model.
In the embodiment of the present application, the operation of responding to the user dialog content is as follows:
acquiring data to be processed, and triggering parallel three-party language processing 1, three-party language processing 2, question and answer analysis, system skill discovery, a hierarchical classifier, skill search and multiple rounds of discovery.
And waiting for the analysis task to generate a real result or receiving a real result returned by the third-party equipment.
And if a new real result is generated or returned, predicting the result of the non-abandoned task without the preset label in the analysis task which does not generate the analysis result at present to obtain a corresponding prediction result. The result prediction method comprises the following steps: and performing priority ranking on all possible analysis results corresponding to the non-abandoned tasks, and taking the result with the highest priority as a corresponding prediction result.
All real results and predicted results are prioritized.
If the result with the highest priority in the sequencing results is the real result, the real result with the highest priority is directly used as an output result and is output to the execution layer, and the execution layer carries out conversation response according to the output result.
And if the result with the highest priority in the sequencing results is a prediction result, searching for the prediction result with the priority lower than at least one real result, and marking the non-abandoned task corresponding to the searched prediction result as the abandoned task in a mode of adding a preset label.
And judging whether non-rejection tasks without preset labels exist in the analysis tasks without the analysis result generated currently.
If the non-abandon task does not exist, the current real result is subjected to priority ranking, the real result with the highest priority is used as an output result and is output to the execution layer, and the execution layer carries out conversation response according to the output result.
And if the non-abandoned tasks exist, returning to execute the operation of waiting for the analysis task to generate a real result or receiving the real result returned by the third-party equipment.
The specific method of priority ranking is not limited herein, and can be selected or set by a skilled person according to the actual situation. Considering that the situation of the priority ordering of the analysis results is very complex in the man-machine natural language conversation process, a sorting module can be preferably preset, and when the priority ordering is required, the analysis results to be sorted only need to be input into the sorting module. The ranking methods actually utilized include, but are not limited to, various machine Learning rankings, such as Lamdda mart machine Learning rankings and Learning to Rank machine Learning rankings.
In practical application, the method provided by the embodiment of the application can save a large amount of waiting time of analysis tasks. And because the man-machine natural language dialogue model is found in practical application and takes charge of analysis tasks of question-answer analysis, system skill discovery, hierarchical classifier, skill search and multi-round discovery, the speed of generating an analysis result is far faster than the speed of returning the analysis result by a third-party device (the condition of the third-party device is unreliable and has network delay). Meanwhile, the analysis tasks which are responsible for the man-machine natural language dialogue model are higher in priority of generated analysis results (important tasks tend to be handed over to the model in practical application). Therefore, when the embodiment of the application is actually applied to a real man-machine natural language dialogue model, more than 60% of waiting time can be saved, and the efficiency of analyzing the dialogue content of the user by the man-machine natural language dialogue model is greatly improved.
Similarly, the embodiment shown in fig. 7 and other related method embodiments can also be applied to a human-machine natural language dialogue model to realize timely and accurate response to the dialogue content of the user. At this time, only the analysis tasks which need to be waited are distinguished from the analysis tasks which need to be waited according to the preset strategy, and the corresponding distinguishing processing is carried out. For example, question and answer analysis, system skill discovery, hierarchical classifiers, skill search and multiple rounds of discovery can be divided into first analysis tasks which need to be waited, three-party language processing 1 and three-party language processing 2 are divided into second analysis tasks which need to be judged whether to be waited according to a preset strategy, and corresponding processing is performed. For a detailed description of the principle, reference may be made to the embodiment shown in fig. 7, the embodiment shown in fig. 8, and other related method embodiments, which are not described herein again.
Fig. 9 shows a block diagram of a multitask-based data analysis device provided in the embodiment of the present application, corresponding to the methods of the embodiments shown in fig. 1 to fig. 6 and other related embodiments, and only the parts related to the embodiments of the present application are shown for convenience of description. The multitask-based data analysis device illustrated in fig. 9 may be an execution subject of the multitask-based data analysis method provided in the first embodiment.
Referring to fig. 9, the multitask-based data analysis apparatus includes:
the task triggering module 91 is configured to trigger a plurality of parallel analysis tasks when the to-be-processed data is acquired, where the analysis tasks are used to analyze the to-be-processed data.
The waiting judgment module 92 is configured to obtain a first result generated by a first analysis task, and judge whether it is necessary to wait for a second analysis task to generate an analysis result according to a preset policy, where the first analysis task is an analysis task that has generated an analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task that has not generated an analysis result in the plurality of parallel analysis tasks.
And the result determining module 93 is configured to, if it is determined according to the preset policy that it is not necessary to wait for the second analysis task to generate an analysis result, prioritize the first result, and take the result with the highest priority as an output result corresponding to the data to be processed.
Further, the wait determining module 92 includes:
and the judging module is used for judging that the fourth analysis task does not need to wait for the fourth analysis task to generate an analysis result if the fourth analysis task does not contain a fifth analysis task, wherein the fifth analysis task is an analysis task which does not contain a preset label in the fourth analysis task, and the preset label is a label added to the fourth analysis task after the fourth analysis task is subjected to result prediction and when the priority of a prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result.
Further, the wait determining module 92 includes:
and the result prediction module is used for acquiring a second result obtained by predicting the result of the second analysis task.
And the sequencing module is used for carrying out priority sequencing on the second result and the first result to obtain a corresponding sequencing result.
And the judging module is used for judging that the second analysis task does not need to wait for generating the analysis result if the result with the highest priority in the sequencing results is the first result.
Further, in the result prediction module, the prediction result is an analysis result with the highest priority among all analysis results corresponding to the second analysis task.
Further, the wait determining module 92 includes:
and the waiting judgment sub-module is used for executing the operation of judging whether the second analysis task needs to wait for generating the analysis result according to a preset strategy if the first result generated by the first analysis task is obtained and the first analysis task generating the first result does not have a preset label.
Further, the wait determining module 92 further includes:
and the termination module is used for sending a termination instruction to the second analysis task if the priority of the prediction result corresponding to the second analysis task is lower than the priority of at least one first result, wherein the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
Further, the ranking module includes:
and the sequencing submodule is used for carrying out priority sequencing on the second result and the first result generated by the fourth analysis task, wherein the fourth analysis task is an analysis task which does not have a preset label in the first analysis task.
Further, the result determining module 93 includes:
and the result determining submodule is used for carrying out priority sequencing on a first result generated by a fourth analysis task and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the fourth analysis task is an analysis task which does not have a preset label in the first analysis task.
The process of implementing each function by each module in the multitask-based data analysis device provided in the embodiment of the present application may specifically refer to the description of the embodiments shown in fig. 1 to 6 and other related embodiments, and will not be described herein again.
Fig. 10 shows a block diagram of a multitask-based data analysis device provided in the embodiment of the present application, corresponding to the method of the embodiment shown in fig. 7 and other related embodiments, and only the parts related to the embodiment of the present application are shown for convenience of description. The multitask-based data analysis device illustrated in fig. 10 may be an execution subject of the multitask-based data analysis method provided in the first embodiment.
Referring to fig. 10, the multitask-based data analysis device includes:
the task triggering module 1001 is configured to trigger at least one first analysis task and at least one second analysis task that are parallel to each other when the data to be processed is acquired, where the first analysis task and the second analysis task are both used to analyze the data to be processed.
The waiting determination module 1002 is configured to, if the first results generated by all the first analysis tasks are obtained, obtain a second result generated by a third analysis task, and determine whether it is necessary to wait for the fourth analysis task to generate an analysis result according to a preset policy, where the third analysis task is an analysis task that has generated an analysis result in at least one second analysis task, and the fourth analysis task is an analysis task that has not generated an analysis result in at least one second analysis task.
The result determining module 1003 is configured to, if it is determined according to the preset policy that it is not necessary to wait for the fourth analysis task to generate an analysis result, perform priority ordering on the first result and the second result, and use a result with a highest priority as an output result corresponding to the data to be processed.
Further, the wait determining module 1002 includes:
and the marking module is used for judging that the fourth analysis task does not need to wait for the fourth analysis task to generate an analysis result if the fourth analysis task does not contain a fifth analysis task, wherein the fifth analysis task is an analysis task which does not contain a preset label in the fourth analysis task, and the preset label is a label added to the fourth analysis task after the fourth analysis task is subjected to result prediction and when the priority of a prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result.
Further, the wait determining module 1002 includes:
and the result prediction module is used for obtaining a third result obtained by predicting the result of the fourth analysis task.
And the sequencing module is used for carrying out priority sequencing on the first result, the second result and the third result to obtain corresponding sequencing results.
And the judging module is used for judging that the second analysis task is not required to wait for generating the analysis result if the result with the highest priority in the sequencing results is the first result or the second result.
Further, in the result prediction module, the prediction result is an analysis result with the highest priority among all analysis results corresponding to the fourth analysis task.
Further, the wait determining module 1002 includes:
and the waiting judgment sub-module is used for executing the operation of judging whether the fourth analysis task needs to be waited for generating the analysis result according to a preset strategy if a second result generated by the third analysis task is obtained and the third analysis task generating the second result does not have a preset label.
Further, the wait determining module 1002 further includes:
and a termination module, configured to send a termination instruction to the fourth analysis task if the priority of the prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result and the second result, where the termination instruction is used to instruct the analysis task to stop analyzing the to-be-processed data.
Further, the ranking module includes:
and the sequencing submodule is used for carrying out priority sequencing on the first result, the third result and a second result generated by a sixth analysis task, wherein the sixth task is an analysis task which is not provided with a preset label in the third analysis task.
Further, the result determining module 1003 includes:
and the result determining submodule is used for carrying out priority ranking on the first result and a second result generated by a sixth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the sixth task is an analysis task which is not provided with a preset label in the third analysis task.
The process of implementing each function by each module in the multitask-based data analysis device provided in the embodiment of the present application may specifically refer to the description of the embodiment shown in fig. 7 and other related method embodiments, and is not described herein again.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-mentioned division of the functional units and modules is illustrated, and in practical applications, the above-mentioned function distribution may be performed by different functional units and modules according to needs, that is, the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-mentioned functions. Each functional unit and module in the embodiments may be integrated in one processing unit, or each unit may exist alone physically, or two or more units are integrated in one unit, and the integrated unit may be implemented in a form of hardware, or in a form of software functional unit. In addition, specific names of the functional units and modules are only for convenience of distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working processes of the units and modules in the system may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
It should be understood that, the sequence numbers of the steps in the foregoing embodiments do not imply an execution sequence, and the execution sequence of each process should be determined by its function and inherent logic, and should not constitute any limitation to the implementation process of the embodiments of the present application.
It will be understood that the terms "comprises" and/or "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It should also be understood that the term "and/or" as used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.
As used in this specification and the appended claims, the term "if" may be interpreted contextually as "when", "upon" or "in response to" determining "or" in response to detecting ". Similarly, the phrase "if it is determined" or "if a [ described condition or event ] is detected" may be interpreted contextually to mean "upon determining" or "in response to determining" or "upon detecting [ described condition or event ]" or "in response to detecting [ described condition or event ]".
Furthermore, in the description of the present application and the appended claims, the terms "first," "second," "third," and the like are used for distinguishing between descriptions and not necessarily for describing or implying relative importance. It will also be understood that, although the terms first, second, etc. may be used herein to describe various elements in some embodiments of the application, these elements should not be limited by these terms. These terms are only used to distinguish one element from another. For example, a first analysis task may be named a second analysis task, and similarly, a second analysis task may be named a first analysis task, without departing from the scope of the various described embodiments. The first and second analysis tasks are both analysis tasks, but they are not the same analysis task.
Reference throughout this specification to "one embodiment" or "some embodiments," or the like, means that a particular feature, structure, or characteristic described in connection with the embodiment is included in one or more embodiments of the present application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," or the like, in various places throughout this specification are not necessarily all referring to the same embodiment, but rather "one or more but not all embodiments" unless specifically stated otherwise. The terms "comprising," "including," "having," and variations thereof mean "including, but not limited to," unless expressly specified otherwise.
The multitask-based data analysis method provided by the embodiment of the application can be applied to terminal devices such as a mobile phone, a tablet computer, a wearable device, a vehicle-mounted device, an Augmented Reality (AR)/Virtual Reality (VR) device, a notebook computer, a super-mobile personal computer (UMPC), a netbook, and a Personal Digital Assistant (PDA), and the embodiment of the application does not limit the specific types of the terminal devices.
For example, the terminal device may be a Station (ST) in a WLAN, which may be a cellular phone, a cordless phone, a Session Initiation Protocol (SIP) phone, a Wireless Local Loop (WLL) station, a Personal Digital Assistant (PDA) device, a handheld device with Wireless communication capability, a computing device or other processing device connected to a Wireless modem, a vehicle-mounted device, a vehicle-mounted networking terminal, a computer, a laptop, a handheld communication device, a handheld computing device, a satellite Wireless device, a Wireless modem card, a television set-top box (STB), a Customer Premises Equipment (CPE), and/or other devices for communicating over a Wireless system and a next generation communication system, such as a Mobile terminal in a 5G Network or a Public Land Mobile Network (future evolved, PLMN) mobile terminals in the network, etc.
By way of example and not limitation, when the terminal device is a wearable device, the wearable device may also be a generic term for intelligently designing daily wearing by applying wearable technology, developing wearable devices, such as glasses, gloves, watches, clothing, shoes, and the like. A wearable device is a portable device that is worn directly on the body or integrated into the clothing or accessories of the user. The wearable device is not only a hardware device, but also realizes powerful functions through software support, data interaction and cloud interaction. The generalized wearable intelligent device has the advantages that the generalized wearable intelligent device is complete in function and large in size, can realize complete or partial functions without depending on a smart phone, such as a smart watch or smart glasses, and only is concentrated on a certain application function, and needs to be matched with other devices such as the smart phone for use, such as various smart bracelets for monitoring physical signs, smart jewelry and the like.
Fig. 11 is a schematic structural diagram of a terminal device according to an embodiment of the present application. As shown in fig. 11, the terminal device 11 of this embodiment includes: at least one processor 110 (only one shown in fig. 11), a memory 111, said memory 111 having stored therein a computer program 112 executable on said processor 110. The processor 110, when executing the computer program 112, implements the steps in the above-described embodiments of the multitask-based data analysis method, such as steps 101 to 103 shown in fig. 1 or steps 1101 to 1103 shown in fig. 11. Alternatively, the processor 110, when executing the computer program 112, implements the functions of each module/unit in each device embodiment described above, such as the functions of the modules 61 to 63 shown in fig. 9 or the modules 1001 to 1003 shown in fig. 10.
The terminal device 11 may be a desktop computer, a notebook, a palm computer, a cloud server, or other computing devices. The terminal device may include, but is not limited to, a processor 110, a memory 111. Those skilled in the art will appreciate that fig. 11 is merely an example of a terminal device 11 and does not constitute a limitation of the terminal device 11 and may include more or less components than those shown, or some components may be combined, or different components, for example, the terminal device may further include an input transmitting device, a network access device, a bus, etc.
The Processor 110 may be a Central Processing Unit (CPU), other general purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf Programmable Gate Array (FPGA) or other Programmable logic device, discrete Gate or transistor logic, discrete hardware components, etc. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The storage 111 may in some embodiments be an internal storage unit of the terminal device 11, such as a hard disk or a memory of the terminal device 11. The memory 111 may also be an external storage device of the terminal device 11, such as a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), and the like, which are provided on the terminal device 11. Further, the memory 111 may also include both an internal storage unit and an external storage device of the terminal device 11. The memory 111 is used for storing an operating system, an application program, a BootLoader (BootLoader), data, and other programs, such as program codes of the computer programs. The memory 111 may also be used to temporarily store data that has been transmitted or is to be transmitted.
In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit. The integrated unit can be realized in a form of hardware, and can also be realized in a form of a software functional unit.
The embodiments of the present application further provide a computer-readable storage medium, where a computer program is stored, and when the computer program is executed by a processor, the computer program implements the steps in the above-mentioned method embodiments.
The embodiments of the present application provide a computer program product, which when running on a mobile terminal, enables the mobile terminal to implement the steps in the above method embodiments when executed.
The integrated modules/units, if implemented in the form of software functional units and sold or used as separate products, may be stored in a computer readable storage medium. Based on such understanding, all or part of the flow in the method of the embodiments described above can be realized by a computer program, which can be stored in a computer-readable storage medium and can realize the steps of the embodiments of the methods described above when the computer program is executed by a processor. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like.
In the above embodiments, the descriptions of the respective embodiments have respective emphasis, and reference may be made to the related descriptions of other embodiments for parts that are not described or illustrated in a certain embodiment.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present application.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
The above-mentioned embodiments are only used for illustrating the technical solutions of the present application, and not for limiting the same; although the present application has been described in detail with reference to the foregoing embodiments, it should be understood by those of ordinary skill in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some technical features may be equivalently replaced; such modifications and substitutions do not substantially depart from the spirit and scope of the embodiments of the present application, and are intended to be included within the scope of the present application.

Claims (18)

1. A multitask-based data analysis method, comprising:
after data to be processed is obtained, triggering a plurality of parallel analysis tasks, wherein the analysis tasks are used for analyzing the data to be processed;
acquiring a first result generated by a first analysis task, and judging whether a second analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the first analysis task is an analysis task which generates an analysis result in the plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate an analysis result in the plurality of parallel analysis tasks;
and if the fact that the second analysis task does not need to wait for generating an analysis result is judged according to a preset strategy, the first result is subjected to priority ranking, and the result with the highest priority is used as the output result corresponding to the data to be processed.
2. The multitask-based data analysis method according to claim 1, wherein the process of determining whether the second analysis task needs to wait for generating an analysis result according to a preset policy includes:
and if the second analysis task does not contain a third analysis task, determining that the second analysis task does not need to wait for the second analysis task to generate an analysis result, wherein the third analysis task is an analysis task which does not have a preset label in the second analysis task, and the preset label is a label added to the second analysis task after the second analysis task is subjected to result prediction and when the priority of a prediction result corresponding to the second analysis task is lower than the priority of at least one first result.
3. The multitask-based data analysis method according to claim 1 or 2, wherein the process of determining whether the second analysis task needs to be waited for generating the analysis result according to a preset policy includes:
obtaining a second result obtained by predicting the result of the second analysis task;
performing priority ranking on the second result and the first result to obtain a corresponding ranking result;
and if the result with the highest priority in the sequencing results is the first result, judging that the second analysis task does not need to wait for generating an analysis result.
4. The multitask-based data analysis method according to claim 2, wherein the predicted result is an analysis result having a highest priority among all analysis results corresponding to the second analysis task.
5. The multitask-based data analysis method according to claim 2, wherein the obtaining a first result generated by a first analysis task and judging whether it is necessary to wait for a second analysis task to generate an analysis result according to a preset policy comprises:
and if the first result generated by the first analysis task is acquired and the first analysis task generating the first result does not carry the preset label, executing the operation of judging whether to wait for a second analysis task to generate an analysis result according to a preset strategy.
6. The multitask-based data analysis method according to claim 2, further comprising:
and if the priority of the predicted result corresponding to the second analysis task is lower than the priority of at least one first result, sending a termination instruction to the second analysis task, wherein the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
7. The multitask-based data analysis method according to claim 2 or 6, wherein the prioritizing the second results and the first results comprises:
and performing priority ordering on the second result and the first result generated by a fourth analysis task, wherein the fourth analysis task is an analysis task which does not have the preset label in the first analysis task.
8. The multitask-based data analysis method according to any one of claims 2, 4, 5 and 7, wherein the prioritizing the first results and using the highest priority result as the output result corresponding to the data to be processed includes:
and performing priority ranking on the first results generated by a fourth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the fourth analysis task is an analysis task which does not have the preset label in the first analysis task.
9. A multitask-based data analysis method, comprising:
after data to be processed is obtained, triggering at least one first analysis task and at least one second analysis task which are parallel, wherein the first analysis task and the second analysis task are both used for analyzing the data to be processed;
if first results generated by all the first analysis tasks are acquired, acquiring second results generated by a third analysis task, and judging whether the fourth analysis task is required to be waited to generate an analysis result according to a preset strategy, wherein the third analysis task is an analysis task which generates an analysis result in the at least one second analysis task, and the fourth analysis task is an analysis task which does not generate an analysis result in the at least one second analysis task;
and if the fact that the fourth analysis task does not need to be waited for generating an analysis result is judged according to a preset strategy, the first result and the second result are subjected to priority ranking, and the result with the highest priority is used as the output result corresponding to the data to be processed.
10. The multitask-based data analysis method according to claim 9, wherein the step of determining whether the fourth analysis task needs to be waited for generating an analysis result according to a preset policy includes:
if the fourth analysis task does not contain a fifth analysis task, determining that it is not necessary to wait for the fourth analysis task to generate an analysis result, wherein the fifth analysis task is an analysis task that does not have a preset tag in the fourth analysis task, and the preset tag is a tag added to the fourth analysis task after the fourth analysis task is subjected to result prediction and when the priority of a prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result.
11. The multitask-based data analysis method according to claim 9 or 10, wherein the process of determining whether it is necessary to wait for the fourth analysis task to generate an analysis result according to a preset policy includes:
obtaining a third result obtained by predicting the result of the fourth analysis task;
performing priority ranking on the first result, the second result and the third result to obtain corresponding ranking results;
and if the result with the highest priority in the sequencing results is the first result or the second result, judging that the second analysis task does not need to wait for generating an analysis result.
12. The multitask-based data analysis method according to claim 10, wherein the predicted result is an analysis result having a highest priority among all analysis results corresponding to the fourth analysis task.
13. The multitask-based data analysis method according to claim 10, wherein the step of obtaining a second result generated by a third analysis task and judging whether it is necessary to wait for a fourth analysis task to generate an analysis result according to a preset policy comprises:
and if the second result generated by the third analysis task is acquired and the third analysis task generating the second result is not provided with the preset label, executing the operation of judging whether to wait for the fourth analysis task to generate an analysis result according to a preset strategy.
14. The multitask-based data analysis method of claim 10, further comprising:
and if the priority of the prediction result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result, sending a termination instruction to the fourth analysis task, wherein the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
15. The multitask-based data analysis method of claim 10 or 14, wherein the prioritizing the first result, the second result, and the third result comprises:
and performing priority ordering on the first result, the third result and the second result generated by a sixth analysis task, wherein the sixth analysis task is an analysis task which does not have the preset label in the third analysis task.
16. The multitask-based data analysis method according to any one of claims 10, 12, 13 and 15, wherein the prioritizing the first result and the second result and using the highest priority result as the output result corresponding to the data to be processed includes:
and performing priority ranking on the first result and the second result generated by a sixth analysis task, and taking the result with the highest priority as an output result corresponding to the data to be processed, wherein the sixth task is an analysis task which does not have the preset label in the third analysis task.
17. A terminal device, characterized in that the terminal device comprises a memory, a processor, a computer program being stored on the memory and being executable on the processor, the processor implementing the steps of the method according to any of claims 1 to 16 when executing the computer program.
18. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 16.
CN201911384716.5A 2019-12-28 2019-12-28 Data analysis method and device based on multitasking and terminal equipment Active CN113051069B (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN201911384716.5A CN113051069B (en) 2019-12-28 2019-12-28 Data analysis method and device based on multitasking and terminal equipment
PCT/CN2020/125221 WO2021129143A1 (en) 2019-12-28 2020-10-30 Multitask-based data analysis method, device and terminal equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911384716.5A CN113051069B (en) 2019-12-28 2019-12-28 Data analysis method and device based on multitasking and terminal equipment

Publications (2)

Publication Number Publication Date
CN113051069A true CN113051069A (en) 2021-06-29
CN113051069B CN113051069B (en) 2023-12-08

Family

ID=76507885

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911384716.5A Active CN113051069B (en) 2019-12-28 2019-12-28 Data analysis method and device based on multitasking and terminal equipment

Country Status (2)

Country Link
CN (1) CN113051069B (en)
WO (1) WO2021129143A1 (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172424A1 (en) * 2007-12-31 2009-07-02 Qiong Cai Thread migration to improve power efficiency in a parallel processing environment
US20100004930A1 (en) * 2008-07-02 2010-01-07 Brian Strope Speech Recognition with Parallel Recognition Tasks
CN103019651A (en) * 2012-08-02 2013-04-03 青岛海信传媒网络技术有限公司 Parallel processing method and device for complex tasks
CN103365708A (en) * 2012-04-06 2013-10-23 阿里巴巴集团控股有限公司 Method and device for scheduling tasks
CN109190757A (en) * 2018-08-07 2019-01-11 百度在线网络技术(北京)有限公司 Task processing method, device, equipment and computer readable storage medium
CN110532782A (en) * 2019-07-30 2019-12-03 平安科技(深圳)有限公司 A kind of detection method of task execution program, device and storage medium
CN110619464A (en) * 2019-09-12 2019-12-27 阿里巴巴集团控股有限公司 Data analysis method and device

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103914373B (en) * 2012-12-31 2018-11-23 百度在线网络技术(北京)有限公司 A kind of method and apparatus for priority corresponding to determining module characteristic information
US20160140438A1 (en) * 2014-11-13 2016-05-19 Nec Laboratories America, Inc. Hyper-class Augmented and Regularized Deep Learning for Fine-grained Image Classification
CN109146076A (en) * 2018-08-13 2019-01-04 东软集团股份有限公司 model generating method and device, data processing method and device
CN109886415A (en) * 2019-01-07 2019-06-14 鲁班嫡系机器人(深圳)有限公司 Data processing method, device, computer equipment and storage medium

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090172424A1 (en) * 2007-12-31 2009-07-02 Qiong Cai Thread migration to improve power efficiency in a parallel processing environment
US20100004930A1 (en) * 2008-07-02 2010-01-07 Brian Strope Speech Recognition with Parallel Recognition Tasks
CN102138175A (en) * 2008-07-02 2011-07-27 谷歌公司 Speech recognition with parallel recognition tasks
CN103365708A (en) * 2012-04-06 2013-10-23 阿里巴巴集团控股有限公司 Method and device for scheduling tasks
CN103019651A (en) * 2012-08-02 2013-04-03 青岛海信传媒网络技术有限公司 Parallel processing method and device for complex tasks
CN109190757A (en) * 2018-08-07 2019-01-11 百度在线网络技术(北京)有限公司 Task processing method, device, equipment and computer readable storage medium
CN110532782A (en) * 2019-07-30 2019-12-03 平安科技(深圳)有限公司 A kind of detection method of task execution program, device and storage medium
CN110619464A (en) * 2019-09-12 2019-12-27 阿里巴巴集团控股有限公司 Data analysis method and device

Also Published As

Publication number Publication date
WO2021129143A1 (en) 2021-07-01
CN113051069B (en) 2023-12-08

Similar Documents

Publication Publication Date Title
CN111221643B (en) Task processing method and task processing device
CN110781180B (en) Data screening method and data screening device
CN110597965B (en) Emotion polarity analysis method and device for article, electronic equipment and storage medium
CN114145006A (en) Scheduling method and device of artificial intelligence resources, storage medium and chip
CN112309384B (en) Voice recognition method, device, electronic equipment and medium
CN109829098A (en) Search result optimization method, device and server
CN115114439A (en) Method and device for multi-task model reasoning and multi-task information processing
WO2021185113A1 (en) Data analysis method based on multiple analysis tasks and electronic device
CN114360027A (en) Training method and device for feature extraction network and electronic equipment
CN107870921B (en) Log data processing method and device
CN116456496B (en) Resource scheduling method, storage medium and electronic equipment
CN113051069B (en) Data analysis method and device based on multitasking and terminal equipment
CN112559078A (en) Method and system for hierarchically unloading tasks of mobile edge computing server
CN115454620A (en) Load prediction method, load prediction device, electronic device, and storage medium
CN110909797B (en) Image detection method and device, equipment and storage medium
CN116112366A (en) Data processing method and device, equipment and storage medium
CN114626501A (en) Data processing method and device, electronic equipment and storage medium
CN117707797B (en) Task scheduling method and device based on distributed cloud platform and related equipment
CN115375208B (en) Camera data analysis method and device, electronic equipment and storage medium
CN109920417B (en) Voice processing method, device, equipment and storage medium
Chakraborty et al. Multi-criterial Offloading Decision Making in Green Mobile Cloud Computing
CN112579865B (en) Price adjustment method and device for search keywords, storage medium and electronic equipment
CN109144678B (en) Processing method, device and storage medium for application association start
CN116976343A (en) Label generation method, device, computer equipment and storage medium
CN115794346A (en) Virtual object interaction method and device, electronic equipment and storage medium

Legal Events

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