CN113051069B - Data analysis method and device based on multitasking and terminal equipment - Google Patents
Data analysis method and device based on multitasking and terminal equipment Download PDFInfo
- Publication number
- CN113051069B CN113051069B CN201911384716.5A CN201911384716A CN113051069B CN 113051069 B CN113051069 B CN 113051069B CN 201911384716 A CN201911384716 A CN 201911384716A CN 113051069 B CN113051069 B CN 113051069B
- 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.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 92
- 238000007405 data analysis Methods 0.000 title claims abstract description 85
- 238000004458 analytical method Methods 0.000 claims abstract description 894
- 238000012163 sequencing technique Methods 0.000 claims description 33
- 238000004590 computer program Methods 0.000 claims description 21
- 238000012545 processing Methods 0.000 abstract description 43
- 238000013473 artificial intelligence Methods 0.000 abstract description 4
- 230000008569 process Effects 0.000 description 23
- 230000004044 response Effects 0.000 description 12
- 238000012216 screening Methods 0.000 description 12
- 230000006870 function Effects 0.000 description 10
- 230000001960 triggered effect Effects 0.000 description 9
- 238000012913 prioritisation Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 239000002699 waste material Substances 0.000 description 5
- 230000005540 biological transmission Effects 0.000 description 4
- 238000004891 communication Methods 0.000 description 3
- 238000001514 detection method Methods 0.000 description 3
- 238000011156 evaluation Methods 0.000 description 3
- 238000010801 machine learning Methods 0.000 description 3
- 238000003058 natural language processing Methods 0.000 description 3
- 238000004904 shortening Methods 0.000 description 3
- 230000003190 augmentative effect Effects 0.000 description 2
- 230000001419 dependent effect Effects 0.000 description 2
- 238000013461 design Methods 0.000 description 2
- 230000000694 effects Effects 0.000 description 2
- 230000003993 interaction Effects 0.000 description 2
- 238000003491 array Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 239000011521 glass Substances 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 238000012544 monitoring process Methods 0.000 description 1
- 230000006855 networking Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004984 smart glass Substances 0.000 description 1
- 238000000638 solvent extraction Methods 0.000 description 1
- 238000006467 substitution reaction Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
- G06F9/5005—Allocation of resources, e.g. of the central processing unit [CPU] to service a request
- G06F9/5027—Allocation 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/5038—Allocation 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements 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/46—Multiprogramming arrangements
- G06F9/50—Allocation of resources, e.g. of the central processing unit [CPU]
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Management, Administration, Business Operations System, And Electronic Commerce (AREA)
- Debugging And Monitoring (AREA)
Abstract
The application provides a data analysis method, a device and a terminal device based on multitasking, which are applicable to the technical field of artificial intelligence, and the method comprises the following steps: after the data to be processed are acquired, triggering a plurality of parallel analysis tasks; 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 the analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate the 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 the analysis result is judged according to the preset strategy, the first result with the highest priority is used as an output result corresponding to the data to be processed. The embodiment of the application reduces the total waiting time of parallel tasks and improves the efficiency of the processing model in the artificial intelligence field when using multiple parallel analysis tasks to perform data analysis.
Description
Technical Field
The application belongs to the technical field of artificial intelligence, and particularly relates to a data analysis method and device based on multitasking and terminal equipment.
Background
When the existing processing model performs data analysis and result output, in order to improve the accuracy of output results, a plurality of parallel analysis tasks are often started, each analysis task independently analyzes data to be processed and obtains corresponding analysis results, then the processing model comprehensively analyzes all the analysis results, and one of the optimal results 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 directly caused to have larger difference due to the difference of the analysis principle, the dependent resources, the data transmission condition and other factors of each analysis task, so that the time consumption of the data analysis of the processing model is longer and the efficiency is lower.
Disclosure of Invention
In view of the above, the embodiment of the application provides a data analysis method, a device and a terminal device based on multitasking, which can solve the problems of long time consumption and low efficiency when a processing model performs multitasking data analysis in the artificial intelligence field.
A first aspect of an embodiment of the present application provides a data analysis method based on multiplexing, including:
After the data to be processed are acquired, 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 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 the analysis result in the plurality of parallel analysis tasks, and the second analysis task is an analysis task which does not generate the 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 the 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 an output result corresponding to the data to be processed.
The embodiment of the application can preset a strategy for evaluating whether the analysis task which does not generate the analysis result is worth waiting or not. After triggering a plurality of parallel analysis tasks, judging whether the analysis tasks which do not generate the analysis results need to be waited or not by using a preset strategy every time the real analysis results generated by the analysis tasks are acquired. If the judgment result is that waiting is not needed, the embodiment of the application directly ranks the priorities of the real analysis results, and takes the real analysis result with the highest priority 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 tasks in data analysis is improved.
In a first possible implementation manner of the first aspect, the determining, by the preset policy, whether to wait for the process of generating the analysis result by the second analysis task includes:
if the second analysis task does not include a third analysis task, determining that the second analysis task does not need to wait for generating an analysis result, wherein the third analysis task is an analysis task which is not provided with a preset label in the second analysis task, and after the result of the second analysis task is predicted by the preset label, when the priority of a predicted result corresponding to the second analysis task is lower than the priority of at least one first result, adding the label to the second analysis task.
The embodiment of the application can realize the automatic identification of whether the non-generated analysis result needs to be discarded or not, and determine the condition of no need of waiting, thereby greatly reducing the waiting time of the discarding 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 to wait for the process of generating the analysis result by the second analysis task includes:
obtaining a second result obtained by carrying out result prediction on the second analysis task;
Priority ranking is carried out on the second result and the first result, and a corresponding ranking result is obtained;
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 residual analysis task can be directly ended, and the waiting time is greatly shortened.
In a third possible implementation manner of the first aspect, the prediction result and the second result are all 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 accuracy and reliability of screening the abandoned task can be ensured.
In a fourth possible implementation manner of the first aspect, on the basis of the first possible implementation manner of the first aspect, the obtaining a first result generated by the first analysis task, and determining, according to a preset policy, whether to wait for the second analysis task to generate the analysis result includes:
If the first result generated by the first analysis task is obtained and the first analysis task generating the first result does not have the preset label, executing the operation of judging whether to wait for the second analysis task to generate the analysis result according to a preset strategy.
The embodiment of the application can reduce the occupation of the processor resource of the terminal equipment by responding to the non-discarding task and triggering the preset strategy.
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 termination instruction is sent to the selected discarding task, so that the discarding task does not return any analysis result, further the terminal equipment does not need to process the analysis result corresponding to the discarding task, and the occupation of the processor resource of the terminal equipment can be reduced.
In a sixth possible implementation manner of the first aspect, on the basis of the foregoing various possible implementation manners of the first aspect, the prioritizing the second result and the first result includes:
and prioritizing 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, the predicted result and the real result generated by the non-discarding task are only subjected to priority ranking, so that the occupation of the terminal equipment processor resource can be reduced.
In a seventh possible implementation manner of the first aspect, on the basis of the foregoing various possible implementation manners of the first aspect, the prioritizing the first result and taking a result with a highest priority as an output result corresponding to the data to be processed includes:
and sequencing 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 is not provided with the preset label in the first analysis task.
In the embodiment of the application, the real results generated by the non-discarding task are only subjected to priority ranking, 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 multiplexing, including:
after the data to be processed is acquired, 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 used for analyzing the data to be processed;
if all the first results generated by the first analysis tasks are obtained, second results generated by a third analysis task are obtained, and whether the analysis results generated by a fourth analysis task need to be waited is judged according to a preset strategy, wherein the third analysis task is an analysis task which has generated the analysis results in the at least one second analysis task, and the fourth analysis task is an analysis task which has not generated the analysis results in the at least one second analysis task;
and if the fourth analysis task does not need to wait for generating an analysis result according to a preset strategy, carrying out 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 embodiment of the application can preset a strategy for evaluating whether the analysis task which does not generate the analysis result is worth waiting or not. Meanwhile, in order to prevent the analysis tasks with higher importance from being abandoned and bring excessive workload to the terminal equipment, the embodiment of the application divides the analysis tasks into a first analysis task which needs to be waited and a second analysis task which needs to judge whether to wait according to a preset strategy. After triggering a plurality of parallel first analysis tasks and second analysis tasks, when obtaining real analysis results generated by the second analysis tasks each time, the embodiment of the application uses a preset strategy to judge whether the second analysis tasks which do not generate analysis results need to be waited. If the judgment result is that waiting is not needed, the embodiment of the application directly ranks the priorities of the real analysis results, and takes the real analysis result with the highest priority as the final output result. Therefore, the embodiment of the application can selectively discard the waiting of some analysis tasks according to the preset strategy, thereby reducing the total waiting time of parallel tasks and improving the data analysis efficiency when the multi-analysis tasks perform data analysis.
In a first possible implementation manner of the second aspect, the determining, by the preset policy, whether to wait for the fourth analysis task to generate the analysis result includes:
and if the fourth analysis task does not contain a fifth analysis task, determining that the fourth analysis task does not need to wait for generating an analysis result, wherein the fifth analysis task is an analysis task which is not provided with a preset label in the fourth analysis task, and after the result of the fourth analysis task is predicted by the preset label, when the priority of a predicted result corresponding to the fourth analysis task is lower than the priority of at least one first result or second result, adding the label to the fourth analysis task.
The embodiment of the application can realize the automatic identification of whether the non-generated analysis result needs to be discarded or not, and determine the condition of no need of waiting, thereby greatly reducing the waiting time of the discarding 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 to wait for the fourth analysis task to generate the analysis result includes:
obtaining a third result obtained by predicting the result of the fourth analysis task;
Priority ranking is carried out on the first result, the second result and the third result, and corresponding ranking results are obtained;
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 residual analysis task can be directly ended, and the waiting time is greatly shortened.
With reference to 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 all 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 accuracy and reliability of screening the abandoned task can be ensured.
On the basis of the first possible implementation manner of the second aspect, in a fourth possible implementation manner of the second aspect, the obtaining a second result generated by the third analysis task, and judging whether to wait for the fourth analysis task to generate the analysis result according to a preset policy includes:
And if the second result generated by the third analysis task is obtained and the third analysis task generating the second result does not have the preset label, executing the operation of judging whether to wait for the fourth analysis task to generate the analysis result according to a preset strategy.
The embodiment of the application can reduce the occupation of the processor resource of the terminal equipment by responding to the non-discarding task and triggering the preset strategy.
In a fifth possible implementation manner of the second aspect, on the basis of the first possible implementation manner of the second aspect, the method further includes:
and if the priority of the predicted 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 termination instruction is sent to the selected discarding task, so that the discarding task does not return any analysis result, further the terminal equipment does not need to process the analysis result corresponding to the discarding task, and the occupation of the processor resource of the terminal equipment can be reduced.
With reference to the foregoing various possible implementation manners of the second aspect, in a sixth possible implementation manner of the second aspect, the prioritizing the first result, the second result, and the third result includes:
and carrying out priority ranking on the first result, the third result and the second result generated by a sixth analysis task, 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, the predicted result and the real result generated by the non-discarding task are only subjected to priority ranking, so that the occupation of the terminal equipment processor resource can be reduced.
In a seventh possible implementation manner of the second aspect, on the basis of the foregoing various possible implementation manners 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 data to be processed includes:
and sequencing 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 is not provided with the preset label in the third analysis task.
In the embodiment of the application, the real results generated by the non-discarding task are only subjected to priority ranking, 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 data analysis apparatus based on multiplexing, including:
the task triggering module is used for triggering a plurality of parallel analysis tasks after acquiring the data to be processed, and the analysis tasks are used for analyzing the data to be processed;
the waiting judging 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 has generated the analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task which has not generated the analysis result in the plurality of parallel analysis tasks;
and the result determining module is used for carrying out priority ranking on the first result and taking the result with the highest priority as an output result corresponding to the data to be processed if the fact that the second analysis task does not need to wait for generating the analysis result is judged according to the preset strategy.
A fourth aspect of an embodiment of the present application provides a data analysis apparatus based on multiplexing, 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 acquired, wherein the first analysis task and the second analysis task are used for analyzing the data to be processed;
the waiting judging module is used for acquiring second results generated by a third analysis task and judging whether to wait for the fourth analysis task to generate the analysis results according to a preset strategy if the first results generated by all the first analysis tasks are acquired, wherein the third analysis task is an analysis task which has generated the analysis results in at least one second analysis task, and the fourth analysis task is an analysis task which has not generated the analysis results in at least one second analysis task;
and the result determining module is used for carrying out priority ranking on the first result and the second result if the fourth analysis task does not need to wait for generating 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 an embodiment of the present application provides a terminal device comprising a memory, a processor, the memory having stored thereon a computer program executable on the processor, the processor executing the computer program to perform the steps of the method for multi-tasking based data analysis according to any of the first or second aspects above.
A sixth aspect of the embodiments of the present application provides a computer-readable storage medium comprising: a computer program is stored, characterized in that it when executed by a processor implements the steps of the method for data analysis based on multiplexing according to any of the above first or second aspects.
A seventh aspect of an embodiment of the present application provides a computer program product, which when run on a terminal device, causes the terminal device to perform the method for multitasking based data analysis as described in any of the first or second aspects above.
It will be appreciated that the advantages of the second to seventh aspects may be found in the relevant description of the first or second aspects, and are not described here again.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a schematic flow chart of an implementation of a data analysis method based on multiple tasks according to an embodiment of the present application;
FIG. 2 is a schematic flow chart of an implementation of a data analysis method based on multiple tasks according to an embodiment of the present application;
FIG. 3 is a schematic flow chart of an implementation of a data analysis method based on multiple tasks according to an embodiment of the present application;
FIG. 4 is a schematic flow chart of an implementation of a data analysis method based on multiple tasks according to an embodiment of the present application;
FIG. 5 is a schematic flow chart of an implementation of a data analysis method based on multiple tasks according to an embodiment of the present application;
FIG. 6 is a schematic flow chart of an implementation of a method for data analysis based on multiple tasks according to an embodiment of the present application;
FIG. 7 is a schematic flow chart of an implementation of a method for data analysis based on multiple tasks according to an embodiment of the present application;
fig. 8 is a schematic view of an application scenario provided in an embodiment of the present application;
FIG. 9 is a schematic diagram of a multi-task based data analysis device according to an embodiment of the present application;
FIG. 10 is a schematic diagram of a multi-task 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 the particular system architecture, 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 illustrate the technical scheme of the application, the following description is made by specific examples.
In order to facilitate an understanding of the present application, embodiments of the present application will be briefly described herein:
when the existing processing model performs multi-task parallel data analysis, all the parallel analysis tasks are waited to generate corresponding analysis results, all the analysis results are uniformly prioritized, and finally the analysis result with the highest priority is used as a final output result. For example in a process model for man-machine conversations. When the dialogue content of the user is obtained, a plurality of dialogue analysis tasks are synchronously started by taking the dialogue content as data to be processed, the analysis results of all the dialogue analysis tasks are obtained, the priority order of the analysis results is carried out, and finally, the analysis result with the highest priority is used as an output result to carry out subsequent analysis of dialogue response of the user.
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 due to factors such as analysis principles of the parallel analysis tasks, dependent resources, data transmission conditions and the like, so that certain differences may exist in time consumption of finally generating the analysis result among different analysis tasks. For example, when there are both analysis tasks in the multi-analysis tasks that are responsible for by the terminal device itself and analysis tasks that are responsible for by the third party device. For the analysis task that the third party device is responsible for, two parts that are long in time are: data network transmission time and data analysis time. In practical applications, the data network transmission time consumption is larger than the actual data analysis time consumption in most cases, so that the analysis task time consumption in the practical cases, which is responsible for the third party equipment, is often larger than the analysis task time consumption in the practical cases, which is responsible for the terminal equipment itself. For the processing model, the total time length for data analysis is equal to the longest analysis task time consumption, so that the existing multi-analysis task parallel data analysis method can directly lead to longer data analysis time consumption and lower efficiency of the processing model.
Although the accuracy of the final output result can be improved by the parallel data analysis of multiple analysis tasks, in practical application, it is found that, on one hand, each analysis task has a certain difference in helping to improve the accuracy of the final output result. Under different scenarios, this difference may be reflected in the importance of the analysis task itself, or in the extent to which the analysis result generated by the analysis task affects the final output result. For analysis tasks with weak or even no help to improve the accuracy of the final output result, if the analysis tasks are continuously waited for, the practical meaning is smaller, the task waiting time consumption is greatly increased, and therefore, the waiting value of the analysis tasks is smaller. On the other hand, for many scenarios, the accuracy and real-time (i.e., time-consuming data analysis) of the final output result of the processing model are very important two performance index indices. For example, in some real-time man-machine conversation scenarios, if the user can not answer the conversation in time, even if the final answer result is very accurate, the meaning is lost. Therefore, in these situations with high real-time requirements, in order to meet the requirement of shortening waiting time and real-time, some analysis tasks with long time consumption and some tasks with weak help to improve accuracy of the final output result are tasks with low waiting value. Based on the above principle, the embodiment of the present application presets a policy for evaluating whether an analysis task that has not generated an analysis result is worth waiting. After triggering a plurality of parallel analysis tasks, when the real analysis result generated by the analysis tasks is obtained each time, the embodiment of the application uses the preset strategy to judge whether the analysis tasks which do not generate the analysis result need to be waited. If the judgment result is that waiting is not needed, the embodiment of the application directly ranks the priorities of the real analysis results, and takes the real analysis result with the highest priority as the final output result. Therefore, the embodiment of the application can selectively discard the waiting of some analysis tasks according to the preset strategy, thereby reducing the total waiting time of parallel tasks and improving the data analysis efficiency of the multi-analysis tasks during data analysis.
Meanwhile, the execution main body of the data analysis method based on the multiple tasks in the embodiment of the application is a terminal device which is provided with a processing model and can realize operations such as multiple parallel analysis task triggering and analysis result output in the embodiment of the application. The specific device type of the terminal device is not limited herein, and may be determined according to an actual application scenario, for example, a mobile terminal, a computer, a server, and other devices.
Fig. 1 shows a flowchart of an implementation of a data analysis method based on multitasking according to an embodiment of the present application, which is described in detail below:
s101, after data to be processed are acquired, triggering a plurality of parallel analysis tasks, wherein the analysis tasks are used for analyzing the data to be processed.
The data content, the data type, and the like 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 application is applied to a scene of a man-machine conversation to realize a response to the content of the user conversation, the data to be processed at this time may be the content of the user conversation, such as "what is the weather today" of the user question. For example, when the embodiment of the application is applied to the commodity pushing of the user to realize personalized pushing of the favorite commodity of the user, the data to be processed can be personal information of the user, historical consumption records and the like, such as gender, age and recent half-year historical purchase records of the user.
Meanwhile, under different application scenes, the types and the quantity of the analysis tasks actually required to be used may have certain differences, and the analysis tasks can be specifically selected or set by a technician according to actual requirements, and are not limited herein. For example, in the context of man-machine conversation, there is a positive correlation between the number of analysis tasks theoretically and the accuracy of the final analysis result, so a technician 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 a certain difference may exist in the analysis angles of each of the different analysis tasks, such as the analysis tasks are good for continuous dialogue analysis, and the analysis tasks are good for single dialogue analysis. Therefore, in order to improve the comprehensiveness of the analysis result and further improve the accuracy of the final output result, technicians can set the types of the analysis tasks which are actually triggered according to the actual scene requirements.
In addition, under different application scenarios, there may be a certain difference in the executable of the analysis task, so that there may also be a certain difference in the corresponding analysis task triggering mode and the acquisition operation of the analysis result. For example, for the analysis task for which the terminal device itself is responsible, its execution party is the terminal device itself. Correspondingly, triggering the analysis task at this time means that the terminal device itself starts to execute the corresponding analysis task, and acquiring operation means that the analysis result generated by the terminal device itself is acquired. And for some analysis tasks that are taken care of by the third party device, the executive is the third party device. Correspondingly, triggering the analysis task at this time means that the data to be processed is generated to the corresponding third party device so as to inform the third party device to analyze the received data to be processed, and the obtaining operation means that the analysis result returned by the third party device is received. Therefore, the embodiment of the application does not limit the specific analysis task triggering mode and needs to be determined according to the actual analysis task condition.
Based on the above description, when the data to be processed is obtained, the embodiment of the application triggers a plurality of parallel analysis tasks, so that each analysis task independently performs data analysis on the data to be processed.
S102, 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 has generated the analysis result in a plurality of parallel analysis tasks, and the second analysis task is an analysis task which has not generated the analysis result in the plurality of parallel analysis tasks.
In the embodiment of the application, all analysis tasks which have generated analysis results are collectively named as a first analysis task, and all analysis tasks which have not generated analysis results are collectively named as a second analysis task. The first result is the generated real analysis result (hereinafter referred to as real result). As can be seen from the above description, in practical applications, there may be a large difference in the value of the corresponding waiting of different analysis tasks. In order to reduce the total waiting time of the analysis task and improve the data analysis efficiency, the embodiment of the application presets a strategy for evaluating whether the analysis task which does not generate the analysis result has a waiting value. On the basis, each time a new real result is obtained, the embodiment of the application utilizes the preset strategy to analyze and evaluate the analysis tasks which do not generate the analysis result, and judges whether to wait for the analysis tasks to generate the analysis result. The specific analysis method used in the preset strategy is not limited herein, and may be selected or set by the skilled person.
In some alternative embodiments, a maximum waiting period may be set in order to meet the scene requirements of high real-time requirements. Setting a preset strategy to judge whether the total waiting time reaches the longest waiting time; if the analysis result is reached, judging that the analysis task which does not generate the analysis result does not need to be waited; if not, the analysis task is determined to continue waiting for the analysis result not to be generated.
In other alternative embodiments, a ratio threshold may be preset, and a 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 analysis tasks that are triggered, and then the relationship between the ratio and the ratio threshold is determined; if the ratio is smaller than the ratio threshold, continuing to wait for an analysis task which does not generate an analysis result; if the ratio is greater than or equal to the ratio threshold, it is determined that it is not necessary to wait for an analysis task that does not generate an analysis result.
In still other alternative embodiments, it may be configured to perform an analytical 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 low, judging that the analysis task which does not generate the analysis result does not need to be waited; when there is an analysis task of which the importance is high and which does not generate an analysis result, it is determined that the analysis task which does not generate an analysis result is continued to wait. For example, the analysis task that did not generate the analysis result may be first subjected to result prediction to obtain the analysis result that it is most likely to output. And comparing the predicted analysis result with the real result in priority, 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. Or marking the importance degree of each analysis task in advance, and then directly reading the importance degree of each analysis task which does not generate an analysis result.
Meanwhile, according to different analysis task executors, "new real results are obtained" and the situation of executing the preset strategy in the embodiment of the present application can be divided into two cases:
in the case a, for the analysis task executed by the terminal device, the new real result is obtained at this time, which means that the terminal device itself completes the analysis task and generates the new real result.
And b, for the analysis task executed by the third party equipment, acquiring a new real result at the moment, namely after the third party equipment generates the new real result 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.
And S103, if the fact that the second analysis task does not need to wait for generating the analysis result is judged according to the preset strategy, the first result is subjected to priority ranking, and the result with the highest priority is used as an 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 non-generated analysis result, the embodiment of the application can directly prioritize the existing real results, and takes the result with the highest priority 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 running in a processing model, and considering that the analysis result priority ranking may be very complex in practical application, especially in some scenes with strong real-time performance, the priority level itself varies in real-time. For example, in a commodity recommendation scene for a user, the preference of the user for commodities changes, so that the corresponding priority level of each commodity changes in real time. In order to cope with the prioritization requirements in these situations, an independent prioritization model or functional module is often set in practical application to perform the prioritization operation of the analysis results. The embodiment of the present application is therefore not limited to the manner in which the analysis results are ordered, including, but not limited to, for example: the processing model directly performs sorting when data analysis is performed, or the processing model cooperates with an independent sorting model or functional module, and the processing model outputs a first result to the sorting model or functional module for priority sorting and returns the first result to the processing model.
Meanwhile, it should be noted that, in the embodiment of the present application, the output object of the output result needs to be determined according to the actual application situation, so as to meet the actual application requirement, including but not limited to, for example: 1. other functional modules of the process model itself or a process layer. 2. Other models that cooperate with the process model. 3. Other devices than the terminal device as the execution subject. 4. And outputting the voice broadcast to the user by the terminal equipment directly, for example, performing voice broadcast.
Although the accuracy of the final output result can be improved by the parallel data analysis of multiple analysis tasks, in practical application, it is found that, on one hand, each analysis task has a certain difference in helping to improve the accuracy of the final output result. Under different scenarios, this difference may be reflected in the importance of the analysis task itself, or in the extent to which the analysis result generated by the analysis task affects the final output result. For analysis tasks with weak or even no help to improve the accuracy of the final output result, if the analysis tasks are continuously waited for, the practical meaning is smaller, the task waiting time consumption is greatly increased, and therefore, the waiting value of the analysis tasks is smaller. On the other hand, for many scenarios, the accuracy and real-time (i.e., time-consuming data analysis) of the final output result of the processing model are very important two performance index indices. For example, in some real-time man-machine conversation scenarios, if the user can not answer the conversation in time, even if the final answer result is very accurate, the meaning is lost. Therefore, in these situations with high real-time requirements, in order to meet the requirement of shortening waiting time and real-time, some analysis tasks with long time consumption and some tasks with weak help to improve accuracy of the final output result are tasks with low waiting value. Based on the above principle, the embodiment of the present application presets a policy for evaluating whether an analysis task that has not generated an analysis result is worth waiting. After triggering a plurality of parallel analysis tasks, when the real analysis result generated by the analysis tasks is obtained each time, the embodiment of the application uses the preset strategy to judge whether the analysis tasks which do not generate the analysis result need to be waited. If the judgment result is that waiting is not needed, the embodiment of the application directly ranks the priorities of the real analysis results, and takes the real analysis result with the highest priority as the final output result. Therefore, the embodiment of the application can selectively discard the waiting of some analysis tasks according to the preset strategy, thereby reducing the total waiting time of parallel tasks and improving the data analysis efficiency of the multi-analysis tasks during data analysis.
As a specific implementation manner of determining the preset policy in the embodiment shown in fig. 1, as shown in fig. 2, in the embodiment of the present application, the data analysis method based on multiple tasks specifically includes:
s101, after data to be processed are acquired, triggering a plurality of parallel analysis tasks, wherein 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 here.
S201, obtaining a first result generated by the first analysis task, and obtaining a second result obtained by predicting the result of the second analysis task.
For a 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 after predicting the analysis result finally generated by the analysis task that does not generate the analysis result.
In practical situations, the multi-task data analysis only selects one analysis result with the highest priority as the final output result, and although there may be many analysis results generated by each analysis task, only one determined analysis result is generated finally to participate in the prioritization of the final output result. On this basis, in case 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 final analysis result generated by the analysis task has a higher priority than all the existing real results, which indicates that the final output result may be affected by the analysis task.
In case 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 result with higher priority exists, and the analysis task does not influence the final output result.
When the analysis task belongs to the case 2, the analysis task is not influenced on the final output result no matter whether the analysis result of the analysis task is waited or not based on the existing real result. Based on the principle, in order to reduce the total task waiting time, each time an analysis task generates a real result, the embodiment of the application predicts the result of each analysis task which does not generate the analysis result according to a preset strategy so as to be used as reference data for judging whether the analysis task needs to be waited or not later. The method for predicting the result is not limited, and can be selected or set by a technician according to actual requirements.
As an alternative embodiment of the present application, in order to ensure the credibility of the prediction result, the result prediction method in the embodiment of the present application includes two alternative types:
And (3) prioritizing all possible analysis results corresponding to the analysis tasks according to the type a, and taking the analysis result with the highest priority as a prediction result.
In this case, for a single analysis task, the generated prediction result is the analysis result with the highest selected priority after all possible analysis results of the prediction result are prioritized. The priority ordering rule is the same as the rule for performing final priority ordering on the analysis result, so as to ensure the reliability of the prediction result.
And b, analyzing the analysis task, and taking the most possibly generated analysis result as a prediction result.
In this case, for a single analysis task, the prediction result generated is the analysis result most likely to be output by the analysis task in the data analysis. The specific analysis method that most likely generates the result is not limited herein and may be selected or set by the skilled artisan. For example, in some embodiments, analysis predictions may be made by generating a record of analysis results from analysis task histories. In other embodiments, analytical predictions may also be made by generating an analytical results record from histories of other tasks similar to the analytical task.
In the embodiment of the application, any one of the above methods can be selected as a result prediction method for practical use.
S202, priority ranking is carried out on the second result and the first result, and corresponding ranking results are obtained.
After obtaining the prediction results corresponding to all analysis tasks which do not generate the analysis results, the embodiment of the application performs priority ranking on the prediction results and all the existing real results together to obtain priority data corresponding to each prediction result and each real result.
Corresponding to two possible cases in S201, there are two cases between the priorities of the predicted result and the existing real result in the embodiment of the present application:
case 1': the existence of predicted results has higher priority than all real results, and can be divided into two refined cases:
a. each predicted outcome priority is higher than all real outcomes. For example, assume that there are 6 analysis results, and the priorities thereof are in order from high to low: predicted outcome a, predicted outcome B, predicted outcome C, real outcome D, real outcome E, and real outcome F. At this time, it is explained that, based on the existing real results, each analysis task that does not generate an analysis result may affect the final output result.
b. There is a partial predictor priority over all real results, while a partial predictor priority is lower than one or more real results. For example, assume that there are 6 analysis results, and the priorities thereof are in order from high to low: predicted outcome a, true outcome D, predicted outcome B, true outcome E, true outcome F, and predicted outcome C. In this case, for the predicted result with higher priority than all the real results, such as the predicted result a in the example, the analysis result finally generated by the corresponding analysis task may affect the final output result. For the predicted results with a lower priority than one or more real results, the predicted results B and C in the above example have a higher priority, so that the corresponding analysis tasks eventually generate analysis results with a lower priority, and based on the existing real results, the analysis tasks cannot influence the final output result.
Case 2': the absence of the predicted outcome has a higher priority than all the real outcomes, i.e., the highest priority analysis outcome of the ranked outcomes is one real outcome. Referring to the sub-case b, at this time, for each predicted result, there is a real result with higher priority, so that the priority of the analysis result finally generated by the analysis task corresponding to each predicted result is not the highest, i.e. the final output result is not affected.
To cope with the above case 2', as an embodiment of the present application, after the sorting result is obtained in S202, the embodiment of the present application includes:
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 an analysis result. And taking the result with the highest priority as an output result corresponding to the data to be processed.
As can be seen from the above description of the case 2', when the highest priority result in the sorting results is a real result, it is stated that for all analysis tasks that do not generate analysis results, the priority of the analysis result that is finally generated is necessarily 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 it is not necessary to wait for an analysis task that does not generate an analysis result. It should be noted that, since the sorting result of all the real results has already been obtained in S202, if the embodiment of the present application is combined with the embodiment shown in fig. 1, at this time, S103 may not perform secondary prioritization, but directly use 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 sequenced together, and the result with the highest priority is the real result, waiting for all analysis tasks which do not generate analysis results is directly abandoned, and the real result with the highest priority is directly used as the final output result. Compared with the waiting of all analysis tasks in the prior art, the method and the device can rapidly determine the analysis tasks which have no influence on the final output result through the prediction result and the priority sorting screening, save a large amount of waiting time by discarding the analysis results waiting of the analysis tasks, and further improve the efficiency of the processing model in the process of multi-analysis task data analysis.
To cope with the above case 1', as an embodiment of the present application, after the sorting result is obtained in S202, the embodiment of the present application includes:
s203, if the result with the highest priority in the sequencing results is the second result, screening out a target task corresponding to the target result from the third analysis task, and adding a preset label to the target task. The third analysis task is an analysis task which is not provided with a preset label in the second analysis task, and the target result is a result with the priority lower than that of at least one first result in the second result.
As is clear from the above description of the case 1', when the result with the highest priority is the predicted result, on the one hand, it is described that among the analysis tasks for which the analysis result is not generated, there is an analysis task that may affect the final output result. On the other hand, as is clear from the above description of the sub-case b in the case 1', if the predicted result priority is lower than one or more real results, it is indicated that some analysis tasks which do not generate the analysis result exist, and the waiting analysis tasks (hereinafter referred to as discarding tasks) can be directly discarded without affecting the final output result. In the embodiment of the application, all analysis tasks which do not generate analysis results are divided into two types of discarding tasks and non-discarding tasks, and all the discarding tasks are collectively named as a third analysis task.
Because there are analysis tasks that may affect the final output result among the analysis tasks that do not generate the analysis results, theoretically, the embodiments of the present application also need to continue waiting for these analysis tasks to generate actual analysis results. However, as is clear from the above analysis, the continuous waiting for the discard task does not improve the accuracy of the final output result, but rather 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', target tasks with prediction result priority lower than one or more real result priorities (i.e. target tasks are reject tasks to which preset labels are not temporarily added) are screened out from analysis tasks not generating analysis results, and at the same time, a preset label is added to the target tasks to help the processing model to distinguish reject tasks from non-reject tasks, and perform corresponding waiting operations. The specific data type and the adding mode of the preset label are not limited herein, and can be set by a technician.
It should be noted that, if the processing model encounters the sub-case a in the case 1' in the actual operation, all analysis tasks that do not generate the analysis result are non-discarding tasks, so that the operation of "selecting the target task corresponding to the target result from the third analysis task" in the corresponding S203 may not select any target task.
As an alternative implementation manner of S203 to screen the target task from the third analysis task, the embodiment of the present application includes:
traversing the positions of the second results corresponding to the third analysis tasks in the sequencing results, and screening out target tasks corresponding to the target results according to the obtained positions.
Or screening out a target result from the second result according to the sorting result, and screening out a target task corresponding to the target result from the third analysis task.
The screening of the target task may be performed by a skilled person in any manner, and is not limited herein.
As an alternative embodiment of the present application, in order to further shorten the waiting time of the analysis task, the terminal device may allocate more processor resources to the non-discard task corresponding to the prediction result higher in priority than all the real results based on S203. Meanwhile, it may also be set that the more resources allocated with higher priority. By allocating more processor resources to the non-abandoned task for task processing, the processing efficiency of the non-abandoned task can be improved, the waiting time of the non-abandoned task is shortened, and the data analysis efficiency is improved.
S204, if the second analysis task does not include the third analysis task, it is determined that it is not necessary to wait for the second analysis task to generate an analysis result.
From the above description, all the 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 realizing screening of the discarding task and adding of the preset label, the embodiment of the application searches whether non-discarding tasks exist in all triggered analysis tasks or not when the sorting result of the S202 is the condition 1'. When there is no non-discarding task, that is, only the analysis task and the discarding task which have generated the real result are left, the embodiment of the application directly determines that waiting is not needed, and then ends waiting for the discarding task.
In one embodiment of the present application, when the plurality of parallel analysis tasks still include the third analysis task, it is determined that the second analysis task needs to wait for generating the analysis result, and only the operation of S201 needs to be returned.
S205, the first results are prioritized, and the result with the highest priority is used as the output result corresponding to the data to be processed.
After finishing waiting in S204, the embodiment of the present application ranks all existing real results in priority, so as to determine the final output result with the highest priority. The specific sorting and outputting principle description may refer to the description of S103, and will not be repeated here.
As an alternative embodiment of the present application, it is known from the above description whether the discard task will ultimately generate the analysis result and what analysis result will be generated specifically, all the final output result is not affected, so it may be unnecessary to wait for the discard task to generate the analysis result. However, in the embodiment of the present application, only the reject task is marked, and the execution of the reject task is not affected, so in theory, in the process of waiting for the analysis result generated by the non-reject task, the real result generated by the reject task may still be obtained. For the true result of the discard task, it is theoretically no matter whether it participates in the prioritization in S202 and S103, the final output result is not affected. Therefore, in the embodiment of the present application, the real results of the priority ranking in S202 and S103 may include the real results of the reject task or may not include the real results of the reject task, and may be specifically set by the technician. If the real result of the discarding task is not included, the real result participating in the priority ranking needs to be filtered, and the real result corresponding to the discarding task is removed.
In the embodiment of the application, when a new real analysis result is generated by each time of analysis results, result prediction is carried out on analysis tasks which do not generate the analysis results, then the same sequencing is carried out on the real results and the predicted results, and whether the tasks which do not need to be waited are judged according to the sequencing results, and whether the tasks which do not need to be waited are still waited. For the case that there are non-discarding tasks, the embodiment of the present application adds a preset label to the non-marked discarding task to mark, and continuously waits for the non-discarding task to generate a corresponding analysis result. For the case that no non-abandoned task exists, waiting is directly finished, and the result with the highest priority in the real results is taken as the final output result. The embodiment of the application can realize the automatic identification of whether the non-generated analysis result needs to be discarded or not, and determine the condition of no need of waiting, thereby greatly reducing the waiting time of the discarding task and improving the efficiency of data analysis.
Meanwhile, in practical application, when the processing models in many scenes are used for setting analysis tasks, some important core tasks are selected to be executed by the terminal equipment so as to ensure the safety and stability of data, and some analysis tasks with lower importance are handed over to third party equipment of a partner for processing. Due to problems such as network delay, the time consumption of the actual processing model is the longest when waiting for analysis tasks, and the analysis tasks with lower relative importance are often used. According to the embodiment of the application, the analysis of the predicted result and the evaluation of the influence of the corresponding analysis task on the final output result can effectively mark the analysis task with lower importance, which is responsible for by the third party equipment, as a discarding task, so that the waiting time is greatly reduced.
As can be seen from the description of the embodiment shown in FIG. 2, the embodiment of the present application screens out the reject task having no effect on the final output result according to the priority of the predicted result, and discards waiting for the analysis result of the reject task. However, in the embodiment shown in fig. 2, only the reject task is marked, and the execution of the reject task is not affected, so in theory, in the process of waiting for the analysis result generated by the non-reject task, the real result generated by the reject task may still be obtained. Thus, in step S102 of the embodiment shown in fig. 1, the new real result obtained may also be a real result generated by the discard task.
For the case where the true result generated by the discard task is acquired at S102. Since the actual results generated at this time (except for the actual results of the discard task) and the predicted result cases corresponding to the non-discard task do not send changes. Therefore, even if the preset strategy is directly triggered at this time, the subsequent operations such as result prediction, sorting and screening still need to continue waiting for all non-abandoned tasks, and no influence is caused on the final output result. 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 by:
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, executing an operation of judging whether to wait for the second analysis task to generate the analysis result according to a preset strategy.
In the embodiment of the application, even if the newly generated real result is obtained, the trigger of the preset strategy is not directly performed, but the analysis task for generating the new real result is judged whether to be a discarding task with a preset label. Meanwhile, the subsequent preset strategy is triggered and executed only when the analysis task for generating the new real result does not have a preset label, namely the task is not a discarding task, so that the response to the real result generated by the discarding task is avoided, and the processor resource of the terminal equipment is saved.
As can be seen from the above description of the embodiments, the embodiment shown in fig. 2 only marks the reject task, and does not affect the execution of the reject task itself. Therefore, in theory, in the process of waiting for the non-reject task to generate the analysis result, the real result generated by the reject 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 reject task, thereby causing resource waste of the terminal device. In order to avoid wasting resources of the terminal device, referring to fig. 4 on the basis of the embodiment shown in fig. 2, after S203, an embodiment of the present application further includes:
S401, sending a termination instruction to the target task, wherein the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
After screening out the reject tasks to which the preset labels need to be added in S203, the embodiment of the present application sends a termination instruction to the reject tasks to terminate the reject tasks. In the embodiment of the present application, the execution party of the discarding task may be the task executed by the terminal device itself or the third party device, so that the sending object, the sending mode, etc. of the termination instruction are also determined according to the actual situation of the execution party of the discarding task, which may be specifically set by the technician according to the actual situation, and are not limited herein.
In the embodiment of the application, the filtered reject task can be directly terminated by sending the termination instruction, so that the real result generated by the reject task can not be obtained in S102, and further the situation of processor resource waste caused by responding to the real result generated by the reject task can not occur in the embodiment shown in FIG. 2, and the processor resource of the terminal equipment is saved.
As can be seen from the above description of the embodiments, 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 in theory, in the process of waiting for the analysis result generated by the non-reject task, the real result generated by the reject task may still be obtained. Therefore, when the prioritizing of the real result and the predicted result is performed at S202, and when the prioritizing of the real result is performed at S103, there is also a possibility that the real result generated by the task is discarded from the real result. Since the real result generated by the discarding task will not theoretically affect the final output result, prioritizing the result will result in waste of terminal device processor resources. In order to avoid the waste of processor resources of the terminal device, the operations of S202 with reference to fig. 5 may be replaced by:
And S501, prioritizing the second result and the first result generated by a fourth analysis task, 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 application, all analysis tasks which are not reject tasks among the analysis tasks which generate the analysis results are collectively named as a fourth analysis task. Meanwhile, when the priority ordering of the S202 is performed, the embodiment of the application only orders the predicted result and the real results generated by the analysis tasks which are not the discarding tasks, and obtains the corresponding ordering result, thereby reducing the workload of the priority ordering and saving the processor resource of the terminal equipment.
Meanwhile, as an alternative embodiment of the present application, the operation of S103 may be replaced with that of fig. 6 on the basis of the above-described respective embodiments of the present application:
s601, carrying out 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 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 application, all analysis tasks which are not reject tasks among the analysis tasks which generate the analysis results are collectively named as a fourth analysis task. In the embodiment of the application, when the priority ordering of the S103 is performed, only the real results generated by the analysis tasks which are not the discarding tasks are ordered, and the real result with the highest priority is used as the final output result, so that the workload of the priority ordering is reduced, and the processor resource of the terminal equipment is saved.
Fig. 7 shows a flowchart of an implementation of a data analysis method based on multitasking according to an embodiment of the present application, which is described in detail below:
s701, triggering at least one first analysis task and at least one second analysis task which are parallel after the data to be processed are acquired, wherein the first analysis task and the second analysis task are used for analyzing the data to be processed.
The specific operation details and principles of S701 are basically the same as those of S101 in the embodiment shown in fig. 1, so reference may be made to the description of S101, which is not repeated here.
The difference from S101 is that, in consideration of the actual situation, even if the analysis tasks are parallel, there is a large difference in importance degree and time-consuming data analysis between the different analysis tasks. Therefore, in the embodiment shown in fig. 1, although it is possible to recognize whether to continue waiting and shorten waiting time, each parallel analysis task is treated indiscriminately, on one hand, some more important analysis tasks are very likely to be discarded; on the other hand, since the preset strategy is triggered once to process each time a new real result is obtained, the terminal device can directly increase a large amount of workload, and particularly for some originally time-consuming relatively short analysis tasks, the preset strategy at each time judges that the actual effect is smaller, but a large amount of workload can be increased.
In order to reduce the workload imposed on the terminal device, while avoiding that some of the more important analysis tasks are discarded. 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 by utilizing a preset strategy in advance. The specific partitioning rule is not limited herein, and may be marked by a technician according to actual requirements. For example, in some embodiments, the technician may distinguish between the importance levels of the various analysis tasks in the actual scenario, and the analysis task with an importance level above a certain threshold may be marked as the first analysis task. Meanwhile, time-consuming conditions can be analyzed according to the data of each analysis task in actual conditions, so that some analysis tasks with short time consumption can be screened out and marked as a first analysis task.
S702, if all the first results generated by the first analysis tasks are obtained, obtaining second results generated by a third analysis task, and judging whether to wait for a fourth analysis task to generate an analysis result according to a preset strategy, wherein the third analysis task is an analysis task which has generated the analysis result in at least one second analysis task, and the fourth analysis task is an analysis task which has not generated the analysis result in at least one second analysis task.
In the embodiment of the application, all analysis tasks which have generated analysis results in the second analysis task are collectively named as a third analysis task, and all analysis tasks which have not generated analysis results 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 true result generated by the second analysis task.
The specific operation details and principles of S702 are basically the same as those of S102 in the embodiment shown in fig. 1, so reference is made to the description of S102, and details thereof are omitted here.
The difference from S102 is that the embodiment of the present application does not trigger the preset policy every time a new analysis result is obtained, but waits for the first analysis task to generate all the real results. On the basis that the first task generates real results, a preset strategy is triggered each time an analysis result generated by the second analysis task is acquired.
And S703, if the fourth analysis task does not need to wait for generating an analysis result according to the preset strategy, the first result and the second result are subjected to priority ranking, and the result with the highest priority is used as an output result corresponding to the data to be processed.
The specific operation details and principles of S703 are basically the same as those of S103 in the embodiment shown in fig. 1, so reference may be made to the description of S103, which is not repeated here. The difference from S103 is that in the embodiment of the present application, the real result includes two parts, namely, the first result and the second result, so that when the final priority ranking is performed, the two parts need to be ranked 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 parallel data analysis of multiple analysis tasks, in practical application, it is found that, on one hand, each analysis task has a certain difference in helping to improve the accuracy of the final output result. Under different scenarios, this difference may be reflected in the importance of the analysis task itself, or in the extent to which the analysis result generated by the analysis task affects the final output result. For analysis tasks with weak or even no help to improve the accuracy of the final output result, if the analysis tasks are continuously waited for, the practical meaning is smaller, the task waiting time consumption is greatly increased, and therefore, the waiting value of the analysis tasks is smaller. On the other hand, for many scenarios, the accuracy and real-time (i.e., time-consuming data analysis) of the final output result of the processing model are very important two performance index indices. For example, in some real-time man-machine conversation scenarios, if the user can not answer the conversation in time, even if the final answer result is very accurate, the meaning is lost. Therefore, in these situations with high real-time requirements, in order to meet the requirement of shortening waiting time and real-time, some analysis tasks with long time consumption and some tasks with weak help to improve accuracy of the final output result are tasks with low waiting value.
Based on the above principle, the embodiment of the present application presets 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 from being abandoned and bring excessive workload to the terminal equipment, the embodiment of the application divides the analysis tasks into a first analysis task which needs to be waited and a second analysis task which needs to judge whether to wait according to a preset strategy. After triggering a plurality of parallel first analysis tasks and second analysis tasks, when obtaining real analysis results generated by the second analysis tasks each time, the embodiment of the application uses a preset strategy to judge whether the second analysis tasks which do not generate analysis results need to be waited. If the judgment result is that waiting is not needed, the embodiment of the application directly ranks the priorities of the real analysis results, and takes the real analysis result with the highest priority as the final output result. Therefore, the embodiment of the application can selectively discard the waiting of some analysis tasks according to the preset strategy, thereby reducing the total waiting time of parallel tasks and improving the data analysis efficiency of the multi-analysis tasks during data analysis.
As a specific implementation manner of determining the preset policy in the embodiment shown in fig. 7, in the embodiment of the present application, a process for determining the preset policy in S702 specifically includes:
and obtaining a third result obtained by predicting the result of the fourth analysis task.
And carrying out priority ranking on the first result, the second result and the third result to obtain corresponding ranking results.
If the highest priority result in the sequencing results is the first result or the second result, the judgment is 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 a target task corresponding to the target result from the fifth analysis task, and adding a preset label to the target task. The fifth analysis task is an analysis task which is not provided with a preset label in the fourth analysis task, and the target result is a result with the priority lower than that of at least one first result or second result in the third result. The third result is a prediction result, and is the analysis result with the highest priority among all the analysis results corresponding to the fourth analysis task.
If the fifth analysis task is not included in the plurality of parallel analysis tasks, it is determined that there is no need to wait for the fourth analysis task to generate an analysis result.
If the plurality of parallel analysis tasks includes the fifth analysis task, it is determined that it is necessary to wait for the process of generating the analysis result by the fourth analysis task, and the operation of executing 702 is returned.
The specific details and principles of the operation of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 2, so reference may be made to the description of the embodiment shown in fig. 2, and details thereof are omitted herein.
In the embodiment of the application, on the basis of all the first analysis tasks being completed, each time the second analysis task generates a new real analysis result by the analysis result, the analysis task which does not generate the analysis result is subjected to result prediction, then the real result and the prediction result are subjected to the same sequencing, and whether the discarding task without waiting exists or not and whether the discarding task without waiting still exists or not are judged according to the sequencing result. For the case that there are non-discarding tasks, the embodiment of the present application adds a preset label to the non-marked discarding task to mark, and continuously waits for the non-discarding task to generate a corresponding analysis result. For the case that no non-abandoned task exists, waiting is directly finished, and the result with the highest priority in the real results is taken as the final output result. The embodiment of the application can realize the automatic identification of whether the non-generated analysis result needs to be discarded or not, and determine the condition of no need of waiting, thereby greatly reducing the waiting time of the discarding task and improving the efficiency of data analysis.
Meanwhile, in practical application, when the processing models in many scenes are used for setting analysis tasks, some important core tasks are selected to be executed by the terminal equipment so as to ensure the safety and stability of data, and some analysis tasks with lower importance are handed over to third party equipment of a partner for processing. Due to problems such as network delay, the time consumption of the actual processing model is the longest when waiting for analysis tasks, and the analysis tasks with lower relative importance are often used. According to the embodiment of the application, the analysis of the predicted result and the evaluation of the influence of the corresponding analysis task on the final output result can effectively mark the analysis task with lower importance, which is responsible for by the third party equipment, as a discarding task, so that 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:
if the second result generated by the third analysis task is obtained and the third analysis task generating the second result does not have the preset label, executing the operation of judging whether the fourth analysis task needs to wait for generating the analysis result according to the preset strategy.
The specific details and principles of the operation of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 3, so reference may be made to the description of the embodiment shown in fig. 3, and details thereof are omitted herein.
In the embodiment of the application, even if the newly generated real result is obtained, the trigger of the preset strategy is not directly performed, but the analysis task for generating the new real result is judged whether to be a discarding task with a preset label. Meanwhile, the subsequent preset strategy is triggered and executed only when the analysis task for generating the new real result does not have a preset label, namely the task is not a discarding task, so that the response to the real result generated by the discarding task is avoided, and the processor resource of the terminal equipment is saved.
As an optional embodiment of the present application, after the foregoing embodiment screens out a target task corresponding to a target result from the fifth analysis task, 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 details and principles of the operation of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 4, so reference may be made to the description of the embodiment shown in fig. 4, and details thereof are omitted herein.
In the embodiment of the application, the filtered reject task can be directly terminated by sending the termination instruction, so that the real result generated by the reject task can not be obtained in S702, and further, in the embodiment shown in FIG. 7, the condition of processor resource waste caused by responding to the real result generated by the reject task can not occur, and the processor resource of the terminal equipment is saved.
As an optional embodiment of the present application, in the foregoing embodiment, the operation of prioritizing the first result, the second result, and the third result to obtain corresponding ranked results may be replaced with:
and prioritizing the first result, the third result and the 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 details and principles of the operation of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 5, so reference may be made to the description of the embodiment shown in fig. 5, and details thereof are omitted herein.
In the embodiment of the application, all analysis tasks which are not reject tasks among the analysis tasks which generate the analysis results are collectively named as a fourth analysis task. Meanwhile, when the priority ranking is carried out, the embodiment of the application ranks the predicted results and the real results generated by the analysis tasks which are not the discarding tasks, and obtains the corresponding ranking results, thereby reducing the workload of the priority ranking and saving the processor resources of the terminal equipment.
Meanwhile, as an alternative embodiment of the present application, the operation of S703 may be replaced with:
and sequencing 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 a preset label in the third analysis task.
The specific details and principles of the operation of the embodiment of the present application are basically the same as those of the embodiment shown in fig. 6, so reference may be made to the description of the embodiment shown in fig. 6, and details thereof are omitted herein.
In the embodiment of the application, all analysis tasks which are not reject tasks among the analysis tasks which generate the analysis results are collectively named as a fourth analysis task. In the embodiment of the application, when the priority ordering of S703 is performed, only the real results generated by the analysis tasks which are not the discarding tasks are ordered, and the real result with the highest priority is used as the final output result, thereby reducing the workload of the priority ordering and saving the processor resource of the terminal equipment.
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 implement timely and accurate response to user dialogue contents.
In the embodiment of the present application, it is assumed that the data to be processed is dialogue content input by the user, "what is today weather? ", together comprising: the method comprises the steps of three-party language processing 1, three-party language processing 2, question and answer analysis, system skill discovery, hierarchical classifier, skill search and multi-round discovery of 7 parallel analysis tasks, wherein the skill discovery based on user dialogue content is used for outputting a target to a subsequent execution layer in a human-machine natural language dialogue model, and the execution layer controls the output system to answer, so that continuous conversation is completed. The three-party language processing 1 and the three-party language processing 2 are natural language processing (Natural Language Processing, NLP) tasks which are responsible for the third-party equipment, and the rest analysis tasks are tasks which are responsible for the human-machine natural language dialogue model.
In the embodiment of the application, the operation of responding to the user dialogue content is as follows:
and acquiring data to be processed, and triggering parallel three-party language processing 1, three-party language processing 2, question-answer analysis, system skill discovery, hierarchical classifier, skill search and multi-round discovery.
Waiting for the analysis task to generate a real result or receiving the real result returned by the third party device.
If a new real result is generated or returned, predicting the result of a non-discarding task without a preset label in the analysis task which does not generate the analysis result at present, and obtaining a corresponding prediction result. The result prediction method comprises the following steps: and prioritizing all possible analysis results corresponding to the non-abandoned task, and taking the result with the highest priority as the corresponding prediction result.
And prioritizing all the real results and the predicted results.
If the result with the highest priority in the sequencing results is a 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 session response according to the output result.
If the result with the highest priority in the sequencing results is the predicted result, searching the predicted result with the priority lower than at least one real result, and marking the non-discarding task corresponding to the searched predicted result as the discarding task by adding a preset label.
Judging whether non-discarding tasks without preset labels exist in the analysis tasks which do not generate the analysis results at present.
If the task is not discarded, the current real results are subjected to priority ranking, the real result with the highest priority is used as an output result and is output to an execution layer, and the execution layer carries out session response according to the output result.
And if the non-abandoned task exists, returning to execute the operation of waiting for the analysis task to generate the real result or receiving the real result returned by the third-party equipment.
The specific method of prioritization is not limited herein, and may be selected or set by the skilled person according to the actual situation. Considering that the situation of priority ordering of analysis results is very complex in the man-machine natural language dialogue process, a sorting module can be preferably preset, and when priority ordering is needed, the embodiment of the application only needs to input the analysis results to be ordered into the sorting module. Ranking methods that are practically utilized include, but are not limited to, such as various machine Learning ranks, such as Lamdda mart machine Learning ranks and Learning to Rank machine Learning ranks.
In practical application, the method provided by the embodiment of the application can save a great amount of waiting time of analysis tasks. And as the analysis tasks of question-answer analysis, system skill discovery, hierarchical classifier, skill search and multi-round discovery which are responsible for the man-machine natural language dialogue model are found in the practical application, the speed of generating the analysis result is far faster than the speed of returning the analysis result by the third party equipment (the third party equipment is unreliable and has network delay). Meanwhile, the human-machine natural language dialogue model is responsible for analysis tasks, and the priority of the generated analysis results is higher (important tasks tend to be submitted 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, the waiting time consumption can be saved by more than 60%, and the efficiency of the man-machine natural language dialogue model for analyzing the dialogue content of the user is greatly improved.
Similarly, the embodiment shown in fig. 7 and other related method embodiments can be applied to the man-machine natural language dialogue model to realize timely and accurate response to the user dialogue content. At the moment, only the analysis tasks which need to be waited are distinguished from the analysis tasks which need to be judged whether to wait according to a preset strategy, and corresponding distinguishing processing is carried out. For example, the question-answer analysis, the system skill discovery, the hierarchical classifier, the skill search and the multi-round discovery can be divided into a first analysis task which has to be waited, the three-party language processing 1 and the three-party language processing 2 are divided into a second analysis task which needs to judge whether to wait according to a preset strategy, and the corresponding processing is performed. Specific principle descriptions can be referred to the embodiment shown in fig. 7, the embodiment shown in fig. 8 and other related method embodiments, which are not described herein.
Corresponding to the above embodiments of fig. 1 to 6 and the methods of other related embodiments, fig. 9 shows a block diagram of a multitasking data analysis device according to an embodiment of the present application, and for convenience of explanation, only the portions related to the embodiments of the present application are shown. The multitasking data analysis apparatus illustrated in fig. 9 may be an execution subject of the multitasking data analysis method provided in the first embodiment.
Referring to fig. 9, the multitasking data analysis apparatus includes:
the task triggering module 91 is configured to trigger a plurality of parallel analysis tasks when acquiring data to be processed, where the analysis tasks are used to analyze the data to be processed.
The waiting judging module 92 is configured to obtain a first result generated by a first analysis task, and judge whether to need 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 a plurality of parallel analysis tasks.
The result determining module 93 is configured to, if it is determined according to a preset policy that the second analysis task does not need to wait for generating the analysis result, prioritize the first result, and take the result with the highest priority as the output result corresponding to the data to be processed.
Further, the waiting judgment module 92 includes:
the judging module is configured to judge that it is not necessary to wait for the fourth analysis task to generate an analysis result if the fourth analysis task does not include a fifth analysis task, where the fifth analysis task is an analysis task that is not provided with a preset label in the fourth analysis task, and the preset label is a label added to the fourth analysis task when the priority of a predicted result corresponding to the fourth analysis task is lower than the priority of at least one of the first result or the second result after the result is predicted for the fourth analysis task.
Further, the waiting judgment module 92 includes:
the result prediction module is used for obtaining a second result obtained by carrying out result prediction on the second analysis task.
And the sequencing module is used for sequencing the priority of 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 is not required to wait for generating an analysis result if the result with the highest priority in the sequencing results is the first result.
Further, in the result prediction module, the predicted result is the analysis result with the highest priority among all the analysis results corresponding to the second analysis task.
Further, the waiting judgment module 92 includes:
and the waiting judging 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 the preset strategy if the first result generated by the first analysis task is obtained and the first analysis task for generating the first result does not have the preset label.
Further, the waiting 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 predicted 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 sequencing module comprises:
and the sequencing sub-module is used for sequencing the priority of 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 a preset label in the first analysis task.
Further, the result determining module 93 includes:
the result determining sub-module is used for sequencing the first results generated by the fourth analysis task in priority, 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 respective functions by each module in the multitasking data analysis device provided in the embodiment of the present application may refer to the foregoing embodiments shown in fig. 1 to 6 and descriptions of other related embodiments, which are not repeated herein.
Corresponding to the method of the embodiment shown in fig. 7 and other related embodiments, fig. 10 shows a block diagram of a multitasking data analysis device according to an embodiment of the present application, and for convenience of explanation, only the portions related to the embodiment of the present application are shown. The multitasking data analysis apparatus illustrated in fig. 10 may be an execution subject of the multitasking data analysis method provided in the first embodiment.
Referring to fig. 10, the multitasking data analysis apparatus 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 when acquiring data to be processed, where the first analysis task and the second analysis task are both used for analyzing the data to be processed.
The waiting determining module 1002 is configured to, if all the first results generated by the first analysis tasks are obtained, obtain second results generated by a third analysis task, and determine whether to need to wait for a 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.
And a result determining module 1003, configured to prioritize the first result and the second result and use the result with the highest priority as the output result corresponding to the data to be processed if it is determined that the fourth analysis task does not need to wait for generating the analysis result according to the preset policy.
Further, the waiting determination module 1002 includes:
the marking module is configured to determine that it is not necessary to wait for the fourth analysis task to generate an analysis result if the fourth analysis task does not include a fifth analysis task, where the fifth analysis task is an analysis task that does not include a preset label in the fourth analysis task, and the preset label is a label added to the fourth analysis task when a priority of a predicted result corresponding to the fourth analysis task is lower than a priority of at least one of the first result or the second result after the result is predicted for the fourth analysis task.
Further, the waiting determination module 1002 includes:
and the result prediction module is used for obtaining a third result obtained by carrying out result prediction on the fourth analysis task.
The sorting module is used for carrying out priority sorting on the first result, the second result and the third result to obtain corresponding sorting results.
And the judging module is used for judging that the second analysis task is not required to wait for generating an 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 predicted result is the analysis result with the highest priority among all the analysis results corresponding to the fourth analysis task.
Further, the waiting determination module 1002 includes:
and the waiting judging sub-module is used for executing the operation of judging whether the fourth analysis task needs to wait for generating the analysis result according to the preset strategy if the second result generated by the third analysis task is obtained and the third analysis task for generating the second result does not have the preset label.
Further, the waiting determining module 1002 further includes:
and the termination module is used for sending a termination instruction to the fourth analysis task if the priority of the predicted result corresponding to the fourth analysis task is lower than the priority of at least one first result or second result, and the termination instruction is used for indicating the analysis task to stop analyzing the data to be processed.
Further, the sequencing module comprises:
and the sequencing sub-module is used for sequencing the first result, the third result and the second result generated by a sixth analysis task in priority, 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:
the result determining sub-module is used for sequencing the first result and the second result generated by the sixth analysis task in priority, 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 respective functions by each module in the multitasking data analysis device according to the embodiment of the present application may refer to the foregoing description of the embodiment shown in fig. 7 and other related method embodiments, which are not described herein.
It will be apparent to those skilled in the art that, for convenience and brevity of description, only the above-described division of the functional units and modules is illustrated, and in practical application, the above-described functional distribution may be performed by different functional units and modules according to needs, i.e. the internal structure of the apparatus is divided into different functional units or modules to perform all or part of the above-described functions. The functional units and modules in the embodiment may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit, where the integrated units may be implemented in a form of hardware or a form of a software functional unit. In addition, the specific names of the functional units and modules are only for distinguishing from each other, and are not used for limiting the protection scope of the present application. The specific working process of the units and modules in the above system may refer to the corresponding process in the foregoing method embodiment, which is not described herein again.
It should be understood that the sequence number of each step in the foregoing embodiment does not mean that the execution sequence of each process should be determined by the function and the internal logic, and should not limit the implementation process of the embodiment of the present application.
It should 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 the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in the present description and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Furthermore, the terms "first," "second," "third," and the like in the description of the present specification and in the appended claims, are used for distinguishing between descriptions and not necessarily for indicating or implying a relative importance. It will also be understood that, although the terms "first," "second," etc. may be used herein in some embodiments of the application to describe various elements, these elements should not be limited by these terms. These terms are only used to distinguish one element from another element. 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. Both the first analysis task and the second analysis task are analysis tasks, but they are not the same analysis task.
Reference in the 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 application. Thus, appearances of the phrases "in one embodiment," "in some embodiments," "in other embodiments," and the like in the specification are not necessarily all referring to the same embodiment, but mean "one or more but not all embodiments" unless expressly specified otherwise. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless expressly specified otherwise.
The data analysis method based on the multi-task provided by the embodiment of the application can be applied to terminal equipment such as mobile phones, tablet computers, wearable equipment, vehicle-mounted equipment, augmented reality (augmented reality, AR)/Virtual Reality (VR) equipment, notebook computers, ultra-mobile personal computer (UMPC), netbooks, personal digital assistants (personal digital assistant, PDA) and the like, and the embodiment of the application does not limit the specific types of the terminal equipment.
For example, the terminal device may be a Station (ST) in a WLAN, a cellular telephone, a cordless telephone, a Session initiation protocol (Session InitiationProtocol, SIP) telephone, a wireless local loop (Wireless Local Loop, WLL) station, a personal digital assistant (Personal Digital Assistant, PDA) device, a handheld device with wireless communication capabilities, a computing device or other processing device connected to a wireless modem, an in-vehicle device, a car networking terminal, a computer, a laptop computer, a handheld communication device, a handheld computing device, a satellite radio, a wireless modem card, a television Set Top Box (STB), a customer premise equipment (customer premise equipment, CPE) and/or other devices for communicating over a wireless system as well as next generation communication systems, such as a mobile terminal in a 5G network or a mobile terminal in a future evolved public land mobile network (Public Land Mobile Network, PLMN) network, etc.
By way of example, but not limitation, when the terminal device is a wearable device, the wearable device may also be a generic name for applying wearable technology to intelligently design daily wear, developing wearable devices, such as glasses, gloves, watches, apparel, shoes, and the like. The 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 can realize a powerful function through software support, data interaction and cloud interaction. The generalized wearable intelligent device comprises full functions, large size, and complete or partial functions which can be realized independent of a smart phone, such as a smart watch or a smart glasses, and is only focused on certain application functions, and needs to be matched with other devices such as the smart phone for use, such as various smart bracelets, smart jewelry and the like for physical sign monitoring.
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 is 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 of the respective embodiments of the multitasking data analysis method described above, for example steps 101 to 103 shown in fig. 1, or steps 1101 to 1103 shown in fig. 11. Alternatively, the processor 110 may perform the functions of the modules/units in the above-described apparatus embodiments when executing the computer program 112, for example, 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 computing device such as a desktop computer, a notebook computer, a palm computer, a cloud server, etc. The terminal device may include, but is not limited to, a processor 110, a memory 111. It will be appreciated by those skilled in the art 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 illustrated, or may combine certain components, or different components, e.g., the terminal device may also include an input transmitting device, a network access device, a bus, etc.
The processor 110 may be a central processing unit (Central Processing Unit, CPU), but may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf programmable gate arrays (Field-Programmable Gate Array, FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
The memory 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 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) or 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 to store an operating system, application programs, boot loader (BootLoader), data, and other programs, etc., such as program codes of the computer program. The memory 111 may also be used to temporarily store data that has been transmitted or is to be transmitted.
In addition, each functional unit in the embodiments of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
Embodiments of the present application also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements steps for implementing the various method embodiments described above.
Embodiments of the present application provide a computer program product which, when run on a mobile terminal, causes the mobile terminal to perform steps that enable the implementation of the method embodiments described above.
The integrated modules/units, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable storage medium. Based on such understanding, the present application may implement all or part of the flow of the method of the above embodiment, or may be implemented by a computer program to instruct related hardware, where the computer program may be stored in a computer readable storage medium, and when the computer program is executed by a processor, the computer program may implement the steps of each of the method embodiments described above. Wherein the computer program comprises computer program code which may be in source code form, object code form, executable file or some intermediate form etc. The computer readable medium may include: any entity or device capable of carrying the computer program code, a recording medium, a U disk, a removable hard disk, a magnetic disk, an optical disk, a computer Memory, a Read-Only Memory (ROM), a random access Memory (Random Access Memory, RAM), an electrical carrier signal, a telecommunications signal, a software distribution medium, and so forth.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and in part, not described or illustrated in any particular embodiment, reference is made to the related descriptions of other embodiments.
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 solution. 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 units may or may not be physically separate, and units shown 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 may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
The above embodiments are only for illustrating the technical solution of the present application, and not for limiting the same; although the application has been described in detail with reference to the foregoing embodiments, it will be understood by those of ordinary skill in the art that: the technical scheme described in the foregoing embodiments can be modified or some technical features thereof can be replaced by equivalents; such modifications and substitutions do not depart from the spirit and scope of the technical solutions of the embodiments of the present application, and are intended to be included in the scope of the present application.
Claims (16)
1. A method of data analysis based on multiplexing, comprising:
after the data to be processed are acquired, 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, judging whether to wait for a second analysis task to generate an analysis result according to a preset strategy, and comprising the following steps: if the second analysis task does not contain a third analysis task, determining that the second analysis task does not need to wait for generating an analysis result, wherein the third analysis task is an analysis task which is not provided with a preset label in the second analysis task, and after the result of the second analysis task is predicted by the preset label, when the priority of a predicted result corresponding to the second analysis task is lower than the priority of at least one first result, adding the label to the second analysis task; 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; the prediction result is a prediction analysis result obtained after predicting the analysis result finally generated by the analysis task which does not generate the analysis result;
And if the fact that the second analysis task does not need to wait for generating the 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 an output result corresponding to the data to be processed.
2. The method of claim 1, wherein the determining whether the second analysis task needs to wait for the second analysis task to generate the analysis result according to the preset policy comprises:
obtaining a second result obtained by carrying out result prediction on the second analysis task;
priority ranking is carried out on the second result and the first result, and a corresponding ranking result is obtained;
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.
3. The method of claim 1, wherein the predicted result is a highest priority analysis result among all analysis results corresponding to the second analysis task.
4. The method for analyzing data based on multiple tasks according to claim 1, wherein the steps of obtaining the first result generated by the first analysis task, and determining whether to wait for the second analysis task to generate the analysis result according to a preset policy, comprise:
If the first result generated by the first analysis task is obtained and the first analysis task generating the first result does not have the preset label, executing the operation of judging whether to wait for the second analysis task to generate the analysis result according to a preset strategy.
5. The multi-task based data analysis method of claim 1, 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.
6. The method of multitasking based data analysis of claim 2, said prioritizing said second result and said first result comprising:
and prioritizing 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.
7. The method for analyzing data based on multiple tasks as claimed in any one of claims 1, 3, 4 and 6, wherein said prioritizing the first result and using the highest priority result as the output result corresponding to the data to be processed comprises:
And sequencing 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 is not provided with the preset label in the first analysis task.
8. A method of data analysis based on multiplexing, comprising:
after the data to be processed is acquired, 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 used for analyzing the data to be processed;
if all the first results generated by the first analysis task are obtained, obtaining the second results generated by the third analysis task, and judging whether to wait for the fourth analysis task to generate the analysis results according to a preset strategy, wherein the method comprises the following steps: if the fourth analysis task does not contain a fifth analysis task, determining that the fourth analysis task does not need to wait for generating an analysis result, wherein the fifth analysis task is an analysis task which is not provided with a preset label in the fourth analysis task, and after the result of the fourth analysis task is predicted by the preset label, when the priority of a predicted result corresponding to the fourth analysis task is lower than the priority of at least one first result or second result, adding the label to the fourth analysis task; 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; the prediction result is a prediction analysis result obtained after predicting the analysis result finally generated by the analysis task which does not generate the analysis result;
And if the fourth analysis task does not need to wait for generating an analysis result according to a preset strategy, carrying out 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.
9. The method of claim 8, wherein the determining whether the fourth analysis task needs to wait for the fourth analysis task to generate the analysis result according to the preset policy comprises:
obtaining a third result obtained by predicting the result of the fourth analysis task;
priority ranking is carried out on the first result, the second result and the third result, and corresponding ranking results are obtained;
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.
10. The method of claim 8, wherein the predicted result is a highest priority analysis result among all analysis results corresponding to the fourth analysis task.
11. The method for multi-task based data analysis according to claim 8, wherein obtaining the second result generated by the third analysis task and determining whether it is necessary to wait for the fourth analysis task to generate the analysis result according to the preset policy, comprises:
And if the second result generated by the third analysis task is obtained and the third analysis task generating the second result does not have the preset label, executing the operation of judging whether to wait for the fourth analysis task to generate the analysis result according to a preset strategy.
12. The method of multitasking based data analysis of claim 8, further comprising:
and if the priority of the predicted 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.
13. The method of multitasking based data analysis of claim 9, said prioritizing said first result, said second result and said third result comprising:
and carrying out priority ranking 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.
14. A method of multi-tasking based data analysis as claimed in any of claims 8, 10, 11 and 13 wherein said prioritizing said first result and said second result and taking the highest priority result as the output result corresponding to said data to be processed comprises:
and sequencing 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 analysis task is an analysis task which is not provided with the preset label in the third analysis task.
15. A terminal device, characterized in that it comprises a memory, a processor, on which a computer program is stored which is executable on the processor, the processor executing the computer program to carry out the steps of the method according to any one of claims 1 to 14.
16. A computer readable storage medium storing a computer program, characterized in that the computer program when executed by a processor implements the steps of the method according to any one of claims 1 to 14.
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 CN113051069A (en) | 2021-06-29 |
CN113051069B true 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 (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102138175A (en) * | 2008-07-02 | 2011-07-27 | 谷歌公司 | 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 (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7930574B2 (en) * | 2007-12-31 | 2011-04-19 | Intel Corporation | Thread migration to improve power efficiency in a parallel processing environment |
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 |
-
2019
- 2019-12-28 CN CN201911384716.5A patent/CN113051069B/en active Active
-
2020
- 2020-10-30 WO PCT/CN2020/125221 patent/WO2021129143A1/en active Application Filing
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
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 |
CN113051069A (en) | 2021-06-29 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105843650B (en) | Application program management method and device in intelligent terminal | |
JP6629883B2 (en) | Content search engine | |
CN102149171A (en) | Method and device for selecting network based on converged heterogeneous radio access network | |
CN110597965B (en) | Emotion polarity analysis method and device for article, electronic equipment and storage medium | |
CN115543577B (en) | Covariate-based Kubernetes resource scheduling optimization method, storage medium and device | |
WO2021185113A1 (en) | Data analysis method based on multiple analysis tasks and electronic device | |
CN109829098A (en) | Search result optimization method, device and server | |
CN115907926A (en) | Commodity recommendation method and device, electronic equipment and storage medium | |
CN110377821A (en) | Generate method, apparatus, computer equipment and the storage medium of interest tags | |
CN113205189B (en) | Method for training prediction model, prediction method and device | |
CN112559078B (en) | Method and system for hierarchically unloading tasks of mobile edge computing server | |
CN114360027A (en) | Training method and device for feature extraction network and electronic equipment | |
CN113051069B (en) | Data analysis method and device based on multitasking and terminal equipment | |
CN116456496B (en) | Resource scheduling method, storage medium and electronic equipment | |
CN110909797B (en) | Image detection method and device, equipment and storage medium | |
CN116956204A (en) | Network structure determining method, data predicting method and device of multi-task model | |
CN115454620A (en) | Load prediction method, load prediction device, electronic device, and storage medium | |
CN114675845A (en) | Information age optimization method and device, computer equipment and storage medium | |
CN113570114A (en) | Intelligent matching method and system for resource service and computer equipment | |
CN113467892A (en) | Distributed cluster resource configuration method and corresponding device, equipment and medium | |
CN117707797B (en) | Task scheduling method and device based on distributed cloud platform and related equipment | |
CN109272180B (en) | Cloud manufacturing service implementation method and device and cloud manufacturing service platform | |
US20190362294A1 (en) | Systems and computer-implemented methods for dynamic and automatic resource management | |
Chakraborty et al. | Multi-criterial Offloading Decision Making in Green Mobile Cloud Computing | |
CN112684878B (en) | Data transmission method and electronic equipment |
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 |