Task execution method and device
By controlling the download of electronic equipment in the detection stage and checking and installing file integrity in the pre-download stage during the task execution of electronic equipment, the problem of time-consuming download of electronic equipment software is solved, and the production efficiency is improved and the correct installation of files is achieved.
Patent Information
- Application Number
- CN202411545821.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-31
- Publication Date
- 2025-02-25
AI Technical Summary
Electronic equipment takes a long time during software download before leaving the factory, resulting in an increase in production line waiting time and impact on production beats, reducing production efficiency.
By determining the task stage in which the electronic device is located, controlling it to download the target file in the detection stage, and perform file integrity checksum installation in the pre-download stage, it realizes the tasks of different task stages in parallel, thereby saving the overall process time.
By performing tasks in parallel, the production process time of electronic equipment is significantly saved, production efficiency is improved, and the file integrity and correct installation is ensured.
Smart Images

Figure CN119512574A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to a task execution method and device. Background Art
[0002] In the preparation stage before electronic equipment leaves the factory, due to the large number of pre-installed software and the long download time of some of the software, the electronic equipment takes a long time in the download stage. This situation not only increases the waiting time of the production line, but also significantly affects the production rhythm and reduces production efficiency. Summary of the invention
[0003] The embodiments of the present application provide a task execution method and device.
[0004] The technical solution of this application is implemented as follows:
[0005] In a first aspect, an embodiment of the present application provides a task execution method, which is applied to a first electronic device, including:
[0006] determining a first task stage of at least one second electronic device;
[0007] If there is at least one task stage after the first task stage, control the second electronic device to perform the target task in the first task stage, so that the second electronic device performs the task based on the execution result of the target task in at least one task stage; the target task is a partial task in at least one task stage.
[0008] In the above-mentioned task execution method, before controlling the second electronic device to execute the target task in the first task stage, the method further includes:
[0009] Acquire first information corresponding to the first task stage; the first information at least includes the duration and identification data of the first task stage;
[0010] If the identification data indicates that tasks of other task stages can be executed in parallel within the first task stage, a target task is selected from at least one task stage according to a duration.
[0011] In the above-mentioned task execution method, the first task stage includes a plurality of subtask stages, and the duration includes a plurality of subdurations of the plurality of subtask stages; and selecting a target task from at least one task stage according to the duration includes:
[0012] Determine a first subtask stage that satisfies a first condition from among the multiple subtask stages; the first condition indicates that there will be no impact between the tasks executed in parallel;
[0013] Determine a first sub-duration of a first sub-task phase according to the multiple sub-durations;
[0014] According to the first sub-duration, a target task is selected from at least one task stage, and the target task is executed in parallel with the tasks of the first sub-task stage.
[0015] In the above task execution method, selecting a target task from at least one task stage according to the first sub-duration includes:
[0016] Obtain at least one duration corresponding to at least one task phase;
[0017] Determine a target duration of at least one duration whose duration is shorter than the first sub-duration;
[0018] A task performed in a target task stage corresponding to the target duration in at least one task stage is determined as a target task.
[0019] In the above task execution method, the method further includes:
[0020] Acquiring device information of the second electronic device at a preset position of the second electronic device; the device information of the second electronic device is stored at the preset position by the second electronic device before entering the first task stage;
[0021] If the device information indicates that the second electronic device satisfies the second condition, determining the first task stage corresponding to the second electronic device; the second condition indicates that the second electronic device has the ability to use the target model, and the number of trainable parameters of the target model is greater than 100 million;
[0022] If the device information indicates that the second electronic device does not satisfy the second condition, the second electronic device is controlled to perform a corresponding task in each task stage.
[0023] In the above task execution method, the first task stage is a detection stage, at least one task stage is a pre-download stage, the target task is to download a target file, and the download time of the target file is greater than a first threshold value; the method further includes:
[0024] If there is a pre-download phase after the detection phase, controlling the second electronic device to download the target file during the detection phase;
[0025] Performing a check on the integrity of the target file to obtain a first check result;
[0026] If the first verification result indicates that the downloaded target file is complete, the target file is retained.
[0027] In the above task execution method, the method further includes:
[0028] If the second electronic device enters the pre-download phase, obtaining the target file downloaded and retained in the detection phase;
[0029] Performing a second verification on the integrity of the target file to obtain a second verification result;
[0030] If the second verification result indicates that the downloaded target file is complete, the target file is installed together with other files into a preset storage area of the second electronic device; the other files are download files corresponding to other download tasks, and the other download tasks are download tasks other than the target task in at least one download task in the pre-download stage.
[0031] In the above task execution method, the method further includes:
[0032] If there are other download tasks except the target task in the pre-download stage, the second electronic device is controlled to download other files in the pre-download stage so that the second electronic device can install files downloaded in different stages; the other download tasks are to download other files.
[0033] In the above task execution method, the method further includes:
[0034] If the second electronic device completes the detection phase, the detection data corresponding to the detection phase is deleted while retaining the target file.
[0035] In a second aspect, an embodiment of the present application provides a task execution device, including:
[0036] A determination module, used to determine a first task stage of at least one second electronic device;
[0037] A control module is used to control the second electronic device to perform a target task in the first task stage if there is at least one task stage after the first task stage, so that the second electronic device performs a task based on the execution result of the target task in at least one task stage; the target task is a partial task in at least one task stage. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 A flowchart of a task execution method provided in an embodiment of the present application;
[0039] Figure 2 An exemplary method for determining a target task provided in the embodiment of the present application is as follows: Figure 1 ;
[0040] Figure 3 An exemplary method for determining a target task provided in the embodiment of the present application is as follows: Figure 2 ;
[0041] Figure 4 An exemplary method for determining a target task provided in the embodiment of the present application is as follows: Figure 3 ;
[0042] Figure 5 A flowchart of an exemplary task execution method provided in an embodiment of the present application;
[0043] Figure 6 An exemplary file integrity verification method process provided in the embodiment of the present application Figure 1 ;
[0044] Figure 7 An exemplary file integrity verification method process provided in the embodiment of the present application Figure 2 ;
[0045] Figure 8 A schematic diagram of an exemplary production process flow provided in an embodiment of the present application;
[0046] Fig. 9 A schematic diagram of the structure of a task execution device provided in an embodiment of the present application Figure 1 ;
[0047] Fig.10 A schematic diagram of the structure of a task execution device provided in an embodiment of the present application Figure 2 . DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0049] The present application embodiment provides a task execution method, which is applied to a first electronic device. Figure 1 A flowchart of a task execution method provided in an embodiment of the present application is as follows: Figure 1 As shown, the task execution method may include the following steps S101 to S102:
[0050] Step S101: Determine a first task stage of at least one second electronic device.
[0051] In an embodiment of the present application, a first electronic device determines a first task stage of at least one second electronic device.
[0052] In some embodiments of the present application, the first electronic device is a device used to control the second electronic device to perform corresponding tasks at different task stages; the second electronic device may be a mobile terminal, such as a smart phone, a tablet computer, and a smart watch, etc., and the second electronic device may also be a portable laptop computer; the specific first electronic device and the second electronic device may be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0053] In some embodiments of the present application, the first task stage may be a stage that the second electronic device needs to go through during the production process, such as a testing stage, a software download stage, or a software installation stage; the specific first task stage may be determined based on actual conditions, and the embodiments of the present application do not make any specific limitations here.
[0054] Step S102: If there is at least one task stage after the first task stage, control the second electronic device to perform the target task in the first task stage, so that the second electronic device performs the task based on the execution result of the target task in at least one task stage; the target task is a partial task in at least one task stage.
[0055] In an embodiment of the present application, after the first electronic device determines that at least one second electronic device is in a first task stage, if there is at least one task stage after the first task stage, the first electronic device controls the second electronic device to perform a target task in the first task stage, so that the second electronic device performs a task based on the execution result of the target task in at least one task stage; the target task is a partial task in at least one task stage.
[0056] In some embodiments of the present application, assuming that the first task stage is a testing stage, then at least one task stage includes at least a software download stage and one or more stages of a software installation stage. Assuming that the first task stage is a software download stage, then at least one task stage can be a software installation stage. The specific at least one task stage can be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0057] In some embodiments of the present application, after entering at least one task stage, the second electronic device needs to execute a task in at least one task stage. Assuming that at least one task stage includes a software download stage, the target task can be a download task of a certain software in the software download stage. Assuming that at least one task stage includes a software installation stage, the target task can be an installation task of a certain software in the software installation stage. The specific target task can be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0058] Exemplarily, the first task stage is the testing stage, at least one task stage is the software downloading stage and the software installation stage, and the target task is to download a certain software. At this time, the first electronic device can control the second electronic device to perform the downloading task of a certain software in the testing stage. Based on this, when the second electronic device enters the software downloading stage, there is no need to repeat the downloading steps for the software. Therefore, when the second electronic device enters the software installation stage, it can directly perform the installation operation based on the software downloaded in the testing stage, saving the production process of the second electronic device.
[0059] Another example is that the first task stage is a software download stage, at least one task stage is a software installation stage, and the target task is to install a certain software. At this time, the first electronic device can control the second electronic device to perform a certain software installation task in the software download stage. Based on this, when the second electronic device enters the software installation stage, there is no need to repeat the installation steps for the software, thereby saving the production process of the second electronic device.
[0060] Based on the above embodiment, before the first electronic device controls the second electronic device to perform the target task in the first task stage, Figure 2 , it is also necessary to perform the following steps S201 to S202:
[0061] Step S201, obtaining first information corresponding to a first task stage; the first information at least includes a duration and identification data of the first task stage.
[0062] In an embodiment of the present application, the first electronic device obtains first information corresponding to the first task stage; the first information includes at least the duration of the first task stage and identification data.
[0063] In some embodiments of the present application, the first task stage may include one or more sub-task stages. If the first task stage includes only one sub-task stage, then the duration of the first task stage is the duration of the sub-task stage. If the first task stage includes multiple sub-task stages, then the duration of the first task stage is the multiple sub-durations of the multiple sub-task stages. The specific duration can be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0064] Step S202: If the identification data indicates that tasks of other task stages can be executed in parallel within the first task stage, a target task is selected from at least one task stage according to the duration.
[0065] In an embodiment of the present application, after the first electronic device obtains the duration and identification data of the first task stage, if the identification data indicates that tasks of other task stages can be executed in parallel within the first task stage, the first electronic device selects a target task from at least one task stage according to the duration.
[0066] In some embodiments of the present application, the first task stage may include one or more sub-task stages. If the first task stage includes only one sub-task stage, then the identification data of the first task stage is the identification data of the sub-task stage, that is, it is used to indicate whether the tasks of other task stages can or cannot be executed in parallel within the sub-task stage. If the first task stage includes multiple sub-task stages, then the identification data of the first task stage is multiple sub-identification data of multiple sub-task stages, that is, it is used to indicate whether the tasks of other task stages can or cannot be executed in parallel within each sub-task stage. The specific identification data can be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0067] In some embodiments of the present application, when the first electronic device selects a target task from at least one task stage after the first task stage based on the duration, if the first task stage includes only one subtask stage, then the first electronic device may select the target task from at least one task stage based on the duration of the subtask stage to execute in parallel within the subtask stage; if the first task stage includes multiple subtask stages, then the first electronic device may select the target task from at least one task stage in turn based on the duration of each subtask stage to execute in parallel within the subtask stage.
[0068] Based on the above embodiment, the first task stage includes multiple subtask stages, the duration includes multiple sub-durations of the multiple subtask stages, and the first electronic device selects a target task from at least one task stage according to the duration, referring to Figure 3 , including the following steps S301 to S303:
[0069] Step S301 , determining a first subtask stage that meets a first condition from among multiple subtask stages; the first condition indicates that there will be no impact between tasks executed in parallel.
[0070] In an embodiment of the present application, when selecting a target task, the first electronic device first determines a first subtask stage from multiple subtask stages that satisfies a first condition; the first condition indicates that there will be no impact between tasks executed in parallel.
[0071] In some embodiments of the present application, the first task stage includes multiple sub-task stages, and the duration includes multiple sub-durations of the multiple sub-task stages. At this time, the first sub-task stage that meets the first condition among the multiple sub-task stages can be determined based on multiple sub-identification data corresponding to the multiple sub-task stages included in the identification data, and the number of the first sub-task stages is one or more.
[0072] Step S302: Determine a first sub-duration of a first sub-task phase according to the multiple sub-durations.
[0073] In an embodiment of the present application, after the first electronic device determines a first subtask stage that can execute tasks in parallel from multiple subtask stages, it determines a first sub-duration of the first subtask stage based on multiple sub-durations, and the number of first sub-durations corresponds to the number of first subtask stages.
[0074] Step S303: Select a target task from at least one task stage according to the first sub-duration, and execute the target task in parallel with the tasks of the first sub-task stage.
[0075] In an embodiment of the present application, after determining the first sub-duration of the first sub-task stage, the first electronic device selects a target task from at least one task stage according to the first sub-duration, and executes the target task in parallel with the tasks of the first sub-task stage.
[0076] In some embodiments of the present application, if the number of first subtask stages is one, at this time, a target task that can be executed in parallel can be selected from at least one task stage according to the first sub-duration of the first subtask stage; if the number of first subtask stages is multiple, at this time, a target task that can be executed in parallel can be selected from at least one task stage for each first subtask stage according to the first sub-duration of each first subtask stage.
[0077] Based on the above embodiment, the first electronic device selects a target task from at least one task stage according to the first sub-duration, referring to Figure 4 , including the following steps S401 to S403:
[0078] Step S401: Obtain at least one duration corresponding to at least one task stage.
[0079] In an embodiment of the present application, the first electronic device obtains at least one duration corresponding to at least one task stage.
[0080] In some embodiments of the present application, the first electronic device can obtain the duration of each task stage included in at least one task stage. For example, at least one task stage includes multiple different download task stages. In this case, the download duration of each download task stage can be obtained; or, at least one task stage includes multiple different installation task stages. In this case, the installation duration of each installation task stage can be obtained; the specific duration can be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0081] Step S402: Determine a target duration whose duration among at least one duration is smaller than the first sub-duration.
[0082] In the embodiment of the present application, after acquiring at least one duration, the first electronic device determines a target duration in the at least one duration that is shorter than the first sub-duration.
[0083] In some embodiments of the present application, in order to complete the target task within the first sub-task stage, the target duration of the target task needs to be less than the first sub-duration. Based on this, a target duration less than the first sub-duration can be found from at least one duration. If there are multiple durations less than the first sub-duration in at least one duration, at this time, the duration closest to the first sub-duration among the multiple durations less than the first sub-duration can be selected and determined as the target duration; further, the target duration can also be composed of multiple durations. For example, there are multiple durations less than the first sub-duration in at least one duration, and each of the multiple durations less than the first sub-duration is very short. Therefore, at least two durations can be selected from the multiple durations less than the first sub-duration as the target duration, as long as the sum of at least two durations is still less than the first sub-duration. It can be understood that at least two target tasks are executed in parallel while executing the tasks of the first sub-task stage.
[0084] Step S403: Determine, in at least one task stage, a task executed in a target task stage corresponding to a target duration as a target task.
[0085] In the embodiment of the present application, after the first electronic device determines the target duration, it determines a task performed in a target task stage corresponding to the target duration in at least one task stage as a target task.
[0086] In some embodiments of the present application, if the target duration includes only one duration, then the number of target tasks is one, that is, one target task is executed in parallel while executing the tasks of the first subtask stage; if the target duration includes at least two durations, then the number of target tasks is at least two, that is, at least two target tasks are executed in parallel while executing the tasks of the first subtask stage; the specific number of target tasks can be determined based on actual conditions, and the embodiments of the present application do not make specific limitations here.
[0087] Based on the above embodiments, reference Figure 5 , the first electronic device may further perform the following steps S501 to S503:
[0088] Step S501: acquiring device information of the second electronic device at a preset location of the second electronic device; the device information of the second electronic device is stored at the preset location by the second electronic device before entering the first task stage.
[0089] In an embodiment of the present application, the first electronic device obtains device information of the second electronic device at a preset position of the second electronic device; the device information of the second electronic device is stored at the preset position by the second electronic device before entering the first task stage.
[0090] In some embodiments of the present application, there is a second task stage before the first task stage. When the second electronic device is in the second task stage, the first electronic device refreshes the device information of the second electronic device to the preset position of the second device; wherein the device information of the second device can identify whether the second device is a device of a preset type, for example, the second device is an artificial intelligence (AI) computer. At this time, the device information can be an identification indicating that the second device is an AI computer, and the preset position can be the Basic Input Output System (BIOS) of the second electronic device; the specific device information and preset position can be selected according to actual conditions, and the embodiments of the present application do not make specific limitations here.
[0091] Step S502: If the device information indicates that the second electronic device satisfies the second condition, determine the first task stage corresponding to the second electronic device; the second condition indicates that the second electronic device has the ability to utilize the target model, and the number of trainable parameters of the target model is greater than 100 million.
[0092] In an embodiment of the present application, after the first electronic device obtains the device information of the second electronic device, if the device information indicates that the second electronic device satisfies a second condition, the first task stage corresponding to the second electronic device is determined; the second condition indicates that the second electronic device has the ability to utilize the target model, and the number of trainable parameters of the target model is greater than 100 million.
[0093] In some embodiments of the present application, if the device information of the second electronic device characterizes that the second electronic device is an AI computer, at this time, the second electronic device has the ability to utilize the target model, and the number of trainable parameters of the target model is greater than 100 million. Therefore, when the second electronic device enters the download phase, it is necessary to download the corresponding large model file. Since the large model file is large, it usually takes a long time to download. Therefore, the large model file can be pre-downloaded in the first task phase to save the time required for the second electronic device in the download phase.
[0094] Step S503: If the device information indicates that the second electronic device does not satisfy the second condition, control the second electronic device to perform a corresponding task in each task stage.
[0095] In an embodiment of the present application, after the first electronic device obtains the device information of the second electronic device, if the device information indicates that the second electronic device does not meet the second condition, the first electronic device controls the second electronic device to perform a corresponding task in each task stage.
[0096] In some embodiments of the present application, if the device information of the second electronic device indicates that the second electronic device is not an AI computer, then the second electronic device does not have the ability to utilize the target model. Therefore, when the second electronic device enters the download phase, it is not necessary to download the corresponding large model file. Therefore, when the second electronic device enters the download phase, it is sufficient to download the general file without downloading it in parallel in the first task phase.
[0097] Based on the above embodiment, the first task stage is the detection stage, at least one task stage is the pre-download stage, the target task is to download the target file, the download time of the target file is greater than the first threshold value, and the reference Figure 6 , the first electronic device may further perform the following steps S601 to S603:
[0098] Step S601: If there is a pre-download phase after the detection phase, control the second electronic device to download the target file in the detection phase.
[0099] In some embodiments of the present application, if there is a pre-download phase after the detection phase, the second electronic device is controlled to download the determined target file during the detection phase. Since the download time of the target file is relatively long, placing the target file in the detection phase for download can save the download time of the pre-download phase.
[0100] Step S602: perform a check on the integrity of the target file to obtain a first check result.
[0101] In some embodiments of the present application, after the first electronic device controls the second electronic device to download the target file during the detection phase, in order to avoid the second electronic device affecting the downloading of the target file when performing the detection task during the detection phase, it is also necessary to verify the integrity of the target file to obtain a first verification result for the target file.
[0102] In some embodiments of the present application, a parity check method may be used when verifying the integrity of a target file; the specific verification method may be selected based on actual conditions, and the embodiments of the present application do not make any specific limitations thereon.
[0103] Step S603: If the first verification result indicates that the downloaded target file is complete, the target file is retained.
[0104] In some embodiments of the present application, after the first electronic device performs a check on the integrity of the target file and obtains a first check result for the target file, if the first check result indicates that the downloaded target file is complete, the target file is retained; similarly, if the first check result indicates that the downloaded target file is incomplete, the target file is not retained.
[0105] Based on the above embodiments, reference Figure 7 , the first electronic device may further perform the following steps S701 to S703:
[0106] Step S701: If the second electronic device enters the pre-download phase, the target file downloaded and retained in the detection phase is obtained.
[0107] In some embodiments of the present application, if the second electronic device completes the detection phase and enters the pre-download phase, the first electronic device obtains the target file downloaded and retained during the detection phase. At this time, the target file obtained is a file that has been verified once and passed the verification.
[0108] Step S702: perform a second verification on the integrity of the target file to obtain a second verification result.
[0109] In some embodiments of the present application, after the first electronic device obtains the target file that passes the primary check, it is also necessary to perform a secondary check on the integrity of the target file to prevent the target file from being damaged during the detection phase.
[0110] Step S703: If the second verification result indicates that the downloaded target file is complete, the target file is installed together with other files into a preset storage area of the second electronic device; the other files are download files corresponding to other download tasks, and the other download tasks are download tasks other than the target task in at least one download task in the pre-download stage.
[0111] In some embodiments of the present application, after entering the pre-download stage, the second electronic device also needs to perform a corresponding download task, that is, download a specified file. At this time, since the target file in the specified file has been downloaded in the detection stage, the second electronic device only needs to download other files in the specified file except the target file, and after the target file passes the secondary verification, the target file is installed together with other downloaded files to the preset storage area of the second electronic device; it should be noted that this installation step can be selected to be executed when the second electronic device enters the installation stage.
[0112] Based on the above embodiment, the first electronic device can also perform the following steps: if there are other download tasks besides the target task in the pre-download stage, control the second electronic device to download other files in the pre-download stage so that the second electronic device can install files downloaded in different stages; other download tasks are to download other files.
[0113] In some embodiments of the present application, similar to the above, if there are other download tasks in addition to the target task in the pre-download stage, that is, downloading other files, the second electronic device can perform download tasks for other files in the pre-download stage. Based on this, the second electronic device can install the other files downloaded in the pre-download stage together with the target files downloaded in the detection stage when entering the installation stage.
[0114] Based on the above embodiment, the first electronic device may further perform the following steps: if the second electronic device completes the detection phase, the detection data corresponding to the detection phase is deleted while retaining the target file.
[0115] In some embodiments of the present application, if the second electronic device completes the detection phase and a verification of the target file passes, the target file can be retained and the detection data used by the second electronic device in the detection phase can be deleted to free up storage space of the second electronic device.
[0116] An embodiment of the present application provides a task execution method, which is applied to a first electronic device, and the method includes: determining a first task stage in which at least one second electronic device is located; if there is at least one task stage after the first task stage, controlling the second electronic device to perform a target task in the first task stage, so that the second electronic device performs a task based on the execution result of the target task in at least one task stage; the target task is a partial task in at least one task stage; using the above-mentioned implementation scheme, when the electronic device is in the first task stage to perform a task, the present application controls the electronic device and executes tasks in subsequent task stages, and by executing tasks in different task stages in parallel, the overall process time can be saved, thereby improving production efficiency.
[0117] Based on the above embodiment, the present application explains the process of executing the above task through an exemplary embodiment, and the specific steps are as follows:
[0118] Assume that the second electronic device is an AI personal computer (Personal Computer, PC), refer to Figure 8During the production process, AIPC first passes through the pre-installed software download test (Test Preload Download, TPDL) site / assembly function test (Assembly Function Test, AFT) site, then passes through the Run-in (test) site, and finally enters the software download pre-installation (Software Download, SWDL) site.
[0119] Step 1. Determine the order information. If the order information indicates that the electronic device currently being produced is an AIPC, then refresh the AI flag (device information in the above embodiment) to the system BIOS of the electronic device at the TPDL / AFT site to mark the electronic device as an AIPC.
[0120] Step 2. In the test automation script of the Run-in site (the first task stage in the above embodiment), add the corresponding test duration (duration in the above embodiment) for each test item (the subtask stage in the above embodiment), and a mark (identification data in the above embodiment) indicating whether the current test item is suitable for downloading files in parallel in the background during the test.
[0121] Refer to Table 1, which is an exemplary test item table given in the embodiment of the present application:
[0122] Table 1 Exemplary test item table
[0123]
[0124]
[0125] Step 3. Before running each test item at the Run-in site, use the tool to read the test duration and mark corresponding to the test item in the test automation script (for example, a mark of 0 indicates that it is not suitable for downloading, and a mark of 1 indicates that it is suitable for downloading). If the mark indicates that it is suitable for downloading, use the tool to read the file information that the electronic device needs to download in the order information.
[0126] Step 4: Search the file information for a file (target file) whose downloading time satisfies the test time corresponding to the test item, such as a large-size AI file, and automatically trigger the downloading of the AI file.
[0127] Step 5. After all test items at the Run-in site are completed, before entering the SWDL site, the test data needs to be deleted. If an AI flag is detected in the system BIOS of the electronic device, the downloaded AI file is retained and the integrity of the AI file is verified once using the parity check method. If the verification passes, the AI file is retained.
[0128] Step 6. After entering the SWDL site, obtain the AI file retained at the Run-in site, and use the parity check method to perform a second check on the integrity of the AI file. If the check passes, directly install the AI file, which can save the time of downloading large-size AI files at the SWDL site, thereby improving production line efficiency.
[0129] Based on the above embodiment, in another embodiment of the present application, a task execution device 9 is provided. Fig. 9 A schematic diagram of the structure of a task execution device provided in this application Figure 1 ,like Fig. 9 As shown, the task execution device 9 includes:
[0130] The determination module 900 is used to determine the first task stage of at least one second electronic device;
[0131] The control module 901 is used to control the second electronic device to perform a target task in the first task stage if there is at least one task stage after the first task stage, so that the second electronic device performs a task based on the execution result of the target task in the at least one task stage; the target task is a partial task in the at least one task stage.
[0132] In some embodiments, the task execution device 9 further includes: an acquisition module and a selection module;
[0133] The acquisition module is used to acquire first information corresponding to the first task stage; the first information at least includes the duration and identification data of the first task stage;
[0134] The selection module is configured to select the target task from the at least one task stage according to the duration if the identification data indicates that tasks of other task stages can be executed in parallel within the first task stage.
[0135] In some embodiments, the determination module 900 is further used to determine a first subtask stage that satisfies a first condition from among the multiple subtask stages; the first condition indicates that there will be no impact between the tasks executed in parallel;
[0136] The determining module 900 is further configured to determine a first sub-duration of the first sub-task phase according to the multiple sub-durations;
[0137] The selection module is further configured to select the target task from the at least one task stage according to the first sub-duration, and execute the target task in parallel with the tasks of the first sub-task stage.
[0138] In some embodiments, the acquisition module is further used to acquire at least one duration corresponding to the at least one task stage;
[0139] The determination module 900 is further used to determine a target duration in the at least one duration that is less than the first sub-duration; and to determine a task executed in a target task stage corresponding to the target duration in the at least one task stage as the target task.
[0140] In some embodiments, the acquisition module is further used to acquire device information of the second electronic device at a preset position of the second electronic device; the device information of the second electronic device is stored at the preset position by the second electronic device before entering the first task stage;
[0141] The determination module 900 is further configured to determine a first task stage corresponding to the second electronic device if the device information indicates that the second electronic device satisfies a second condition; the second condition indicates that the second electronic device has the ability to utilize a target model, and the number of trainable parameters of the target model is greater than 100 million;
[0142] The control module 901 is further configured to control the second electronic device to perform a corresponding task in each task stage if the device information indicates that the second electronic device does not satisfy a second condition.
[0143] In some embodiments, the task execution device 9 further includes: a verification module and a storage module;
[0144] The control module 901 is further configured to control the second electronic device to download the target file in the detection phase if there is a pre-download phase after the detection phase;
[0145] The verification module is used to verify the integrity of the target file and obtain a first verification result;
[0146] The storage module is configured to retain the target file if the first verification result indicates that the downloaded target file is complete.
[0147] In some embodiments, the task execution device 9 further includes: an installation module;
[0148] The acquisition module is further configured to acquire the target file downloaded and retained in the detection phase if the second electronic device enters the pre-download phase;
[0149] The verification module is further used to perform a second verification on the integrity of the target file to obtain a second verification result;
[0150] The installation module is used to install the target file together with other files into a preset storage area of the second electronic device if the second verification result indicates that the downloaded target file is complete; the other files are download files corresponding to other download tasks, and the other download tasks are download tasks other than the target task in at least one download task in the pre-download stage.
[0151] In some embodiments, the control module 901 is also used to control the second electronic device to download other files in the pre-download stage if there are other download tasks other than the target task in the pre-download stage, so that the second electronic device can install files downloaded in different stages; the other download tasks are to download the other files.
[0152] In some embodiments, the task execution device 9 further includes: a deletion module;
[0153] The deleting module is used to delete the detection data corresponding to the detection stage while retaining the target file if the second electronic device completes the detection stage.
[0154] An embodiment of the present application provides a task execution device, which includes: a determination module, used to determine a first task stage in which at least one second electronic device is located; a control module, used to control the second electronic device to perform a target task in the first task stage if there is at least one task stage after the first task stage, so that the second electronic device performs a task based on the execution result of the target task in at least one task stage; the target task is a partial task in at least one task stage; using the above-mentioned implementation scheme, when the electronic device is in the first task stage to perform a task, the present application controls the electronic device and executes tasks in subsequent task stages, and by executing tasks in different task stages in parallel, the overall process time can be saved, thereby improving production efficiency.
[0155] Fig.10 A schematic diagram of the structure of a task execution device provided in an embodiment of the present application Figure 2 In practical applications, based on the same disclosure concept of the above embodiments, Fig.10 As shown, the task execution device 9 of this embodiment further includes: a processor 902 , a memory 903 and a communication bus 904 .
[0156] In the process of a specific embodiment, the processor 902 can be at least one of an application-specific integrated circuit (ASIC), a digital signal processor (DSP), a digital signal processing device (DSPD), a programmable logic device (PLD), a field programmable gate array (FPGA), a CPU, a controller, a microcontroller, and a microprocessor. It can be understood that for different task execution devices 9, the electronic device used to implement the above-mentioned processor function can also be other, which is not specifically limited in this embodiment.
[0157] In the embodiment of the present application, the processor 902 implements the following task execution method:
[0158] determining a first task stage of at least one second electronic device;
[0159] If there is at least one task stage after the first task stage, control the second electronic device to perform a target task in the first task stage, so that the second electronic device performs a task based on the execution result of the target task in the at least one task stage; the target task is a partial task in the at least one task stage.
[0160] In some embodiments, the processor 902 is further used to obtain first information corresponding to the first task stage; the first information includes at least the duration of the first task stage and identification data; if the identification data represents that tasks of other task stages can be executed in parallel within the first task stage, the target task is selected from the at least one task stage according to the duration.
[0161] In some embodiments, the processor 902 is further used to determine a first subtask stage that satisfies a first condition from the multiple subtask stages; the first condition indicates that there will be no impact between tasks executed in parallel; based on the multiple sub-durations, a first sub-duration of the first subtask stage is determined; based on the first sub-duration, the target task is selected from the at least one task stage, and the target task is executed in parallel while executing the tasks of the first subtask stage.
[0162] In some embodiments, the processor 902 is further used to obtain at least one duration corresponding to the at least one task stage; determine a target duration in the at least one duration that is less than the first sub-duration; and determine the task executed in the target task stage corresponding to the target duration in the at least one task stage as the target task.
[0163] In some embodiments, the processor 902 is further used to obtain device information of the second electronic device at a preset position of the second electronic device; the device information of the second electronic device is stored at the preset position by the second electronic device before entering the first task stage; if the device information represents that the second electronic device satisfies a second condition, the first task stage corresponding to the second electronic device is determined; the second condition represents that the second electronic device has the ability to utilize a target model, and the number of trainable parameters of the target model is greater than 100 million; if the device information represents that the second electronic device does not meet the second condition, the second electronic device is controlled to perform corresponding tasks in each task stage.
[0164] In some embodiments, the processor 902 is further used to control the second electronic device to download the target file during the detection phase if there is a pre-download phase after the detection phase; perform a check on the integrity of the target file to obtain a first check result; if the first check result indicates that the downloaded target file is complete, retain the target file.
[0165] In some embodiments, the processor 902 is further used to obtain the target file downloaded and retained in the detection phase if the second electronic device enters the pre-download phase; perform a secondary check on the integrity of the target file to obtain a second check result; if the second check result indicates that the downloaded target file is complete, install the target file together with other files into a preset storage area of the second electronic device; the other files are download files corresponding to other download tasks, and the other download tasks are download tasks other than the target task in at least one download task in the pre-download phase.
[0166] In some embodiments, the processor 902 is also used to control the second electronic device to download other files in the pre-download stage if there are other download tasks other than the target task in the pre-download stage, so that the second electronic device can install files downloaded in different stages; the other download tasks are to download the other files.
[0167] In some embodiments, the processor 902 is further configured to delete the detection data corresponding to the detection phase while retaining the target file if the second electronic device completes the detection phase.
[0168] The embodiment of the present application provides a computer-readable storage medium, which stores one or more computer programs, and the one or more computer programs can be executed by one or more processors to implement the above method. The computer-readable storage medium can be a volatile memory (volatile memory), such as a random access memory (Random-Access Memory, RAM); or a non-volatile memory (non-volatile memory), such as a read-only memory (Read-Only Memory, ROM), a flash memory (flash memory), a hard disk (Hard Disk Drive, HDD) or a solid-state drive (Solid-State Drive, SSD); or it can be a respective device including one or any combination of the above memories, such as a mobile phone, a computer, a tablet device, a personal digital assistant, etc.
[0169] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of hardware embodiments, software embodiments, or embodiments in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage and optical storage, etc.) that contain computer-usable program code.
[0170] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0171] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0172] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0173] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily thought of by a person skilled in the art within the technical scope disclosed in the present application should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A task execution method, applied to a first electronic device, comprising: determining a first task stage of at least one second electronic device; If there is at least one task stage after the first task stage, controlling the second electronic device to perform a target task in the first task stage, so that the second electronic device performs a task based on an execution result of the target task in the at least one task stage; The target task is a partial task in the at least one task stage.
2. The method according to claim 1, before controlling the second electronic device to perform the target task in the first task stage, the method further comprises: Acquire first information corresponding to the first task stage; The first information includes at least the duration and identification data of the first task phase; If the identification data indicates that tasks of other task phases can be executed in parallel within the first task phase, the target task is selected from the at least one task phase according to the duration.
3. The method according to claim 2, wherein the first task phase comprises a plurality of subtask phases, and the duration comprises a plurality of subdurations of the plurality of subtask phases; The selecting the target task from the at least one task stage according to the duration includes: Determining a first subtask stage satisfying a first condition from among the multiple subtask stages; the first condition indicating that there will be no impact between the tasks executed in parallel; Determine a first sub-duration of the first sub-task phase according to the multiple sub-durations; The target task is selected from the at least one task stage according to the first sub-duration, and the target task is executed in parallel with the tasks of the first sub-task stage.
4. The method according to claim 3, wherein selecting the target task from the at least one task stage according to the first sub-duration comprises: Obtaining at least one duration corresponding to the at least one task phase; Determine a target duration of the at least one duration whose duration is shorter than the first sub-duration; In the at least one task stage, a task performed in the target task stage corresponding to the target duration is determined as the target task.
5. The method according to any one of claims 1 to 4, further comprising: Acquiring device information of the second electronic device at a preset position of the second electronic device; The device information of the second electronic device is stored in the preset location by the second electronic device before entering the first task stage; If the device information indicates that the second electronic device satisfies a second condition, determining a first task stage corresponding to the second electronic device; The second condition indicates that the second electronic device has the ability to utilize the target model, and the number of trainable parameters of the target model is greater than 100 million; If the device information indicates that the second electronic device does not satisfy the second condition, the second electronic device is controlled to perform a corresponding task in each task stage.
6. The method according to claim 1, wherein the first task stage is a detection stage, the at least one task stage is a pre-download stage, the target task is to download a target file, and the download time of the target file is greater than a first threshold value; the method further comprises: If there is a pre-download phase after the detection phase, controlling the second electronic device to download the target file during the detection phase; Performing a check on the integrity of the target file to obtain a first check result; If the first verification result indicates that the downloaded target file is complete, the target file is retained.
7. The method according to claim 6, further comprising: If the second electronic device enters the pre-download phase, acquiring the target file downloaded and retained in the detection phase; Performing a second verification on the integrity of the target file to obtain a second verification result; If the second verification result indicates that the downloaded target file is complete, the target file is installed together with other files into a preset storage area of the second electronic device; the other files are download files corresponding to other download tasks, and the other download tasks are download tasks other than the target task in at least one download task in the pre-download stage.
8. The method according to claim 6 or 7, further comprising: If there are other download tasks except the target task in the pre-download stage, control the second electronic device to download other files in the pre-download stage so that the second electronic device can install files downloaded in different stages; the other download tasks are to download the other files.
9. The method according to claim 6 or 7, further comprising: If the second electronic device completes the detection phase, the detection data corresponding to the detection phase is deleted while retaining the target file.
10. A task execution device, comprising: A determination module, used to determine a first task stage of at least one second electronic device; a control module, configured to control the second electronic device to perform a target task in the first task stage if there is at least one task stage after the first task stage, so that the second electronic device performs a task based on an execution result of the target task in the at least one task stage; The target task is a partial task in the at least one task stage.