Distributed computing method, device, computer equipment and storage medium
Through the target micro-application, the distributed computing tasks are performed on local devices, and the problems of data security risks and low computing speed in the prior art are solved, and efficient and secure distributed computing is achieved.
Patent Information
- Application Number
- CN202111499175.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-12-09
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2041-12-09
AI Technical Summary
Existing distributed computing technology requires users to download and install applications, increasing data security risks, and computing data needs to be uploaded to the server for processing, resulting in a slower computing speed.
By setting up and calling distributed computing tasks through the target micro-application, the computing tasks are directly executed on the local device, avoiding the step of uploading data to the server, improving computing speed, and enhancing data security.
It realizes efficient execution of distributed computing tasks, reduces storage space requirements, improves computing speed, and enhances data security.
Smart Images

Figure CN114168335B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of application technology, and in particular to a distributed computing method, apparatus, computer equipment, and storage medium. Background Art
[0002] Distributed computing is to divide a business that requires huge computing power into many small parts, and then distribute these parts to many computer nodes for parallel processing, and finally combine these calculation results to get the final result.
[0003] In the related art, users need to download the relevant application from the application store and install it in the terminal before using the application, so that they can use the application for distributed computing. In addition, during distributed computing, business data needs to be uploaded to the server for processing, which increases data security risks. Summary of the invention
[0004] The embodiments of the present application provide a distributed computing method, apparatus, computer equipment and storage medium. The technical solution is as follows:
[0005] On the one hand, an embodiment of the present application provides a distributed computing method, the method comprising:
[0006] Setting a distributed computing task through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services;
[0007] The target distributed computing device is called through the target micro-application for computing resources, the target distributed computing device is subscribed to the target micro-application, and the target distributed computing device is used to call computing resources through the target service in the target micro-application to execute the distributed computing task and obtain a distributed computing result;
[0008] The distributed computing result sent by the target distributed computing device is received through the target micro-application.
[0009] On the other hand, an embodiment of the present application provides a distributed computing method, the method comprising:
[0010] Obtaining a distributed computing task assigned by a scheduling device through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services;
[0011] Invoke computing resources through the target service in the target micro-application to execute the distributed computing task and obtain a distributed computing result;
[0012] The distributed computing result is fed back to the scheduling device through the target micro-application.
[0013] On the other hand, an embodiment of the present application provides a distributed computing device, the device comprising:
[0014] A setting module, used to set a distributed computing task through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services;
[0015] A first calling module is used to call the computing resources of the target distributed computing device through the target micro-application, the target distributed computing device subscribes to the target micro-application, and the target distributed computing device is used to call the computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result;
[0016] A receiving module is used to receive the distributed computing result sent by the target distributed computing device through the target micro-application.
[0017] On the other hand, an embodiment of the present application provides a distributed computing device, the device comprising:
[0018] An acquisition module, used to acquire the distributed computing task assigned by the scheduling device through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services;
[0019] A calling module, used to call computing resources through the target service in the target micro-application to execute the distributed computing task and obtain a distributed computing result;
[0020] A feedback module is used to feed back the distributed computing result to the scheduling device through the target micro-application.
[0021] On the other hand, an embodiment of the present application provides a computer device, which includes a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set are loaded and executed by the processor to implement the distributed computing method as described in the above aspects.
[0022] On the other hand, an embodiment of the present application provides a computer-readable storage medium, in which at least one instruction, at least one program, a code set or an instruction set is stored, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement the distributed computing method as described in the above aspects.
[0023] On the other hand, an embodiment of the present application provides a computer program product or a computer program, which includes a computer instruction stored in a computer-readable storage medium. A processor of a computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the distributed computing method provided in the above aspect.
[0024] The technical solution provided by this application may have the following beneficial effects:
[0025] The scheduling device sets the distributed computing task through the target micro-application, and calls the computing resources of the target distributed computing device through the target micro-application. The target distributed computing device obtains the distributed computing task assigned by the scheduling device through the target micro-application, calls the computing resources through the target micro-application to perform the distributed computing task, and feeds back the distributed computing result to the scheduling device through the target micro-application. The scheduling device receives the computing result through the target micro-application. Compared with the related technology, the target micro-application requires less storage space than traditional applications. The scheduling device calls the computing resources of the target distributed computing device through the target micro-application to realize distributed computing. There is no need to upload the computing data to the server for processing, which improves the computing speed of the distributed computing task and ensures the security of the computing data. BRIEF DESCRIPTION OF THE DRAWINGS
[0026] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0027] Figure 1 A schematic diagram of a micro-application script provided by an exemplary embodiment of the present application is shown;
[0028] Figure 2 A schematic diagram showing an implementation environment provided by an exemplary embodiment of the present application is shown;
[0029] Figure 3 A flowchart of a distributed computing method provided by an exemplary embodiment of the present application is shown;
[0030] Figure 4 A flow chart of a distributed computing method provided by another exemplary embodiment of the present application is shown;
[0031] Figure 5 A schematic diagram of a task setting interface of a target micro-application provided by an exemplary embodiment of the present application is shown;
[0032] Figure 6 A flow chart of a distributed computing method provided by another exemplary embodiment of the present application is shown;
[0033] Figure 7 A schematic diagram of the structure of a distributed computing system provided by an exemplary embodiment of the present application is shown;
[0034] Figure 8 A flowchart of a distributed computing method for image super-resolution provided by an exemplary embodiment of the present application is shown;
[0035] Fig. 9 A flowchart of a computing resource management sub-process provided by an exemplary embodiment of the present application is shown;
[0036] Fig.10 A flow chart of a distributed computing method for image super-resolution provided by another exemplary embodiment of the present application is shown;
[0037] Fig.11 A flowchart of an operation sub-process provided by an exemplary embodiment of the present application is shown;
[0038] Fig.12 A schematic diagram of an implementation of an image super-resolution process provided by an exemplary embodiment of the present application is shown;
[0039] Fig.13 A block diagram of a distributed computing device provided by an exemplary embodiment of the present application is shown;
[0040] Fig.14 A structural block diagram of a distributed computing device provided by another exemplary embodiment of the present application is shown;
[0041] Fig.15 A structural block diagram of a computer device provided by an exemplary embodiment of the present application is shown. DETAILED DESCRIPTION
[0042] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are merely examples of devices and methods consistent with some aspects of the present application as detailed in the appended claims.
[0043] The following is an explanation of the nouns that appear in this article.
[0044] Micro-applications: Micro-applications can be seen as a collection of services, which are used to implement specific business logic through calls between services, that is, the application functions of micro-applications. Unlike traditional applications that can only run on specific operating systems, the services of micro-applications can be services on different operating systems, that is, micro-applications support heterogeneous operating systems and can run across platforms. Unlike traditional applications that need to be downloaded and bound to devices before use, micro-applications use a subscription mechanism and are bound to users, that is, after subscribing to a micro-application through a device under a user account, all devices under the user account can use the micro-application. Unlike traditional applications that need to download and install application installation packages before running, for example, before running Android applications, you need to download the apk package, micro-applications only need to download the corresponding application script before running. During the micro-application process, the application script is executed through the micro-application engine to realize the application function. Compared with traditional applications, the application script has a lower code volume, so it occupies less storage space and is conducive to dynamic deployment and updating.
[0045] Micro-application script: also known as micro-application definition, used to control the calling relationship between services in a micro-application, and uses a scripting language to describe a common business logic. The scripting language can be XML or JavaScript.
[0046] like Figure 1 As shown, the micro-application script 11 is composed of several triggers 12, and each trigger 12 is composed of a trigger event 13, a control logic 14, and several services 15 controlled by the control logic 14. Among them, the service in the micro-application script is not the service itself, but the service identifier of the service.
[0047] Unlike traditional applications that require downloading and installing application installation packages before running, for example, before running Android applications, you need to download the apk package. Before running micro-applications, you only need to download the corresponding micro-application script. During the micro-application process, the micro-application script is executed by the micro-application engine to realize the micro-application function. Compared with traditional applications, micro-application scripts have lower code volume, so they occupy less storage space and are conducive to dynamic deployment and updating.
[0048] Service: As the smallest unit in the running process of a micro-application, it is used to implement specific tasks. For example, the screenshot service is used to implement the device screenshot function, the screen projection service is used to implement the display screen projection between devices, and so on. In addition, the service called during the running of the micro-application can be a service on the current device or a service on other devices. For example, during the running of the micro-application, you can obtain the device screenshots of other devices by calling the screenshot service on other devices, and display the device screenshots of other devices by calling the picture display service. Unlike the traditional application installation process, all services used in the running process need to be pre-installed locally. Since the business logic of the micro-application is dynamically assembled during the running process, the services in the micro-application support dynamic deployment, that is, during the running process, based on the business logic executed by the current device, the service corresponding to the business logic is dynamically deployed to the current device. Correspondingly, when the application function of the same micro-application is implemented through multiple devices, since the business logic of different devices may be different, the services deployed at different devices may also be different, that is, the services in the micro-application have the characteristics of differential deployment. In one possible implementation, the services that constitute a micro-application may include static services and dynamic services, wherein static services refer to services provided by a host application and need to be pre-installed in a device, while dynamic services refer to services that support dynamic deployment and can be dynamically deployed in a device during the operation of the micro-application.
[0049] The implementation environment of the embodiments of the present application is introduced below.
[0050] Please refer to Figure 2 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application. The implementation environment includes a scheduling device 210, a target distributed computing device 220 and a server 230.
[0051] In the embodiment of the present application, the scheduling device 210 and the target distributed computing device 220 are respectively subscribed to a target micro-application 240, which is a micro-application that provides distributed computing functions. The target micro-application 240 can be regarded as a collection of multiple distributed computing services. Among them, the distributed computing service can be an image super-resolution service, an online transcoding service, a voice-to-text service, etc., which is not limited in the embodiment of the present application.
[0052] In an embodiment of the present application, the target micro-application 240 is bound to the user. In one possible implementation, the scheduling device 210 and the target distributed computing device 220 belong to the same user account, and any device under the user account subscribes to the target micro-application 240, and other devices also subscribe to the target micro-application 240 synchronously. In another possible implementation, the scheduling device 210 and the target distributed computing device 220 belong to different user accounts, and the scheduling device 210 and the target distributed computing device 220 need to subscribe to the target micro-application 240 respectively.
[0053] In a possible implementation, the scheduling device 210 calls the computing resources of the target distributed computing device 220 through the target micro-application 240 to complete the calculation of the distributed computing task.
[0054] In another possible implementation, the scheduling device 210 and the target distributed computing device 220 belong to the same computing resource sharing group, which may also include other devices. The scheduling device 210 calls the computing resources of the target distributed computing device 220 or other devices in the computing resource sharing group through the target micro-application 240 to complete the calculation of the distributed computing task.
[0055] The embodiments of the present application also include other devices, and only the scheduling device 210 and the target distributed computing device 220 are used as examples. Regarding the device types of the scheduling device 210 and the target distributed computing device 220, the device types of the scheduling device 210 and the target distributed computing device 220 can be the same or different, and the device type can be a smart phone, a tablet computer, a personal computer, a laptop computer, a desktop computer, a smart home, a smart wearable device, a car computer, etc., and the embodiments of the present application do not limit this.
[0056] The scheduling device 210, the target distributed computing device 220 and other devices are connected to the server 230 via a wireless network or a wired network.
[0057] The server 230 may be at least one of a single server, a server cluster consisting of multiple servers, a cloud computing platform, and a virtualization center. The server 230 is deployed with the following modules: user management 231 , device management 232 , sharing group management 233 , and resource gateway management 234 .
[0058] In some embodiments, when the scheduling device 210 and the target distributed computing device 220 belong to different user accounts, the user management 231 is used to manage the user account information, and the device management 232 is used to manage all device information corresponding to the user account.
[0059] In some embodiments, when the scheduling device 210 and the target distributed computing device 220 belong to the same computing resource sharing group, the sharing group management 233 is used to manage the devices or users in the computing resource sharing group. The resource gateway management 234 is used to manage the mapping relationship between the device and the resource gateway to implement the call of computing resources.
[0060] In addition, the scheduling device 210 and the target distributed computing device 220 and other devices can exchange data through the Internet, local area network, etc.
[0061] Please refer to Figure 3 , which shows a flowchart of a distributed computing method provided by an exemplary embodiment of the present application. In this embodiment, the method is used for Figure 1 Taking the implementation environment shown in FIG. 1 as an example, the method includes:
[0062] Step 301: The scheduling device sets a distributed computing task through a target micro-application.
[0063] The scheduling device subscribes to a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services.
[0064] In an embodiment of the present application, a micro-application is a collection of services, and its business logic is implemented by a computer device executing a micro-application script through a micro-application engine, wherein the micro-application scripts of different micro-applications are all executed by the same micro-application engine.
[0065] As a low-code script file, the micro-application script consists of several triggers, and each trigger is used to trigger under a specific trigger event, and after the trigger, the service call is made through the corresponding control logic of the trigger.
[0066] In some embodiments, the micro-application script includes at least an initialization trigger and an end trigger, the initialization trigger is used to trigger the micro-application to start running, and the end trigger is used to trigger the micro-application to end running. In addition to the initialization trigger and the end trigger, the micro-application script also includes other triggers that implement specific micro-application functions, which is not limited in the embodiments of the present application.
[0067] The types of distributed computing tasks may be image super-resolution tasks, online transcoding tasks, speech-to-text tasks, etc., which are not limited in the embodiments of the present application. In some embodiments, different distributed computing tasks correspond to different services, for example, image super-resolution tasks correspond to image super-resolution services, online transcoding tasks correspond to online transcoding services, speech-to-text tasks correspond to speech-to-text services, etc.
[0068] Step 302: The target distributed computing device obtains the distributed computing task assigned by the scheduling device through the target micro-application.
[0069] The target distributed computing device also subscribes to the target micro-application. The scheduling device establishes a connection with the target distributed computing device through the target micro-application and allocates distributed computing tasks. The target distributed computing device obtains the distributed computing tasks through the target micro-application.
[0070] In a possible implementation, the scheduling device allocates the distributed computing task to the target distributed computing device according to the computing capability and working status of the target distributed computing device.
[0071] Optionally, the target distributed computing device and the scheduling device belong to the same user account. The target micro-application is bound to the user, and if any of the target distributed computing device and the scheduling device under the user account subscribes to the target micro-application, other devices can use the target micro-application.
[0072] Optionally, the target distributed computing device and the scheduling device belong to different user accounts. The target micro-applications are bound to different users respectively, and the target distributed computing device and the scheduling device subscribe to the target micro-applications respectively.
[0073] Optionally, the number of target distributed computing devices may be one or more, which is not limited in the embodiment of the present application.
[0074] Step 303: The scheduling device calls the computing resources of the target distributed computing device through the target micro-application.
[0075] The scheduling device sends a call request to the target distributed computing device through the target micro-application, requesting to call the computing resources of the target distributed computing device.
[0076] Step 304: The target distributed computing device calls computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result.
[0077] Furthermore, the target distributed computing device calls local computing resources through the target service according to the type of the distributed computing task to execute the distributed computing task.
[0078] In an embodiment of the present application, the target distributed computing device executes the target control logic corresponding to the target trigger in the target micro-application script and calls the target service to perform the distributed computing function. Among them, the target service is a service used to implement the distributed computing function, and the target service can be a static service or a dynamic service. As a pre-installed service, the call of the static service depends on the host application, that is, the static service can only be called when the host application is installed. Taking the image super-resolution service as a static service as an example, the image super-resolution service can only be called by the scheduling device when the image super-resolution application is installed on the target distributed computing device.
[0079] As a service that supports dynamic deployment, dynamic services do not rely on pre-installed applications for their invocation, and the dynamic services that can be invoked are uniformly stored in the cloud service library. Taking image super-resolution as an example, the target distributed computing device does not need to pre-install the image super-resolution application. When the source device needs to call the image super-resolution service, the target distributed computing device queries the image super-resolution service from the cloud service library in real time and downloads and deploys it, and the image super-resolution service can be called by the scheduling device.
[0080] Step 305: The target distributed computing device feeds back the distributed computing result to the scheduling device through the target micro-application.
[0081] In the embodiment of the present application, the types of distributed computing tasks are different, and the distributed computing results fed back by the target distributed computing device to the scheduling device through the target micro-application are also different.
[0082] Exemplarily, when the type of distributed computing task is an image super-resolution task, the distributed computing result fed back by the target distributed computing device to the scheduling device is a super-resolution image; when the type of distributed computing task is an online transcoding task, the distributed computing result fed back by the target distributed computing device to the scheduling device is a transcoded video; when the type of distributed computing task is a speech-to-text task, the distributed computing result fed back by the target distributed computing device to the scheduling device is audio converted into text.
[0083] Step 306: The scheduling device receives the distributed computing result sent by the target distributed computing device through the target micro-application.
[0084] In a possible implementation, the scheduling device receives the distributed computing results sent by the target distributed computing device through the target micro-application, merges the distributed computing results, and completes the calculation of the distributed computing task.
[0085] Exemplarily, when the type of distributed computing task is a speech-to-text task, the distributed computing task assigned by the scheduling device to the target distributed computing device is an audio segment. The target distributed computing device converts the audio segment into a text segment by calling computing resources, and sends the calculation result to the scheduling device through the target micro-application. After receiving the calculation result, the scheduling device needs to merge the calculation result to form a complete converted text corresponding to the audio.
[0086] In summary, in the embodiment of the present application, the scheduling device sets a distributed computing task through the target micro-application, and calls the computing resources of the target distributed computing device through the target micro-application. The target distributed computing device obtains the distributed computing task assigned by the scheduling device through the target micro-application, calls the computing resources through the target micro-application to perform the distributed computing task, and feeds back the distributed computing result to the scheduling device through the target micro-application, and the scheduling device receives the computing result through the target micro-application. Compared with the related art, the target micro-application requires less storage space than traditional applications. The scheduling device calls the computing resources of the target distributed computing device through the target micro-application to realize distributed computing. There is no need to upload the computing data to the server for processing, which improves the computing speed of the distributed computing task and ensures the security of the computing data.
[0087] In a possible implementation, in addition to being able to call the computing resources of the target distributed computing device through the target micro-application to perform distributed computing tasks, the scheduling device can also call local resources through the target micro-application to perform distributed computing tasks. Figure 4 , which shows a flowchart of a distributed computing method provided by another exemplary embodiment of the present application.
[0088] Step 401: The scheduling device displays a task setting interface of the target micro-application, wherein the task setting interface includes a type selection control and a task selection control corresponding to at least one task type.
[0089] In a possible implementation, when receiving a start instruction for a target micro-application, the scheduling device displays a task setting interface for the target micro-application. The task setting interface includes a type selection control and a task selection control. The type selection control is used to select a task type, and the task selection control is used to select a specific task content corresponding to the task type.
[0090] Optionally, the start instruction can be triggered by the user by clicking the target micro-application icon, or by interaction (such as voice, shaking, tapping, scene perception, etc.). The embodiment of the present application does not limit the specific method of starting the target micro-application.
[0091] Optionally, different task types correspond to different type selection controls, for example, an image super-resolution task corresponds to an image super-resolution selection control, an online transcoding task corresponds to an online transcoding selection control, and a speech-to-text task corresponds to a speech-to-text selection control.
[0092] Optionally, when the task type is an image super-resolution task, the task selection control is used to select an image; when the task type is an online transcoding task, the task selection control is used to select a video to be transcoded; when the task type is a speech-to-text task, the task selection control is used to select audio to be converted into text.
[0093] For example, Figure 5 As shown, a schematic diagram of a task setting interface of a target micro-application provided by an exemplary embodiment of the present application is shown. The user clicks on the target micro-application, i.e., the distributed computing micro-application 511, in the micro-application list interface 51, and the scheduling device receives a start instruction for the distributed computing micro-application 511, and displays the task setting interface 52 of the distributed computing micro-application 511. The task setting interface 52 includes an image super-resolution selection control 521, an online transcoding selection control 522, and a speech-to-text selection control 523. Among them, the image super-resolution selection control 521 corresponds to the image super-resolution task, the online transcoding selection control 522 corresponds to the online transcoding task, and the speech-to-text selection control 523 corresponds to the speech-to-text task. In addition, the task setting interface 52 also includes a task selection control 524 and a start control 525.
[0094] Step 402: Based on the triggering operation of the type selection control and the task selection control, the scheduling device sets the distributed computing task.
[0095] In one possible implementation, when a trigger operation is received on a type selection control, the scheduling device determines the corresponding task type, and when a trigger operation is received on a task selection control, the scheduling device determines the specific task content, and then the scheduling device starts to set the distributed computing task.
[0096] Optionally, the trigger operation may be a click operation, a long press operation, a tapping operation, etc., which is not limited in the embodiments of the present application.
[0097] For example, Figure 5 As shown, after the user clicks the image super-resolution selection control 521, he further clicks the task selection control 524 to select the picture that needs to be super-resolution, and further clicks the start control 525, and the scheduling device starts to set the distributed computing task.
[0098] Step 403: The scheduling device calls the computing resources of the target distributed computing device through the target micro-application.
[0099] The scheduling device sends a call request to the target distributed computing device through the target micro-application, requesting to call computing resources. The target distributed computing device determines the target service in the target micro-application based on the target task type of the distributed computing task. Further, the target distributed computing device calls the computing resource through the target service in the target micro-application to execute the distributed computing result.
[0100] In addition, it should be noted that, in a possible implementation, when the target service is not deployed locally, the target distributed computing device dynamically loads and deploys the target service from the cloud service library. Optionally, when the target service is a dynamic service, the target distributed computing device does not deploy the target service, and the target distributed computing device dynamically loads and deploys the target service from the cloud service library.
[0101] In the embodiments of the present application, different target task types correspond to different target services. In some embodiments, when the target task type of the distributed computing task is an image super-resolution task, the target distributed computing device determines the target service to be an image super-resolution service; when the target task type of the distributed computing task is an online transcoding task, the target distributed computing device determines the target service to be an online transcoding service; when the target task type of the distributed computing task is a speech-to-text task, the target distributed computing device determines the target service to be a speech-to-text service.
[0102] Step 404: The scheduling device receives the distributed computing result sent by the target distributed computing device through the target micro-application.
[0103] For the implementation of this step, please refer to step 306, which will not be described in detail in this embodiment of the present application.
[0104] Step 405: Based on the target task type of the distributed computing task, the scheduling device determines the target service in the target micro-application.
[0105] In an embodiment of the present application, the control logic in the target micro-application script of the scheduling device defines the correspondence between the task type and the calling service, and the control logic calls the corresponding service based on the target task type. Among them, different target task types correspond to different target services. In some embodiments, when the target task type of the distributed computing task is an image super-resolution task, the scheduling device determines that the target service is an image super-resolution service; when the target task type of the distributed computing task is an online transcoding task, the scheduling device determines that the target service is an online transcoding service; when the target task type of the distributed computing task is a speech-to-text task, the scheduling device determines that the target service is a speech-to-text service.
[0106] Step 406: When the target service is not deployed locally, the scheduling device dynamically loads and deploys the target service from the cloud service library.
[0107] In a possible implementation, when the target service is a dynamic service, the scheduling device has not deployed the target service, and the scheduling device may dynamically load and deploy the target service from a cloud service library.
[0108] Regarding the process of the scheduling device loading and deploying the target service from the cloud service library, in a possible implementation, when the target service is a dynamic service, the scheduling device obtains the service status of the host service corresponding to the target service through the dynamic service manager. Among them, the operation of the dynamic service depends on its corresponding host service. For example, when the dynamic service is a container creation service, the scheduling device obtains the service status of the container service. The embodiment of the present application does not limit the type of specific host service. Therefore, when the service status of the host service is not started, the scheduling device starts the host service. Further, the scheduling device queries the deployment status of the target service through the host service. In the case where the target service is not deployed, the scheduling device downloads the target service from the cloud service library and loads the target service through the host service. In the case of a deployed target service (it may be that the historical call target service is cached locally), the scheduling device directly loads the target service through the host service. Optionally, the scheduling device needs to determine the target service agent corresponding to the target service based on the description information of the target service, and perform parameter conversion through the target service agent, thereby passing the converted parameters to the host service so that the host service calls the target service based on the parameters.
[0109] Step 407: The scheduling device calls local computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result.
[0110] In one possible implementation, the scheduling device calls local computing resources through the target service to execute the distributed computing task, obtains the distributed computing result, and merges the result with the computing result received from the target distributed computing device to complete the calculation of the distributed computing task.
[0111] In the embodiment of the present application, the scheduling device can not only call local computing resources through the target micro-application to perform distributed computing tasks, but also call the computing resources of the target distributed computing device through the target micro-application to perform distributed computing tasks, thereby enabling multiple devices to perform distributed computing tasks at the same time and improving computing efficiency. In addition, when the target service is not deployed locally, the scheduling device and the target distributed computing device can dynamically load the target service from the cloud service library to meet different distributed computing needs.
[0112] In one possible implementation, not all computing resources of all devices can be called by the scheduling device. Therefore, the scheduling device needs to establish a computing resource pool that can be called, and then call the devices in the computing resource pool to implement distributed computing, and distribute distributed computing tasks according to the capabilities of different devices to avoid low computing power devices affecting the computing efficiency of the overall distributed computing tasks. In one possible implementation, the scheduling device obtains the device identification of the distributed computing device, establishes a connection with the distributed computing device, and adds it to the computing resource pool, and distributes distributed computing tasks to it according to the working status and computing power of the distributed computing device. Please refer to Figure 6 , which shows a flowchart of a distributed computing method provided by another exemplary embodiment of the present application.
[0113] Step 601: The scheduling device sets a distributed computing task through a target micro-application.
[0114] For the implementation of this step, please refer to step 301, which will not be described in detail in this embodiment of the present application.
[0115] Step 602: The scheduling device obtains the device identification of the distributed computing device.
[0116] The device identifier is unique, and different distributed computing devices correspond to different device identifiers.
[0117] Optionally, the number of distributed computing devices may be one or more, which is not limited in the embodiments of the present application.
[0118] Regarding the method for obtaining the device identification of the distributed computing device, in a possible implementation, the scheduling device obtains the device identification of the distributed computing device through near field communication.
[0119] The distributed computing device sends an NFC (Near Field Communication) signal to the scheduling device. The NFC signal carries the device identification of the distributed computing device. When the scheduling device receives the NFC signal, it obtains the device identification of the distributed computing device.
[0120] In another possible implementation, the scheduling device parses the link to obtain the device identification of the distributed computing device.
[0121] Optionally, the link may be a text message link, a WeChat link, etc., which is not limited in the embodiments of the present application.
[0122] In an illustrative example, the distributed computing device generates a text message link and sends it to the scheduling device. The text message link includes a device identifier of the distributed computing device. The scheduling device obtains the device identifier of the distributed computing device by parsing the text message link.
[0123] In another possible implementation, the scheduling device parses the graphic code to obtain the device identification of the distributed computing device.
[0124] Optionally, the graphic code may be a QR code, a bar code, etc., which is not limited in the embodiments of the present application.
[0125] In an illustrative example, the distributed computing device generates a two-dimensional code, the two-dimensional code includes a device identification of the distributed computing device, and the scheduling device obtains the device identification of the distributed computing device by parsing the two-dimensional code.
[0126] In another possible implementation, the scheduling device and the distributed computing device belong to the same computing resource sharing group, and the scheduling device may obtain device identifiers of other distributed computing devices in the computing resource sharing group.
[0127] In an illustrative example, the scheduling device creates a computing resource sharing group, and the distributed computing device joins the computing resource sharing group. All members in the computing resource sharing group can call each other's computing resources. The server is deployed with a sharing group management module for managing all devices in the computing resource sharing group. In addition, the distributed computing devices in the computing resource sharing group can belong to the same user account or to different user accounts, which is not limited in the embodiments of the present application.
[0128] Exemplarily, the distributed computing devices within the computing resource sharing group can belong to the same user account, that is, the mobile phone, tablet computer, car computer, etc. under user account A, or they can belong to different user accounts, that is, the mobile phone A, tablet computer A, car computer A under user account A and the mobile phone B, tablet computer B, etc. under user B account.
[0129] In addition, it should be noted that, in some embodiments, when the distributed computing devices belong to different user accounts, a user management module and a device management module are deployed on the server side. The user management module is used to manage user account information, and the device management module is used to manage device information under the user account. The number of devices under the user account can be one or more, and different devices correspond to different device identifiers. The scheduling device first obtains the user identifier of the user account to which the distributed computing device belongs. Based on the user identifier, the scheduling device queries the user management module and the device management module for the device list under the user account corresponding to the user identifier through the target micro-application, determines the device identifier of the distributed computing device from the device list, and then obtains the device identifier of the distributed computing device through the target micro-application.
[0130] Exemplarily, the distributed computing devices in the computing resource sharing group are mobile phone A, mobile phone B, tablet computer A, and tablet computer B. Among them, mobile phone A and tablet computer A belong to user account A, and mobile phone B and tablet computer B belong to user account B. When the scheduling device needs to obtain the device identification of mobile phone B, the scheduling device first obtains the user identification corresponding to user account B to which mobile phone B belongs. Further, the scheduling device queries the user management module and the device management module through the target micro-application to obtain the device list under user account B corresponding to the user identification, including mobile phone B and tablet computer B, and then obtains the device identification of mobile phone B through the target micro-application.
[0131] Step 603: The scheduling device establishes a connection with the distributed computing device based on the device identification.
[0132] The scheduling device obtains the device identification of the distributed computing device, determines the distributed computing device corresponding to the device identification and establishes a connection. The process of establishing a connection is described below.
[0133] 1. The scheduling device obtains the resource gateway address of the distributed computing device based on the device identifier.
[0134] In the embodiment of the present application, a resource gateway is deployed in the distributed computing device, and a resource gateway management module is deployed on the server side. When the scheduling device needs to call the computing resources of the distributed computing device, it is necessary to first query the gateway address of the resource gateway in the distributed computing device through the resource gateway management module, and call the computing resources of the distributed computing device through the resource gateway.
[0135] The resource gateway is an entry gateway for calling distributed computing devices to compute resources. The resource gateway management module is used to manage the mapping relationship between distributed computing devices and resource gateways.
[0136] 2. Based on the device identification, the scheduling device determines the device type of the distributed computing device.
[0137] In an embodiment of the present application, the control logic in the scheduling device target micro-application script determines the device type of the distributed computing device according to the computing capability of the distributed computing device.
[0138] In a possible implementation, the distributed computing devices are divided into devices with strong computing capabilities and devices with weak computing capabilities according to their computing capabilities. Optionally, the devices with strong computing capabilities may be car computers, tablet computers, mobile phones, desktop computers, etc. Optionally, the devices with weak computing capabilities may be smart TVs, smart watches, etc.
[0139] 3. When the device type belongs to the target device type, the scheduling device establishes a connection with the distributed computing device based on the resource gateway address.
[0140] The target device type is set in the control logic of the scheduling device target micro-application script. In one possible implementation, when the device type of the distributed computing device belongs to the target device type, the scheduling device queries the resource gateway address of the distributed computing device through the resource gateway management module on the server side, and establishes a connection with the distributed computing device through the resource gateway address.
[0141] Optionally, the target device type may be a device with strong computing capabilities, such as a car computer, a tablet computer, a mobile phone, a desktop computer, etc.
[0142] Exemplarily, the target device type set in the control logic in the scheduling device target micro-application script is a type of device with strong computing capabilities. The scheduling device determines, based on the device identification, that the distributed computing device is a vehicle computer, which belongs to the target device type, i.e., a type of device with strong computing capabilities. The scheduling device queries the resource gateway address of the vehicle computer through the resource gateway management module on the server side, and establishes a connection with the vehicle computer through the resource gateway address.
[0143] Step 604: When the connection is successfully established, the scheduling device adds the distributed computing device to the computing resource pool.
[0144] In a possible implementation, if the connection between the scheduling device and the distributed computing device is successfully established, the scheduling device adds the distributed computing device to the computing resource pool. If the connection between the scheduling device and the distributed computing device fails to be established, the scheduling device will not add the distributed computing device to the computing resource pool (because data interaction cannot be performed, resulting in the inability to allocate distributed computing tasks).
[0145] Among them, the devices in the computing resource pool include both scheduling devices and distributed computing devices, wherein the number of distributed computing devices can be one or more, which is not limited in the embodiments of the present application.
[0146] Step 605: When there are unfinished distributed computing tasks, the scheduling device determines a distributed computing device in an idle state in the computing resource pool as a target distributed computing device.
[0147] Optionally, during the distributed computing process, the scheduling device detects in real time whether there are any unfinished distributed computing tasks. If there are any unfinished distributed computing tasks, the scheduling device determines in real time the working status of the distributed computing devices in the computing resource pool. In one possible implementation, the scheduling device determines a distributed computing device in an idle state as a target distributed computing device.
[0148] In a possible implementation, the distributed computing device in an idle state means that the current working state of the distributed computing device is an idle state, that is, the current distributed computing device has no tasks to be processed.
[0149] In another possible implementation, a distributed computing device in an idle state means that the distributed computing device can process the task currently being processed and the distributed computing task at the same time. Taking the vehicle computer as an example, if the vehicle computer is currently performing a music playback task, it can process the image super-resolution task at the same time. At this time, the scheduling device determines that the vehicle computer is in an idle state and determines it as the target distributed computing device. If the vehicle computer is currently performing an autonomous driving task, it cannot process the image super-resolution task at the same time. At this time, the scheduling device determines that the vehicle computer is currently in a busy state.
[0150] In a possible implementation, the scheduling device determines the number of target distributed computing devices based on the task volume of unfinished distributed computing tasks.
[0151] Optionally, the scheduling device may determine all distributed computing devices in the resource computing pool that are in an idle state as target distributed computing devices, or may determine multiple distributed computing devices in the resource computing pool that are in an idle state as target distributed computing devices, or may select specific distributed computing devices in an idle state as target distributed computing devices.
[0152] Exemplarily, the distributed computing devices in the resource computing pool that are in an idle state include the vehicle computer, mobile phone, and tablet computer. When there are 30 unfinished super-resolution images, in order to improve computing efficiency, the scheduling device can determine all distributed computing devices in the resource computing pool, namely the vehicle computer, mobile phone, and tablet computer, as target distributed computing devices. When there are 5 unfinished super-resolution images, in order to save power consumption, the scheduling device can determine the mobile phone in the resource computing pool as the target distributed computing device.
[0153] Step 606: Based on the computing capability of the target distributed computing device, the scheduling device determines the target task volume to be allocated to the target distributed computing device, and the target task volume is positively correlated with the computing capability.
[0154] Different target distributed computing devices have different computing capabilities. After determining the target distributed computing device, the scheduling device determines the computing capability of the target distributed computing device and determines the target task volume to be allocated to the target distributed computing device based on the computing capability of the target distributed computing device. In other words, the stronger the computing capability of the target distributed computing device, the greater the target task volume allocated to the target distributed computing device by the scheduling device, and the weaker the computing capability of the target distributed computing device, the smaller the target task volume allocated to the target distributed computing device by the scheduling device.
[0155] Regarding the determination of the computing power of the target distributed computing device, the scheduling device can determine the computing power of the target distributed computing device based on the correspondence between the device type and computing power of the target distributed computing device, or it can determine the computing power of the target distributed computing device based on the completion speed of historical distributed computing tasks.
[0156] In an illustrative example, the distributed computing task is an image super-resolution task. There are 10 images to be super-resolution, and the target distributed computing devices are the idle vehicle computer and the mobile phone. Since the computing power of the vehicle computer is higher than that of the mobile phone, the scheduling device allocates a target task volume of 7 images to the vehicle computer and a target task volume of 3 images to the mobile phone.
[0157] Step 607: The scheduling device sends the target task amount of distributed computing tasks to the target distributed computing device through the connection between the scheduling device and the target distributed computing device.
[0158] After the scheduling device determines the target distributed computing device, it sends the target amount of distributed computing tasks to the target distributed computing device. After receiving the target amount of distributed computing tasks, the target distributed computing device calls its local computing resources to execute the target amount of distributed computing tasks to obtain the target distributed computing results.
[0159] Step 608: The scheduling device receives the distributed computing result sent by the target distributed computing device through the target micro-application.
[0160] Please refer to step 306 for the implementation of this step, which is not limited in this embodiment of the present application.
[0161] In an embodiment of the present application, the scheduling device allocates distributed computing tasks of a task volume that is appropriate to the working status and computing capacity of the target distributed computing device according to the working status and computing capacity of the target distributed computing device, thereby improving the processing speed of the distributed computing device.
[0162] The following uses image super-resolution as an example to introduce the system structure in the embodiment of the present application. Figure 7 , which shows a structural schematic diagram of a distributed computing system provided by an exemplary embodiment of the present application.
[0163] The system consists of four subsystems, namely the business subsystem, the device connection subsystem, the NFC subsystem and the operation subsystem.
[0164] The business subsystem is used to provide an interactive interface to the end users, which includes a task segmentation module, a task distribution module, a result processing module and a result display module.
[0165] The task segmentation module is used to segment the image super-resolution task into multiple image super-resolu-tion tasks.
[0166] The task distribution module is used to distribute the multiple image supramolecular tasks segmented by the task segmentation module to different operation units, so as to achieve the purpose of using multiple operation units as evenly as possible and avoid multiple operation units processing the same task at the same time.
[0167] The result processing module is used to combine the operation results of multiple operation units for processing.
[0168] The result display module is used to display the processing results after the result processing modules are merged.
[0169] The device connection subsystem is used to connect with other devices, including a device discovery module and a device connection module.
[0170] The device discovery module is used to use device identification to find other devices and effective connection methods.
[0171] The device connection module is used to establish connections between devices.
[0172] The NFC subsystem is used for data transmission between devices, including the NFC receiving module and the NFC sending module.
[0173] The NFC receiving module is used to receive data sent by other devices using the NFC function.
[0174] The NFC sending module is used to send data to other devices using the NFC function.
[0175] The computing subsystem is used for computing distributed computing tasks, including dynamic service loading modules, computing modules, and input and output modules.
[0176] The dynamic service loading module is used to dynamically load different operation modules according to the required operation type.
[0177] The operation module is used to perform different time-consuming operations, read the input data and output the results of the operation, such as the operation results of image super-resolution.
[0178] The input and output module is used to obtain the input required for calculation from the task, and output the result back to the business device after the calculation module obtains it.
[0179] The following introduces the distributed computing method of image super-resolution in combination with various modules in the system. Figure 8 , which shows a flowchart of a distributed computing method for image super-resolution provided by an exemplary embodiment of the present application.
[0180] Step 801: The scheduling device starts to obtain a list of pictures waiting for image super-resolution.
[0181] Step 802: The scheduling device starts image super-resolution.
[0182] Step 803: The scheduling device determines whether there is an unfinished image super-resolution task. If yes, the process proceeds to step 804; if no, the process ends.
[0183] Step 804, scheduling the device to execute the computing resource management sub-process.
[0184] Step 805 , the scheduling device determines whether there are unallocated computing resources, if yes, executes step 806 , if no, executes step 804 .
[0185] Step 806: The scheduling device assigns an image super-resolution task to an idle computing module.
[0186] Step 807: The scheduling device waits for the task operation result.
[0187] Step 808: The scheduling device displays the calculation result and then returns to step 803.
[0188] The computing resource management sub-process in step 804 is described below. Fig. 9 , which shows a flowchart of a computing resource management sub-process provided by an exemplary embodiment of the present application.
[0189] Step 901, the scheduling device determines whether there is NFC communication, if yes, executes step 902, if not, executes step 901.
[0190] Step 902: The scheduling device reads NFC content.
[0191] Step 903: The scheduling device obtains the device identification of the distributed computing device from NFC.
[0192] Step 904: The scheduling device discovers the distributed computing device through the device identifier.
[0193] Step 905 , the scheduling device determines whether a distributed computing device is found, if so, executes step 906 , if not, executes step 901 .
[0194] Step 906: The scheduling device connects to the distributed computing device.
[0195] Step 907 , the scheduling device determines whether the connection is successful, if yes, executes step 908 , if not, executes step 901 .
[0196] Step 908: The scheduling device adds the distributed computing device as a computing unit to the computing resource pool.
[0197] Please refer to Fig.10 , which shows a flowchart of a distributed computing method for image super-resolution provided by another exemplary embodiment of the present application.
[0198] Step 1001: The distributed computing device turns on NFC.
[0199] Step 1002 , the distributed computing device determines whether there is an NFC connection, if yes, executes step 1003 , if not, executes step 1002 .
[0200] Step 1003: The distributed computing device sends a device identification to the scheduling device.
[0201] Step 1004: The distributed computing device starts a connection module.
[0202] Step 1005 , the distributed computing device determines whether there is a device connected, if yes, execute 1006 , if not, execute 1005 .
[0203] Step 1006: the distributed computing device executes the operation sub-process.
[0204] The following is an introduction to the operation sub-process of step 1006. Fig.11 , which shows a flowchart of an operation sub-process provided by an exemplary embodiment of the present application.
[0205] Step 1101, the distributed computing device determines whether there is a computing task, if yes, executes step 1102, if no, executes step 1101.
[0206] Step 1102: The distributed computing device uses the input and output module to obtain input content in the computing task.
[0207] Step 1103, the distributed computing device determines whether there is a related computing unit, if so, executes step 1105, if not, executes step 1104.
[0208] Step 1104: the distributed computing device uses a dynamic loading module to load related computing units.
[0209] Step 1105: the distributed computing device performs calculations.
[0210] Step 1106: The distributed computing device returns the calculation result to the input-output module.
[0211] In the embodiment of the present application, a distributed computing method is used for image super-resolution, which improves the processing speed of image super-resolution tasks. Fig.12As shown, in the related art, it takes 4 seconds to use a single device, i.e., a scheduling device, to super-resolution two images. In the embodiment of the present application, the scheduling device calls the computing resources of the target distributed computing device through the target micro-application to super-resolution two images, which takes a total of 2 seconds, and the processing speed of the image super-resolution task is increased by 1 times.
[0212] The following is an embodiment of the device of the present application, which can be used to execute the embodiment of the method of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the embodiment of the method of the present application.
[0213] Please refer to Fig.13 , which shows a structural block diagram of a distributed computing device provided by an exemplary embodiment of the present application, the device comprising:
[0214] A setting module 1301 is used to set a distributed computing task through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function and is a collection of services;
[0215] The first calling module 1302 is used to call the computing resources of the target distributed computing device through the target micro-application, the target distributed computing device subscribes to the target micro-application, and the target distributed computing device is used to call the computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result;
[0216] The receiving module 1303 is used to receive the distributed computing result sent by the target distributed computing device through the target micro-application.
[0217] Optionally, the first calling module 1302 includes:
[0218] A determination unit, configured to determine, when there is an uncompleted distributed computing task, a distributed computing device in an idle state in a computing resource pool as the target distributed computing device;
[0219] A sending unit is used to send the distributed computing task to the target distributed computing device through the connection with the target distributed computing device.
[0220] Optionally, the device further comprises:
[0221] An acquisition module, used to acquire a device identification of a distributed computing device;
[0222] An establishing module, configured to establish a connection with the distributed computing device based on the device identification;
[0223] An adding module is used to add the distributed computing device to the computing resource pool when the connection is successfully established.
[0224] Optionally, the acquisition module is further used to:
[0225] Acquire the device identification of the distributed computing device by means of near field communication; or,
[0226] Obtaining a device identification of the distributed computing device by parsing the link; or,
[0227] Obtaining a device identification of the distributed computing device by parsing the graphic code; or,
[0228] The device identification of the distributed computing device in the computing resource sharing group is obtained, the distributed computing devices in the computing resource sharing group share computing resources, and the distributed computing devices in the computing resource sharing group belong to the same account or different accounts.
[0229] Optionally, the establishing module includes:
[0230] An acquisition unit, configured to acquire a resource gateway address of the distributed computing device based on the device identifier, wherein the resource gateway address is a gateway address of a resource gateway in the distributed computing device, and the resource gateway is used to manage the calling of resources in the device;
[0231] An establishing unit is used to establish a connection with the distributed computing device based on the resource gateway address.
[0232] Optionally, the establishing unit is further used to:
[0233] Determining a device type of the distributed computing device based on the device identification;
[0234] In a case where the device type belongs to the target device type, a connection is established with the distributed computing device based on the resource gateway address.
[0235] Optionally, the sending unit is further used to:
[0236] Based on the computing capacity of the target distributed computing device, determine a target task amount to be allocated to the target distributed computing device, wherein the target task amount is positively correlated with the computing capacity;
[0237] The distributed computing task of the target task amount is sent to the target distributed computing device through the connection with the target distributed computing device.
[0238] Optionally, the device further comprises:
[0239] The second calling module is used to call the local computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result.
[0240] Optionally, the device further comprises:
[0241] A determination module, configured to determine the target service in the target micro-application based on the target task type of the distributed computing task;
[0242] The loading and deployment module is used to dynamically load and deploy the target service from the cloud service library when the target service is not deployed locally.
[0243] Optionally, the setting module 1301 is further used for:
[0244] Displaying a task setting interface of the target micro-application, wherein the task setting interface includes a type selection control and a task selection control corresponding to at least one task type;
[0245] The distributed computing task is set based on the triggering operation of the type selection control and the task selection control.
[0246] In summary, in the embodiment of the present application, the scheduling device sets a distributed computing task through the target micro-application, and calls the computing resources of the target distributed computing device through the target micro-application. The target distributed computing device obtains the distributed computing task assigned by the scheduling device through the target micro-application, calls the computing resources through the target micro-application to perform the distributed computing task, and feeds back the distributed computing result to the scheduling device through the target micro-application, and the scheduling device receives the computing result through the target micro-application. Compared with the related art, the target micro-application requires less storage space than traditional applications. The scheduling device calls the computing resources of the target distributed computing device through the target micro-application to realize distributed computing. There is no need to upload the computing data to the server for processing, which improves the computing speed of the distributed computing task and ensures the security of the computing data.
[0247] Please refer to Fig.14 , which shows a structural block diagram of a distributed computing device provided by an exemplary embodiment of the present application, the device comprising:
[0248] An acquisition module 1401 is used to acquire a distributed computing task assigned by a scheduling device through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function and is a collection of services;
[0249] A calling module 1402 is used to call computing resources through the target service in the target micro-application to execute the distributed computing task and obtain a distributed computing result;
[0250] Feedback module 1403 is used to feed back the distributed computing result to the scheduling device through the target micro-application.
[0251] Optionally, the device further comprises:
[0252] A determination module, configured to determine the target service in the target micro-application based on the target task type of the distributed computing task;
[0253] The dynamic loading module is used to dynamically load and deploy the target service from the cloud service library when the target service is not deployed locally.
[0254] In summary, in the embodiment of the present application, the scheduling device sets a distributed computing task through the target micro-application, and calls the computing resources of the target distributed computing device through the target micro-application. The target distributed computing device obtains the distributed computing task assigned by the scheduling device through the target micro-application, calls the computing resources through the target micro-application to perform the distributed computing task, and feeds back the distributed computing result to the scheduling device through the target micro-application, and the scheduling device receives the computing result through the target micro-application. Compared with the related art, the target micro-application requires less storage space than traditional applications. The scheduling device calls the computing resources of the target distributed computing device through the target micro-application to realize distributed computing. There is no need to upload the computing data to the server for processing, which improves the computing speed of the distributed computing task and ensures the security of the computing data.
[0255] It should be noted that: the device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the device and method embodiments provided in the above embodiment belong to the same concept, and the specific implementation process is detailed in the method embodiment, which will not be repeated here.
[0256] Please refer to Fig.15 , which shows a structural block diagram of a computer device 1500 provided by an exemplary embodiment of the present application. The computer device 1500 in the present application may include one or more of the following components: a processor 1510 and a memory 1520, wherein the processor 1510 is electrically connected to the memory 1520.
[0257] The processor 1510 may include one or more processing cores. The processor 1510 uses various interfaces and lines to connect the various parts of the entire computer device 1500, and executes various functions and processes data of the computer device 1500 by running or executing instructions, programs, code sets or instruction sets stored in the memory 1520, and calling data stored in the memory 1520. Optionally, the processor 1510 can be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1510 can integrate one or a combination of CPU (Central Processing Unit), graphics processing unit (GPU) and modem. Among them, the CPU mainly processes the operating system, user interface and application program; the GPU is responsible for rendering and drawing the content to be displayed on the touch display; the modem is used to process wireless communication. It can be understood that the above-mentioned modem may not be integrated into the processor 1510, but implemented separately through a communication chip.
[0258] The memory 1520 may include a random access memory (RAM) or a read-only memory (ROM). Optionally, the memory 1520 includes a non-transitory computer-readable storage medium. The memory 1520 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 1520 may include a storage program area and a storage data area, wherein the storage program area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc. The operating system may be an Android system (including a system deeply developed based on the Android system), an IOS system developed by Apple (including a system deeply developed based on the IOS system) or other systems. The storage data area may also store data (such as a phone book, audio and video data, chat record data) created by the computer device 1500 during use.
[0259] In the embodiment of the present application, at least one instruction is stored in the memory 1520, and the at least one instruction is used by the processor 1510 to execute the distributed computing method shown in the above embodiment.
[0260] In the embodiment of the present application, the computer device 1500 may further include an NFC component, and the NFC component is used to receive and send NFC signals, so that the computer device 1500 can process the NFC signal through the processor 1510.
[0261] Optionally, the computer device 1500 further includes a camera for scanning the graphic code so that the processor can parse the graphic code to obtain the device identification.
[0262] Optionally, the computer device 1500 may also include a touch display screen, which may be a capacitive touch display screen, which is used to receive a touch operation on or near it by a user using any suitable object such as a finger, a touch pen, etc., and to display the user interface of each application. The touch display screen is usually arranged on the front panel of the computer device 1500. The touch display screen may be designed as a full screen, a curved screen, or a special-shaped screen. The touch display screen may also be designed as a combination of a full screen and a curved screen, or a combination of a special-shaped screen and a curved screen, which is not limited in the embodiments of the present application.
[0263] In addition, those skilled in the art can understand that the structure of the computer device 1500 shown in the above figures does not constitute a limitation on the computer device 1500, and the computer device 1500 may include more or fewer components than shown, or combine certain components, or arrange components differently. For example, the computer device 1500 also includes a radio frequency circuit, a shooting component, a sensor (excluding a temperature sensor), an audio circuit, a wireless fidelity (WiFi) component, a power supply, a Bluetooth component, and other components, which will not be described in detail here.
[0264] An embodiment of the present application further provides a computer-readable storage medium, which stores at least one program code, and the program code is loaded and executed by a processor to implement the distributed computing method described in the above embodiments.
[0265] According to one aspect of the present application, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the distributed computing method provided in various optional implementations of the above aspects.
[0266] It should be understood that the "multiple" mentioned in this article refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. In addition, the step numbers described in this article only illustrate a possible execution sequence between the steps. In some other embodiments, the above steps may not be executed in the order of the numbers, such as two steps with different numbers are executed at the same time, or two steps with different numbers are executed in the opposite order to the diagram. The embodiments of the present application are not limited to this.
[0267] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A distributed computing method, characterized in that: The method comprises: Setting a distributed computing task through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services; Calling computing resources of a target distributed computing device through the target micro-application, the target distributed computing device subscribes to the target micro-application, and the target distributed computing device is used to call computing resources through the target service in the target micro-application to execute the distributed computing task and obtain a distributed computing result; Receiving the distributed computing result sent by the target distributed computing device through the target micro-application; Determine the target service in the target micro-application based on the target task type of the distributed computing task; If the target service is not deployed locally, dynamically load and deploy the target service from a cloud service library; The target service in the target micro-application calls local computing resources to execute the distributed computing task and obtain the distributed computing result.
2. The method according to claim 1, characterized in that The calling of computing resources of a target distributed computing device through the target micro-application includes: In the case where there is an unfinished distributed computing task, determining a distributed computing device in an idle state in a computing resource pool as the target distributed computing device; The distributed computing task is sent to the target distributed computing device through the connection with the target distributed computing device.
3. The method according to claim 2, characterized in that The method further comprises: Obtaining a device identification of a distributed computing device; Establishing a connection with the distributed computing device based on the device identification; When the connection is successfully established, the distributed computing device is added to the computing resource pool.
4. The method according to claim 3, characterized in that The obtaining of the device identification of the distributed computing device includes: Acquire the device identification of the distributed computing device by means of near field communication; or, Obtaining a device identification of the distributed computing device by parsing the link; or, Obtaining a device identification of the distributed computing device by parsing the graphic code; or, The device identification of the distributed computing device in the computing resource sharing group is obtained, the distributed computing devices in the computing resource sharing group share computing resources, and the distributed computing devices in the computing resource sharing group belong to the same account or different accounts.
5. The method according to claim 3, characterized in that: The establishing a connection with the distributed computing device based on the device identification includes: Acquire a resource gateway address of the distributed computing device based on the device identifier, wherein the resource gateway address is a gateway address of a resource gateway in the distributed computing device, and the resource gateway is used to manage the calling of resources in the device; A connection is established with the distributed computing device based on the resource gateway address.
6. The method according to claim 5, characterized in that The establishing a connection with the distributed computing device based on the resource gateway address includes: Determining a device type of the distributed computing device based on the device identification; In a case where the device type belongs to the target device type, a connection is established with the distributed computing device based on the resource gateway address.
7. The method according to claim 2, characterized in that The sending the distributed computing task to the target distributed computing device through the connection with the target distributed computing device includes: Based on the computing capacity of the target distributed computing device, determine a target task amount to be allocated to the target distributed computing device, wherein the target task amount is positively correlated with the computing capacity; The distributed computing task of the target task amount is sent to the target distributed computing device through the connection with the target distributed computing device.
8. The method according to any one of claims 1 to 7, characterized in that: The step of setting a distributed computing task through a target micro-application includes: Displaying a task setting interface of the target micro-application, wherein the task setting interface includes a type selection control and a task selection control corresponding to at least one task type; The distributed computing task is set based on the triggering operation of the type selection control and the task selection control.
9. A distributed computing method, characterized in that: The method comprises: Obtaining a distributed computing task assigned by a scheduling device through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services; Determine a target service in the target micro-application based on a target task type of the distributed computing task; If the target service is not deployed locally, dynamically load and deploy the target service from a cloud service library; Calling computing resources through the target service in the target micro-application to execute the distributed computing task, and obtaining a distributed computing result; The distributed computing result is fed back to the scheduling device through the target micro-application.
10. A distributed computing device, characterized in that: The device comprises: A setting module, used to set a distributed computing task through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services; A first calling module is used to call the computing resources of the target distributed computing device through the target micro-application, the target distributed computing device subscribes to the target micro-application, and the target distributed computing device is used to call the computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result; A receiving module, configured to receive the distributed computing result sent by the target distributed computing device through the target micro-application; A determination module, configured to determine the target service in the target micro-application based on the target task type of the distributed computing task; A loading and deployment module, used to dynamically load and deploy the target service from a cloud service library when the target service is not deployed locally; The second calling module is used to call the local computing resources through the target service in the target micro-application to execute the distributed computing task and obtain the distributed computing result.
11. A distributed computing device, characterized in that: The device comprises: An acquisition module, used to acquire the distributed computing task assigned by the scheduling device through a target micro-application, wherein the target micro-application is a micro-application that provides a distributed computing function, and the target micro-application is a collection of services; A determination module, configured to determine a target service in the target micro-application based on a target task type of the distributed computing task; A dynamic loading module, used to dynamically load and deploy the target service from a cloud service library when the target service is not deployed locally; A calling module, used to call computing resources through the target service in the target micro-application to execute the distributed computing task and obtain a distributed computing result; A feedback module is used to feed back the distributed computing result to the scheduling device through the target micro-application.
12. A computer device, characterized in that: The computer device includes a processor and a memory; the memory stores at least one instruction, and the at least one instruction is used to be executed by the processor to implement the distributed computing method as claimed in any one of claims 1 to 8, or to implement the distributed computing method as claimed in claim 9.
13. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores at least one program code, and the program code is loaded and executed by a processor to implement the distributed computing method according to any one of claims 1 to 8, or to implement the distributed computing method according to claim 9.
14. A computer program product, characterized in that The computer program product includes computer instructions, which are stored in a computer-readable storage medium; a processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device performs the distributed computing method as described in any one of claims 1 to 8, or implements the distributed computing method as described in claim 9.
Citation Information
Patent Citations
Micro-service + micro-application system and data processing method and device
CN110908658A
QoS-OPTIMIZED SELECTION OF A CLOUD MICROSERVICES PROVIDER
US20210211363A1