CN117707784A - Task processing method and connecting device - Google Patents

Task processing method and connecting device Download PDF

Info

Publication number
CN117707784A
CN117707784A CN202311865277.6A CN202311865277A CN117707784A CN 117707784 A CN117707784 A CN 117707784A CN 202311865277 A CN202311865277 A CN 202311865277A CN 117707784 A CN117707784 A CN 117707784A
Authority
CN
China
Prior art keywords
electronic device
target
task
processing
electronic
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311865277.6A
Other languages
Chinese (zh)
Inventor
郑泽滨
钟浩
林喜鸿
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN202311865277.6A priority Critical patent/CN117707784A/en
Publication of CN117707784A publication Critical patent/CN117707784A/en
Pending legal-status Critical Current

Links

Landscapes

  • Computer And Data Communications (AREA)

Abstract

The application discloses a task processing method and a connecting device, wherein the method comprises the following steps: after at least two electronic devices are accessed, a task processing request of a first electronic device is obtained, and target communication connection between the first electronic device and at least one second electronic device is established; sending a task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task of the first electronic device; the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems.

Description

Task processing method and connecting device
Technical Field
The present disclosure relates to the field of computer technologies, and in particular, to a task processing method and a connection device.
Background
With the continuous increase of the complexity of computing tasks, a single computer cannot meet the task processing requirements of some computing intensive application programs, in the prior art, computing power sharing is performed by adopting a cloud computing mode, but the mode needs to send data to a cloud for computing, so that the security of the data cannot be ensured.
Disclosure of Invention
The embodiment of the application provides a task processing method, which comprises the following steps of; after at least two electronic devices are accessed, responding to a task processing request of a first electronic device, and establishing target communication connection between the first electronic device and at least one second electronic device; sending the task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task of the first electronic device; wherein the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems.
In some embodiments, further comprising: after the electronic equipment is accessed, a target mapping relation table is established based on the identification information of the electronic equipment and the electronic equipment, so that after a task processing request of the electronic equipment is obtained, target communication connection between the electronic equipment is established based on the target mapping relation table.
In some embodiments, the establishing the target communication connection between the first electronic device and the at least one second electronic device includes at least one of: if the task processing request does not carry the target identification information, determining at least one second electronic device capable of processing the task processing request based on the task processing request and the device resource condition of the accessed electronic device, and conducting a target communication channel between the first electronic device and the at least one second electronic device; if the task processing request carries target identification information and the target identification information is matched with the target mapping relation table, a target communication channel between the first electronic equipment and at least one second electronic equipment with the target identification information is conducted; and if the task processing request carries target identification information but the target identification information is not matched with the target mapping relation table, determining at least one second electronic device capable of processing the task processing request based on the task processing request and the device resource condition of the accessed electronic device, and conducting a target communication channel between the first electronic device and the at least one second electronic device.
In some embodiments, wherein sending the task processing request to the second electronic device over the target communication connection includes: determining the relation between the task processing request and a target processing task obtained by the first electronic equipment; if the task processing request corresponds to all tasks of the target processing task, distributing all tasks based on the equipment resource condition of the accessed electronic equipment, and sending the distributed subtask processing request to the corresponding second electronic equipment; and if the task processing request corresponds to the subtask after the first electronic device distributes the target processing task, directly transmitting the subtask to the corresponding second electronic device based on the device resource condition of the accessed electronic device.
In some embodiments, wherein causing the second electronic device to process the target processing task of the first electronic device includes: the target processing task is processed individually or cooperatively based on the number of second electronic devices and/or a processing policy required by the task processing request.
In some embodiments, wherein the second electronic device is caused to process the target processing task of the first electronic device, comprises at least one of: controlling the unique second electronic device to independently process the target processing task of the first electronic device under the condition that the second electronic device is unique; controlling the unique second electronic device and the first electronic device to process the target processing task in parallel or serial under the condition that the second electronic device is unique; controlling the non-unique second electronic equipment to process the target processing task of the first electronic equipment in parallel or in series under the condition that the second electronic equipment is not unique; and controlling the non-unique second electronic device and the first electronic device to process the target processing task in parallel or in series under the condition that the second electronic device is not unique.
In some embodiments, further comprising: the execution result of the target processing task by the second electronic device is sent back to the first electronic device, so that the first electronic device performs integrated processing on the execution result and feeds back to a target application; or, the second electronic device integrates the execution result of the target processing task and sends the result back to the first electronic device so as to feed back to the target application through the first electronic device.
In some embodiments, further comprising: and carrying out authority verification on the obtained request data of the task processing request or the access request of the execution result, feeding back the request content of the access request based on the verification result and/or outputting corresponding prompt information to the first electronic equipment.
The embodiment of the application also provides a task processing method applied to the first electronic device, comprising the following steps: after the target connection equipment is accessed, responding to a target processing task generated by a target application, and sending a task processing request to the target connection equipment; establishing a target communication connection with at least one second electronic device through the target connection device, so as to send the task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task independently or cooperatively; wherein the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems.
The embodiment of the application also provides a connecting device, which comprises at least two first interfaces, a processor and a memory, wherein the first interfaces are used for connecting the electronic device, executable programs are stored in the memory, and the processor executes the executable programs to perform the task processing method.
Drawings
In order to more clearly illustrate the technical solutions of the present application or the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments described in the present application, and other drawings can be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a task processing method according to an embodiment of the present application;
FIG. 2 is a flowchart of establishing a target mapping table in an embodiment of the present application;
FIG. 3 is a flow chart of one embodiment of step S102 of FIG. 1 according to an embodiment of the present application;
FIG. 4 is a flow chart of a task processing method according to another embodiment of the present application;
FIG. 5 is a schematic diagram of a system architecture corresponding to a task processing method according to an embodiment of the present application;
Fig. 6 is a block diagram of a connection device according to an embodiment of the present application.
Detailed Description
Various aspects and features of the present application are described herein with reference to the accompanying drawings.
It should be understood that various modifications may be made to the embodiments of the application herein. Therefore, the above description should not be taken as limiting, but merely as exemplification of the embodiments. Other modifications within the scope and spirit of this application will occur to those skilled in the art.
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments of the application and, together with a general description of the application given above and the detailed description of the embodiments given below, serve to explain the principles of the application.
These and other characteristics of the present application will become apparent from the following description of a preferred form of embodiment, given as a non-limiting example, with reference to the accompanying drawings.
It is also to be understood that, although the present application has been described with reference to some specific examples, those skilled in the art can certainly realize many other equivalent forms of the present application.
The foregoing and other aspects, features, and advantages of the present application will become more apparent in light of the following detailed description when taken in conjunction with the accompanying drawings.
Specific embodiments of the present application will be described hereinafter with reference to the accompanying drawings; however, it is to be understood that the disclosed embodiments are merely exemplary of the application, which can be embodied in various forms. Well-known and/or repeated functions and constructions are not described in detail to avoid obscuring the application with unnecessary or excessive detail. Therefore, specific structural and functional details disclosed herein are not intended to be limiting, but merely serve as a basis for the claims and as a representative basis for teaching one skilled in the art to variously employ the present application in virtually any appropriately detailed structure.
The specification may use the word "in one embodiment," "in another embodiment," "in yet another embodiment," or "in other embodiments," which may each refer to one or more of the same or different embodiments as per the application.
According to the task processing method, the task is cooperatively processed among different electronic devices based on the target communication connection by establishing the target communication connection among the different electronic devices, additional upgrading of hardware of the electronic devices is not needed, task processing can be efficiently performed, cost is reduced, the number of the accessed electronic devices can be flexibly set according to different task processing requirements, flexibility and expandability are improved, and meanwhile, the task is not required to be sent to a cloud for processing, so that safety is improved.
As shown in fig. 1, the method includes the following steps;
step S101, after at least two electronic devices are accessed, a task processing request of a first electronic device is obtained, and target communication connection between the first electronic device and at least one second electronic device is established.
The execution main body of the task processing method in this embodiment is a connection device, where the connection device can be connected to at least two electronic devices, each electronic device is connected to the connection device through its own preset hardware interface, so as to perform task cooperative processing between the electronic devices, and implement device resource sharing between the electronic devices, where the preset hardware interface may be, for example, a lightning interface, a USB4 interface, or other interfaces capable of supporting LAN protocols. In this embodiment, the electronic device that initiates the task processing request is used as the first electronic device, and the electronic device that receives the task processing request through the target communication connection is used as the second electronic device. After at least two electronic devices are accessed and task processing requests of the first electronic device are obtained, at least one second electronic device which can meet the task processing requests is determined from other electronic devices, and target communication connection between the first electronic device and the at least one second electronic device is established. The type of the target communication connection is determined by the way the first electronic device and the second electronic device are connected to the connection device, for example, if the first electronic device and the second electronic device are connected to the connection device through a lightning interface, the target communication connection is a lightning interface connection.
Alternatively, the task processing request may be all task requests of the target processing task, or may be part of task requests of the target processing task. The first electronic device may allocate the target processing task, or the connection device may allocate the target processing task, where if the target processing task is allocated to the second electronic device, the task processing request is an all-task request of the target processing task, and if a part of the target processing task is allocated to the second electronic device, the task processing request is a part of the task request of the target processing task.
Optionally, the task processing request may further include at least one of a calculation amount required by the task, a maximum time acceptable for completing the task, a maximum task parallelism, an algorithm complexity of the task, and a specified collected data type, in addition to all or a part of the target processing task, so that the connection device is convenient to select a suitable second electronic device for collaborative task processing. The appointed collection data type is used for appointing the data type which needs to be collected by the second electronic equipment in the task processing process. Taking the model training scene as an example, if the designated collected data type is speed, the second electronic device needs to collect own speed in the task processing process so as to assist the second electronic device to complete a local training task.
Step S102, sending the task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task of the first electronic device.
After the target communication connection is established, a task processing request is sent to the second electronic device based on the target communication connection, and the target processing task of the first electronic device is processed by the second electronic device. Specifically, if the task processing request is an allocated task processing request, the task processing request is forwarded to at least one second electronic device, and if the task processing request is an unallocated task processing request, the task processing request is allocated and then sent to the at least one second electronic device.
In addition, if the second electronic device is one, the second electronic device processes the target processing task independently or in cooperation with the first electronic device. If the plurality of second electronic devices are provided, each second electronic device cooperatively processes the target processing task, or each second electronic device cooperatively processes the target processing task with the first electronic device.
The first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems, and optionally, the hardware platforms can be any one of platforms including an ARM architecture, an X86 architecture, an AMD platform, an Intel platform and the like, and the operating systems can be any one of systems including windows, android, linux, a Mac OS, a home-made kylin system, a system communication system and the like.
After at least two electronic devices are connected, a task processing request of a first electronic device is obtained, and target communication connection between the first electronic device and at least one second electronic device is established; sending a task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task of the first electronic device; the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems. By establishing the target communication connection between different electronic devices, tasks are cooperatively processed between different electronic devices based on the target communication connection, additional upgrading of electronic device hardware is not needed, task processing can be efficiently performed, cost is reduced, the number of accessed electronic devices can be flexibly set according to different task processing requirements, flexibility and expandability are improved, and meanwhile, the tasks are not required to be sent to a cloud for processing, so that safety is improved.
In some embodiments of the present application, as shown in fig. 2, the method further includes the steps of:
step S1011, after the electronic equipment is accessed, a target mapping relation table is established based on the identification information of the electronic equipment and the electronic equipment, so that after a task processing request of the electronic equipment is obtained, a target communication connection between the electronic equipment is established based on the target mapping relation table.
In this embodiment, after the electronic device is accessed, identification information of the electronic device is obtained, where the identification information may be a MAC address, an equipment ID, a number, location information of the electronic device, and other information capable of identifying uniqueness of the electronic device. And establishing a target mapping relation table based on the identification information of the electronic equipment and the electronic equipment, wherein the target mapping relation table characterizes the connection matching relation between the identification information and the port of the connection equipment, and then after the task processing request of the electronic equipment is obtained, establishing target communication connection between the electronic equipment based on the target mapping relation table, so that more efficient establishment of the target communication connection is realized.
In some embodiments of the present application, after establishing a target mapping relationship table with the electronic device based on the identification information of the electronic device, the method further includes: and sending a resource condition acquisition instruction to each electronic device based on the target mapping relation table, acquiring and storing the equipment resource condition returned by each electronic device, so that the connecting device determines the equipment resource condition of each electronic device, and then, a proper second electronic device can be determined based on the equipment resource condition of each electronic device, or task allocation is reasonably carried out.
In some embodiments of the present application, the establishing the target communication connection between the first electronic device and the at least one second electronic device includes at least one of:
if the task processing request does not carry the target identification information, determining at least one second electronic device capable of processing the task processing request based on the task processing request and the device resource condition of the accessed electronic device, and conducting a target communication channel between the first electronic device and the at least one second electronic device;
if the task processing request carries target identification information and the target identification information is matched with the target mapping relation table, a target communication channel between the first electronic equipment and at least one second electronic equipment with the target identification information is conducted;
and if the task processing request carries target identification information but the target identification information is not matched with the target mapping relation table, determining at least one second electronic device capable of processing the task processing request based on the task processing request and the device resource condition of the accessed electronic device, and conducting a target communication channel between the first electronic device and the at least one second electronic device.
In this embodiment, processing is performed under different conditions according to whether the task processing request carries target identification information and whether the target identification information is matched with the target mapping relationship table, where the target identification information is identification information of a second electronic device that the first electronic device desires to connect, and may be any one of information such as a MAC address, a device ID, a number, and location information of the second electronic device.
Specifically, if the task processing request does not carry the target identification information, at least one second electronic device capable of processing the task processing request is determined based on the task processing request and the device resource condition of the accessed electronic device, where the device resource condition may be a configuration condition of a hardware resource and/or a usage condition of the hardware resource. And then, a target communication channel between the first electronic equipment and at least one second electronic equipment is conducted, and target communication connection is established. The target communication channel may in particular be a LAN (Local Area Network ) channel, for example a LAN channel of a lightning interface.
If the task processing request carries the target identification information and the target identification information is matched with the target mapping relation table, the second electronic equipment which is expected to be connected by the first electronic equipment is also connected to the connecting equipment, the second electronic equipment can be determined by inquiring the target mapping relation table, a target communication channel between the first electronic equipment and at least one second electronic equipment with the target identification information is conducted, and target communication connection is established.
If the task processing request carries target identification information, but the target identification information is not matched with the target mapping relation table, it is indicated that the second electronic device which the first electronic device expects to be connected to is not connected to the connection device, or can not be inquired, the second electronic device needs to be redetermined according to the device resource conditions of the connected electronic devices, specifically, at least one second electronic device capable of processing the task processing request is determined based on the task processing request and the device resource conditions of the connected electronic devices, and a target communication channel between the first electronic device and the at least one second electronic device is conducted.
According to whether the task processing request carries the target identification information or not and whether the target identification information is matched with the target mapping relation table, at least one second electronic device can be determined according to different conditions, and the corresponding target communication channel is conducted, so that the connecting device can establish the target communication channels of the first electronic device and the second electronic device under various different conditions, and more reliable establishment of target communication connection is realized.
In some embodiments of the present application, the sending the task processing request to the second electronic device through the target communication connection, as shown in fig. 3, includes the following steps:
Step S1021, determining a relationship between the task processing request and the target processing task obtained by the first electronic device.
In this embodiment, a relationship between a task processing request and a target processing task obtained by a first electronic device is determined, where the relationship includes all tasks of the task processing request corresponding to the target processing task, or subtasks of the task processing request corresponding to the first electronic device after the task processing request allocates the target processing task, and then step S1022 or step S1023 is executed according to different relationships.
Step S1022, if the task processing request corresponds to all tasks of the target processing task, distributing the all tasks based on the device resource condition of the accessed electronic device, and sending the distributed sub-task processing request to the corresponding second electronic device.
If the task processing request corresponds to all tasks of the target processing task, the first electronic device is indicated to not distribute the target processing task, the connection device distributes all tasks based on the device resource condition of the accessed electronic device, and then the distributed subtask processing request is sent to the corresponding second electronic device.
Step S1023, if the task processing request corresponds to the subtask after the first electronic device distributes the target processing task, the subtask is directly sent to the corresponding second electronic device based on the device resource condition of the accessed electronic device.
If the task processing request corresponds to a subtask after the first electronic device distributes the target processing task, the first electronic device is indicated that the first electronic device distributes the target processing task, and the connection device directly sends the subtask to the corresponding second electronic device based on the device resource condition of the accessed electronic device.
When the target processing task is not allocated, all tasks of the target processing task are allocated, and then the allocated subtask processing requests are sent to the second electronic equipment, and when the target processing task is allocated to each subtask, each subtask is directly sent to the corresponding second electronic equipment, so that the task processing requests are sent to the second electronic equipment more flexibly and accurately.
In some embodiments of the present application, sending the allocated subtask processing request to the corresponding second electronic device includes: encrypting the distributed subtask processing request based on a preset encryption algorithm, and sending the encrypted subtask processing request to the corresponding second electronic equipment.
In some embodiments of the present application, sending each subtask directly to a respective second electronic device includes: encrypting each subtask based on a preset encryption algorithm, and sending each encrypted subtask to corresponding second electronic equipment.
By encrypting the subtask processing request to be sent or each subtask, the task is prevented from being acquired by irrelevant electronic equipment, and the safety of sending the task processing request is improved.
Optionally, the preset encryption algorithm may be a hash algorithm, a symmetric encryption algorithm, or other encryption algorithm
In some embodiments of the present application, the enabling the second electronic device to process the target processing task of the first electronic device includes:
the target processing task is processed individually or cooperatively based on the number of second electronic devices and/or a processing policy required by the task processing request.
The number of second electronic devices and/or the processing policy required by the task processing request need to be considered when processing the target processing task, for example, if the second electronic devices are one, the second electronic devices may process the target processing task separately, and if the second electronic devices are multiple, the second electronic devices may process the target task cooperatively. Different task processing requests may need different processing strategies, for example, each subtask corresponding to some task processing requests needs parallel processing, each subtask corresponding to other task processing requests needs serial processing, and the target processing task is processed through the number of second electronic devices and/or the processing strategies needed by the task processing requests, so that more reliable task processing is realized.
In some embodiments of the present application, the target processing task of the first electronic device is processed by the second electronic device, including at least one of the following:
controlling the unique second electronic device to independently process the target processing task of the first electronic device under the condition that the second electronic device is unique;
controlling the unique second electronic device and the first electronic device to process the target processing task in parallel or serial under the condition that the second electronic device is unique;
controlling the non-unique second electronic equipment to process the target processing task of the first electronic equipment in parallel or in series under the condition that the second electronic equipment is not unique;
and controlling the non-unique second electronic device and the first electronic device to process the target processing task in parallel or in series under the condition that the second electronic device is not unique.
In this embodiment, in the case where the second electronic device is unique, the target processing task may be processed individually or cooperatively, and specifically, the target processing task may be processed individually by the unique second electronic device, or the target processing task may be processed in parallel or in series by the unique second electronic device and the first electronic device. Under the condition that the second electronic equipment is not unique, the target processing tasks are cooperatively processed, and the cooperative mode can specifically be to control the non-unique second electronic equipment to process the target processing tasks of the first electronic equipment in parallel or in series, or can be to control the non-unique second electronic equipment and the first electronic equipment to process the target processing tasks in parallel or in series.
For example, if the target processing task is to process an image.
If the second electronic device is one, the task processing request is all task requests of the target processing task, the first electronic device does not need to participate in task processing, and the second electronic device is used for processing the target processing task independently, and the method specifically comprises operations of performing image recognition, adding marks and improving resolution.
If the second electronic device is one, the task processing request is a part of the task request of the target processing task, which means that the first electronic device also needs to participate in task processing, and the target processing task is processed in parallel or in series by the second electronic device and the first electronic device according to the processing strategy (serial or parallel) of the target processing task, for example, the second electronic device executes the operations of image recognition and mark adding, and then the first electronic device executes the operation of resolution improvement.
If the number of the second electronic devices is three, the first electronic device does not participate in task processing if the task processing requests are all task requests of the target processing task, and the target processing task is processed in parallel or in series by the three second electronic devices according to the processing strategy (serial or parallel) of the target processing task. For example, operations of image recognition, adding a mark, and enhancing resolution are performed serially by three electronic devices.
If the number of the second electronic devices is three, the first electronic device also needs to participate in task processing if the task processing request is a partial task request of the target processing task, and the target processing task is processed in parallel or in series by the three second electronic devices and the first electronic device according to the processing strategy (serial or parallel) of the target processing task. For example, the operations of image recognition and marking are performed in parallel by the first electronic device and the second electronic device, and then the operation of resolution improvement is performed by the first electronic device.
Based on whether the second electronic equipment is unique or not, a plurality of processing modes are adopted to process the target processing task, so that more flexible task processing is realized.
In some embodiments of the present application, the method further comprises:
the execution result of the target processing task by the second electronic device is sent back to the first electronic device, so that the first electronic device performs integrated processing on the execution result and feeds back to a target application; or alternatively, the first and second heat exchangers may be,
and integrating the execution result of the target processing task by the second electronic equipment and then sending the integrated execution result back to the first electronic equipment so as to feed back to the target application through the first electronic equipment.
In this embodiment, the execution result of the target processing task by the second electronic device may be integrated on the first electronic device or may be integrated on the connection device. If the target processing task is integrated on the first electronic equipment, the execution result of the target processing task by the second electronic equipment is sent back to the first electronic equipment, so that the first electronic equipment performs the integration processing on the execution result and feeds back to the target application. If the integration is performed on the connection device, the integration processing is performed on the execution result, and then the integration processing result is sent back to the first electronic device and fed back to the target application by the first electronic device.
For example, if the target processing task is to identify different objects in the image.
If three second electronic devices exist, three execution results (three groups of objects) are generated, the connection device receives the execution results returned by the second electronic devices and sends the execution results to the first electronic device, if the first electronic device participates in task processing, the first electronic device integrates the three execution results with the execution results (a group of objects) of the first electronic device, such as splicing or fusing the three execution results, or adding the three execution results, and the first electronic device returns the integrated processing result (image recognition result) to the target application. If the first electronic device does not participate in the task processing, the first electronic device integrates the three execution results and returns the result of the integration processing (image recognition result) to the target application.
Or if three second electronic devices exist, three execution results (three groups of objects) are generated, the first electronic device also participates in task processing, the connection device integrates each execution result returned by each second electronic device and the execution result (one group of objects) returned by the first electronic device, the integrated processing result (four groups of objects) is sent to the first electronic device, and the first electronic device returns the integrated processing result (image recognition result) to the target application. If the first electronic device does not participate in task processing, the first electronic device returns the integration processing result of the three execution results (three groups of objects) to the target application.
If there is a second electronic device, an execution result (a group of objects) is generated, the connection device returns the execution result (the image recognition result) to the first electronic device, if the first electronic device participates in the task processing, the first electronic device integrates the execution result (the group of objects) with the execution result (the group of objects) of itself, and returns the result (the image recognition result) of the integration processing to the target application, if the first electronic device does not participate in the task processing, the first electronic device returns the execution result to the target application.
In some embodiments of the present application, the second integration processing may be performed, that is, the connection device performs the first integration processing on the execution result of each second electronic device, and then the first electronic device performs the second integration processing on the execution result of the first electronic device and the execution result of the first electronic device. For example, if three second electronic devices exist, three execution results are generated, the connection device performs integration processing on each execution result returned by each second electronic device, and sends the result of the integration processing to the first electronic device, if the first electronic device participates in task processing, the first electronic device performs integration processing on the integration processing result of the three execution results and the execution result of the first electronic device, and the first electronic device returns the result of the final integration processing to the target application.
The execution results can be integrated in different devices, so that the target application of the first electronic device can obtain the final task execution result more flexibly.
It should be noted that, the specific process of the integration process belongs to the prior art, and is not described herein.
In some embodiments of the present application, the method further comprises:
and carrying out authority verification on the obtained request data of the task processing request or the access request of the execution result, feeding back the request content of the access request based on the verification result and/or outputting corresponding prompt information to the first electronic equipment.
In this embodiment, authority verification is performed on the access request of the obtained request data or the execution result of the task processing request, if the verification is passed, the request data or the execution result may be fed back, or prompt information that the verification is passed may be sent to the first electronic device at the same time, and if the verification is not passed, prompt information that the verification is failed may be sent to the first electronic device.
The request data is content data of the task processing request, such as task content requiring cooperative processing by the second electronic device, such as image data to be rendered, position information to be calculated, or image data or audio data to be identified, and the like.
The execution result is a processing result of the task content by the second electronic device, such as image data obtained by rendering, position information obtained by calculation, a recognition result of an object in an image or a recognition result (voiceprint) of an object in audio data.
For example, if an access request of the image data to be rendered is received, performing password verification on the access request, if the verification is passed, feeding back the image data to be rendered corresponding to the access request, and if the verification is not passed, sending prompt information of verification failure to the first electronic device.
If an access request of the image data obtained through rendering is received, verifying the equipment identification code of the access request, if the access request passes the verification, feeding back the corresponding image data obtained through rendering, simultaneously sending prompt information of passing the verification to the first electronic equipment, and if the access request does not pass the verification, sending prompt information of failure in the verification to the first electronic equipment.
Alternatively, the prompting message may include outputting a voice prompt, an OSD interface prompt, or prompting by sending the prompting message to the user terminal. Optionally, the permission verification mode may be verification of a pairing password, verification of a device identification code, signature verification of a device application, and the like.
By performing authority verification on the access request of the request data or the execution result, illegal access requests can be prevented, and therefore data security is improved.
In some embodiments of the present application, after generating the target mapping table, the method further includes: and acquiring and storing access right information of each electronic device based on the target mapping relation table, and subsequently carrying out right verification on the acquired request data of the task processing request or the access request of the execution result based on the stored access right information.
In some embodiments of the present application, the method further comprises: if a preset disconnection condition is met, disconnecting the target communication connection, wherein the preset disconnection condition comprises that a disconnection request of the first electronic device is received, or a preset time length is reached after an execution result is returned to the first electronic device, or abnormal equipment resource conditions of the second electronic device are monitored, and the like, so that reliable disconnection of the target communication connection is realized.
Based on the same inventive concept, the embodiment of the application also provides a task processing method, which is applied to the first electronic device, as shown in fig. 4, and includes the following steps:
step S201, after accessing the target connection device, in response to obtaining the target processing task generated by the target application, sending a task processing request to the target connection device.
In this embodiment, the first electronic device accesses the target connection device through the preset hardware interface, and the target application is installed in the first electronic device, where the target application may be an application program that requires a larger computing power resource, and the target application generates a target processing task. Optionally, in some cases, in response to the device resource situation of the first electronic device failing to individually process the target processing task generated by the target application, the first electronic device automatically sends a task processing request to the target connection device. In other cases, the first electronic device sends a task processing request to the target connection device in response to the co-processing instructions output by the user.
Alternatively, the task processing request may be all task requests of the target processing task, or may be part of task requests of the target processing task. The first electronic device may allocate the target processing task, or the target connection device may allocate the target processing task, where if the target processing task is allocated to the second electronic device, the task processing request is an all-task request of the target processing task, and if a part of the target processing task is allocated to the second electronic device, the task processing request is a part of the task request of the target processing task.
Optionally, the task processing request may further include at least one of a calculation amount required by the task, a maximum time acceptable for completing the task, a maximum task parallelism, an algorithm complexity of the task, and a specified collected data type, in addition to all or a part of the target processing task, so that the target connection device can conveniently select a suitable second electronic device for collaborative task processing.
Step S202, establishing a target communication connection with at least one second electronic device through the target connection device, so as to send the task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task separately or cooperatively.
After the task processing request of the first electronic device is obtained, at least one second electronic device which can meet the task processing request is determined from other electronic devices, and a target communication connection between the first electronic device and the at least one second electronic device is established. The type of the target communication connection is determined by the manner in which the first electronic device and the second electronic device are connected to the target connection device, for example, if the first electronic device and the second electronic device are connected to the target connection device through a lightning interface, the target communication connection is a lightning interface connection.
After the target communication connection is established, a task processing request is sent to the second electronic device based on the communication connection, and the target processing task of the first electronic device is processed by the second electronic device. Specifically, if the task processing request is an allocated task processing request, the task processing request is forwarded to at least one second electronic device, and if the task processing request is an unallocated task processing request, the task processing request is allocated and then sent to the at least one second electronic device.
In addition, if the second electronic device is one, the second electronic device processes the target processing task independently or processes the target processing task in cooperation with the first electronic device, and if the second electronic device is a plurality of second electronic devices, each second electronic device processes the target processing task in cooperation with the first electronic device or processes the target processing task in cooperation with the first electronic device.
The first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems, and optionally, the hardware platforms can be any one of platforms including an ARM architecture, an X86 architecture, an AMD platform, an Intel platform and the like, and the operating systems can be any one of systems including windows, android, linux, a Mac OS, a domestic kylin system, a system communication system and the like.
The task processing method in the embodiment of the application is applied to first electronic equipment and comprises the following steps: after the target connection equipment is accessed, a task processing request is sent to the target connection equipment in response to obtaining a target processing task generated by a target application; establishing target communication connection with at least one second electronic device through the target connection device so as to send a task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task independently or cooperatively; the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems. By establishing the target communication connection between different electronic devices, tasks are cooperatively processed between different electronic devices based on the target communication connection, additional upgrading of electronic device hardware is not needed, task processing can be efficiently performed, cost is reduced, the number of accessed electronic devices can be flexibly set according to different task processing requirements, flexibility and expandability are improved, and meanwhile, the tasks are not required to be sent to a cloud for processing, so that safety is improved.
In order to further explain the technical idea of the invention, the technical scheme of the invention is described with specific application scenarios.
The embodiment of the application provides a task processing method, each electronic device is connected to a target connection device through a lightning interface (Thunderbolt), and the process of the task processing method is described below with reference to fig. 5.
Step S1, initializing a stage.
(1) And (3) starting a system: and the Bus driver in each electronic device controls the starting and initializing of Thunderbolt Control Center to ensure the normal operation of each component.
(2) Address mapping: the target connection device identifies each accessed electronic device through an address mapping mechanism, and establishes a target mapping relation table based on the MAC address of each electronic device and the electronic device, wherein the target mapping relation table characterizes the connection matching relation between the MAC address and the port of the target connection device.
(3) Registration process: the target connection equipment registers all the accessed electronic equipment into the system, and the registration process specifically comprises the following steps: and sending a resource condition acquisition instruction to each electronic device based on the target mapping relation table, and acquiring and storing the equipment resource condition returned by each electronic device.
Step S2, data preparation and transmission stage.
(1) Task initiation: the application program of the first electronic device initiates a GPU Geekbench task.
(2) Resource detection and recommendation: the target connection equipment automatically monitors the GPU resource use condition of each electronic equipment, and determines the optimal electronic equipment for connection according to each GPU resource condition, and the optimal electronic equipment is the second electronic equipment at the moment.
(3) Establishing connection: a target communication connection between the first electronic device and the second electronic device is established.
(4) And (3) data transmission: the P2P NDIS driver of the first electronic device exposes the related data of the GPU Geekbench task to an operating system through a LAN interface, data transmission is carried out to the second electronic device through a lightning interface cable, and the operating system of the second electronic device receives the transmitted data through the P2P NDIS driver.
Step S3, task execution stage.
(1) Task collaboration: and after the second electronic equipment receives the task request, the GPU Geekbench task calls related APIs on the two electronic equipment to calculate.
(2) Task execution control: and the Bus driver coordinates communication and data transmission between the first electronic equipment and the second electronic equipment.
(3) Real-time data synchronization: and the target connection equipment monitors the real-time GPU resource use condition of the first electronic equipment and the second electronic equipment in the task execution process, and dynamically adjusts connection according to requirements.
Step S4, result transmission stage
(1) The task is completed: and the GPU Geekbench task is processed and completed on the first electronic device and the second electronic device.
(2) ACL management and authorization: the target connection device is responsible for managing access rights for transmitting data between different electronic devices through Thunderbolt, ensuring that only authorized electronic devices or applications can access the transmitted result data.
(3) And (3) transmitting results: after confirming the error, the second electronic device returns data to the first electronic device through the lightning interface cable, and the first electronic device integrates the returned data and returns corresponding application programs.
In addition, thunderbolt FW/HW in fig. 5 is connected to the Bus driver and the P2P NDIS driver through a communication mechanism or interface such as FW Mailbox & Proprietary Interface, for coordinating related operations of firmware and hardware.
Bus driver is connected to Thunderbolt Control Center via Named Event for Device Connected Notification, toast/HAS Components and IOCTL Based Communication. Wherein Named Event for device connected notification is used for naming events for device connection notifications. The Toast/HAS Components are associated with Toast messages and Hardware Accelerated Security (hardware acceleration security component) for security notification and acceleration functions. IOCTL Based Communication enables the Bus Driver to interact with Thunderbolt Control Center via the IOCTL interface provided by the Windows kernel. Further Bus driver starts and manages Thunderbolt Control Center through the host. The P2P NDIS driver is connected with Windows Networking Stack through an NDIS Interface communication Interface.
The task processing method in the embodiment of the application has the following beneficial effects:
1. the use cost is reduced: for enterprises or individual users, the local computer is not additionally upgraded, and for professional fields or high-load business support, the maximum support is given according to the application and distribution.
2. The calculation efficiency is improved: thanks to the high bandwidth and low latency (20-40 Gb/s can be achieved) of Thunderbolt communication connection and data transmission, two different electronic devices can achieve efficient computational processing of tasks, thus achieving real-time collaboration of the different electronic devices.
3. And 4, the expandability is enhanced: with the increasing demand for task computing, more electronic devices can be added to the system at any time to expand the computing power of the system without redesigning the entire system.
4. Ensuring data security: compared with cloud computing, equipment resource sharing of different local electronic equipment is realized based on a Thunderbolt communication transmission mode, and data can only stay locally, so that data security is fundamentally ensured.
Based on the same inventive concept, the embodiment of the application also provides a connection device, as shown in fig. 6, including at least two first interfaces, a processor and a memory, where each first interface is used to connect to an electronic device, the memory stores an executable program, and the processor executes the executable program to perform the task processing method as described above.
The first interface may be a lightning interface or other interface that may support LAN protocols, i.e. a connection means, or may be a computer device integrating the switch function. Although fig. 6 includes only two first interfaces, the number of the first interfaces in the embodiment of the present application is not limited to two, and may be more than two.
The memory may include RAM (Random Access Memory ) or may include non-volatile memory, such as at least one disk memory. Optionally, the memory may also be at least one memory device located remotely from the aforementioned processor.
The processor may be a general-purpose processor, including a CPU, NP (Network Processor ), etc.; but also DSP (Digital Signal Processing, digital signal processor), ASIC (Application Specific Integrated Circuit ), FPGA (Field Programmable Gate Array, field programmable gate array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the present invention, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
The above embodiments are only exemplary embodiments of the present application and are not intended to limit the present application, the scope of which is defined by the claims. Various modifications and equivalent arrangements may be made to the present application by those skilled in the art, which modifications and equivalents are also considered to be within the scope of the present application.

Claims (10)

1. A task processing method, comprising;
after at least two electronic devices are accessed, responding to a task processing request of a first electronic device, and establishing target communication connection between the first electronic device and at least one second electronic device;
sending the task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task of the first electronic device;
wherein the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems.
2. The method of claim 1, further comprising:
after the electronic equipment is accessed, a target mapping relation table is established based on the identification information of the electronic equipment and the electronic equipment, so that after a task processing request of the electronic equipment is obtained, target communication connection between the electronic equipment is established based on the target mapping relation table.
3. The method of claim 2, wherein establishing a target communication connection between the first electronic device and at least one second electronic device comprises at least one of:
if the task processing request does not carry the target identification information, determining at least one second electronic device capable of processing the task processing request based on the task processing request and the device resource condition of the accessed electronic device, and conducting a target communication channel between the first electronic device and the at least one second electronic device;
if the task processing request carries target identification information and the target identification information is matched with the target mapping relation table, a target communication channel between the first electronic equipment and at least one second electronic equipment with the target identification information is conducted;
and if the task processing request carries target identification information but the target identification information is not matched with the target mapping relation table, determining at least one second electronic device capable of processing the task processing request based on the task processing request and the device resource condition of the accessed electronic device, and conducting a target communication channel between the first electronic device and the at least one second electronic device.
4. The method of claim 1, wherein sending the task processing request to the second electronic device over the target communication connection comprises:
determining the relation between the task processing request and a target processing task obtained by the first electronic equipment;
if the task processing request corresponds to all tasks of the target processing task, distributing all tasks based on the equipment resource condition of the accessed electronic equipment, and sending the distributed subtask processing request to the corresponding second electronic equipment;
and if the task processing request corresponds to the subtask after the first electronic device distributes the target processing task, directly transmitting the subtask to the corresponding second electronic device based on the device resource condition of the accessed electronic device.
5. The method of claim 1, wherein causing the second electronic device to process the target processing task of the first electronic device comprises:
the target processing task is processed individually or cooperatively based on the number of second electronic devices and/or a processing policy required by the task processing request.
6. The method of claim 1 or 5, wherein causing the second electronic device to process the target processing task of the first electronic device comprises at least one of:
Controlling the unique second electronic device to independently process the target processing task of the first electronic device under the condition that the second electronic device is unique;
controlling the unique second electronic device and the first electronic device to process the target processing task in parallel or serial under the condition that the second electronic device is unique;
controlling the non-unique second electronic equipment to process the target processing task of the first electronic equipment in parallel or in series under the condition that the second electronic equipment is not unique;
and controlling the non-unique second electronic device and the first electronic device to process the target processing task in parallel or in series under the condition that the second electronic device is not unique.
7. The method of claim 1, further comprising:
the execution result of the target processing task by the second electronic device is sent back to the first electronic device, so that the first electronic device performs integrated processing on the execution result and feeds back to a target application; or alternatively, the first and second heat exchangers may be,
and integrating the execution result of the target processing task by the second electronic equipment and then sending the integrated execution result back to the first electronic equipment so as to feed back to the target application through the first electronic equipment.
8. The method of any one of claims 1 to 5, or 7, further comprising:
and carrying out authority verification on the obtained request data of the task processing request or the access request of the execution result, feeding back the request content of the access request based on the verification result and/or outputting corresponding prompt information to the first electronic equipment.
9. A task processing method applied to a first electronic device, the method comprising:
after the target connection equipment is accessed, responding to a target processing task generated by a target application, and sending a task processing request to the target connection equipment;
establishing a target communication connection with at least one second electronic device through the target connection device, so as to send the task processing request to the second electronic device through the target communication connection, so that the second electronic device processes the target processing task independently or cooperatively;
wherein the first electronic device and the second electronic device have the same or different hardware platforms and/or operating systems.
10. A connection device comprising at least two first interfaces for connecting to an electronic device, a processor and a memory, the memory having stored therein an executable program, the processor executing the executable program to perform the task processing method of any one of claims 1-8.
CN202311865277.6A 2023-12-29 2023-12-29 Task processing method and connecting device Pending CN117707784A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311865277.6A CN117707784A (en) 2023-12-29 2023-12-29 Task processing method and connecting device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311865277.6A CN117707784A (en) 2023-12-29 2023-12-29 Task processing method and connecting device

Publications (1)

Publication Number Publication Date
CN117707784A true CN117707784A (en) 2024-03-15

Family

ID=90162407

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311865277.6A Pending CN117707784A (en) 2023-12-29 2023-12-29 Task processing method and connecting device

Country Status (1)

Country Link
CN (1) CN117707784A (en)

Similar Documents

Publication Publication Date Title
US20210297410A1 (en) Mec platform deployment method and apparatus
US10698717B2 (en) Accelerator virtualization method and apparatus, and centralized resource manager
US20170257282A1 (en) Authenticating connections and program identity in a messaging system
CN109951488B (en) Method, device, equipment and storage medium for realizing service of content distribution network
US11632247B2 (en) User security token invalidation
US10037200B2 (en) Synchronizing installation and execution of a program on a second information processing apparatus with a first information processing apparatus which failed installation of the program
EP3682364B1 (en) Cryptographic services utilizing commodity hardware
CN111510474B (en) Data transmission method based on message middleware and related equipment
CN109450976B (en) Method and device for accessing service system
CN115543924B (en) Task processing method and related device based on trusted management platform
CN111917586A (en) Container bandwidth adjusting method, server and storage medium
US9483219B2 (en) Information processing system, information processor, non-transitory computer readable medium, and information processing method
CN113361913A (en) Communication service arranging method, device, computer equipment and storage medium
CN110910110B (en) Data processing method and device and computer storage medium
US10673827B1 (en) Secure access to user data
US10785147B2 (en) Device and method for controlling route of traffic flow
CN117707784A (en) Task processing method and connecting device
CN112953986A (en) Management method and device for edge application
KR101262849B1 (en) Apparatus and method for allocating and releasing of image device in virtualization system
CN113612732B (en) Resource calling method and device and multiparty secure computing system
CN115550070A (en) Multi-party cooperation method and related device
KR20090071542A (en) Host posing network device and method thereof
CN111683164B (en) IP address configuration method and VPN service system
CN107172094B (en) Method and system for accessing service program on super computing center
CN112468453A (en) Access method, system, electronic device and storage medium of multi-protocol device

Legal Events

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