WO2024131493A1 - 任务处理方法、装置、设备及存储介质 - Google Patents

任务处理方法、装置、设备及存储介质 Download PDF

Info

Publication number
WO2024131493A1
WO2024131493A1 PCT/CN2023/135150 CN2023135150W WO2024131493A1 WO 2024131493 A1 WO2024131493 A1 WO 2024131493A1 CN 2023135150 W CN2023135150 W CN 2023135150W WO 2024131493 A1 WO2024131493 A1 WO 2024131493A1
Authority
WO
WIPO (PCT)
Prior art keywords
task
target task
target
verification information
devices
Prior art date
Application number
PCT/CN2023/135150
Other languages
English (en)
French (fr)
Inventor
陈锦明
江腾飞
俞佳
刘帅
陈泽丰
Original Assignee
先临三维科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 先临三维科技股份有限公司 filed Critical 先临三维科技股份有限公司
Publication of WO2024131493A1 publication Critical patent/WO2024131493A1/zh

Links

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Definitions

  • the present disclosure relates to the field of communication technology, and in particular to a task processing method, device, equipment and storage medium.
  • a three-dimensional scanning device can usually be used to rotate 360° around the target scene to collect images of the target scene, and then send them to the mobile terminal.
  • the application on the mobile terminal constructs a three-dimensional point cloud model of the target scene based on the collected images, rasterizes the three-dimensional point cloud model, renders it, and displays it to the user.
  • the present invention provides a task processing method, device, equipment and storage medium.
  • a task processing method is provided, applicable to a first device, the method comprising:
  • the second device determines that it can execute the target task based on the verification information
  • a connection is established with the second device, and at least part of the target task is sent to the second device, so that the second device processes at least part of the received target task and returns the processing result.
  • a task processing method is provided, the method being applicable to a second device, the method comprising:
  • connection request sent by a first device, wherein the connection request is sent after the first device receives the target task, and the connection request carries verification information;
  • a task processing apparatus applicable to a first device, the apparatus comprising:
  • a detection module is configured to detect whether there is a second device capable of providing computing services in the surrounding environment after receiving the target task;
  • a verification module configured to send a connection request carrying verification information to the second device if the second device exists
  • the sending module is configured to establish a connection with the second device and send at least part of the target task to the second device when the second device determines that the target task can be performed based on the verification information, so that the second device processes at least part of the received target task and returns the processing result.
  • a task processing apparatus applicable to a second device, the apparatus comprising:
  • a receiving module configured to receive a connection request sent by a first device, wherein the connection request is sent after the first device receives a target task, and the connection request carries verification information;
  • a verification module configured to establish a connection with the first device if it is determined based on the verification information that the target task can be performed;
  • the processing module is configured to receive at least part of the target task sent by the first device, process at least part of the received target task, and return the processing result to the first device.
  • an electronic device comprising a processor, a memory, and computer instructions stored in the memory and executable by the processor, wherein when the processor executes the computer instructions, the method mentioned in the first aspect above can be implemented.
  • a computer-readable storage medium on which computer instructions are stored. When the computer instructions are executed, the method mentioned in the first aspect is implemented.
  • the first device after receiving the target task, can automatically search whether there is a second device in the environment that can provide computing services.
  • verification information can be sent to the second device so that the second device can determine whether it can process the task based on the verification information. If it can, the two devices can establish a connection, and the first device can transfer part or all of the task to the second device for processing and obtain the processing result.
  • FIG. 1 is a schematic diagram of an application scenario of an embodiment of the present disclosure.
  • FIG. 2 is a flow chart of a task processing method according to an embodiment of the present disclosure.
  • FIG. 3 is a schematic diagram of an application scenario of an embodiment of the present disclosure.
  • FIG. 4 is a schematic diagram of an application scenario of an embodiment of the present disclosure.
  • FIG5 is a flowchart of a task processing method according to an embodiment of the present disclosure.
  • FIG. 6 is a timing diagram of a task processing method according to an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of the logical structure of a task processing device according to an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of the logical structure of a task processing device according to an embodiment of the present disclosure.
  • FIG. 9 is a schematic diagram of a logical structure of a device according to an embodiment of the present disclosure.
  • first, second, third, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other.
  • first information may also be referred to as the second information, and similarly, the second information may also be referred to as the first information.
  • word "if” as used herein may be interpreted as "at the time of” or "when” or "in response to determining”.
  • mobile terminals such as mobile phones and tablets have also acquired strong computing capabilities, and some computationally intensive (i.e., large computational workload and high computational intensity) applications can be run through these mobile terminals, such as reconstruction and rendering of three-dimensional scenes, large-scale 3D games, etc.
  • computationally intensive applications such as large computational workload and high computational intensity
  • the computing power of the current iPad Pro equipped with M series chips is already very strong, comparable to desktop-level Intel CPUs, so it is possible to run computationally intensive applications on iPad Pro equipped with M series chips.
  • a three-dimensional scanning device can usually be used to rotate 360° around the target scene to collect images of the target scene, and then send them to the mobile terminal.
  • the application on the mobile terminal builds a three-dimensional point cloud model of the target scene based on the collected images, rasterizes the three-dimensional point cloud model, renders it, and displays it to the user. Since the three-dimensional reconstruction process requires a lot of calculations, even if current mobile terminals can complete such computing tasks independently, executing such high-computation tasks for a long time will cause the chip on the mobile terminal to overheat and reduce the frequency, resulting in a significant decrease in computing performance.
  • the commonly used solution at present is to use a radiator to dissipate heat for the mobile terminal.
  • this method can avoid chip overheating and frequency reduction, since the mobile terminal has to be placed on the radiator, the mobile terminal cannot be easily moved and loses its portability. In addition, since an additional radiator is required, the chip overheating problem cannot be improved in scenarios where a radiator does not exist.
  • the embodiment of the present disclosure provides a task processing method, which can be used to process some computationally intensive tasks.
  • the environment usually includes multiple devices, for example, a user may have multiple devices such as a mobile phone, a tablet, and a computer. Therefore, after the device receives a computationally intensive task, it can use the computing resources of other devices in the environment to jointly process the task, thereby avoiding overheating of the device chip.
  • a pre-developed application can be installed in each device in advance, or a pre-developed service can be set. When running the application or service, the device that receives the computationally intensive task can automatically search whether there is a device in the environment that can provide computing services.
  • verification information can be sent to the device so that the device can determine whether it can process the task based on the verification information. If it can, the two devices can establish a connection, and the device that receives the intensive task can transfer part or all of the task to the device that can provide computing services for processing, and obtain the processing results.
  • first devices the devices that receive intensive tasks are collectively referred to as first devices
  • second devices the devices that can provide computing services to the first devices.
  • the first device can be a mobile terminal such as a mobile phone or a tablet
  • the second device can be a mobile phone, a tablet, a computer, etc.
  • the computing performance of the second device is not lower than that of the first device.
  • self-developed software can be installed on the first device and the second device respectively, or self-developed services can be set up in the first device and the second device, so that the first device can automatically detect and discover the surrounding second device, and send verification information to the second device. After the second device determines that it can process the task based on the verification information, the two establish a connection to complete the transfer and collaborative processing of the task.
  • FIG1 it is a schematic diagram of an application scenario of the task processing method provided by the present disclosure, and the environment includes the following: A device 11 and a second device 12. After receiving the target task, the first device 11 can detect whether there is a second device 12 around. If detected, verification information is sent to the second device 12. After the verification is passed, the target task is sent to the second device 12.
  • the task processing method is introduced from the processing flow of the first device, which may specifically include the following steps:
  • the first device can automatically detect whether there is a second device in the surrounding environment that can provide computing services.
  • the target task may be some computationally intensive tasks, such as three-dimensional reconstruction tasks of complex scenes, rendering tasks of 3D game scenes, and so on. Considering that the first device completes these tasks independently, the amount of calculation is large, which will cause the chip in the first device to overheat and reduce the frequency. Therefore, after receiving a similar target task, the first device can detect whether there is a second device in the surrounding environment. For example, the first device and the second device can realize point-to-point communication, and the second device can broadcast a message after being turned on, so that the first device can detect the second device based on the broadcast message.
  • the first device can automatically detect the second device and communicate with it through some services for discovering nearby devices and establishing peer-to-peer communication with the devices. For example, taking the first device as an Apple device, the first device can automatically search for other nearby Apple devices based on the Multipeer service framework and communicate with them peer-to-peer.
  • the embodiments of the present disclosure are not limited to the Multipeer service framework, and can also be other service frameworks with similar functions.
  • a connection request may be sent to the second device, and the connection request may carry verification information, which can be used to determine whether the second device can process the target task.
  • the second device can verify the identity of the first device, and only when the identity of the first device meets certain conditions will it establish a connection with it and assist it in processing computing tasks.
  • the second device may not be able to perform the task that the first device wants to transfer to the second device, if the target task is not verified in advance and the target task is received directly from the first device, it will not only waste transmission resources, but also reduce the overall processing efficiency of the task because it cannot process itself. Therefore, when the first device requests to establish a connection with the second device, it can attach verification information so that the second device can determine whether it can process the target task based on the verification information.
  • step S206 after receiving the connection request from the first device, the second device can determine whether it can perform the target task based on the verification information carried in the connection request. If it can, it agrees to the connection request of the first device, so that the first device can establish a connection with the second device, and then the first device can send part or all of the target task to the second device through the established connection, so that the second device can process the received task and return the processing result.
  • the first device and the second device can establish a point-to-point communication connection, for example, point-to-point communication (peer-to-peer, referred to as P2P or peer-to-peer Internet technology) can be achieved through the Multipeer framework service or a service with similar functions, or if the two devices are in the same local area network, a communication connection can also be established through the local area network.
  • point-to-point communication peer-to-peer, referred to as P2P or peer-to-peer Internet technology
  • P2P peer-to-peer Internet technology
  • the verification information may include the identity information of the first device.
  • the second device determines that the identity information of the first device meets the preset conditions, it determines that it can execute the target task sent by the first device and establishes a connection with it. For example, after detecting the second device, the first device can send a token to it that identifies its identity (the token is assigned by the developer). After receiving the token, the second device can verify the validity of the token. If the token is valid, it will establish a connection with the first device. Otherwise, it will reject the connection request of the first device. By verifying the identity of the first device, it can prevent the computing resources of the second device from being maliciously occupied, and it can also ensure Security of data transmission.
  • the verification information may also include the task type of the target task.
  • the second device can determine whether the task type of the target task matches the task type it can process. If they match, it will establish a connection with the first device and receive the task transferred by the first device.
  • the first device and the second device can communicate in a point-to-point manner, and generally in point-to-point communication, the transmission bandwidth that can be supported has a certain upper limit.
  • the maximum bandwidth that can be supported by two devices that implement point-to-point communication based on the Multipeer service framework is 5GB/s.
  • the verification information may also include the transmission bandwidth required for the target task.
  • the second device can determine whether the transmission bandwidth required for the target task exceeds the target bandwidth, where the target bandwidth is the maximum bandwidth that can be supported by the two devices when performing point-to-point communication. If it does not exceed, it agrees to establish a connection with the first device.
  • the two can also transmit data through the local area network. Since the local area network can usually support a larger bandwidth, if it is determined that the transmission bandwidth required for the target task exceeds the above target bandwidth, it can be further determined whether the first device and the second device are located in the same local area network. If the two are located in the same local area network, it can also be considered that the second device can process the target task and establish a connection with the first device.
  • the verification information may include one or more of the identification information of the first device, the task type of the target task, and the transmission bandwidth required for the target task.
  • the second device When verifying whether the second device can perform the target task, it can also be determined in combination with one or more of the above verification information.
  • the specific setting can be based on actual needs. For example, in some scenarios, there is only one type of target task by default, so there is no need to verify the type of the target task, or the transmission bandwidth required for the target task will not be higher than the maximum bandwidth supported by the two devices for point-to-point communication by default, so there is no need to verify the bandwidth.
  • the first device 11 can be connected to a three-dimensional scanning device 13 for communication, and the target task can be a task of constructing and displaying a three-dimensional model using the data collected by the three-dimensional scanning device 13.
  • the target task can be a task of constructing and displaying a three-dimensional model using the data collected by the three-dimensional scanning device 13.
  • three-dimensional scanning devices which can scan the target scene, collect image data or point cloud data of the target scene, and construct a three-dimensional model of the target scene based on the image data or data. Since the three-dimensional reconstruction process involves a large amount of calculation, it is necessary to use the computing resources of other devices to complete the task together.
  • three-dimensional scanning devices such as oral scanning devices, industrial scanning devices, and professional scanning devices
  • these scanning devices collect different types of data (such as images or point clouds), different amounts of data (such as resolutions and frame rates), and different amounts of calculation required to construct a three-dimensional model using the data collected by these devices.
  • the oral scanning device collects oral image data
  • the industrial scanning device usually collects laser point cloud data.
  • the amount of data collected by the oral scanning device is smaller, and the amount of calculation required for three-dimensional reconstruction is also smaller.
  • the three-dimensional reconstruction process has the largest amount of computation, and this part of the processing task usually needs to be sent to the second device.
  • this part of the processing task usually needs to be sent to the second device.
  • a large amount of processing data needs to be sent when this part of the processing task is sent to the second device, for example, a large amount of image data or point cloud data needs to be transmitted to build a three-dimensional point cloud model. Therefore, in this scenario, the first device and the second device can communicate point-to-point. Compared with communication through the Internet, point-to-point communication can provide a larger transmission bandwidth and is more suitable for such a task transfer scenario that requires the transmission of a large amount of data.
  • the first device when a user uses his mobile phone to process a target task, there are multiple devices such as the user's own computer and tablet nearby, and these devices can provide computing services.
  • a device with the best or better current computing performance can be selected to assist in the processing of the target task. For example, if the first device detects that there are multiple second devices in the surrounding environment, and multiple second devices are able to process the target task, the first device can notify each second device to feedback the current performance parameters, which can characterize the current computing power of the device.
  • the performance parameters can be the current hardware resource occupancy of the device, the hardware performance parameters of each device, and so on. Then, based on the performance parameters, the target second device with the best performance and the strongest computing power can be screened out from multiple second devices, or the target second device with computing performance that meets certain conditions can be selected, and part or all of the target processing task can be transferred to the target second device for processing by the target second device.
  • the target task can be divided into multiple subtasks
  • the second device detected in the surrounding environment can include one or more, that is, the first device and the one or more second devices can constitute a distributed computing system.
  • the first device obtains the performance parameters of itself and each second device, and the performance parameters can characterize the current computing power of the device.
  • the performance parameters can be the current hardware resource occupancy of the device, the hardware performance parameters of each device, etc.
  • the allocation method of the multiple subtasks between the first device and the one or more second devices can be determined based on the respective performance parameters, and at least part of the multiple subtasks can be sent to the second device respectively based on the allocation method.
  • the best allocation strategy can be determined to improve the task processing efficiency.
  • the target task is processed, which can improve the processing efficiency of the task.
  • the target task may be a task of constructing and displaying a three-dimensional model using images collected by a three-dimensional scanning device.
  • the target task may be divided into the following multiple subtasks: (1) performing three-dimensional reconstruction using images to obtain a three-dimensional point cloud model; (2) performing encapsulation processing on the three-dimensional point cloud model; (3) performing rasterization processing on the point cloud model; (4) rendering and displaying the three-dimensional model after rasterization processing.
  • subtask (1) has the largest amount of calculation and requires high computing power.
  • subtasks (1)-(3) may be transferred to the second device for execution, and the remaining subtasks may be executed by the first device. If it is determined based on the performance parameters of the second device that the current computing power of the second device is weak, for example, the current hardware resources of the second device are largely occupied, then only subtask (1) may be transferred to the second device for execution.
  • the above subtasks can be further allocated based on the performance parameters of the first device and each second device.
  • multiple frames of images can be divided into multiple groups, and a second device can be used to perform three-dimensional reconstruction on a group of images to obtain a portion of a three-dimensional point cloud.
  • other allocation methods can also be used.
  • the task allocation can be flexibly set based on the characteristics of the distributed computing system, and the embodiments of the present disclosure do not limit this.
  • the target task can be downgraded to reduce the computational complexity of the target task.
  • the first device is in communication with a 3D scanning device
  • the target task may be a task of constructing and displaying a 3D model using data collected by the 3D scanning device.
  • the first device continuously receives data of the target scene collected by the 3D scanning device, and constructs a 3D model based on the collected data.
  • the target task may be downgraded in the following two ways:
  • Method (1) Notify the 3D scanning device to reduce the speed of collecting data. For example, if the 3D scanning device collects images of the target scene, the 3D scanning device can be notified to reduce the scanning speed (number of photos per second), thereby reducing the frame rate of the collected images, and further reducing the processing pressure of the first device.
  • Method (2) Only some subtasks in the target task are executed, wherein the subtasks at least include constructing a 3D point cloud model based on data collected by a 3D scanning device.
  • the first device may only Process a portion of the subtasks that must be processed currently in the target task, and the remaining subtasks can be executed by other devices, or can be executed later by this device (offline processing).
  • offline processing Taking the three-dimensional scanning device as an example, it is necessary to use the image of the target scene to construct a three-dimensional point cloud model using the image after the first device obtains the image from the three-dimensional scanning device. The remaining steps such as packaging can be executed later. Therefore, the necessary steps can be executed first.
  • the first device can first display the unpackaged three-dimensional point cloud model to meet the user's basic needs of seeing the scanning progress while scanning.
  • the first device can execute steps such as packaging to obtain a more complete and accurate three-dimensional model to meet the user's needs for the accuracy of the three-dimensional model.
  • the first device and the second device are both iOS-based devices, for example, the first device is an iPad and the second device is a Mac.
  • the first device and the second device can establish peer-to-peer communication through a Multipeer service framework.
  • the first device and the second device can be iOS systems, Android systems, Windows systems, or Linux systems.
  • the first device and the second device can establish communication through Bluetooth (Bluetooth mesh), NFC (Near Field Communication), automatic discovery service, mqtt instant messaging protocol or Zigbee wireless communication protocol.
  • Bluetooth Bluetooth mesh
  • NFC Near Field Communication
  • automatic discovery service mqtt instant messaging protocol or Zigbee wireless communication protocol.
  • the two devices can directly transmit data through short-range communication methods such as Bluetooth and NFC.
  • this communication method does not require the transfer of devices such as routers, is less susceptible to the impact of network bandwidth, and can ensure the stability of data transmission, which is more suitable for scenarios of 3D reconstruction tasks.
  • FIG5 it is a schematic diagram of the processing flow of the second device, which may specifically include the following steps:
  • S502 Receive a connection request sent by a first device, where the connection request is sent after the first device receives a target task, and the connection request carries verification information;
  • S506 Receive at least part of the target task sent by the first device, process at least part of the received target task, and return the processing result to the first device.
  • determining that the target task can be performed based on the verification information includes:
  • the verification information includes the identity information of the first device, and the identity information meets the preset conditions
  • the verification information includes a task type of the target task, and the task type matches a task type that can be processed by the second device;
  • the verification information includes the transmission bandwidth required by the target task, and the transmission bandwidth is not higher than the target bandwidth;
  • the verification information includes a transmission bandwidth required by the target task, the transmission bandwidth is higher than the target bandwidth, and the first device and the second device are located in the same local area network;
  • the target bandwidth is the maximum bandwidth that can be supported when the first device and the second device perform point-to-point communication.
  • the first device is communicatively connected to a three-dimensional scanning device
  • the target task is to construct and display a three-dimensional model using data collected by the three-dimensional scanning device, wherein different types of three-dimensional scanning devices correspond to different target tasks.
  • establishing a connection with the first device is refused.
  • the second device can provide computing services to multiple first devices at the same time. Therefore, the second device can also establish connections with multiple first devices, receive tasks sent by multiple first devices, process the tasks and return them to each first device.
  • iOS devices can achieve point-to-point communication through the Multipeer service framework
  • other nearby Apple devices such as Mac
  • pre-developed software 1 and software 2 can be installed on the iPad device and the computing node, respectively.
  • the Multipeer service can be used to detect whether there is a computing node nearby. If a computing node is detected nearby, a connection request can be sent to the computing node, and the connection request carries verification information.
  • the Multipeer service can be used to monitor the connection request sent by the iPad device. If a connection request is monitored, the iPad device is verified based on the verification information carried in the connection request. If the verification is passed, a connection is established with the iPad device, and the processing task sent by the iPad device is received, and the task is returned to the iPad device after processing. If the verification fails, the connection is refused.
  • the computing node will verify the iPad device in the following three aspects:
  • Permission verification That is, the iPad device will pass a token assigned to it (token, assigned by the developer) to the computing node.
  • the computing node can verify whether the token is valid. If it is valid, it will continue to connect. If it is invalid, it will refuse the connection, thus ensuring that the computing node will not be occupied maliciously;
  • Computing service name and version Different computing nodes can provide different types of computing services.
  • 3D scanning equipment includes oral scanning equipment, professional scanning equipment, industrial scanning equipment, etc.
  • the verification information can include the name and version information of the computing service currently required by the iPad device, so that the computing node can determine whether it can perform the computing task.
  • the iPad device can determine how to allocate computing tasks based on the computing nodes and its own current computing capabilities. For example, when most of the current hardware processing resources of the computing nodes are occupied, the iPad device can only allocate the task of building a three-dimensional point cloud model based on image data to the computing nodes for processing. When most of the current hardware processing resources of the computing nodes are idle, the tasks of building a three-dimensional point cloud model based on image data, encapsulating the three-dimensional point cloud model, and rasterizing the model can all be allocated to the computing nodes.
  • the iPad device can select the computing node with the strongest current computing power and assign the computing task to the node.
  • the current iPad device does not detect the computing node, it can notify the oral scanning device to reduce the image acquisition rate, or the iPad device only performs the task of building a three-dimensional point cloud model using image data, and no longer performs the task of encapsulating and rasterizing the three-dimensional point cloud model to reduce the amount of calculation.
  • the embodiment of the present disclosure further provides a task processing device, which is applicable to a first device.
  • the device 70 includes:
  • a detection module 71 is used to detect whether there is a second device capable of providing computing services in the surrounding environment after receiving the target task;
  • Verification module 72 configured to send a connection message carrying verification information to the second device if the second device exists. Receive requests;
  • the sending module 73 is used to establish a connection with the second device and send at least part of the target task to the second device when the second device determines that it can execute the target task based on the verification information, so that the second device processes at least part of the received target task and returns the processing result.
  • the specific steps of the above-mentioned device executing the task processing method can refer to the description in the above-mentioned method embodiment, and will not be repeated here.
  • the embodiment of the present disclosure further provides another task processing device, which is applicable to the second device.
  • the device 80 includes:
  • a receiving module 81 is used to receive a connection request sent by a first device, wherein the connection request is sent after the first device receives a target task, and the connection request carries verification information;
  • a verification module 82 configured to establish a connection with the first device if it is determined that the target task can be performed based on the verification information
  • the processing module 83 is used to receive at least part of the target task sent by the first device, process at least part of the received target task, and return the processing result to the first device.
  • the specific steps of the above-mentioned device executing the task processing method can refer to the description in the above-mentioned method embodiment, and will not be repeated here.
  • an embodiment of the present disclosure also provides a device, as shown in Figure 9, which includes a processor 91, a memory 92, and computer instructions stored in the memory 92 for execution by the processor 91, and the processor 91 implements any of the methods described in the above embodiments when executing the computer instructions.
  • the present disclosure also provides a computer-readable storage medium on which a computer program is stored.
  • a computer program is stored on which a computer program is stored.
  • the program is executed by a processor, the method described in any of the above embodiments is implemented.
  • Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information.
  • Information can be computer readable instructions, data structures, program modules or other data.
  • Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device.
  • computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.
  • the embodiments of the present disclosure can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the embodiments of the present disclosure is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM/RAM, a disk, an optical disk, etc., including several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment of the present disclosure or some parts of the embodiments.
  • a computer device which can be a personal computer, a server, or a network device, etc.
  • a typical implementation device is a computer, which may be in the form of a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device or a combination of any of these devices.
  • each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments.
  • the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
  • the device embodiment described above is only exemplary, and the modules described as separate components may or may not be physically separated, and can be used in the implementation of the embodiment of the present disclosure.
  • the functions of each module are implemented in one or more software and/or hardware. Some or all of the modules may be selected according to actual needs to achieve the purpose of the embodiment. Those skilled in the art can understand and implement the embodiment without creative work.
  • the present disclosure relates to the field of communication technology, and specifically discloses a task processing method, including: after receiving a target task, a first device can automatically search whether there is a second device in the environment that can provide computing services. When searching for a second device in the environment that can provide computing services, verification information can be sent to the second device so that the second device can determine whether it can process the task based on the verification information. If so, the two devices can establish a connection, and the first device can transfer part or all of the task to the second device for processing, and obtain the processing results.
  • the present application has industrial applicability.

Landscapes

  • Computer And Data Communications (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

本公开实施例提供一种任务处理方法、装置及设备。第一设备在接收到目标任务后,可以自动搜索环境中是否存在可提供计算服务的第二设备。在搜索到环境中存在可提供计算服务的第二设备时,可以向该第二设备发送验证信息,以便该第二设备基于验证信息确定自己能否处理该任务,如果可以,两个设备则可以建立连接,第一设备可以将部分或全部任务转移到第二设备中处理,并获取处理结果。通过借助环境中的其他设备的计算资源共同处理计算密集型任务,即可以避免设备过热,也可以提高任务处理效率。

Description

任务处理方法、装置、设备及存储介质
相关申请的交叉引用
本申请要求于2022年12月19日提交中国专利局、申请号为202211635279.1、发明名称为“任务处理方法、装置、设备及存储介质”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本公开涉及通信技术领域,尤其涉及一种任务处理方法、装置、设备及存储介质。
背景技术
随着技术的发展,有些手机、平板等移动终端也已经具备较强的计算能力,可以通过这些移动终端运行一些计算密集型的应用,比如,三维场景的重建和渲染,大型的3D游戏等。以三维场景的重建和渲染为例,通常可以通过三维扫描设备围绕目标场景旋转360°,采集目标场景的图像,然后发送给移动终端,由移动终端上的应用基于采集的图像构建目标场景的三维点云模型、对三维点云模型进行栅格化处理、渲染并展示给用户。由于三维重建的过程计算量较大,即便目前的移动终端可以独立完成这类计算任务,但长时间执行这类高计算量的任务会造成移动终端上的芯片过热降频,导致计算性能大幅下降。
发明内容
本公开提供一种任务处理方法、装置、设备及存储介质。
根据本公开实施例的第一方面,提供一种任务处理方法,适用于第一设备,所述方法包括:
在接收到目标任务后,探测周围环境中是否存在能够提供计算服务的第二设备;
如果存在第二设备,则向所述第二设备发送携带验证信息的连接请求;
在所述第二设备基于所述验证信息确定能够执行所述目标任务的情况下,与所述第二设备建立连接,将所述目标任务的至少部分发送给所述第二设备,以使所述第二设备处理接收到的所述目标任务的至少部分并返回处理结果。
根据本公开实施例的第二方面,提供一种任务处理方法,所述方法适用于第二设备,所述方法包括:
接收第一设备发送的连接请求,所述连接请求在所述第一设备接收到目标任务后发送,所述连接请求中携带有验证信息;
在基于所述验证信息确定能够执行所述目标任务的情况下,与所述第一设备建立连接;
接收第一设备发送的所述目标任务的至少部分,对接收到的所述目标任务的至少部分进行处理,并向所述第一设备返回处理结果。
根据本公开实施例的第三方面,提供一种任务处理装置,适用于第一设备,所述装置包括:
探测模块,被配置为在接收到目标任务后,探测周围环境中是否存在能够提供计算服务的第二设备;
验证模块,被配置为如果存在第二设备,则向所述第二设备发送携带验证信息的连接请求;
发送模块,被配置为在所述第二设备基于所述验证信息确定能够执行所述目标任务的情况下,与所述第二设备建立连接,将所述目标任务的至少部分发送给所述第二设备,以使所述第二设备处理接收到的所述目标任务的至少部分并返回处理结果。
根据本公开实施例的第四方面,提供一种任务处理装置,适用于第二设备,所述装置包括:
接收模块,被配置为接收第一设备发送的连接请求,所述连接请求在所述第一设备接收到目标任务后发送,所述连接请求中携带有验证信息;
验证模块,被配置为在基于所述验证信息确定能够执行所述目标任务的情况下,与所述第一设备建立连接;
处理模块,被配置为接收第一设备发送的所述目标任务的至少部分,对接收到的所述目标任务的至少部分进行处理,并向所述第一设备返回处理结果。
根据本公开实施例的第五方面,提供一种电子设备,所述电子设备包括处理器、存储器、存储在所述存储器可供所述处理器执行的计算机指令,所述处理器执行所述计算机指令时,可实现上述第一方面提及的方法。
根据本公开实施例的第六方面,提供一种计算机可读存储介质,所述存储介质上存储有计算机指令,所述计算机指令被执行时实现上述第一方面提及的方法。
本公开实施例中,第一设备在接收到目标任务后,可以自动搜索环境中是否存在可提供计算服务的第二设备。在搜索到环境中存在可提供计算服务的第二设备时,可以向该第二设备发送验证信息,以便该第二设备基于验证信息确定自己能否处理该任务,如果可以,两个设备则可以建立连接,第一设备可以将部分或全部任务转移到第二设备中处理,并获取处理结果。
应当理解的是,以上的一般描述和后文的细节描述仅是示例性和解释性的,而非限制本公开。
附图说明
此处的附图被并入说明书中并构成本说明书的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。
图1是本公开实施例的一种应用场景的示意图。
图2是本公开实施例的一种任务处理方法的流程图。
图3是本公开实施例的一种应用场景的示意图。
图4是本公开实施例的一种应用场景的示意图。
图5是本公开实施例的一种任务处理方法的流程图。
图6是本公开实施例的一种任务处理方法的时序图。
图7是本公开实施例的一种任务处理装置的逻辑结构示意图。
图8是本公开实施例的一种任务处理装置的逻辑结构示意图。
图9是本公开实施例的一种设备的逻辑结构示意图。
具体实施方式
这里将详细地对示例性实施例进行说明,其示例表示在附图中。下面的描述涉及附图时,除非另有表示,不同附图中的相同数字表示相同或相似的要素。以下示例性实施例中所描述的实施方式并不代表与本公开相一致的所有实施方式。相反,它们仅是与如所附权利要求书中所详述的、本公开的一些方面相一致的装置和方法的例子。
在本公开使用的术语是仅仅出于描述特定实施例的目的,而非旨在限制本公开。在本公开和所附权利要求书中所使用的单数形式的“一种”、“所述”和“该”也旨在包括多数形式,除非上下文清楚地表示其他含义。还应当理解,本文中使用的术语“和/ 或”是指并包含一个或多个相关联的列出项目的任何或所有可能组合。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合。
应当理解,尽管在本公开可能采用术语第一、第二、第三等来描述各种信息,但这些信息不应限于这些术语。这些术语仅用来将同一类型的信息彼此区分开。例如,在不脱离本公开范围的情况下,第一信息也可以被称为第二信息,类似地,第二信息也可以被称为第一信息。取决于语境,如在此所使用的词语“如果”可以被解释成为“在……时”或“当……时”或“响应于确定”。
为了使本技术领域的人员更好的理解本公开实施例中的技术方案,并使本公开实施例的上述目的、特征和优点能够更加明显易懂,下面结合附图对本公开实施例中的技术方案作进一步详细的说明。
随着技术的发展,手机、平板等移动终端也已经具备较强的计算能力,可以通过这些移动终端运行一些计算密集型(即计算量大、计算强度高)的应用,比如,三维场景的重建和渲染,大型的3D游戏等。比如,目前搭载M系列芯片的iPad Pro计算能力已经很强大,可以媲美桌面级Intel CPU,因此,在搭载M系列芯片的iPad Pro上运行计算密集的应用成为可能。
以三维场景的重建和渲染为例,通常可以通过三维扫描设备围绕目标场景旋转360°,采集目标场景的图像,然后发送给移动终端,由移动终端上的应用基于采集到的图像构建目标场景的三维点云模型、对三维点云模型进行栅格化处理、渲染并展示给用户。由于三维重建的过程计算量较大,即便目前的移动终端可以独立完成这类计算任务,但长时间执行这类高计算量的任务也会造成移动终端上的芯片过热降频,导致计算性能大幅下降。
目前常用的解决方案是通过散热器对移动终端进行散热,这种方式虽然能够避免芯片过热降频,但是由于移动终端要放置于散热器上,会导致移动终端无法轻松移动,失去移动终端的便携性,且由于需要借助额外的散热器,在不存在散热器的场景,还是无法改善芯片过热问题。
基于此,本公开实施例提供了一种任务处理方法,可以用于对一些计算密集型的任务进行处理。考虑到环境中通常会包括多个设备,比如,某个用户可能会有手机、平板、电脑等多个设备。因此,在设备接收到计算密集型的任务后,可以借助环境中的其他设备的计算资源,共同对该任务进行处理,从而可以避免设备的芯片过热。比如,可以预先在各设备中安装预先开发的应用程序,或者设置预先开发的服务,在运行该应用程序或服务时,接收到计算密集型任务的设备可以自动搜索环境中是否存在可提供计算服务的设备。在搜索到环境中存在可提供计算服务的设备时,可以向该设备发送验证信息,以便该设备基于验证信息确定自己能否处理该任务,如果可以,两个设备则可以建立连接,接收到密集型任务的设备可以将部分或全部任务转移到可提供计算服务的设备中处理,并获取处理结果。通过借助环境中的其他设备的计算资源共同处理计算密集型任务,即可以避免设备过热,也可以提高任务处理效率。
为了方便描述,以下将接收到密集型任务的设备统称为第一设备,可以向第一设备提供计算服务的设备统称为第二设备。第一设备可以是手机、平板等移动终端,第二设备可以是手机、平板、电脑等,一般而言,第二设备的计算性能不低于第一设备的计算性能。
为了实现第一设备可以借助第二设备的计算资源处理计算密集型任务,可以在第一设备和第二设备分别安装自行开发的软件,或者在第一设备和第二设备中设置自行开发的服务,使得第一设备可以自动探测并发现周围的第二设备,并向第二设备发送验证信息,在第二设备基于验证信息确定可以处理该任务后,则两者建立连接,完成任务的转移和协同处理。
如图1所示,为本公开实施提供的任务处理方法的应用场景示意图,环境中包括第 一设备11和第二设备12,第一设备11在接收到目标任务后,可以探测周围是否存在第二设备12,如探测到,则向第二设备12发送验证信息,在验证通过后,向第二设备12发送目标任务。
以下结合图2,从第一设备的处理流程对该任务处理方法进行介绍,具体可以包括以下步骤:
S202、在接收到目标任务后,探测周围环境中是否存在能够提供计算服务的第二设备;
在步骤S202中,第一设备在接收到目标任务后,可以自动探测周围环境中是否存在能够提供计算服务的第二设备。其中,目标任务可以是一些计算密集型的任务,比如,可以是复杂场景的三维重建任务、3D游戏场景的渲染任务等等。考虑到第一设备独立完成这些任务,计算量较大,会导致第一设备中的芯片过热降频,因此,第一设备在接收到类似的目标任务后,可以探测周围环境中是否存在第二设备。比如,第一设备和第二设备可以实现点对点通信,第二设备在开启后,可以广播消息,以便第一设备可以基于该广播的消息探测到第二设备。
其中,在一些场景,第一设备可以通过一些用于发现附近设备并与设备建立点对点通信的服务实现自动探测第二设备并与之通信。比如,以第一设备为苹果的设备为例,第一设备可以基于Multipeer服务框架自动搜索附近的其他苹果设备,并与之进行点对点通信。当然,本公开实施例并不局限于Multipeer服务框架,也可以是其他具有类似功能的服务框架。
S204、如果周围环境中存在第二设备,则向所述第二设备发送携带验证信息的连接请求;
在步骤S204中,如果第一设备探测到周围环境中存在第二设备,则可以向第二设备发送连接请求,连接请求中可以携带验证信息,该验证信息可以用于确定第二设备能否处理该目标任务。比如,考虑到数据传输的安全性,第二设备可以对第一设备的身份进行验证,只有在第一设备的身份符合一定的条件下,才会与其建立连接,并协助其处理计算任务。或者,考虑到第一设备想要转移给第二设备的任务第二设备未必有能力执行,如果不预先对目标任务进行验证,直接从第一设备接收该目标任务,则既会浪费传输资源,又由于自身无法处理,反而会降低任务的整体处理效率。因此,第一设备在请求与第二设备建立连接时,可以附带验证信息,以便第二设备基于验证信息判定能否处理该目标任务。
S206、在所述第二设备基于所述验证信息确定能够执行所述目标任务的情况下,与所述第二设备建立连接,将所述目标任务的至少部分发送给所述第二设备,以使所述第二设备处理接收到的所述目标任务的至少部分并返回处理结果。
在步骤S206中,第二设备在接收到第一设备的连接请求后,可以基于连接请求中携带的验证信息确定自身是否能够执行该目标任务,如果可以,则同意第一设备的连接请求,从而第一设备可以和第二设备建立连接,然后第一设备可以通过建立的连接将目标任务的部分或全部发送给第二设备,以便第二设备可以处理接收到的任务,并返回处理结果。其中,第一设备和第二设备可以建立点对点通信连接,比如,可以通过Multipeer框架服务或具有类似功能的服务实现点对点通信(peer-to-peer,简称P2P又称对等互联网络技术),或者如果两个设备在同一个局域网,也可以通过局域网建立通信连接。
在一些实施例中,验证信息中可以包括第一设备的身份标识信息,第二设备在判定第一设备的身份标识信息符合预设条件后,则确定能够执行第一设备发送的目标任务,并与之建立连接。比如,第一设备在探测到第二设备后,可以向其发送一个标识其身份的令牌(该令牌由开发人员分配),第二设备在接收到该令牌后,可以验证令牌的有效性,如果令牌有效,则与第一设备建立连接,否则,拒绝第一设备的连接请求。通过对第一设备的身份进行验证,可以避免第二设备的计算资源被恶意占用,同时也可以保证 数据传输的安全性。
在一些实施例中,考虑到目标任务可能存在多种类型的任务,不同类型的目标任务,其计算量不一样,其对处理设备的性能要求也不同,因而不同的第二设备能够处理的任务类型也不同。为了避免第二设备在接收到目标任务后,才发现自身的硬件资源无法支撑该任务,造成传输资源浪费且降低任务处理效率,验证信息中也可以包括目标任务的任务类型,第二设备在接收到验证信息后,可以判定目标任务的任务类型和自身能够处理的任务类型是否匹配,如果匹配,则与第一设备建立连接,并接收第一设备转移的任务。
在一些实施例中,第一设备和第二设备可以通过点对点的方式进行通信,而一般点对点通信时,其能够支持的传输带宽有一定的上限。比如,以Multipeer服务框架为例,基于Multipeer服务框架实现点对点通信的两个设备所能支持的最大带宽为5GB/s。为了避免两个设备之间的传输带宽无法支撑目标任务的数据传输的问题,验证信息中也可以包括目标任务所需的传输带宽。第二设备在接收到验证信息后,可以判定目标任务所需的传输带宽是否超过目标带宽,其中,目标带宽为两个设备进行点对点通信时所能支持的最大带宽,如果是不超过,则同意与第一设备建立连接。
此外,考虑到在一些场景中,第一设备和第二设备位于同一个局域网中,因此,两者也可以通过局域网来进行数据的传输。由于局域网通常可以支持更大的带宽,因此,如果判定目标任务所需的传输带宽超过上述目标带宽,则可以进一步判定第一设备和第二设备是否位于同一个局域网,如果两者位于同一个局域网,则也可以认为第二设备能够处理该目标任务,并与第一设备建立连接。
当然,实际在设置验证信息时,验证信息可以包括第一设备的身份标识信息、目标任务的任务类型、目标任务所需的传输带宽中的一种或多种,在验证第二设备能否执行目标任务时,也可以结合上述一种或多种验证信息共同判定,具体可以基于实际需求设置。比如,在有些场景,目标任务的类型默认只有一种,则无需对目标任务的类型进行验证,或者目标任务所需的传输带宽默认都不会高于两个设备进行点对点通信所支持的最大带宽,则无需对带宽进行验证。
在一些实施例中,如图3所示,该第一设备11可以和三维扫描设备13通信连接,该目标任务可以是利用三维扫描设备13采集的数据构建三维模型并展示的任务。目前存在各种类型的三维扫描设备,三维扫描设备可以对目标场景进行扫描,采集目标场景的图像数据或者点云数据,并基于图像数据或数据构建目标场景的三维模型,由于三维重建的过程涉及到的计算量较大,因而,需要借助其他设备的计算资源共同完成该任务。考虑到三维扫描设备的类型较多,比如,有口腔扫描设备、工业扫描设备、专业扫描设备,这些扫描设备采集的数据类型不同(比如,图像或点云)、数据量不同(比如,分辨率、帧率不同)、利用这些设备采集的数据构建三维模型所需的计算量也不同。比如,口腔扫描设备采集的是口腔的图像数据,而工业扫描设备通常采集的激光点云数据,相比于工业扫描设备和专业扫描设备,口腔扫描设备采集的数据量较小,三维重建时,所需的计算量也较小。
可见,针对不同类型的三维扫描设备采集的数据,在进行三维重建时,对处理设备的性能要求也不同。因此,针对利用不同类型的三维扫描设备采集的数据构建三维模型的任务,可以设置不同的任务类型,以便可以基于任务类型选取出合适的第二设备。
此外,在利用三维扫描设备采集的数据构建三维模型的过程中,三维重建的过程计算量最大,通常需要将该部分处理任务发送给第二设备。考虑到在将该部分处理任务发送给第二设备时,需要发送大量的处理数据,比如,需要传输大量图片数据或点云数据,用于构建三维点云模型。因此,这种场景下,第一设备和第二设备可以进行点对点通信,相比于通过互联网通信,点对点通信可以提供更大的传输带宽,更适合这种需要传输大量数据的任务转移的场景。
在一些实施例中,如图4所示,第一设备周围环境中可能存在多个第二设备,比如,用户在利用自己的手机处理目标任务时,附近还放着用户自己的电脑、平板等多个设备,这些设备都可以提供计算服务。为了可以提高任务的处理效率,可以从中选取当前计算性能最佳或较佳的设备来协助目标任务的处理。比如,如果第一设备探测到周围环境中存在多个第二设备,并且多个第二设备都能够处理该目标任务时,第一设备可以通知各第二设备反馈当前各自的性能参数,该性能参数可以表征设备当前的计算能力。比如,性能参数可以是设备当前的硬件资源的占用情况、各设备的硬件性能参数等等。然后可以基于性能参数从多个第二设备中筛选出性能最好、计算能力最强的目标第二设备,或者选取计算性能符合一定条件的目标第二设备,并将目标处理任务的部分或全部转移至该目标第二设备,由该目标第二设备处理。
在一些实施例中,目标任务可以拆分成多个子任务,在周围环境中探测到第二设备可以包括一个或多个,即第一设备和这一个或多个第二设备可以构成一个分布式计算系统。第一设备与这一个或多个第二设备建立连接后,第一设备获取自身和各个第二设备各自的性能参数,该性能参数可以表征设备当前的计算能力。比如,性能参数可以是设备当前的硬件资源的占用情况、各设备的硬件性能参数等等。然后可以基于各自的性能参数确定这多个子任务在第一设备和这一个或多个第二设备之间的分配方式,并基于该分配方式将多个子任务的至少部分分别发送给第二设备。通过根据第一设备和一个或多个第二设备当前的处理能力动态的调整目标任务的子任务的分配方式,可以确定最佳的分配策略,提高任务处理效率。同时,借助于周围的一个或多个第二设备与第一设备构成一个分布式计算系统,对目标任务进行处理,可以提高任务的处理效率。
比如,在一些实施例中,该目标任务可以是利用三维扫描设备采集的图像构建三维模型并展示的任务。以第二设备为一个为例,该目标任务可以拆分成以下多个子任务:(1)利用图像进行三维重建,得到三维点云模型;(2)对三维点云模型进行封装处理;(3)对点云模型进行栅格化处理;(4)将栅格化处理后的三维模型渲染并展示。上述4个子任务中,子任务(1)的计算量最大,对计算能力要求较高。因此,第一设备在将目标任务转移给第二设备处理时,如果基于第二设备性能参数确定第二设备当前的计算能力较强,比如,第二设备当前的硬件资源仅被少量占用,则可以将子任务(1)-(3)均转移到第二设备中执行,其余子任务由第一设备执行。如果基于第二设备性能参数确定第二设备当前的计算能力偏弱,比如,第二设备当前的硬件资源被大量占用,则可以仅将子任务(1)转移到第二设备中执行。
当然,针对第二设备为多个的场景,可以基于第一设备和各第二设备的性能参数进一步对上述子任务进行分配,比如,可以将多帧图像分成多组,利用一个第二设备对一组图像进行三维重建,得到一部分三维点云。当然,也可以采用其他分配方式,具体可以基于分布式计算系统的特点灵活设置任务分配情况,本公开实施例不做限制。
在一些实施例中,如果周围环境中不存在第二设备,即第一设备无法借助其他设备完成目标任务,这种情况下,为了避免第一设备过热,可以对目标任务进行降级处理,以减小目标任务的计算量。
比如,在一些实施例中,第一设备与三维扫描设备通信连接,该目标任务可以是利用三维扫描设备采集的数据构建三维模型并展示的任务。比如,第一设备不断接收三维扫描设备采集目标场景的数据,基于采集的数据构建三维模型。其中,对目标任务进行降级处理,可以采用以下两种方式:
方式(1):通知三维扫描设备降低采集数据的速度。比如,以三维扫描设备采集的是目标场景的图像为例,可以通知三维扫描设备降低扫描速度(每秒拍照数),从而可以降低采集的图像的帧率,进而也可以减小第一设备的处理压力。
方式(2):仅执行该目标任务中的部分子任务,其中,该部分子任务至少包括基于三维扫描设备采集的数据构建三维点云模型。为了避免第一设备过热,第一设备可以仅 处理目标任务中当前必须处理的一部分子任务,其余的子任务可以利用其余设备执行,或者可以利用本设备后续执行(离线处理)。以三维扫描设备采集的是目标场景的图像为例,考虑到第一设备从三维扫描设备中获取到图像后,利用图像构建三维点云模型才是较为必要的步骤,其余的步骤如封装等可以后续执行,因此,可以先执行该必要的步骤。即在用户扫描过程中,第一设备可以先显示未经过封装的三维点云模型,满足用户边扫描边看到扫描进度的基本需求,当用户扫描完成后,第一设备就可以执行封装等步骤,得到更为完善、精准的三维模型,满足用户对三维模型精度的需求。
在一些实施例中,第一设备和第二设备均为基于iOS系统的设备,比如,第一设备为ipad,第二设备为Mac,第一设备和第二设备可以通过Multipeer服务框架建立点对点通信。
在一些实施例中,第一设备和第二设备可以是iOS系统,也可以是安卓系统,也可以是windows系统,还可以是Linux系统,第一设备和第二设备可以通过蓝牙(Bluetooth mesh)、NFC(Near Field Communication,近场通信)、自动发现服务,mqtt即时通讯协议或Zigbee无线通讯协议建立通信。
针对目标任务为三维重建任务的场景,由于第一设备需要发送给第二设备的数据量比较大。通过蓝牙、NFC等近距离通信方式,两个设备可以直接进行数据传输,相比于通过互联网传输,这种通信方式不需要经过路由器等设备的中转,更不容易受到网络带宽的影响,可以保证数据传输的稳定性,更适用于三维重建任务的场景。
如图5所示,为第二设备的处理流程示意图,具体可以包括以下步骤:
S502、接收第一设备发送的连接请求,所述连接请求在所述第一设备接收到目标任务后发送,所述连接请求中携带有验证信息;
S504、在基于所述验证信息确定能够执行所述目标任务的情况下,与所述第一设备建立连接;
S506、接收第一设备发送的所述目标任务的至少部分,对接收到的目标任务的至少部分进行处理,并向所述第一设备返回处理结果。
在一些实施例中,基于所述验证信息确定能够执行所述目标任务,包括:
所述验证信息包括所述第一设备的身份标识信息,所述身份标识信息符合预设条件;
所述验证信息包括所述目标任务的任务类型,所述任务类型与所述第二设备能够处理的任务类型匹配;
所述验证信息包括所述目标任务所需的传输带宽,所述传输带宽不高于目标带宽;
所述验证信息包括所述目标任务所需的传输带宽,所述传输带宽高于所述目标带宽且所述第一设备和所述第二设备位于同一局域网内;
其中,所述目标带宽为所述第一设备与所述第二设备进行点对点通信时能够支持的最大带宽。
在一些实施例中,所述第一设备与三维扫描设备通信连接,所述目标任务为利用所述三维扫描设备采集的数据构建三维模型并展示,其中,不同类型的三维扫描设备对应的目标任务的任务类型不同。
在一些实施例中,在基于所述验证信息确定不能够执行所述目标任务的情况下,拒绝与所述第一设备建立连接。
当然,在一些场景,考虑到第二设备的性能较好,可以同时为多个第一设备提供计算服务。因此,第二设备也可以和多个第一设备建立连接,并接收多个第一设备发送的任务,对任务进行处理并返回给各个第一设备。
其中,第二设备在执行上述任务处理方法时的具体实现细节可参考上述实施例中的描述,在此不再赘述。
为了进一步介绍本公开实施例提供的任务处理方法,以下结合一个具体实施例加以解释。
在口腔治疗领域,医生可以使用将口腔扫描设备与自身的ipad设备通信,口腔扫描设备可以将采集的病人口腔的图像并发送给ipad设备,由ipad设备上的指定应用利用该图像数据构建口腔三维模型,并展示。由于三维重建任务计算量较大,虽然目前搭载M系列芯片的iPad Pro计算能力已经很强大,可以独立完成上述三维重建任务。但是如果处理时间较长,容易导致ipad设备的芯片过热降频,影响处理性能。
考虑到iOS设备之间可以通过Multipeer服务框架实现点对点通信,因此,可以借助附近的其他苹果设备(比如,Mac)作为计算节点,共同完成三维模型构建任务。
比如,如图6所示,可以在ipad设备和计算节点上分别安装预先开发的软件1和软件2。当ipad设备运行上述软件1后,ipad设备如果接收到了要利用图像构建三维模型的任务,可以利用Multipeer服务探测附近是否存在计算节点,如果探测到附近存在计算节点,则可以向计算节点发送连接请求,连接请求中携带验证信息。当计算节点运行上述软件2后,可以利用Multipeer服务监听ipad设备发送的连接请求,如果监听到了连接请求,则基于连接请求中携带的验证信息对该ipad设备进行验证,如果通过验证,则与ipad设备建立连接,并接收ipad设备发送的处理任务,将任务处理后返回给ipad设备。如果未通过验证,则拒绝建立连接。
其中,计算节点会对ipad设备进行以下三个方面的验证:
1.权限验证。即ipad设备会将分配给它的一个token(令牌,由开发人员分配)传递给计算节点,计算节点可以验证该token是否有效,有效则继续进行连接,无效则拒绝连接,从而确保计算节点不会被恶意占用;
2、计算服务名称以及版本。由于不同计算节点能够提供的计算服务的类型不一样,比如,三维扫描设备包括口腔扫描设备、专业扫描设备、工业扫描设备等,对不同扫描设备采集的数据进行三维重建时,其对计算节点的性能要求也不一样。因此,验证信息中可以包括ipad设备当前需要的计算服务的名称和版本信息,以便计算节点判定自己能否执行该计算任务。
3、期望的带宽大小。不同的计算服务需要的带宽也不相同,Multipeer服务框架本身能提供的最高带宽大概是5GB/s,如果计算任务所需的带宽小于该最高带宽,则验证通过。如果需要更高带宽,则需要借助WiFi、以太网等局域网技术。局域网传输要求iPad和计算节点都接入同一局域网,如果两者当前并没有连入局域网或者连入的局域网不同,则验证失败。
ipad设备可以基于计算节点和自身当前的计算能力确定计算任务的分配方式,比如,当计算节点当前的硬件处理资源大部分被占用,则ipad设备可以仅将基于图像数据构建三维点云模型的任务分配给计算节点处理,当计算节点当前的硬件处理资源大部分处于空闲状态,则可以将基于图像数据构建三维点云模型、对三维点云模型进行封装、栅格化处理的任务均分配给计算节点。
当然,如果ipad设备探测到多个计算节点,可以选取当前计算能力最强的计算节点,将计算任务分配给该节点。
此外,如果当前ipad设备没有探测到计算节点,则可以通知口腔扫描设备降低采集图像的速率,或者ipad设备仅执行利用图像数据构建三维点云模型的任务,不再执行对三维点云模型进行封装、栅格化处理的任务,以减小计算量。
不难理解,上述各实施例中的描述的方案在不存在冲突的情况下,可以进行组合,本公开实施例中不一一例举。
相应的,本公开实施例还提供了一种任务处理装置,适用于第一设备,如图7所示,所述装置70包括:
探测模块71,用于在接收到目标任务后,探测周围环境中是否存在能够提供计算服务的第二设备;
验证模块72,用于如果存在第二设备,则向所述第二设备发送携带验证信息的连 接请求;
发送模块73,用于在所述第二设备基于所述验证信息确定能够执行所述目标任务的情况下,与所述第二设备建立连接,将所述目标任务的至少部分发送给所述第二设备,以使所述第二设备处理接收到的所述目标任务的至少部分并返回处理结果。
其中,上述装置执行任务处理方法的具体步骤可以参考上述方法实施例中的描述,在此不再赘述。
相应的,本公开实施例还提供了另一种任务处理装置,适用于第二设备,如图8所示,所述装置80包括:
接收模块81,用于接收第一设备发送的连接请求,所述连接请求在所述第一设备接收到目标任务后发送,所述连接请求中携带有验证信息;
验证模块82,用于在基于所述验证信息确定能够执行所述目标任务的情况下,与所述第一设备建立连接;
处理模块83,用于接收第一设备发送的所述目标任务的至少部分,对接收到的所述目标任务的至少部分进行处理,并向所述第一设备返回处理结果。
其中,上述装置执行任务处理方法的具体步骤可以参考上述方法实施例中的描述,在此不再赘述。
进一步的,本公开实施例还提供一种设备,如图9所示,所述设备包括处理器91、存储器92、存储于所述存储器92可供所述处理器91执行的计算机指令,所述处理器91执行所述计算机指令时实现上述实施例中任一项所述的方法。
本公开实施例还提供一种计算机可读存储介质,其上存储有计算机程序,该程序被处理器执行时实现前述任一实施例所述的方法。
计算机可读介质包括永久性和非永久性、可移动和非可移动媒体可以由任何方法或技术来实现信息存储。信息可以是计算机可读指令、数据结构、程序的模块或其他数据。计算机的存储介质的例子包括,但不限于相变内存(PRAM)、静态随机存取存储器(SRAM)、动态随机存取存储器(DRAM)、其他类型的随机存取存储器(RAM)、只读存储器(ROM)、电可擦除可编程只读存储器(EEPROM)、快闪记忆体或其他内存技术、只读光盘只读存储器(CD-ROM)、数字多功能光盘(DVD)或其他光学存储、磁盒式磁带,磁带磁磁盘存储或其他磁性存储设备或任何其他非传输介质,可用于存储可以被计算设备访问的信息。按照本文中的界定,计算机可读介质不包括暂存电脑可读媒体(transitory media),如调制的数据信号和载波。
通过以上的实施方式的描述可知,本领域的技术人员可以清楚地了解到本公开实施例可借助软件加必需的通用硬件平台的方式来实现。基于这样的理解,本公开实施例的技术方案本质上或者说对现有技术做出贡献的部分可以以软件产品的形式体现出来,该计算机软件产品可以存储在存储介质中,如ROM/RAM、磁碟、光盘等,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开实施例各个实施例或者实施例的某些部分所述的方法。
上述实施例阐明的系统、装置、模块或单元,具体可以由计算机芯片或实体实现,或者由具有某种功能的产品来实现。一种典型的实现设备为计算机,计算机的具体形式可以是个人计算机、膝上型计算机、蜂窝电话、相机电话、智能电话、个人数字助理、媒体播放器、导航设备、电子邮件收发设备、游戏控制台、平板计算机、可穿戴设备或者这些设备中的任意几种设备的组合。
本说明书中的各个实施例均采用递进的方式描述,各个实施例之间相同相似的部分互相参见即可,每个实施例重点说明的都是与其他实施例的不同之处。尤其,对于装置实施例而言,由于其基本相似于方法实施例,所以描述得比较简单,相关之处参见方法实施例的部分说明即可。以上所描述的装置实施例仅仅是示意性的,其中所述作为分离部件说明的模块可以是或者也可以不是物理上分开的,在实施本公开实施例方案时可以 把各模块的功能在同一个或多个软件和/或硬件中实现。也可以根据实际的需要选择其中的部分或者全部模块来实现本实施例方案的目的。本领域普通技术人员在不付出创造性劳动的情况下,即可以理解并实施。
以上所述仅是本公开实施例的具体实施方式,应当指出,对于本技术领域的普通技术人员来说,在不脱离本公开实施例原理的前提下,还可以做出若干改进和润饰,这些改进和润饰也应视为本公开实施例的保护范围。
工业实用性
本公开涉及通信技术领域,具体公开了一种任务处理方法,包括:第一设备在接收到目标任务后,可以自动搜索环境中是否存在可提供计算服务的第二设备。在搜索到环境中存在可提供计算服务的第二设备时,可以向该第二设备发送验证信息,以便该第二设备基于验证信息确定自己能否处理该任务,如果可以,两个设备则可以建立连接,第一设备可以将部分或全部任务转移到第二设备中处理,并获取处理结果。通过借助环境中的其他设备的计算资源共同处理计算密集型任务,即可以避免设备过热,也可以提高任务处理效率,因此本申请具有工业实用性。

Claims (16)

  1. 一种任务处理方法,适用于第一设备,所述方法包括:
    在接收到目标任务后,探测周围环境中是否存在能够提供计算服务的第二设备;
    如果存在第二设备,则向所述第二设备发送携带验证信息的连接请求;
    在所述第二设备基于所述验证信息确定能够执行所述目标任务的情况下,与所述第二设备建立连接,将所述目标任务的至少部分发送给所述第二设备,以使所述第二设备处理接收到的所述目标任务的至少部分并返回处理结果。
  2. 根据权利要求1所述的方法,在所述验证信息符合以下一项或多项的情况下,确定所述第二设备能够执行所述目标任务:
    所述验证信息包括所述第一设备的身份标识信息,所述身份标识信息符合预设条件;
    所述验证信息包括所述目标任务的任务类型,所述任务类型与所述第二设备能够处理的任务类型匹配;
    所述验证信息包括所述目标任务所需的传输带宽,所述传输带宽不高于目标带宽;
    所述验证信息包括所述目标任务所需的传输带宽,所述传输带宽高于所述目标带宽且所述第一设备和所述第二设备位于同一局域网内;
    其中,所述目标带宽为所述第一设备与所述第二设备进行点对点通信时能够支持的最大带宽。
  3. 根据权利要求2所述的方法,所述第一设备与三维扫描设备通信连接,所述目标任务为利用所述三维扫描设备采集的数据构建三维模型并展示,其中,不同类型的三维扫描设备对应的目标任务的任务类型不同。
  4. 根据权利要求1-3任一项所述的方法,如果周围环境中存在多个第二设备,所述方法还包括:
    获取所述多个第二设备各自的性能参数,所述性能参数用于表征各所述第二设备当前的计算能力;
    基于所述性能参数从所述多个第二设备中选取目标第二设备,并将所述目标任务的至少部分发送至所述目标第二设备。
  5. 根据权利要求1-3任一项所述的方法,所述目标任务包括多个子任务,从周围环境探测到的所述第二设备的数量为一个或多个,将所述目标任务的至少部分发送给所述第二设备,包括:
    获取所述第一设备和一个或多个所述第二设备各自的性能参数,所述性能参数用于表征所述第一设备当前的计算能力和各所述第二设备当前的计算能力;
    基于所述性能参数确定所述多个子任务在所述第一设备和一个或多个所述第二设备之间的分配方式;
    基于所述分配方式将所述多个子任务的至少部分分别发送给一个或多个所述第二设备。
  6. 根据权利要求1-3任一项所述的方法,如果周围环境中不存在第二设备,则对所述目标任务进行降级处理,以减小所述目标任务的计算量。
  7. 根据权利要求6所述的方法,所述第一设备与三维扫描设备通信连接,所述目标任务为利用所述三维扫描设备采集的数据构建三维模型并展示,所述对所述目标任务进行降级处理,包括:
    通知所述三维扫描设备降低采集所述数据的速度;和/或
    仅执行所述目标任务中的部分子任务,其中,所述部分子任务至少包括基于所述三维扫描设备采集的数据构建三维点云模型。
  8. 根据权利要求1所述的方法,所述第一设备和所述第二设备均为基于iOS系统的设备,所述第一设备和所述第二设备通过Multipeer服务框架实现点对点通信。
  9. 一种任务处理方法,所述方法适用于第二设备,所述方法包括:
    接收第一设备发送的连接请求,所述连接请求在所述第一设备接收到目标任务后发送,所述连接请求中携带有验证信息;
    在基于所述验证信息确定能够执行所述目标任务的情况下,与所述第一设备建立连接;
    接收第一设备发送的所述目标任务的至少部分,对接收到的所述目标任务的至少部分进行处理,并向所述第一设备返回处理结果。
  10. 根据权利要求9所述的方法,基于所述验证信息确定能够执行所述目标任务,包括:
    所述验证信息包括所述第一设备的身份标识信息,所述身份标识信息符合预设条件;
    所述验证信息包括所述目标任务的任务类型,所述任务类型与所述第二设备能够处理的任务类型匹配;
    所述验证信息包括所述目标任务所需的传输带宽,所述传输带宽不高于目标带宽;
    所述验证信息包括所述目标任务所需的传输带宽,所述传输带宽高于所述目标带宽且所述第一设备和所述第二设备位于同一局域网内;
    其中,所述目标带宽为所述第一设备与所述第二设备进行点对点通信时能够支持的最大带宽。
  11. 根据权利要求10所述的方法,所述第一设备与三维扫描设备通信连接,所述目标任务为利用所述三维扫描设备采集的数据构建三维模型并展示,其中,不同类型的三维扫描设备对应的目标任务的任务类型不同。
  12. 根据权利要求9或10所述的方法,在基于所述验证信息确定不能够执行所述目标任务的情况下,拒绝与所述第一设备建立连接。
  13. 一种任务处理装置,适用于第一设备,所述装置包括:
    探测模块,被配置为在接收到目标任务后,探测周围环境中是否存在能够提供计算服务的第二设备;
    验证模块,被配置为如果存在第二设备,则向所述第二设备发送携带验证信息的连接请求;
    发送模块,被配置为在所述第二设备基于所述验证信息确定能够执行所述目标任务的情况下,与所述第二设备建立连接,将所述目标任务的至少部分发送给所述第二设备,以使所述第二设备处理接收到的所述目标任务的至少部分并返回处理结果。
  14. 一种任务处理装置,适用于第二设备,所述装置包括:
    接收模块,被配置为接收第一设备发送的连接请求,所述连接请求在所述第一设备接收到目标任务后发送,所述连接请求中携带有验证信息;
    验证模块,被配置为在基于所述验证信息确定能够执行所述目标任务的情况下,与所述第一设备建立连接;
    处理模块,被配置为接收第一设备发送的所述目标任务的至少部分,对接收到的所述目标任务的至少部分进行处理,并向所述第一设备返回处理结果。
  15. 一种电子设备,所述电子设备包括处理器、存储器、存储于所述存储器可供所述处理器执行的计算机指令,所述处理器执行所述计算机指令时实现如权利要求1-8或9-12任一项所述的方法。
  16. 一种计算机可读存储介质,所述计算机可读存储介质上存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-8或9-12任一项所述的方法。
PCT/CN2023/135150 2022-12-19 2023-11-29 任务处理方法、装置、设备及存储介质 WO2024131493A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202211635279.1A CN116016637A (zh) 2022-12-19 2022-12-19 任务处理方法、装置、设备及存储介质
CN202211635279.1 2022-12-19

Publications (1)

Publication Number Publication Date
WO2024131493A1 true WO2024131493A1 (zh) 2024-06-27

Family

ID=86022468

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2023/135150 WO2024131493A1 (zh) 2022-12-19 2023-11-29 任务处理方法、装置、设备及存储介质

Country Status (2)

Country Link
CN (1) CN116016637A (zh)
WO (1) WO2024131493A1 (zh)

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111371849A (zh) * 2019-02-22 2020-07-03 华为技术有限公司 数据处理的方法和电子设备
CN112433852B (zh) * 2020-11-23 2021-09-03 广州技象科技有限公司 一种物联网边缘计算控制方法、装置、设备及存储介质
CN113377520B (zh) * 2021-07-07 2023-03-24 北京百度网讯科技有限公司 资源调度方法、装置、设备以及存储介质
CN114710485B (zh) * 2022-02-21 2023-10-27 联想(北京)有限公司 处理方法和处理装置

Also Published As

Publication number Publication date
CN116016637A (zh) 2023-04-25

Similar Documents

Publication Publication Date Title
EP3522676B1 (en) Peer-to-peer communications enhancements
US20230353455A1 (en) Multi-access management service frameworks for cloud and edge networks
US20220191702A1 (en) Two-phase discovery and onboarding of internet of things (iot) devices
CN109548082A (zh) 业务重定向方法及装置
CN110958281B (zh) 基于物联网的数据传输方法及通信装置
US11070433B2 (en) Network function NF management method and NF management device
CN113676512B (zh) 网络系统、资源处理方法及设备
JP7237195B2 (ja) 通信方法、装置、エンティティ及びコンピュータプログラム
EP3117586A1 (en) Cross-layer context management
CN114342332B (zh) 一种通信方法、装置及系统
US20180295658A1 (en) Method for establishing wireless connection for application of user equipment
KR20180126401A (ko) 멀티코어 기반 데이터 처리 방법 및 장치
US20170251428A1 (en) Methods and Nodes for M2M Communication
JP2022507816A (ja) V2xメッセージ送信方法、装置、及びシステム
US20230236896A1 (en) Method for scheduling compute instance, apparatus, and system
EP2960803A1 (en) Data sharing system
WO2024131493A1 (zh) 任务处理方法、装置、设备及存储介质
CN105451367A (zh) 一种无线网络连接方法、设备及系统
CN115669185A (zh) 数据传输方法、设备及存储介质
US10972356B2 (en) Method for selecting negotiation counterpart, method for responding to discovery message, and related apparatus
JP6515804B2 (ja) 通信端末
CN112383617B (zh) 进行长连接的方法、装置、终端设备以及介质
US9788222B2 (en) Network, and network establishing method and device
CN114040005A (zh) 一种数据传输方法、装置及存储介质
US20230269660A1 (en) Method and apparatus for providing device to device communications