WO2023045207A1 - 任务处理方法及装置、电子设备、存储介质和计算机程序 - Google Patents
任务处理方法及装置、电子设备、存储介质和计算机程序 Download PDFInfo
- Publication number
- WO2023045207A1 WO2023045207A1 PCT/CN2022/075002 CN2022075002W WO2023045207A1 WO 2023045207 A1 WO2023045207 A1 WO 2023045207A1 CN 2022075002 W CN2022075002 W CN 2022075002W WO 2023045207 A1 WO2023045207 A1 WO 2023045207A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- processing
- task
- processed
- detection frame
- subtask
- Prior art date
Links
- 238000004590 computer program Methods 0.000 title claims abstract description 24
- 238000003672 processing method Methods 0.000 title claims abstract description 15
- 238000012545 processing Methods 0.000 claims abstract description 392
- 238000000034 method Methods 0.000 claims abstract description 92
- 230000006870 function Effects 0.000 claims abstract description 20
- 238000001514 detection method Methods 0.000 claims description 169
- 230000008569 process Effects 0.000 claims description 49
- 238000013136 deep learning model Methods 0.000 claims description 19
- 230000011218 segmentation Effects 0.000 claims description 8
- 230000007246 mechanism Effects 0.000 claims description 7
- 238000010586 diagram Methods 0.000 description 24
- 238000004891 communication Methods 0.000 description 11
- 238000005516 engineering process Methods 0.000 description 11
- 238000013480 data collection Methods 0.000 description 9
- 230000009471 action Effects 0.000 description 6
- 230000005540 biological transmission Effects 0.000 description 6
- 230000003287 optical effect Effects 0.000 description 5
- 230000000694 effects Effects 0.000 description 4
- 230000001815 facial effect Effects 0.000 description 4
- 230000003993 interaction Effects 0.000 description 4
- 230000005236 sound signal Effects 0.000 description 4
- 230000003068 static effect Effects 0.000 description 4
- 230000001960 triggered effect Effects 0.000 description 4
- 238000003491 array Methods 0.000 description 3
- 230000002452 interceptive effect Effects 0.000 description 3
- 238000007726 management method Methods 0.000 description 3
- 230000004044 response Effects 0.000 description 3
- 230000001133 acceleration Effects 0.000 description 2
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000013527 convolutional neural network Methods 0.000 description 2
- 230000018109 developmental process Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- JEIPFZHSYJVQDO-UHFFFAOYSA-N iron(III) oxide Inorganic materials O=[Fe]O[Fe]=O JEIPFZHSYJVQDO-UHFFFAOYSA-N 0.000 description 2
- 239000004973 liquid crystal related substance Substances 0.000 description 2
- 238000010295 mobile communication Methods 0.000 description 2
- 230000001902 propagating effect Effects 0.000 description 2
- 238000013515 script Methods 0.000 description 2
- 239000004065 semiconductor Substances 0.000 description 2
- 230000000007 visual effect Effects 0.000 description 2
- KLDZYURQCUYZBL-UHFFFAOYSA-N 2-[3-[(2-hydroxyphenyl)methylideneamino]propyliminomethyl]phenol Chemical compound OC1=CC=CC=C1C=NCCCN=CC1=CC=CC=C1O KLDZYURQCUYZBL-UHFFFAOYSA-N 0.000 description 1
- RYGMFSIKBFXOCR-UHFFFAOYSA-N Copper Chemical compound [Cu] RYGMFSIKBFXOCR-UHFFFAOYSA-N 0.000 description 1
- 230000004075 alteration Effects 0.000 description 1
- 230000003190 augmentative effect Effects 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 230000001413 cellular effect Effects 0.000 description 1
- 230000000295 complement effect Effects 0.000 description 1
- 229910052802 copper Inorganic materials 0.000 description 1
- 239000010949 copper Substances 0.000 description 1
- 238000013135 deep learning Methods 0.000 description 1
- 201000001098 delayed sleep phase syndrome Diseases 0.000 description 1
- 208000033921 delayed sleep phase type circadian rhythm sleep disease Diseases 0.000 description 1
- 238000000605 extraction Methods 0.000 description 1
- 210000000887 face Anatomy 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
- 230000006872 improvement Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 229910044991 metal oxide Inorganic materials 0.000 description 1
- 150000004706 metal oxides Chemical class 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 230000002093 peripheral effect Effects 0.000 description 1
- 229920000747 poly(lactic acid) Polymers 0.000 description 1
- 239000004576 sand Substances 0.000 description 1
- 238000012549 training Methods 0.000 description 1
- 230000001052 transient effect Effects 0.000 description 1
Images
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/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4843—Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/04—Architecture, e.g. interconnection topology
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T1/00—General purpose image data processing
- G06T1/20—Processor architectures; Processor configuration, e.g. pipelining
Definitions
- the present disclosure relates to the field of computer technology, and relates to a task processing method and device, electronic equipment, a storage medium and a computer program.
- the traditional method When performing task processing, the traditional method usually executes the task processing process based on the application program at the bottom of the computer. In some current scenarios, tasks can be processed directly through the front-end page. However, since the scripting language of the front-end page is an interpreted scripting language, it can only run in a single-threaded manner, resulting in low task processing efficiency.
- the disclosure proposes a task processing method and device, electronic equipment, a storage medium, and a computer program, aiming at improving task processing efficiency when performing task processing through a front-end page.
- a task processing method comprising:
- the tasks to be processed include data to be processed;
- the main thread divides the task to be processed according to the functions of at least two processing modules to obtain at least two subtasks to be processed, each of which corresponds to a processing module and includes at least part of the data to be processed, each of which The processing modules are respectively used to process different subtasks to be processed;
- the task processing result of the task to be processed is determined based on the processing result of each subtask.
- the acquiring tasks to be processed includes;
- each of the sub-threads sends subtask processing results to the main thread through an asynchronous message passing mechanism.
- the processing module is stored as a binary format file, and the binary format file is obtained by compiling source code other than non-browser code through a binary code compilation specification.
- the processing module is a pre-trained deep learning model.
- each of the deep learning models is used to process at least two of the following subtasks to be processed:
- Face detection task Face detection task, hair detection task, lip segmentation task and nail detection task.
- the process of processing the corresponding pending subtasks by the processing module includes:
- the image data in the subtask to be processed is input into the deep learning model, and the subtask processing result is output; the subtask processing result includes at least one of the following: a face detection frame, a hair detection frame, Lip detection frame and nail detection frame.
- the calling the processing module interface respectively through multiple sub-threads, processing the corresponding subtasks to be processed through each of the processing modules in parallel and obtaining the subtask processing results includes:
- Each of the worker threads calls the processing module interface respectively, processes corresponding subtasks to be processed through each of the processing modules in parallel, and obtains a processing result of the subtask.
- the determining the task processing result of the task to be processed by obtaining the processing result of each subtask through the main thread includes:
- the processing results of each of the subtasks are obtained through the main thread, and the processing results of each of the subtasks are added to the front-end page to obtain the task processing results.
- the subtask processing results include at least two of the following text information: face detection frame coordinates, hair detection frame coordinates, lip detection frame coordinates, and nail detection frame coordinates;
- the task processing result is text information including each subtask processing result.
- the subtask processing results include at least two of the following marked image information: image data with face detection frames, image data with hair detection frames, images with lip detection frames data and image data with nail detection frame;
- the task processing result is a front-end page with superimposed image information
- the superimposed image information is image data including at least two detection frames among face detection frame, hair detection frame, lip detection frame and nail detection frame, or includes The image data of at least one object detection frame obtained by superimposing at least two detection frames among the face detection frame, the hair detection frame, the lip detection frame and the nail detection frame.
- a task processing device comprising:
- the task determination part is configured to obtain pending tasks, and the pending tasks include data to be processed;
- the task segmentation part is configured to divide the task to be processed through the main thread according to the functions of at least two processing modules to obtain at least two subtasks to be processed, each of the subtasks to be processed corresponds to a processing module and includes at least part For the data to be processed, each of the processing modules is respectively used to process different subtasks to be processed;
- the task processing part is configured to respectively call the processing module interface through a plurality of sub-threads, process corresponding sub-tasks to be processed through each of the processing modules in parallel and obtain sub-task processing results;
- the result determining part is configured to determine a task processing result of the task to be processed based on each subtask processing result.
- the task determining part includes;
- a page display subsection configured to display a task processing page having at least two processing modules
- the task obtaining subpart is configured to obtain tasks to be processed through the task processing interface.
- the task determination part includes a page display subsection and a task acquisition subsection;
- a page display subsection configured to display a task processing page having at least two processing modules
- the task obtaining subpart is configured to obtain tasks to be processed through the task processing interface.
- each of the sub-threads sends subtask processing results to the main thread through an asynchronous message passing mechanism.
- the processing module is stored as a binary format file, and the binary format file is obtained by compiling source codes other than non-browser codes through a binary code editing specification.
- the processing module is a pre-trained deep learning model.
- each of the deep learning models is used to process at least two of the following subtasks to be processed: face detection task, hair detection task, lip segmentation task and nail detection task.
- the process of processing the corresponding pending subtasks by the processing module includes:
- the image data in the subtask to be processed is input into the deep learning model, and the subtask processing result is output; the subtask processing result includes at least one of the following: a face detection frame, a hair detection frame, Lip detection frame and nail detection frame.
- the task processing part is further configured to:
- Each of the worker threads calls the processing module interface respectively, processes corresponding subtasks to be processed through each of the processing modules in parallel, and obtains a processing result of the subtask.
- the result determination part includes a result determination subsection, and the result determination subsection is configured to:
- the processing results of each of the subtasks are obtained through the main thread, and the processing results of each of the subtasks are added to the front-end page to obtain the task processing results.
- the subtask processing results include at least two of the following text information: face detection frame coordinates, hair detection frame coordinates, lip detection frame coordinates, and nail detection frame coordinates;
- the task processing result is text information including each subtask processing result.
- the subtask processing results include at least two of the following marked image information: image data with face detection frames, image data with hair detection frames, images with lip detection frames data and image data with nail detection frame;
- the task processing result is a front-end page with superimposed image information
- the superimposed image information is image data including at least two detection frames among face detection frame, hair detection frame, lip detection frame and nail detection frame, or includes The image data of at least one object detection frame obtained by superimposing at least two detection frames among the face detection frame, the hair detection frame, the lip detection frame and the nail detection frame.
- an electronic device including: a processor; a memory for storing processor-executable instructions; wherein the processor is configured to call the instructions stored in the memory to execute the above method.
- a computer-readable storage medium on which computer program instructions are stored, and when the computer program instructions are executed by a processor, the above method is implemented.
- a computer program including computer readable codes.
- the computer readable codes When the computer readable codes are run in an electronic device, a processor in the electronic device executes to implement the above method.
- the application processing different tasks is used as the processing module of the task processing page.
- the task processing page receives a task
- the task can be processed in parallel by multiple processing modules by dividing the task, and the task can be obtained by asynchronous message transmission.
- the subtask processing results of each processing module finally obtain the task processing results according to the subtask processing results, which improves the task processing efficiency of task processing based on the front-end page.
- FIG. 1 shows a flow chart of a task processing method according to an embodiment of the present disclosure
- Fig. 2 shows a schematic diagram of a task processing page according to an embodiment of the present disclosure
- FIG. 3 shows a schematic diagram of determining a subtask processing result according to an embodiment of the present disclosure
- Fig. 4 shows a schematic diagram of a task processing result according to an embodiment of the present disclosure
- Fig. 5 shows a schematic diagram of determining a task processing result according to an embodiment of the present disclosure
- Fig. 6 shows a schematic diagram of a task processing device according to an embodiment of the present disclosure
- FIG. 7 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure.
- Fig. 8 shows a schematic diagram of an electronic device according to an embodiment of the present disclosure.
- the Worker thread in the embodiment of the present disclosure is used to create a multi-thread environment for the JavaScript language in single-thread mode, and can be an additional thread created by the main thread. While the main thread is running, the worker thread can run in the background without interfering with the main thread, and after the worker thread completes the calculation task, it returns the result to the main thread. Optionally, the worker thread cannot directly communicate with the main thread, and the communication can be completed through an asynchronous message passing mechanism, such as postMessage.
- postMessage is a common function introduced in the front-end language, which allows scripts from different sources to communicate effectively in an asynchronous manner, and can realize cross-text document, multi-window, and cross-domain message transmission. Both the main thread and the worker thread send their respective messages through the postMessage function.
- WebAssembly is a technical solution that can write code in a non-JavaScript programming language and run on a browser.
- the code written in a non-JavaScript programming language can be any code such as C language code, C++ language code, and Rust language code.
- Fig. 1 shows a flowchart of a task processing method according to an embodiment of the present disclosure.
- the task processing method in the embodiment of the present disclosure is executed by a webpage client of a browser or other application programs that can load front-end pages, or an applet in an application program that can load front-end pages.
- a browser or other application programs can be installed in a terminal device, and the terminal device can be User Equipment (User Equipment, UE), mobile device, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant) Digital Assistant, PDA), handheld devices, computing devices, vehicle-mounted devices, wearable devices and other terminal devices that can install the above-mentioned application programs, the task processing method can be installed in the terminal device through the web client, application program or one of them
- the applet calls the JS (JavaScript) scripting language implementation of the task processing page.
- the following mainly takes the method for executing a task processing through a webpage client in a browser as an example for illustration.
- the task processing method of the embodiment of the present disclosure may include the following steps:
- Step S10 obtaining tasks to be processed.
- pending tasks can be obtained through a browser.
- the way to determine the task to be processed may be to obtain the task processing page loaded and displayed through the browser, for example, display a task processing page with at least two processing modules, and obtain the pending task through the task processing interface.
- the task to be processed may be an image recognition task, a video processing task, a text processing task, an audio processing task, and the like.
- the to-be-processed task may also include to-be-processed data, and the to-be-processed data is used for task processing.
- the data to be processed is video data that needs to be processed.
- the task to be processed is an image processing task
- the data to be processed is image data that needs to be processed.
- the task to be processed is an audio processing task
- the task to be processed is audio data that needs to be processed.
- the process of obtaining pending tasks through the task processing page may be obtaining pending data through human-computer interaction and determining the pending tasks.
- the task processing page may include a data collection control, which is used to control the corresponding data collection device to start to collect the data to be processed when triggered, and generate a task to be processed corresponding to the data to be processed. That is to say, the browser can collect the data to be processed in response to the triggering of the data collection control, and determine the task to be processed according to the data to be processed.
- the data collection control on the task processing page is an image collection control.
- the browser controls the terminal device installed with the browser to start the image acquisition device, and collects image data through the image acquisition device as data to be processed. Further, a corresponding image processing task is generated as a task to be processed according to the image data to be processed.
- a plurality of data may be pre-stored in the terminal device installed with the browser of the embodiment of the present disclosure, and the user may obtain the data stored in the terminal device as the data to be processed through human-computer interaction with the task processing page.
- the task processing page may include a data upload control for uploading data to the browser.
- the data upload control is triggered, the data in the terminal device is uploaded as data to be processed, and the data to be processed is determined according to the data to be processed.
- Handle tasks For example, in the case that the task processing page is used to process image processing tasks, the data upload control on the task processing page is an image upload control.
- the browser controls the terminal device installed with the browser to open the local photo album, and the user selects at least one image data in the local photo album and uploads it to the browser as data to be processed. Further, a corresponding image processing task is generated as a task to be processed according to the image data to be processed.
- the task processing page may include both a data collection control and a data upload control, and the user may choose to trigger one of the controls to determine the data to be processed and generate a corresponding task to be processed.
- Fig. 2 shows a schematic diagram of a task processing page according to an embodiment of the present disclosure.
- the task processing page 20 may include a data collection control 21 and a data upload control 22 .
- the user collects the data to be processed when the data collection control 21 is triggered, and uploads the data to be processed when the data upload control 22 is triggered, so as to generate a task to be processed according to the data to be processed.
- the embodiment of the present disclosure is used to perform a face recognition task
- the data collection control 21 is used to collect a face image
- the data upload control 22 is used to upload a face image.
- the browser controls the camera device of the terminal device to turn on, and collects face images as data to be processed to generate a face recognition task to be processed.
- the browser controls the opening of the local photo album of the terminal device, and selects the face image to be recognized as the data to be processed to generate a face recognition task to be processed.
- the embodiments of the present disclosure can directly determine the data to be processed through the task processing page, and generate tasks to be processed based on the data to be processed, so that the entire task processing process can be independently completed by the browser from the beginning to the end, without additional calling of the underlying task processing program of the terminal device .
- the task processing page displayed by the browser may also have at least two processing modules, each processing module is used to process different tasks, and can be used by calling the processing module interface through the JS script language.
- the processing module may be stored as a binary format file, and the binary format file is obtained by compiling source codes other than non-browser codes through a binary code compilation specification.
- the binary code compilation specification can be WebAssembly
- the source code can be C language code, C++ language code or Rust language code, etc.
- the binary format file supported by the browser can be obtained by editing the compilation tool emsdk provided by WebAssembly.
- the processing module may be a program for task processing.
- the processing module may include programs such as an image processing tool for image processing, an audio processing tool for audio processing, and the like.
- the processing module can also be a pre-trained deep learning model.
- the processing module can include a face recognition model for face recognition and a hair recognition model for hair recognition. model, a mouth recognition model for mouth recognition, etc. That is to say, when the processing module is a deep learning model, each deep learning model is used to process at least two of the following subtasks to be processed: face detection task, hair detection task, lip segmentation task and nail detection task.
- step S20 the main thread divides the task to be processed according to the functions of at least two processing modules to obtain at least two subtasks to be processed.
- the main thread divides the task to be processed according to the functions of at least two processing modules and the content of the task to be processed to obtain at least two subtasks to be processed.
- each subtask to be processed may correspond to a processing module, and include at least part of the data to be processed in the task to be processed.
- the process of splitting the tasks to be processed is executed through the JavaScript main thread.
- the processing modules of the task processing page include a human eye recognition module, a hair recognition module, a face recognition module, a mouth recognition module, an arm recognition module and a hand recognition module as an example Be explained. Since the face recognition process needs to locate and recognize key points such as human eyes, hair, face, and mouth, and the processing modules on the task processing page include the human eye recognition module that can perform human eye recognition, and the hair recognition module that can perform hair recognition. module, facial recognition module for facial recognition, and mouth recognition module for mouth recognition.
- the task to be processed can be divided into the human eye recognition subtask corresponding to the human eye recognition module, the hair recognition subtask corresponding to the hair recognition module, the face recognition subtask corresponding to the face recognition module, and the mouth recognition subtask corresponding to the mouth recognition module. Part identification subtask.
- the recognition process of different processing modules needs to be recognized based on a complete face, the above-mentioned human eye recognition subtask, hair recognition subtask, face recognition subtask and mouth recognition subtask are all included in the face recognition task.
- the face image data to be processed is all included in the face recognition task.
- the task to be processed can be divided into multiple subtasks by means of task division, so that different processing modules can perform task processing in parallel to improve task processing efficiency.
- Step S30 call the processing module interface through multiple sub-threads, process the corresponding subtasks to be processed through each of the processing modules in parallel, and obtain the processing results of the subtasks.
- the task processing method of the embodiment of the present disclosure uses multiple sub-threads to respectively call the interfaces of the processing modules, so as to process their corresponding pending tasks in parallel and obtain task processing results.
- each sub-thread is created through the main thread, that is, the main thread is a JavaScript language thread in a single-thread mode, so that a task cannot be processed in parallel when a task is processed through the main thread.
- a plurality of worker threads can be created through the main thread, so as to process corresponding subtasks to be processed in parallel through each processing module based on each woker thread.
- the worker thread can run in the background while the main thread is running, and the two do not interfere with each other.
- the worker thread After the worker thread completes the task processing of the currently pending subtask, it obtains the subtask processing result, and returns the subtask processing result to the main thread. That is to say, the task processing process can create multiple worker threads through the main thread. Each worker thread calls the processing module interface respectively, processes corresponding subtasks to be processed through each processing module in parallel and obtains subtask processing results.
- each worker thread can call the processing module interface separately to pass through each worker thread in parallel.
- the processing module processes the corresponding subtasks to be processed, and obtains the processing results of the subtasks.
- the embodiment of the present disclosure solves the drawback that the browser can only execute tasks through a single thread by creating a worker thread, realizes parallel task processing through multiple processing modules, and improves task processing speed and efficiency.
- each processing module is a pre-trained deep learning model.
- the process of processing the corresponding subtask to be processed by the processing module includes: inputting at least part of the data to be processed included in the subtask to be processed corresponding to the processing module into the processing module, and outputting the processing result of the corresponding subtask.
- the processing module is a deep learning model for object recognition
- the image data in the subtask to be processed can be input to the deep learning model, and the subtask processing result is output
- the subtask processing result includes at least one of the following Type: the face detection frame, hair detection frame, lip detection frame and nail detection frame of the image data.
- the subtask to be processed is a mouth recognition task and the processing module is a mouth recognition model
- the face image to be recognized in the mouth recognition task is input into the mouth recognition model, and the mouth coordinate information is output as a subtask.
- Task processing result when the subtask to be processed is a mouth recognition task and the processing module is a mouth recognition model, the face image to be recognized in the mouth recognition
- Fig. 3 shows a schematic diagram of determining a subtask processing result according to an embodiment of the present disclosure.
- the embodiment of the present disclosure may input at least part of the data to be processed included in the subtask 30 to be processed into the pre-trained processing Module 31 , outputting corresponding subtask processing results 32 .
- Step S40 determining the task processing result of the task to be processed based on the processing result of each subtask.
- each worker thread may send the subtask processing results to the main thread through an asynchronous message passing mechanism.
- a message delivery mechanism may be message delivery through the postMessage function.
- the browser obtains the processing results of each subtask through the main thread, so as to determine the task processing results of the tasks to be processed.
- the task processing result is determined according to the content of the subtask processing result and the type of data to be processed included in the task to be processed.
- the process for the main thread to determine the task processing results may be to obtain the processing results of each subtask, and add the processing results of each subtask to the front-end page to obtain the task processing results.
- the subtask processing result may be text information.
- each text information may be acquired through the main thread, and the task processing result of the task to be processed can be obtained by directly adding each text information to the front-end page. That is to say, in the process of each processing module processing subtasks to be processed and obtaining subtask processing results as text information, each text information can be obtained directly through the main thread to obtain a front-end page including each subtask processing result as the task processing result,
- the task processing result can also be displayed through a browser.
- the subtasks process at least two of the following text information: the coordinates of the face detection frame, the coordinates of the hair detection frame, the coordinates of the lip detection frame, and the coordinates of the nail detection frame.
- the task processing result may be a front-end page including the processing results of each subtask.
- the task to be processed is an image recognition task
- each processing module is used to identify the position coordinates of an object of the image data in the task to be processed as an example for illustration.
- the obtained subtask processing results include the coordinates of the face detection frame, the hair detection frame coordinates, coordinates of the lip detection frame and coordinates of the nail detection frame at least two text information.
- the main thread directly adds the text information of the detection frame coordinates to the front-end page, and obtains the text information including the processing results of each subtask as the task processing result of the task to be processed.
- the main thread can also process each subtask As a result, the corresponding image frame is drawn at the coordinate position represented by each text information on the image data to be processed, and the drawn image data is added to the front-end page to obtain the task processing result.
- the subtask processing result may also be image information, and the image information may be image data in which at least one region is marked.
- the processing result of each subtask is the image information of at least one region in the image data, and each image information is obtained through the main thread, and the image information is superimposed and added to the front-end page to obtain the image information to be processed.
- the task processing result of the processing task That is to say, when each processing module processes subtasks to be processed, the subtask processing result obtained is image information including a plurality of image frames, and the image frames are used to mark at least one region in the image data, by superimposing the images in each image information The way to determine the task processing results.
- the manner of superimposing each image frame may be to superimpose the image frames whose positions partially overlap in the processing results of each subtask to obtain the smallest task image frame that can include each superimposed image frame. Further, the obtained task image frames are displayed as task processing results. Alternatively, the manner of superimposing each image frame may also be to obtain and display a task processing result after directly superimposing each image frame.
- the subtask processing results may include at least two of the following marked image information: image data with face detection frame, image data with hair detection frame, image data with lip detection frame, and image data with nail detection frame
- the task processing result can be a front-end page with superimposed image information
- the superimposed image information is image data including at least two detection frames among face detection frame, hair detection frame, lip detection frame and nail detection frame
- the image data includes at least one object detection frame obtained by superimposing at least two detection frames among the face detection frame, the hair detection frame, the lip detection frame and the nail detection frame.
- the task to be processed is an object recognition task
- each processing module is used to identify a characteristic position of image data in the task to be processed as an example for illustration.
- the processing module includes at least two of a face recognition module, a mouth recognition module, a hair recognition module, and a nail recognition module, and after processing and recognizing the image data in the task to be processed, facial image information, mouth image information, and hair image information are respectively obtained and nail image information.
- Facial image information includes image data with at least one face detection frame
- mouth image information includes image data with at least one lip detection frame
- hair image information includes image data with at least one hair detection frame
- nail image information The image data including at least one nail detection frame can directly superimpose the face detection frame, mouth detection frame, hair detection frame and nail detection frame in each image information through the main thread to obtain the image data including the above-mentioned detection frames
- the front-end page is the result of task processing.
- at least one object detection frame obtained by superimposing at least two detection frames in the face detection frame, hair detection frame, lip detection frame and nail detection frame through the main thread, and adding each object detection frame to the image data , add the front-end page as the task processing result.
- Fig. 4 shows a schematic diagram of a task processing result according to an embodiment of the present disclosure.
- each task to be processed is processed by a processing module to obtain a plurality of image information, which respectively includes an area image frame of a feature position of a face.
- the browser obtains at least one human face image frame 41 by superimposing at least partially overlapping image frames in each image information through the main thread, and determines the task processing result 40 including at least one human face image frame 41 .
- the task processing result 40 is displayed through the task processing page of the browser.
- Fig. 5 shows a schematic diagram of determining a task processing result according to an embodiment of the present disclosure.
- the main thread divides the task to be processed according to the task to be processed 50 and each processing module 51 of the task processing page to obtain at least two tasks. 52 subtasks to be processed.
- a worker thread is assigned to each pending subtask 52, and each worker thread calls the processing module 53 corresponding to the pending subtask to process the pending subtask to obtain a subtask processing result 54.
- the browser acquires each subtask processing result 54 through the main thread to obtain a task processing result 55 .
- the browser can also display the task processing result 55 through the task processing page.
- the embodiment of the present disclosure is used for object recognition as an example for description.
- the processing modules included in the browser include a face detection module, a hair detection module, a lips detection module and a nail detection module.
- the tasks to be processed are divided into face detection tasks, hair detection tasks, lip detection tasks and nail detection tasks according to the functions of each processing module through the main thread.
- four worker threads are created through the main thread, and each worker thread calls each processing module to perform subtask processing.
- one subtask processing result among the obtained face detection result, hair detection result, lip detection result and nail detection result is sent to the main thread through postMessage.
- the main thread After the main thread obtains the subtask processing results sent by each worker thread, it writes the processing results of each subtask into the front-end page code in the form of drawing, and obtains the task processing results of the front-end page as an object recognition task.
- the main thread processes each frame in turn, and then performs object recognition on the next frame in a polling manner after obtaining the task processing result of the current frame.
- the embodiments of the present disclosure can compile programs for processing different tasks into processing modules of a task processing page through WebAssembly, and directly call the processing modules through a browser to perform task processing. Further, after the browser determines the task to be processed, the task to be processed can be divided through the main thread, and multiple worker threads can be used to process the divided subtasks in parallel according to the processing modules, and the main thread can obtain the processing results of each processing module to obtain the task The results are processed, and the task processing speed and task processing efficiency are improved.
- the present disclosure also provides task processing devices, electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any task processing method provided in the present disclosure.
- task processing devices electronic equipment, computer-readable storage media, and programs, all of which can be used to implement any task processing method provided in the present disclosure.
- Fig. 6 shows a schematic diagram of a task processing device according to an embodiment of the present disclosure. As shown in Fig. 6, the device includes:
- the task determination part 60 is configured to acquire pending tasks, the pending tasks include data to be processed;
- the task division part 61 is configured to divide the task to be processed according to the functions of at least two processing modules through the main thread to obtain at least two subtasks to be processed, and each subtask to be processed corresponds to a processing module and includes at least Part of the data to be processed, each of the processing modules is used to process different subtasks to be processed;
- the task processing part 62 is configured to respectively call the processing module interface through a plurality of sub-threads, process corresponding subtasks to be processed through each of the processing modules in parallel, and obtain subtask processing results;
- the result determining part 63 is configured to determine the task processing result of the task to be processed based on the subtask processing results.
- the task determination part 60 includes a page display subsection and a task acquisition subsection;
- a page display subsection configured to display a task processing page having at least two processing modules
- the task obtaining subpart is configured to obtain tasks to be processed through the task processing interface.
- each of the sub-threads sends subtask processing results to the main thread through an asynchronous message passing mechanism.
- the processing module is stored as a binary format file, and the binary format file is obtained by compiling source codes other than non-browser codes through a binary code editing specification.
- the processing module is a pre-trained deep learning model.
- each of the deep learning models is used to process at least two of the following subtasks to be processed: face detection task, hair detection task, lip segmentation task and nail detection task.
- the process of processing the corresponding pending subtasks by the processing module includes:
- the image data in the subtask to be processed is input into the deep learning model, and the subtask processing result is output; the subtask processing result includes at least one of the following: a face detection frame, a hair detection frame, Lip detection frame and nail detection frame.
- the task processing part 62 is further configured to:
- Each of the worker threads calls the processing module interface respectively, processes corresponding subtasks to be processed through each of the processing modules in parallel, and obtains a processing result of the subtask.
- the result determination part 63 includes a result determination subsection, and the result determination subsection is configured to:
- the subtask processing results include at least two of the following text information: face detection frame coordinates, hair detection frame coordinates, lip detection frame coordinates, and nail detection frame coordinates;
- the task processing result is text information including each subtask processing result.
- the subtask processing results include at least two of the following marked image information: image data with face detection frames, image data with hair detection frames, images with lip detection frames data and image data with nail detection frame;
- the task processing result is a front-end page with superimposed image information
- the superimposed image information is image data including at least two detection frames among face detection frame, hair detection frame, lip detection frame and nail detection frame, or includes The image data of at least one object detection frame obtained by superimposing at least two detection frames among the face detection frame, the hair detection frame, the lip detection frame and the nail detection frame.
- the functions or modules included in the apparatus provided by the embodiments of the present disclosure can be used to execute the methods described in the above method embodiments, and the implementation can refer to the descriptions of the above method embodiments.
- Embodiments of the present disclosure also provide a computer-readable storage medium, on which computer program instructions are stored, and the above-mentioned method is implemented when the computer program instructions are executed by a processor.
- Computer readable storage media may be volatile or nonvolatile computer readable storage media.
- An embodiment of the present disclosure also proposes an electronic device, including: a processor; a memory for storing instructions executable by the processor; wherein the processor is configured to invoke the instructions stored in the memory to execute the above method.
- An embodiment of the present disclosure also provides a computer program product, including computer-readable codes, or a non-volatile computer-readable storage medium carrying computer-readable codes, when the computer-readable codes are stored in a processor of an electronic device When running in the electronic device, the processor in the electronic device executes the above method.
- Electronic devices may be provided as terminals, servers, or other forms of devices.
- FIG. 7 shows a schematic diagram of an electronic device 800 according to an embodiment of the present disclosure.
- the electronic device 800 may be a terminal such as a mobile phone, a computer, a digital broadcast terminal, a messaging device, a game console, a tablet device, a medical device, a fitness device, or a personal digital assistant.
- electronic device 800 may include one or more of the following components: processing component 802, memory 804, power supply component 806, multimedia component 808, audio component 810, input/output (Input/Output, I/O) interface 812 , sensor component 814 , and communication component 816 .
- the processing component 802 generally controls the overall operations of the electronic device 800, such as those associated with display, telephone calls, data communications, camera operations, and recording operations.
- the processing component 802 may include one or more processors 820 to execute instructions to complete all or part of the steps of the above method. Additionally, processing component 802 may include one or more modules that facilitate interaction between processing component 802 and other components. For example, processing component 802 may include a multimedia module to facilitate interaction between multimedia component 808 and processing component 802 .
- the memory 804 is configured to store various types of data to support operations at the electronic device 800 . Examples of such data include instructions for any application or method operating on the electronic device 800, contact data, phonebook data, messages, pictures, videos, etc.
- the memory 804 can be realized by any type of volatile or non-volatile storage device or their combination, such as Static Random-Access Memory (Static Random-Access Memory, SRAM), Electrically Erasable Programmable Read-Only Memory (Electrically Erasable Programmable read only memory, EEPROM), erasable programmable read-only memory (Erasable Programmable Read-Only Memory, EPROM), programmable read-only memory (Programmable Read-Only Memory, PROM), read-only memory (Read-Only Memory, ROM), magnetic memory, flash memory, magnetic disk or optical disk.
- Static Random-Access Memory SRAM
- Electrically Erasable Programmable Read-Only Memory Electrically Erasable Programmable Read-Only Memory
- EEPROM Electrically Erasable
- the power supply component 806 provides power to various components of the electronic device 800 .
- Power components 806 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for electronic device 800 .
- the multimedia component 808 includes a screen providing an output interface between the electronic device 800 and the user.
- the screen may include a liquid crystal display (Liquid Crystal Display, LCD) and a touch panel (Touch panel, TP). If the screen includes a touch panel, the screen may be implemented as a touch screen to receive input signals from a user.
- the touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensor may not only sense a boundary of a touch or swipe action, but also detect duration and pressure associated with the touch or swipe action.
- the multimedia component 808 includes a front camera and/or a rear camera. When the electronic device 800 is in an operation mode, such as a shooting mode or a video mode, the front camera and/or the rear camera can receive external multimedia data. Each front camera and rear camera can be a fixed optical lens system or have focal length and optical zoom capability.
- the audio component 810 is configured to output and/or input audio signals.
- the audio component 810 includes a microphone (microphone, MIC), and when the electronic device 800 is in an operation mode, such as a calling mode, a recording mode and a voice recognition mode, the microphone is configured to receive an external audio signal. Received audio signals may be further stored in memory 804 or sent via communication component 816 .
- the audio component 810 also includes a speaker for outputting audio signals.
- the I/O interface 812 provides an interface between the processing component 802 and a peripheral interface module, which may be a keyboard, a click wheel, a button, and the like. These buttons may include, but are not limited to: a home button, volume buttons, start button, and lock button.
- Sensor assembly 814 includes one or more sensors for providing status assessments of various aspects of electronic device 800 .
- the sensor component 814 can detect the open/closed state of the electronic device 800, the relative positioning of components, such as the display and the keypad of the electronic device 800, the sensor component 814 can also detect the electronic device 800 or a Changes in position of components, presence or absence of user contact with electronic device 800 , electronic device 800 orientation or acceleration/deceleration and temperature changes in electronic device 800 .
- Sensor assembly 814 may include a proximity sensor configured to detect the presence of nearby objects in the absence of any physical contact.
- the sensor assembly 814 may also include an optical sensor, such as a Complementary Metal Oxide Semiconductor (CMOS) or Charge-coupled Device (CCD) image sensor, for use in imaging applications.
- CMOS Complementary Metal Oxide Semiconductor
- CCD Charge-coupled Device
- the sensor component 814 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor or a temperature sensor.
- the communication component 816 is configured to facilitate wired or wireless communication between the electronic device 800 and other devices.
- the electronic device 800 can access a wireless network based on a communication standard,
- the communication component 816 receives broadcast signals or broadcast related information from an external broadcast management system via a broadcast channel.
- the communication component 816 also includes a Near Field Communication (NFC) portion to facilitate short-range communication.
- NFC Near Field Communication
- the NFC part can be based on Radio Frequency Identification (RFID) technology, Infrared Data Association (Infrared Data Association, IrDA) technology, Ultra Wide Band (Ultra Wide Band, UWB) technology, Bluetooth (Bluetooth, BT) technology and other technology to achieve.
- RFID Radio Frequency Identification
- IrDA Infrared Data Association
- UWB Ultra Wide Band
- Bluetooth Bluetooth
- the electronic device 800 may be implemented by one or more application-specific integrated circuits (Application Specific Integrated Circuit, ASIC), digital signal processors (Digital Signal Processing, DSP), digital signal processing devices (Digital signal processing device , DSPD), programmable logic device (programmable logic device, PLD), field programmable gate array (Field Programmable Gate Array, FPGA), controller, microcontroller, microprocessor or other electronic components to implement, used to perform the above method.
- ASIC Application Specific Integrated Circuit
- DSP Digital Signal Processing
- DSPD digital signal processing devices
- programmable logic device programmable logic device
- FPGA field programmable gate array
- controller microcontroller, microprocessor or other electronic components to implement, used to perform the above method.
- a non-volatile computer-readable storage medium such as the memory 804 including computer program instructions, which can be executed by the processor 820 of the electronic device 800 to implement the above method.
- This disclosure relates to the field of augmented reality.
- acquiring the image information of the target object in the real environment and then using various visual correlation algorithms to detect or identify the relevant features, states and attributes of the target object, and thus obtain the image information that matches the specific application.
- AR effect combining virtual and reality.
- the target object may involve faces, limbs, gestures, actions, etc. related to the human body, or markers and markers related to objects, or sand tables, display areas or display items related to venues or places.
- Vision-related algorithms can involve visual positioning, SLAM, 3D reconstruction, image registration, background segmentation, object key point extraction and tracking, object pose or depth detection, etc.
- Specific applications can not only involve interactive scenes such as guided tours, navigation, explanations, reconstructions, virtual effect overlays and display related to real scenes or objects, but also special effects processing related to people, such as makeup beautification, body beautification, special effect display, virtual Interactive scenarios such as model display.
- the relevant features, states and attributes of the target object can be detected or identified through the convolutional neural network.
- the above-mentioned convolutional neural network is a network model obtained by performing model training based on a deep learning framework.
- FIG. 8 shows a schematic diagram of an electronic device 1900 according to an embodiment of the present disclosure.
- electronic device 1900 may be provided as a server.
- electronic device 1900 includes processing component 1922 , which further includes one or more processors, and a memory resource represented by memory 1932 for storing instructions executable by processing component 1922 , such as application programs.
- An application program stored in memory 1932 may include one or more portions each corresponding to a set of instructions.
- the processing component 1922 is configured to execute instructions to perform the above method.
- Electronic device 1900 may also include a power supply component 1926 configured to perform power management of electronic device 1900, a wired or wireless network interface 1950 configured to connect electronic device 1900 to a network, and an input-output (I/O) interface 1958 .
- the electronic device 1900 can operate based on the operating system stored in the memory 1932, such as the Microsoft server operating system (Windows ServerTM), the graphical user interface-based operating system (Mac OS XTM) introduced by Apple Inc., and the multi-user and multi-process computer operating system (UnixTM). ), a free and open source Unix-like operating system (LinuxTM), an open source Unix-like operating system (FreeBSDTM), or similar.
- a non-transitory computer-readable storage medium such as the memory 1932 including computer program instructions, which can be executed by the processing component 1922 of the electronic device 1900 to implement the above method.
- the present disclosure can be a system, method and/or computer program product.
- a computer program product may include a computer readable storage medium having computer readable program instructions thereon for causing a processor to implement various aspects of the present disclosure.
- a computer readable storage medium may be a tangible device that can retain and store instructions for use by an instruction execution device.
- a computer readable storage medium may be, for example, but is not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination of the foregoing.
- Non-exhaustive list of computer-readable storage media include: portable computer disk, hard disk, random access memory (Random Access Memory, RAM), read only memory (Read Only Memory, ROM), erasable Electrical Programmable Read Only Memory (EPROM or flash memory), Static Random Access Memory (Static Random Access Memory, SRAM), Portable Compact Disc Read-Only Memory (CD-ROM) , Digital Video Disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing.
- RAM Random Access Memory
- ROM read only memory
- EPROM or flash memory erasable Electrical Programmable Read Only Memory
- Static Random Access Memory SRAM
- Portable Compact Disc Read-Only Memory CD-ROM
- DVD Digital Video Disc
- memory sticks floppy disks
- mechanical encoding devices such as punched cards or raised structures in grooves with instructions stored thereon, and any suitable combination of the foregoing.
- computer-readable storage media are not to be construed as transient signals per se, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., pulses of light through fiber optic cables), or transmitted electrical signals.
- Computer-readable program instructions described herein may be downloaded from a computer-readable storage medium to a respective computing/processing device, or downloaded to an external computer or external storage device over a network, such as the Internet, a local area network, a wide area network, and/or a wireless network.
- the network may include copper transmission cables, fiber optic transmission, wireless transmission, routers, firewalls, switches, gateway computers, and/or edge servers.
- a network adapter card or a network interface in each computing/processing device receives computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in a computer-readable storage medium in each computing/processing device .
- Computer program instructions for performing operations of embodiments of the present disclosure may be assembly instructions, instruction set architecture (Industry Standard Architecture, ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, or in a or any combination of programming languages, including object-oriented programming languages—such as Smalltalk, C++, etc., and conventional procedural programming languages—such as “C” or similar programming languages language.
- Computer readable program instructions may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer, or entirely on the remote computer or server implement.
- the remote computer may be connected to the user's computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it may be connected to an external computer such as use an Internet service provider to connect via the Internet).
- electronic circuits such as programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (programmable logic arrays, PLAs), are personalized by utilizing state information of computer-readable program instructions, The electronic circuit can execute computer readable program instructions, thereby implementing various aspects of the embodiments of the present disclosure.
- These computer-readable program instructions may be provided to a processor of a general purpose computer, special purpose computer, or other programmable data processing apparatus to produce a machine such that when executed by the processor of the computer or other programmable data processing apparatus , producing an apparatus for realizing the functions/actions specified in one or more blocks in the flowchart and/or block diagram.
- These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause computers, programmable data processing devices and/or other devices to work in a specific way, so that the computer-readable medium storing instructions includes An article of manufacture comprising instructions for implementing various aspects of the functions/acts specified in one or more blocks in flowcharts and/or block diagrams.
- each block in a flowchart or block diagram may represent a portion, a program segment, or a portion of an instruction that includes one or more Executable instructions.
- the functions noted in the block may occur out of the order noted in the figures. For example, two blocks in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
- each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified function or action , or may be implemented by a combination of dedicated hardware and computer instructions.
- the computer program product can be realized by hardware, software or a combination thereof.
- the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) and the like.
- the present disclosure relates to a task processing method and device, an electronic device, a storage medium, and a computer program, wherein, the method obtains a task to be processed, and divides the task to be processed through the main thread according to the functions of at least two processing modules, and obtains the tasks including Pending subtasks with at least some pending data.
- a plurality of sub-threads are used to process corresponding subtasks to be processed in parallel through each processing module to obtain a subtask processing result, and then determine a task processing result of the task to be processed based on the processing results of each subtask.
- the embodiment of the present disclosure can divide tasks through the main thread when receiving tasks, and create multiple sub-threads to process some tasks in parallel through different processing modules, obtain the sub-task processing results of each processing module to obtain the final task processing results, and improve the task processing efficiency.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- Software Systems (AREA)
- General Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- Biophysics (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Biomedical Technology (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Data Mining & Analysis (AREA)
- Life Sciences & Earth Sciences (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Image Analysis (AREA)
- Measurement And Recording Of Electrical Phenomena And Electrical Characteristics Of The Living Body (AREA)
- Debugging And Monitoring (AREA)
- Measuring Or Testing Involving Enzymes Or Micro-Organisms (AREA)
Abstract
本公开涉及一种任务处理方法及装置、电子设备、存储介质和计算机程序,该方法通过获取待处理任务,并通过主线程根据至少两个处理模块的功能分割待处理任务,得到包括其中至少部分待处理数据的待处理子任务。通过多个子线程并行通过各处理模块处理对应的待处理子任务,得到子任务处理结果,再基于各子任务处理结果确定待处理任务的任务处理结果。
Description
相关申请的交叉引用
本公开基于申请号为202111137684.6、申请日为2021年9月27日、申请名称为“任务处理方法及装置、电子设备和存储介质”的中国专利申请提出,并要求该中国专利申请的优先权,该中国专利申请的全部内容在此引入本公开作为参考。
本公开涉及计算机技术领域,涉及一种任务处理方法及装置、电子设备、存储介质和计算机程序。
在进行任务处理时,传统方式通常基于计算机底层的应用程序执行任务处理过程。而在目前的一些场景下,可以直接通过前端页面进行任务处理。但由于前端页面的脚本语言为解释型脚本语言,只能通过单线程方式运行,使得任务处理效率较低。
发明内容
本公开提出了一种任务处理方法及装置、电子设备、存储介质和计算机程序,旨在提高通过前端页面进行任务处理时的任务处理效率。
根据本公开的第一方面,提供了一种任务处理方法,所述方法包括:
获取待处理任务,所述待处理任务中包括待处理数据;
通过主线程根据至少两个处理模块的功能分割所述待处理任务,得到至少两个待处理子任务,各所述待处理子任务分别对应一个处理模块且包括至少部分所述待处理数据,各所述处理模块分别用于处理不同的待处理子任务;
通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果;
基于各所述子任务处理结果确定待处理任务的任务处理结果。
在一种可能的实现方式中,所述获取待处理任务包括;
显示具有至少两个处理模块的任务处理页面;
通过所述任务处理界面获取待处理任务。
在一种可能的实现方式中,各所述子线程通过异步消息传递机制将子任务处理结果发送至主线程。
在一种可能的实现方式中,所述处理模块存储为二进制格式文件,所述二进制格式文件通过二进制代码编译规范编译非浏览器代码以外的源代码得到。
在一种可能的实现方式中,所述处理模块为预先训练得到的深度学习模型。
在一种可能的实现方式中,各所述深度学习模型用于处理以下待处理子任务的至少两种:
人脸检测任务、头发检测任务、嘴唇分割任务和指甲检测任务。
在一种可能的实现方式中,所述处理模块处理对应的待处理子任务的过程包括:
将待处理子任务中的图像数据输入所述深度学习模型,输出所述子任务处理结果;所述子任务处理结果包括以下至少一种:所述图像数据的人脸检测框、头发检测框、嘴唇检测框和指甲检测框。
在一种可能的实现方式中,所述通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果包括:
通过所述主线程创建多个worker线程;
通过各所述worker线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果。
在一种可能的实现方式中,所述通过所述主线程获取各所述子任务处理结果确定待处理任务的任务处理结果包括:
通过所述主线程获取各所述子任务处理结果,并将各所述子任务处理结果添加到前端页面中得到任务处理结果。
在一种可能的实现方式中,所述子任务处理结果包括以下文本信息的至少两个:人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标;
所述任务处理结果为包括各所述子任务处理结果的文本信息。
在一种可能的实现方式中,所述子任务处理结果包括以下已标记的图像信息的至少两个:具有人脸检测框的图像数据、具有头发检测框的图像数据、具有嘴唇检测框的图像数据以及具有指甲检测框的图像数据;
所述任务处理结果为具有叠加图像信息的前端页面,所述叠加图像信息为包括人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框的图像数据,或者为包括叠加人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框得到的至少一个对象检测框的图像数据。
根据本公开的第二方面,提供了一种任务处理装置,所述装置包括:
任务确定部分,被配置为获取待处理任务,所述待处理任务中包括待处理数据;
任务分割部分,被配置为通过主线程根据至少两个处理模块的功能分割所述待处理任务,得到至少两个待处理子任务,各所述待处理子任务分别对应一个处理模块且包括至少部分所述待处理数据,各所述处理模块分别用于处理不同的待处理子任务;
任务处理部分,被配置为通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果;
结果确定部分,被配置为基于各所述子任务处理结果确定待处理任务的任务处理结果。
在一种可能的实现方式中,所述任务确定部分包括;
页面显示子部分,被配置为显示具有至少两个处理模块的任务处理页面;
任务获取子部分,被配置为通过所述任务处理界面获取待处理任务。
在一种可能的实现方式中,所述任务确定部分包括页面显示子部分和任务获取子部分;
页面显示子部分,被配置为显示具有至少两个处理模块的任务处理页面;
任务获取子部分,被配置为通过所述任务处理界面获取待处理任务。
在一种可能的实现方式中,各所述子线程通过异步消息传递机制将子任务处理结果发送至主线程。
在一种可能的实现方式中,所述处理模块存储为二进制格式文件,所述二进制格式文件通过二进制代码编辑规范编译非浏览器代码以外的源代码得到。
在一种可能的实现方式中,所述处理模块为预先训练得到的深度学习模型。
在一种可能的实现方式中,各所述深度学习模型用于处理以下待处理子任务的至少两种:人脸检测任务、头发检测任务、嘴唇分割任务和指甲检测任务。
在一种可能的实现方式中,所述处理模块处理对应的待处理子任务的过程包括:
将待处理子任务中的图像数据输入所述深度学习模型,输出所述子任务处理结果;所述子任务处理结果包括以下至少一种:所述图像数据的人脸检测框、头发检测框、嘴唇检测框和指甲检测框。
在一种可能的实现方式中,所述任务处理部分还被配置为:
通过所述主线程创建多个worker线程;
通过各所述worker线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果。
在一种可能的实现方式中,所述结果确定部分包括结果确定子部分,结果确定子部分被配置为:
通过所述主线程获取各所述子任务处理结果,并将各所述子任务处理结果添加到前端页面中得到任务处理结果。
在一种可能的实现方式中,所述子任务处理结果包括以下文本信息的至少两个:人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标;
所述任务处理结果为包括各所述子任务处理结果的文本信息。
在一种可能的实现方式中,所述子任务处理结果包括以下已标记的图像信息的至少两个:具有人脸检测框的图像数据、具有头发检测框的图像数据、具有嘴唇检测框的图像数据以及具有指甲检测框的图像数据;
所述任务处理结果为具有叠加图像信息的前端页面,所述叠加图像信息为包括人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框的图像数据,或者为包括叠加人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框得到的至少一个对象检测框的图像数据。
根据本公开的第三方面,提供了一种电子设备,包括:处理器;用于存 储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
根据本公开的第四方面,提供了一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。
根据本公开的第五方面,提供了一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现上述方法。
本公开实施例将处理不同任务的应用作为任务处理页面的处理模块,在任务处理页面接收到任务时,能够通过划分任务的方式通过多个处理模块并行处理任务,并以异步消息传递的方式得到各处理模块的子任务处理结果,最终根据各子任务处理结果得到任务处理结果,提高了基于前端页面进行任务处理的任务处理效率。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。根据下面参考附图对示例性实施例的详细说明,本公开的其它特征及方面将变得清楚。
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1示出根据本公开实施例的一种任务处理方法的流程图;
图2示出根据本公开实施例的一种任务处理页面的示意图;
图3示出根据本公开实施例的一种确定子任务处理结果的示意图;
图4示出根据本公开实施例的一种任务处理结果的示意图;
图5示出根据本公开实施例的一种确定任务处理结果的示意图;
图6示出根据本公开实施例的一种任务处理装置的示意图;
图7示出根据本公开实施例的一种电子设备的示意图;
图8示出根据本公开实施例的一种电子设备的示意图。
以下将参考附图详细说明本公开的各种示例性实施例、特征和方面。附图中相同的附图标记表示功能相同或相似的元件。尽管在附图中示出了实施例的各种方面,但是除非特别指出,不必按比例绘制附图。
在这里专用的词“示例性”意为“用作例子、实施例或说明性”。这里作为“示例性”所说明的任何实施例不必解释为优于或好于其它实施例。
本文中术语“和/或”,仅仅是一种描述关联对象的关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。
另外,为了更好地说明本公开,在下文的具体实施方式中给出了众多的 细节。本领域技术人员应当理解,没有某些细节,本公开同样可以实施。在一些实施例中,对于本领域技术人员熟知的方法、手段、元件和电路未作详细描述,以便于凸显本公开的主旨。
本公开实施例中的Worker线程用于为单线程模式的JavaScript语言创建多线程环境,可以为主线程开辟的额外线程。在主线程运行的同时,worker线程可以在后台运行,与主线程互不干扰,并且在worker线程完成计算任务后,将结果返回主线程。可选地,worker线程无法与主线程直接通信,可以通过异步消息传递机制完成通信,例如postMessage。其中,postMessage是前端语言中引入的一个常用函数,允许来自不同源的脚本采用异步方式进行有效的通信,可以实现跨文本文档、多窗口、跨域消息传递。主线程和worker线程双方通过postMessage函数发送各自的消息。
WebAssembly是一种可以使用非JavaScript编程语言编写代码并且能在浏览器上运行的技术方案,可选地,非JavaScript编程语言编写代码可以为C语言代码、C++语言代码以及Rust语言代码等任意代码。
图1示出根据本公开实施例的一种任务处理方法的流程图。在一种可能的实现方式中,本公开实施例的任务处理方法通过浏览器的网页客户端或其他可以加载前端页面的应用程序,或者应用程序中能够加载前端页面的小程序执行。可选地,浏览器或其他应用程序可以安装在终端设备中,该终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等任意能够安装上述应用程序的终端设备,所述任务处理方法可以通过终端设备中的安装的网页客户端、应用程序或其中的小程序调用任务处理页面的JS(JavaScript)脚本语言实现。
下文主要以通过浏览器中网页客户端执行任务处理方法为例进行说明。
如图1所示,本公开实施例的任务处理方法可以包括以下步骤:
步骤S10、获取待处理任务。
在一种可能的实现方式中,待处理任务可以通过浏览器获取。可选地,待处理任务的确定方式可以为通过浏览器加载并显示的任务处理页面获取,例如显示具有至少两个处理模块的任务处理页面,通过任务处理界面获取待处理任务。其中,待处理任务可以为图像识别任务、视频处理任务、文本处理任务以及音频处理任务等。
进一步地,待处理任务中还可以包括待处理数据,待处理数据用于进行任务处理。例如,在待处理任务为视频处理任务的情况下,待处理数据为需要进行处理的视频数据。在待处理任务为图像处理任务的情况下,待处理数据为需要进行处理的图像数据。在待处理任务为音频处理任务的情况下,待处理任务为需要进行处理的音频数据。
在一种可能的实现方式中,通过任务处理页面获取待处理任务的过程可以为通过人机交互的方式获取待处理数据,并确定待处理任务。可选地,任务处理页面中可以包括数据采集控件,用于在被触发的情况下,控制对应的数据采集装置开启以采集待处理数据,生成待处理数据对应的待处理任务。 也就是说,浏览器可以响应于数据采集控件被触发,采集待处理数据,根据待处理数据确定待处理任务。例如,在任务处理页面用于处理图像处理任务的情况下,任务处理页面中的数据采集控件为图像采集控件。在用户通过点击等方式触发该图像采集控件的情况下,浏览器控制安装浏览器的终端设备开启图像采集装置,并通过该图像采集装置采集图像数据作为待处理数据。进一步地,根据待处理的图像数据生成对应的图像处理任务作为待处理任务。
进一步地,安装本公开实施例浏览器的终端设备中还可以预先存储多个数据,用户可以通过与任务处理页面进行人机交互的方式获取终端设备中存储的数据作为待处理数据。可选地,任务处理页面中可以包括用于向浏览器上传数据的数据上传控件,在该数据上传控件被触发的情况下上传终端设备中的数据作为待处理数据,并根据待处理数据确定待处理任务。例如,在任务处理页面用于处理图像处理任务的情况下,任务处理页面中的数据上传控件为图像上传控件。在用户通过点击等方式触发该图像上传控件的情况下,浏览器控制安装浏览器的终端设备开启本地相册,用户在本地相册中选中至少一个图像数据上传浏览器作为待处理数据。进一步地,根据待处理的图像数据生成对应的图像处理任务作为待处理任务。
可选地,任务处理页面中可以同时包括数据采集控件和数据上传控件,用户可以选择触发其中一种控件确定待处理数据,生成对应的待处理任务。
图2示出根据本公开实施例的一种任务处理页面的示意图。如图2所示,任务处理页面20中可以包括数据采集控件21和数据上传控件22。用户在触发该数据采集控件21的情况下采集待处理数据,在触发该数据上传控件22的情况下上传待处理数据,以根据待处理数据生成待处理任务。在一种可能的实现方式中,本公开实施例用于执行人脸识别任务,数据采集控件21用于采集人脸图像,数据上传控件22用于上传人脸图像。可选地,用户在触发数据采集控件21的情况下,浏览器控制终端设备的摄像装置开启,并采集人脸图像作为待处理数据生成待处理的人脸识别任务。用户在触发数据上传控件22的情况下,浏览器控制终端设备的本地相册开启,选中需要进行识别的人脸图像作为待处理数据生成待处理的人脸识别任务。
本公开实施例能够通过任务处理页面直接确定待处理数据,并基于待处理数据生成待处理任务,使得整个任务处理过程从开始到处理由浏览器独立完成,不需要额外调用终端设备底层的任务处理程序。
在一种可能的实现方式中,浏览器显示的任务处理页面还可以具有至少两个处理模块,各处理模块分别用于处理不同的任务,可以通过JS脚本语言调用处理模块接口的方式使用。可选地,处理模块可以存储为二进制格式文件,二进制格式文件通过二进制代码编译规范编译非浏览器代码以外的源代码得到。其中,二进制代码编译规范可以为WebAssembly,源代码可以为C语言代码、C++语言代码或Rust语言代码等,通过WebAssembly提供的编译工具emsdk编辑得到浏览器支持的二进制格式文件。
进一步地,处理模块可以为进行任务处理的程序,例如在任务处理页面用于进行视频处理的情况下,处理模块可以包括进行图像处理的图像处理工 具、进行音频处理的音频处理工具等程序。或者,处理模块还可以为预先训练得到的深度学习模型,例如在任务处理页面用于进行人脸识别的情况下,处理模块可以包括进行人脸识别的人脸识别模型、进行头发识别的头发识别模型、进行嘴部识别的嘴部识别模型等。也就是说,在处理模块为深度学习模型的情况下,各深度学习模型至少用于处理以下待处理子任务的至少两种:人脸检测任务、头发检测任务、嘴唇分割任务和指甲检测任务。
步骤S20、通过主线程根据至少两个处理模块的功能分割所述待处理任务,得到至少两个待处理子任务。
在一种可能的实现方式中,通过主线程根据至少两个处理模块的功能,以及待处理任务的内容对待处理任务进行分割,得到至少两个待处理子任务。其中,各待处理子任务可以分别对应一个处理模块,并且包括至少部分待处理任务中的待处理数据。可选地,分割待处理任务的过程通过JavaScript主线程执行。
以本发明实施例中的待处理任务为人脸识别任务,任务处理页面的处理模块包括人眼识别模块、头发识别模块、面部识别模块、嘴部识别模块、胳膊识别模块以及手部识别模块为例进行说明。由于人脸识别过程需要对人眼、头发、面部、嘴部等关键点进行定位识别,且任务处理页面具有的处理模块中包括能够进行人眼识别的人眼识别模块、进行头发识别的头发识别模块、面部识别的面部识别模块以及嘴部识别的嘴部识别模块。可以将待处理任务划分为对应于人眼识别模块的人眼识别子任务、对应于头发识别模块的头发识别子任务、对应于面部识别模块的面部识别子任务以及对应于嘴部识别模块的嘴部识别子任务。
进一步地,由于不同处理模块进行识别的过程均需要基于完整的人脸进行识别,上述人眼识别子任务、头发识别子任务、面部识别子任务和嘴部识别子任务均包括人脸识别任务中的待处理的人脸图像数据。
本公开实施例可以通过任务分割的方式将待处理任务分割为多个子任务,以通过不同的处理模块并行进行任务处理,提高任务处理效率。
步骤S30、通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果。
在一种可能的实现方式中,本公开实施例的任务处理方法通过多个子线程分别调用各处理模块接口,以并行处理各自对应的待处理任务,得到任务处理结果。可选地,各子线程通过主线程创建,即主线程为单线程模式的JavaScript语言线程,使得一个在通过主线程进行任务处理时无法并行处理任务。由此,可以通过主线程开辟多个worker线程,以基于各woker线程通过各处理模块并行处理对应的待处理子任务。其中,worker线程可以在主线程运行的同时在后台运行,两者互不干扰。等到worker线程完成当前待处理子任务的任务处理后,得到子任务处理结果,把子任务处理结果返回给主线程。也就是说,任务处理过程可以为通过主线程创建多个worker线程。通过各worker线程分别调用处理模块接口,并行通过各处理模块处理对应的待处理子任务并得到子任务处理结果。
在一种可能的实现方式中,在通过主线程创建多个worker线程后,基于worker能够在主线程运行的同时在后台运行的特性,可以通过各worker线程分别调用处理模块接口,以并行通过各处理模块处理对应的待处理子任务,得到子任务处理结果。
本公开实施例通过创建worker线程的方式解决了浏览器只能通过单线程执行任务的弊端,实现通过多个处理模块并行进行任务处理,提高了任务处理速度和效率。
在一种可能的实现方式中,各处理模块为预先训练得到的深度学习模型。处理模块处理对应的待处理子任务的过程包括:将与处理模块对应的待处理子任务中包括的至少部分待处理数据输入处理模块中,输出对应的子任务处理结果。在处理模块为用于进行对象识别的深度学习模型的情况下,可以将待处理子任务中的图像数据输入深度学习模型,输出所述子任务处理结果;所述子任务处理结果包括以下至少一种:所述图像数据的人脸检测框、头发检测框、嘴唇检测框和指甲检测框。例如,在待处理子任务为嘴部识别任务,处理模块为嘴部识别模型的情况下,将该嘴部识别任务中的待识别人脸图像输入嘴部识别模型,输出嘴部坐标信息作为子任务处理结果。
图3示出根据本公开实施例的一种确定子任务处理结果的示意图。如图3所示,在任务处理页面的处理模块为训练得到的深度学习模型的情况下,本公开实施例可以通过将待处理子任务30中包括的至少部分待处理数据输入预先训练得到的处理模块31,输出对应的子任务处理结果32。
步骤S40、基于各所述子任务处理结果确定待处理任务的任务处理结果。
在一种可能的实现方式中,在各处理模块处理待处理子任务得到子任务处理结果后,可以由各worker线程通过异步消息传递机制将子任务处理结果发送至主线程。可选地,一部消息传递机制可以为通过postMessage函数进行消息传递。进一步地,浏览器通过主线程获取各子任务处理结果,以确定待处理任务的任务处理结果。其中,任务处理结果根据子任务处理结果的内容以及待处理任务中包括的待处理数据类型确定。主线程确定任务处理结果的过程可以为获取各子任务处理结果,并将各子任务处理结果添加到前端页面中得到任务处理结果。
可选地,子任务处理结果可以为文本信息。响应于各子任务处理结果为文本信息,可以通过主线程获取各文本信息,并通过直接将各文本信息添加到前端页面的方式得到待处理任务的任务处理结果。也就是说,在各处理模块处理待处理子任务得到的子任务处理结果为文本信息的过程中,可以通过主线程直接获取各文本信息得到包括各子任务处理结果的前端页面作为任务处理结果,还可以将该任务处理结果通过浏览器显示。子任务处理结果以下文本信息的至少两个:人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标中。任务处理结果可以为包括各子任务处理结果的前端页面。
以本公开实施例的待处理任务为图像识别任务,各处理模块分别用于识别待处理任务中图像数据的一个对象所在位置坐标为例进行说明。在各处理 模块分别用于识别图像数据中的人脸位置、头发位置、嘴唇位置以及指甲位置中的至少两个的情况下,得到的子任务处理结果中包括人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标中的至少两个文本信息。主线程在获取各处理模块识别的检测框坐标后,直接将检测框坐标的文本信息添加到前端页面中,得到包括各子任务处理结果的文本信息作为待处理任务的任务处理结果。
可选地,在子任务处理结果中包括人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标中的至少两个文本信息的情况下,主线程还可以各子任务处理结果在待处理任务中的图像数据上各文本信息表征的坐标位置绘制对应的图像框,将绘制后的图像数据加入前端页面中得到任务处理结果。
在一种可能的实现方式中,子任务处理结果还可以为图像信息,图像信息可以为其中至少一个区域被标注的图像数据。响应于待处理数据为图像数据,各子任务处理结果为标注图像数据中至少一个区域的图像信息,通过所述主线程获取各图像信息,并将图像信息叠加后添加到前端页面中,得到待处理任务的任务处理结果。也就是说,在各处理模块处理待处理子任务得到的子任务处理结果为包括多个图像框的图像信息,且图像框用于标注图像数据中至少一个区域时,通过叠加各图像信息中图像框的方式确定任务处理结果。可选地,叠加各图像框的方式可以为将各子任务处理结果中位置部分重合的图像框叠加,得到能够包括各叠加图像框的最小的任务图像框。进一步地,将得到的各任务图像框作为任务处理结果并显示。或者,叠加各图像框的方式还可以为将各图像框直接叠加后得到任务处理结果并显示。
可选地,子任务处理结果可以包括以下已标记的图像信息的至少两个:具有人脸检测框的图像数据、具有头发检测框的图像数据、具有嘴唇检测框的图像数据以及具有指甲检测框的图像数据中,任务处理结果可以为具有叠加图像信息的前端页面,叠加图像信息为包括人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框的图像数据,或者为包括叠加人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框得到的至少一个对象检测框的图像数据。
以本公开实施例的待处理任务为对象识别任务,各处理模块分别用于识别待处理任务中图像数据的一个特征位置为例进行说明。处理模块包括面部识别模块、嘴部识别模块、头发识别模块和指甲识别模块中的至少两个,且处理识别待处理任务中的图像数据后分别得到面部图像信息、嘴部图像信息、头发图像信息和指甲图像信息。面部图像信息中包括具有至少一个人脸检测框的图像数据,嘴部图像信息中包括具有至少一个嘴唇检测框的图像数据,头发图像信息中包括具有至少一个头发检测框的图像数据,指甲图像信息中包括具有至少一个指甲检测框的图像数据可以通过主线程直接叠加各图像信息中人脸检测框、嘴部检测框、头发检测框和指甲检测框,得到包括具有上述各检测框的图像数据的前端页面作为任务处理结果。可选地,还可以通过主线程叠加人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种 检测框得到的至少一个对象检测框,并将各对象检测框添加至图像数据上,加入前端页面作为任务处理结果。
图4示出根据本公开实施例的一种任务处理结果的示意图。如图4所示,在待处理任务为人脸识别任务时,各待处理任务通过处理模块处理后得到多个图像信息,其中分别包括人脸面部一个特征位置的区域图像框。浏览器通过主线程叠加各图像信息中至少部分重合的图像框得到至少一个人脸图像框41,并确定包括至少一个人脸图像框41的任务处理结果40。通过浏览器的任务处理页面显示该任务处理结果40。
图5示出根据本公开实施例的一种确定任务处理结果的示意图。如图5所示,本公开实施例在通过浏览器的任务处理页面确定待处理任务50后,通过主线程根据待处理任务50和任务处理页面具有的各处理模块51分割待处理任务得到至少两个待处理子任务52。同时,并为各待处理子任务52分配worker线程,通过各worker线程分别调用该待处理子任务对应的处理模块53,处理该待处理子任务得到子任务处理结果54。通过postMessage将各子任务处理结果54发送至主线程。由浏览器通过主线程获取各子任务处理结果54得到任务处理结果55。可选地,浏览器还可以通过任务处理页面显示该任务处理结果55。
以本公开实施例用于进行对象识别为例进行说明。浏览器中包括的处理模块包括人脸检测模块、头发检测模块、嘴唇检测模块和指甲检测模块。在接收到待处理任务后,通过主线程根据各处理模块的功能将待处理任务划分为人脸检测任务、头发检测任务、嘴唇检测任务和指甲检测任务。进一步地,还通过主线程创建4个worker线程,由各worker线程分别调用各处理模块进行子任务处理。在当前调用的处理模块完成子任务处理后,将得到的人脸检测结果、头发检测结果、嘴唇检测结果和指甲检测结果中的一个子任务处理结果通过postMessage的方式发送给主线程。主线程获取各worker线程发送的子任务处理结果后,将各子任务处理结果处理后以绘制的方式写入前端页面代码中,得到前端页面作为对象识别任务的任务处理结果。可选地,在当前任务需要对多帧图像进行对象识别时,主线程依次处理每一帧,在得到当前帧的任务处理结果后再以轮询的方式对下一帧进行对象识别。
本公开实施例能够将处理不同任务的程序通过WebAssembly编译为任务处理页面的处理模块,直接通过浏览器调用处理模块进行任务处理。进一步地,还可以在浏览器确定待处理任务后通过主线程分割待处理任务,并通过多个worker线程并行根据处理模块处理分割得到的子任务,由主线程获取各处理模块的处理结果得到任务处理结果,提高了任务处理速度和任务处理效率。
可以理解,本公开提及的上述各个方法实施例,在不违背原理逻辑的情况下,均可以彼此相互结合形成结合后的实施例,限于篇幅,本公开不再赘述。本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的执行顺序应当以其功能和可能的内在逻辑确定。
此外,本公开还提供了任务处理装置、电子设备、计算机可读存储介质、 程序,上述均可用来实现本公开提供的任一种任务处理方法,相应技术方案和描述和参见方法部分的相应记载。
图6示出根据本公开实施例的任务处理装置的示意图,如图6所示,所述装置包括:
任务确定部分60,被配置为获取待处理任务,所述待处理任务中包括待处理数据;
任务分割部分61,被配置为通过主线程根据至少两个处理模块的功能分割所述待处理任务,得到至少两个待处理子任务,各所述待处理子任务分别对应一个处理模块且包括至少部分所述待处理数据,各所述处理模块分别用于处理不同的待处理子任务;
任务处理部分62,被配置为通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果;
结果确定部分63,被配置为基于各所述子任务处理结果确定待处理任务的任务处理结果。
在一种可能的实现方式中,所述任务确定部分60包括页面显示子部分和任务获取子部分;
页面显示子部分,被配置为显示具有至少两个处理模块的任务处理页面;
任务获取子部分,被配置为通过所述任务处理界面获取待处理任务。
在一种可能的实现方式中,各所述子线程通过异步消息传递机制将子任务处理结果发送至主线程。
在一种可能的实现方式中,所述处理模块存储为二进制格式文件,所述二进制格式文件通过二进制代码编辑规范编译非浏览器代码以外的源代码得到。
在一种可能的实现方式中,所述处理模块为预先训练得到的深度学习模型。
在一种可能的实现方式中,各所述深度学习模型用于处理以下待处理子任务的至少两种:人脸检测任务、头发检测任务、嘴唇分割任务和指甲检测任务。
在一种可能的实现方式中,所述处理模块处理对应的待处理子任务的过程包括:
将待处理子任务中的图像数据输入所述深度学习模型,输出所述子任务处理结果;所述子任务处理结果包括以下至少一种:所述图像数据的人脸检测框、头发检测框、嘴唇检测框和指甲检测框。
在一种可能的实现方式中,所述任务处理部分62还被配置为:
通过所述主线程创建多个worker线程;
通过各所述worker线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果。
在一种可能的实现方式中,所述结果确定部分63包括结果确定子部分,结果确定子部分被配置为:
通过所述主线程获取各所述子任务处理结果,并将各所述子任务处理结 果添加到前端页面中得到任务处理结果。
在一种可能的实现方式中,所述子任务处理结果包括以下文本信息的至少两个:人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标;
所述任务处理结果为包括各所述子任务处理结果的文本信息。
在一种可能的实现方式中,所述子任务处理结果包括以下已标记的图像信息的至少两个:具有人脸检测框的图像数据、具有头发检测框的图像数据、具有嘴唇检测框的图像数据以及具有指甲检测框的图像数据;
所述任务处理结果为具有叠加图像信息的前端页面,所述叠加图像信息为包括人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框的图像数据,或者为包括叠加人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框得到的至少一个对象检测框的图像数据。
在一些实施例中,本公开实施例提供的装置具有的功能或包含的模块可以用于执行上文方法实施例描述的方法,其实现可以参照上文方法实施例的描述。
本公开实施例还提出一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现上述方法。计算机可读存储介质可以是易失性或非易失性计算机可读存储介质。
本公开实施例还提出一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行上述方法。
本公开实施例还提供了一种计算机程序产品,包括计算机可读代码,或者承载有计算机可读代码的非易失性计算机可读存储介质,当所述计算机可读代码在电子设备的处理器中运行时,所述电子设备中的处理器执行上述方法。
电子设备可以被提供为终端、服务器或其它形态的设备。
图7示出根据本公开实施例的一种电子设备800的示意图。例如,电子设备800可以是移动电话,计算机,数字广播终端,消息收发设备,游戏控制台,平板设备,医疗设备,健身设备,个人数字助理等终端。
参照图7,电子设备800可以包括以下一个或多个组件:处理组件802,存储器804,电源组件806,多媒体组件808,音频组件810,输入/输出(Input/Output,I/O)的接口812,传感器组件814,以及通信组件816。
处理组件802通常控制电子设备800的整体操作,诸如与显示,电话呼叫,数据通信,相机操作和记录操作相关联的操作。处理组件802可以包括一个或多个处理器820来执行指令,以完成上述的方法的全部或部分步骤。此外,处理组件802可以包括一个或多个模块,便于处理组件802和其他组件之间的交互。例如,处理组件802可以包括多媒体模块,以方便多媒体组件808和处理组件802之间的交互。
存储器804被配置为存储各种类型的数据以支持在电子设备800的操作。这些数据的示例包括用于在电子设备800上操作的任何应用程序或方法的指 令,联系人数据,电话簿数据,消息,图片,视频等。存储器804可以由任何类型的易失性或非易失性存储设备或者它们的组合实现,如静态随机存取存储器(Static Random-Access Memory,SRAM),电可擦除可编程只读存储器(Electrically Erasable Programmable read only memory,EEPROM),可擦除可编程只读存储器(Erasable Programmable Read-Only Memory,EPROM),可编程只读存储器(Programmable Read-Only Memory,PROM),只读存储器(Read-Only Memory,ROM),磁存储器,快闪存储器,磁盘或光盘。
电源组件806为电子设备800的各种组件提供电力。电源组件806可以包括电源管理***,一个或多个电源,及其他与为电子设备800生成、管理和分配电力相关联的组件。
多媒体组件808包括在所述电子设备800和用户之间的提供一个输出接口的屏幕。在一些实施例中,屏幕可以包括液晶显示器(Liquid Crystal Display,LCD)和触摸面板(Touch panel,TP)。如果屏幕包括触摸面板,屏幕可以被实现为触摸屏,以接收来自用户的输入信号。触摸面板包括一个或多个触摸传感器以感测触摸、滑动和触摸面板上的手势。所述触摸传感器可以不仅感测触摸或滑动动作的边界,而且还检测与所述触摸或滑动操作相关的持续时间和压力。在一些实施例中,多媒体组件808包括一个前置摄像头和/或后置摄像头。当电子设备800处于操作模式,如拍摄模式或视频模式时,前置摄像头和/或后置摄像头可以接收外部的多媒体数据。每个前置摄像头和后置摄像头可以是一个固定的光学透镜***或具有焦距和光学变焦能力。
音频组件810被配置为输出和/或输入音频信号。例如,音频组件810包括一个麦克风(microphone,MIC),当电子设备800处于操作模式,如呼叫模式、记录模式和语音识别模式时,麦克风被配置为接收外部音频信号。所接收的音频信号可以被进一步存储在存储器804或经由通信组件816发送。在一些实施例中,音频组件810还包括一个扬声器,用于输出音频信号。
I/O接口812为处理组件802和***接口模块之间提供接口,上述***接口模块可以是键盘,点击轮,按钮等。这些按钮可包括但不限于:主页按钮、音量按钮、启动按钮和锁定按钮。
传感器组件814包括一个或多个传感器,用于为电子设备800提供各个方面的状态评估。例如,传感器组件814可以检测到电子设备800的打开/关闭状态,组件的相对定位,例如所述组件为电子设备800的显示器和小键盘,传感器组件814还可以检测电子设备800或电子设备800一个组件的位置改变,用户与电子设备800接触的存在或不存在,电子设备800方位或加速/减速和电子设备800的温度变化。传感器组件814可以包括接近传感器,被配置用来在没有任何的物理接触时检测附近物体的存在。传感器组件814还可以包括光传感器,如互补金属氧化物半导体(Complementary Metal Oxide Semiconductor,CMOS)或电荷耦合装置(Charge-coupled Device,CCD)图像传感器,用于在成像应用中使用。在一些实施例中,该传感器组件814还可以包括加速度传感器,陀螺仪传感器,磁传感器,压力传感器或温度传感器。
通信组件816被配置为便于电子设备800和其他设备之间有线或无线方式的通信。电子设备800可以接入基于通信标准的无线网络,
如WiFi,2G(2-Generation wireless telephone technology,第二代移动通信技术)或3G(3-Generation wireless telephone technology,第三代移动通信技术),或它们的组合。在一个示例性实施例中,通信组件816经由广播信道接收来自外部广播管理***的广播信号或广播相关信息。在一个示例性实施例中,所述通信组件816还包括近场通信(Near Field Communication,NFC)部分,以促进短程通信。例如,在NFC部分可基于射频识别(Radio Frequency Identification,RFID)技术,红外数据协会(Infrared Data Association,IrDA)技术,超宽带(Ultra Wide Band,UWB)技术,蓝牙(Bluetooth,BT)技术和其他技术来实现。
在示例性实施例中,电子设备800可以被一个或多个应用专用集成电路(Application Specific Integrated Circuit,ASIC)、数字信号处理器(Digital Signal Processing,DSP)、数字信号处理设备(Digital signal processing device,DSPD)、可编程逻辑器件(programmable logic device,PLD)、现场可编程门阵列(Field Programmable Gate Array,FPGA)、控制器、微控制器、微处理器或其他电子元件实现,用于执行上述方法。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器804,上述计算机程序指令可由电子设备800的处理器820执行以完成上述方法。
本公开涉及增强现实领域,通过获取现实环境中的目标对象的图像信息,进而借助各类视觉相关算法实现对目标对象的相关特征、状态及属性进行检测或识别处理,从而得到与具体应用匹配的虚拟与现实相结合的AR效果。示例性的,目标对象可涉及与人体相关的脸部、肢体、手势、动作等,或者与物体相关的标识物、标志物,或者与场馆或场所相关的沙盘、展示区域或展示物品等。视觉相关算法可涉及视觉定位、SLAM、三维重建、图像注册、背景分割、对象的关键点提取及跟踪、对象的位姿或深度检测等。具体应用不仅可以涉及跟真实场景或物品相关的导览、导航、讲解、重建、虚拟效果叠加展示等交互场景,还可以涉及与人相关的特效处理,比如妆容美化、肢体美化、特效展示、虚拟模型展示等交互场景。可通过卷积神经网络,实现对目标对象的相关特征、状态及属性进行检测或识别处理。上述卷积神经网络是基于深度学习框架进行模型训练而得到的网络模型。
图8示出根据本公开实施例的一种电子设备1900的示意图。例如,电子设备1900可以被提供为一服务器。参照图8,电子设备1900包括处理组件1922,其进一步包括一个或多个处理器,以及由存储器1932所代表的存储器资源,用于存储可由处理组件1922的执行的指令,例如应用程序。存储器1932中存储的应用程序可以包括一个或一个以上的每一个对应于一组指令的部分。此外,处理组件1922被配置为执行指令,以执行上述方法。
电子设备1900还可以包括一个电源组件1926被配置为执行电子设备1900的电源管理,一个有线或无线网络接口1950被配置为将电子设备1900 连接到网络,和一个输入输出(I/O)接口1958。电子设备1900可以操作基于存储在存储器1932的操作***,例如微软服务器操作***(Windows ServerTM),苹果公司推出的基于图形用户界面操作***(Mac OS XTM),多用户多进程的计算机操作***(UnixTM),自由和开放原代码的类Unix操作***(LinuxTM),开放原代码的类Unix操作***(FreeBSDTM)或类似。
在示例性实施例中,还提供了一种非易失性计算机可读存储介质,例如包括计算机程序指令的存储器1932,上述计算机程序指令可由电子设备1900的处理组件1922执行以完成上述方法。
本公开可以是***、方法和/或计算机程序产品。计算机程序产品可以包括计算机可读存储介质,其上载有用于使处理器实现本公开的各个方面的计算机可读程序指令。
计算机可读存储介质可以是可以保持和存储由指令执行设备使用的指令的有形设备。计算机可读存储介质例如可以是(但不限于)电存储设备、磁存储设备、光存储设备、电磁存储设备、半导体存储设备或者上述的任意合适的组合。计算机可读存储介质的更具体的例子(非穷举的列表)包括:便携式计算机盘、硬盘、随机存取存储器(Random Access Memory,RAM)、只读存储器(Read Only Memory,ROM)、可擦式可编程只读存储器(Electrical Programmable Read Only Memory,EPROM或闪存)、静态随机存取存储器(Static Random Access Memory,SRAM)、便携式压缩盘只读存储器(Compact Disc Read-Only Memory,CD-ROM)、数字多功能盘(Digital Video Disc,DVD)、记忆棒、软盘、机械编码设备、例如其上存储有指令的打孔卡或凹槽内凸起结构、以及上述的任意合适的组合。这里所使用的计算机可读存储介质不被解释为瞬时信号本身,诸如无线电波或者其他自由传播的电磁波、通过波导或其他传输媒介传播的电磁波(例如,通过光纤电缆的光脉冲)、或者通过电线传输的电信号。
这里所描述的计算机可读程序指令可以从计算机可读存储介质下载到各个计算/处理设备,或者通过网络、例如因特网、局域网、广域网和/或无线网下载到外部计算机或外部存储设备。网络可以包括铜传输电缆、光纤传输、无线传输、路由器、防火墙、交换机、网关计算机和/或边缘服务器。每个计算/处理设备中的网络适配卡或者网络接口从网络接收计算机可读程序指令,并转发该计算机可读程序指令,以供存储在各个计算/处理设备中的计算机可读存储介质中。
用于执行本公开实施例操作的计算机程序指令可以是汇编指令、指令集架构(Industry Standard Architecture,ISA)指令、机器指令、机器相关指令、微代码、固件指令、状态设置数据、或者以一种或多种编程语言的任意组合编写的源代码或目标代码,所述编程语言包括面向对象的编程语言—诸如Smalltalk、C++等,以及常规的过程式编程语言—诸如“C”语言或类似的编程语言。计算机可读程序指令可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计 算机的情形中,远程计算机可以通过任意种类的网络—包括局域网(local area network,LAN)或广域网(Wide Area Network,WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。在一些实施例中,通过利用计算机可读程序指令的状态信息来个性化定制电子电路,例如可编程逻辑电路、现场可编程门阵列(FPGA)或可编程逻辑阵列(programmable logic array,PLA),该电子电路可以执行计算机可读程序指令,从而实现本公开实施例的各个方面。
这里参照根据本公开实施例的方法、装置(***)和计算机程序产品的流程图和/或框图描述了本公开的各个方面。应当理解,流程图和/或框图的每个方框以及流程图和/或框图中各方框的组合,都可以由计算机可读程序指令实现。
这些计算机可读程序指令可以提供给通用计算机、专用计算机或其它可编程数据处理装置的处理器,从而生产出一种机器,使得这些指令在通过计算机或其它可编程数据处理装置的处理器执行时,产生了实现流程图和/或框图中的一个或多个方框中规定的功能/动作的装置。也可以把这些计算机可读程序指令存储在计算机可读存储介质中,这些指令使得计算机、可编程数据处理装置和/或其他设备以特定方式工作,从而,存储有指令的计算机可读介质则包括一个制造品,其包括实现流程图和/或框图中的一个或多个方框中规定的功能/动作的各个方面的指令。
也可以把计算机可读程序指令加载到计算机、其它可编程数据处理装置、或其它设备上,使得在计算机、其它可编程数据处理装置或其它设备上执行一系列操作步骤,以产生计算机实现的过程,从而使得在计算机、其它可编程数据处理装置、或其它设备上执行的指令实现流程图和/或框图中的一个或多个方框中规定的功能/动作。
附图中的流程图和框图显示了根据本公开的多个实施例的***、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个部分、程序段或指令的一部分,所述部分、程序段或指令的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的***来实现,或者可以用专用硬件与计算机指令的组合来实现。
该计算机程序产品可以通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品体现为计算机存储介质,在另一个可选实施例中,计算机程序产品体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。
以上已经描述了本公开的各实施例,上述说明是示例性的,并非穷尽性的,并且也不限于所披露的各实施例。在不偏离所说明的各实施例的范围和 精神的情况下,对于本技术领域的普通技术人员来说许多修改和变更都是显而易见的。本文中所用术语的选择,旨在最好地解释各实施例的原理、实际应用或对市场中的技术的改进,或者使本技术领域的其它普通技术人员能理解本文披露的各实施例。
本公开涉及一种任务处理方法及装置、电子设备、存储介质和计算机程序,其中,该方法通过获取待处理任务,并通过主线程根据至少两个处理模块的功能分割待处理任务,得到包括其中至少部分待处理数据的待处理子任务。通过多个子线程并行通过各处理模块处理对应的待处理子任务,得到子任务处理结果,再基于各子任务处理结果确定待处理任务的任务处理结果。本公开实施例能够在接收到任务时通过主线程进行任务分割,并创建多个子线程并行通过不同处理模块并行处理部分任务,获取各处理模块的子任务处理结果得到最终的任务处理结果,提高了任务处理效率。
Claims (15)
- 一种任务处理方法,所述方法包括:获取待处理任务,所述待处理任务中包括待处理数据;通过主线程根据至少两个处理模块的功能分割所述待处理任务,得到至少两个待处理子任务,各所述待处理子任务分别对应一个处理模块且包括至少部分所述待处理数据,各所述处理模块分别用于处理不同的待处理子任务;通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果;基于各所述子任务处理结果确定待处理任务的任务处理结果。
- 根据权利要求1所述的方法,其中,所述获取待处理任务包括;显示具有至少两个处理模块的任务处理页面;通过所述任务处理界面获取待处理任务。
- 根据权利要求1所述的方法,其中,各所述子线程通过异步消息传递机制将子任务处理结果发送至主线程。
- 根据权利要求1至3中任意一项所述的方法,其中,所述处理模块存储为二进制格式文件,所述二进制格式文件通过二进制代码编译规范编译非浏览器代码以外的源代码得到。
- 根据权利要求1至4中任意一项所述的方法,其中,所述处理模块为预先训练得到的深度学习模型。
- 根据权利要求5所述的方法,其中,各所述深度学习模型用于处理以下待处理子任务的至少两种:人脸检测任务、头发检测任务、嘴唇分割任务和指甲检测任务。
- 根据权利要求6所述的方法,其中,所述处理模块处理对应的待处理子任务的过程包括:将待处理子任务中的图像数据输入所述深度学习模型,输出所述子任务处理结果;所述子任务处理结果包括以下至少一种:所述图像数据的人脸检测框、头发检测框、嘴唇检测框和指甲检测框。
- 根据权利要求1至7中任意一项所述的方法,其中,所述通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果包括:通过所述主线程创建多个worker线程;通过各所述worker线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果。
- 根据权利要求1至8中任意一项所述的方法,其中,所述基于各所述子任务处理结果确定待处理任务的任务处理结果包括:通过所述主线程获取各所述子任务处理结果,并将各所述子任务处理结果添加到前端页面中得到任务处理结果。
- 根据权利要求1至9中任意一项所述的方法,其中,所述子任务处理结果包括以下文本信息的至少两个:人脸检测框坐标、头发检测框坐标、嘴唇检测框坐标以及指甲检测框坐标;所述任务处理结果为包括各所述子任务处理结果的文本信息。
- 根据权利要求1至9中任意一项所述的方法,其中,所述子任务处理结果包括以下已标记的图像信息的至少两个:具有人脸检测框的图像数据、具有头发检测框的图像数据、具有嘴唇检测框的图像数据以及具有指甲检测框的图像数据;所述任务处理结果为具有叠加图像信息的前端页面,所述叠加图像信息为包括人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框的图像数据,或者为包括叠加人脸检测框、头发检测框、嘴唇检测框和指甲检测框中至少两种检测框得到的至少一个对象检测框的图像数据。
- 一种任务处理装置,所述装置包括:任务确定部分,被配置为获取待处理任务,所述待处理任务中包括待处理数据;任务分割部分,被配置为通过主线程根据至少两个处理模块的功能分割所述待处理任务,得到至少两个待处理子任务,各所述待处理子任务分别对应一个处理模块且包括至少部分所述待处理数据,各所述处理模块分别用于处理不同的待处理子任务;任务处理部分,被配置为通过多个子线程分别调用处理模块接口,并行通过各所述处理模块处理对应的待处理子任务并得到子任务处理结果;结果确定部分,被配置为基于各所述子任务处理结果确定待处理任务的任务处理结果。
- 一种电子设备,包括:处理器;用于存储处理器可执行指令的存储器;其中,所述处理器被配置为调用所述存储器存储的指令,以执行权利要求1至11中任意一项所述的方法。
- 一种计算机可读存储介质,其上存储有计算机程序指令,所述计算机程序指令被处理器执行时实现权利要求1至11中任意一项所述的方法。
- 一种计算机程序,包括计算机可读代码,当所述计算机可读代码在电子设备中运行时,所述电子设备中的处理器执行用于实现权利要求1至11中任意一项所述的方法。
Applications Claiming Priority (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111137684.6 | 2021-09-27 | ||
CN202111137684.6A CN113806054A (zh) | 2021-09-27 | 2021-09-27 | 任务处理方法及装置、电子设备和存储介质 |
Publications (1)
Publication Number | Publication Date |
---|---|
WO2023045207A1 true WO2023045207A1 (zh) | 2023-03-30 |
Family
ID=78938604
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
PCT/CN2022/075002 WO2023045207A1 (zh) | 2021-09-27 | 2022-01-29 | 任务处理方法及装置、电子设备、存储介质和计算机程序 |
Country Status (3)
Country | Link |
---|---|
CN (1) | CN113806054A (zh) |
TW (1) | TW202314496A (zh) |
WO (1) | WO2023045207A1 (zh) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116126547A (zh) * | 2023-04-18 | 2023-05-16 | 邦邦汽车销售服务(北京)有限公司 | 一种车辆数据处理方法及*** |
CN116739090A (zh) * | 2023-05-12 | 2023-09-12 | 北京大学 | 基于Web浏览器的深度神经网络推理度量方法和装置 |
Families Citing this family (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113806054A (zh) * | 2021-09-27 | 2021-12-17 | 北京市商汤科技开发有限公司 | 任务处理方法及装置、电子设备和存储介质 |
CN114546624B (zh) * | 2022-03-01 | 2024-04-09 | 清华大学 | 任务处理方法及装置、电子设备和存储介质 |
CN114612287A (zh) * | 2022-03-18 | 2022-06-10 | 北京小米移动软件有限公司 | 图像处理方法、装置及存储介质 |
CN115658325B (zh) * | 2022-11-18 | 2024-01-23 | 北京市大数据中心 | 数据处理方法、装置、多核处理器、电子设备以及介质 |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111881401A (zh) * | 2020-08-04 | 2020-11-03 | 浪潮云信息技术股份公司 | 基于WebAssembly的浏览器深度学习方法及*** |
US20210097383A1 (en) * | 2019-09-30 | 2021-04-01 | International Business Machines Corporation | Combined Data Pre-Process And Architecture Search For Deep Learning Models |
CN112650502A (zh) * | 2020-12-31 | 2021-04-13 | 广州方硅信息技术有限公司 | 批处理任务处理方法、装置、计算机设备和存储介质 |
CN113034659A (zh) * | 2021-05-24 | 2021-06-25 | 成都天锐星通科技有限公司 | 三维渲染数据处理方法、装置、电子设备和可读存储介质 |
CN113298692A (zh) * | 2021-05-21 | 2021-08-24 | 北京索为云网科技有限公司 | 终端的位姿跟踪方法、ar渲染方法、设备及存储介质 |
CN113806054A (zh) * | 2021-09-27 | 2021-12-17 | 北京市商汤科技开发有限公司 | 任务处理方法及装置、电子设备和存储介质 |
Family Cites Families (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11494987B2 (en) * | 2018-09-06 | 2022-11-08 | 8th Wall Inc. | Providing augmented reality in a web browser |
CN112437343B (zh) * | 2020-05-15 | 2021-09-17 | 上海哔哩哔哩科技有限公司 | 基于浏览器的封面生成方法和*** |
CN111860253A (zh) * | 2020-07-10 | 2020-10-30 | 东莞正扬电子机械有限公司 | 一种驾驶场景的多任务属性识别方法、装置、介质及设备 |
CN112257135B (zh) * | 2020-10-30 | 2023-09-05 | 久瓴(上海)智能科技有限公司 | 一种基于多线程的模型加载方法、装置、存储介质及终端 |
CN112905347A (zh) * | 2021-03-04 | 2021-06-04 | 北京澎思科技有限公司 | 数据处理方法、设备及存储介质 |
CN113221771B (zh) * | 2021-05-18 | 2023-08-04 | 北京百度网讯科技有限公司 | 活体人脸识别方法、装置、设备、存储介质及程序产品 |
-
2021
- 2021-09-27 CN CN202111137684.6A patent/CN113806054A/zh active Pending
-
2022
- 2022-01-29 WO PCT/CN2022/075002 patent/WO2023045207A1/zh unknown
- 2022-05-06 TW TW111117088A patent/TW202314496A/zh unknown
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20210097383A1 (en) * | 2019-09-30 | 2021-04-01 | International Business Machines Corporation | Combined Data Pre-Process And Architecture Search For Deep Learning Models |
CN111881401A (zh) * | 2020-08-04 | 2020-11-03 | 浪潮云信息技术股份公司 | 基于WebAssembly的浏览器深度学习方法及*** |
CN112650502A (zh) * | 2020-12-31 | 2021-04-13 | 广州方硅信息技术有限公司 | 批处理任务处理方法、装置、计算机设备和存储介质 |
CN113298692A (zh) * | 2021-05-21 | 2021-08-24 | 北京索为云网科技有限公司 | 终端的位姿跟踪方法、ar渲染方法、设备及存储介质 |
CN113034659A (zh) * | 2021-05-24 | 2021-06-25 | 成都天锐星通科技有限公司 | 三维渲染数据处理方法、装置、电子设备和可读存储介质 |
CN113806054A (zh) * | 2021-09-27 | 2021-12-17 | 北京市商汤科技开发有限公司 | 任务处理方法及装置、电子设备和存储介质 |
Cited By (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116126547A (zh) * | 2023-04-18 | 2023-05-16 | 邦邦汽车销售服务(北京)有限公司 | 一种车辆数据处理方法及*** |
CN116739090A (zh) * | 2023-05-12 | 2023-09-12 | 北京大学 | 基于Web浏览器的深度神经网络推理度量方法和装置 |
CN116739090B (zh) * | 2023-05-12 | 2023-11-28 | 北京大学 | 基于Web浏览器的深度神经网络推理度量方法和装置 |
Also Published As
Publication number | Publication date |
---|---|
TW202314496A (zh) | 2023-04-01 |
CN113806054A (zh) | 2021-12-17 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
WO2023045207A1 (zh) | 任务处理方法及装置、电子设备、存储介质和计算机程序 | |
CN106385591B (zh) | 视频处理方法及视频处理装置 | |
JP2021528742A (ja) | 画像処理方法及び装置、電子機器、並びに記憶媒体 | |
CN109257645B (zh) | 视频封面生成方法及装置 | |
CN112585566B (zh) | 用于与具有内置摄像头的设备进行交互的手遮脸输入感测 | |
CN111626183B (zh) | 一种目标对象展示方法及装置、电子设备和存储介质 | |
CN110889382A (zh) | 虚拟形象渲染方法及装置、电子设备和存储介质 | |
CN111241887B (zh) | 目标对象关键点识别方法及装置、电子设备和存储介质 | |
WO2016106997A1 (zh) | 屏幕截图方法及装置、移动终端 | |
KR102061867B1 (ko) | 이미지 생성 장치 및 그 방법 | |
WO2022188305A1 (zh) | 信息展示方法及装置、电子设备、存储介质及计算机程序 | |
JP7395070B1 (ja) | ビデオ処理方法及び装置、電子設備及びコンピュータ読み取り可能な記憶媒体 | |
WO2023051356A1 (zh) | 一种虚拟对象的显示方法及装置、电子设备和存储介质 | |
WO2023142645A1 (zh) | 图像处理方法、装置、电子设备、存储介质和计算机程序产品 | |
CN110929616B (zh) | 一种人手识别方法、装置、电子设备和存储介质 | |
CN112669198A (zh) | 图像特效的处理方法、装置、电子设备和存储介质 | |
CN113822798B (zh) | 生成对抗网络训练方法及装置、电子设备和存储介质 | |
WO2020034763A1 (zh) | 手势识别方法、手势处理方法及装置 | |
WO2022134390A1 (zh) | 标注方法及装置、电子设备和存储介质 | |
CN112613447A (zh) | 关键点检测方法及装置、电子设备和存储介质 | |
WO2023142419A1 (zh) | 人脸跟踪识别方法、装置、电子设备、介质及程序产品 | |
WO2022151687A1 (zh) | 合影图像生成方法、装置、设备、存储介质、计算机程序及产品 | |
CN114266305A (zh) | 对象识别方法及装置、电子设备和存储介质 | |
CN113377478B (zh) | 文娱行业数据标注方法、装置、存储介质及设备 | |
CN112633203B (zh) | 关键点检测方法及装置、电子设备和存储介质 |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 22871274 Country of ref document: EP Kind code of ref document: A1 |
|
NENP | Non-entry into the national phase |
Ref country code: DE |