Communication method and device for grid-connected calculation and electronic equipment

Through aspect-oriented programming, the grid-connected computing aspect management code is injected into the computing power application, and the installation file is dynamically loaded to control the aspect computing power application, which solves the existing problems of low flexibility and efficiency of grid-connected computing processing and achieves efficient Grid-connected computing management.

CN118796249APending Publication Date: 2024-10-18CHINA MOBILE COMM GRP TERMINAL +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202410413124.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-04-08
Publication Date
2024-10-18

AI Technical Summary

Technical Problem

Existing grid-connected computing processing has poor flexibility and low efficiency. The operating system needs to be modified to implement silent installation and uninstallation of computing power APPs, resulting in low user participation and low processing efficiency.

Method used

Through aspect-oriented programming, the grid-connected computing aspect management code is injected into the code compilation process of the computing power application to obtain the aspect computing power application, and the installation file is dynamically loaded in the host application to control the execution of the aspect computing power application and network computing processing to achieve flexible management of computing power applications.

Benefits of technology

It improves the flexibility and efficiency of grid-connected computing processing, simplifies the development process of computing power applications, avoids modifications to the operating system, and enhances the maintainability and reusability of the code.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118796249A_ABST
    Figure CN118796249A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a communication processing method and device for grid-connected calculation and electronic equipment, and the method comprises the steps: firstly, based on a aspect-oriented programming mode, injecting a grid-connected calculation aspect management code in a code compiling process of a computing power application program, and carrying out the aspect processing of the computing power application program; in the running process of the host application program, a target grid-connected calculation request issued by the computing power task platform is obtained based on the host application program, a corresponding target computing power application program installation file is obtained according to the target grid-connected calculation request, and the installation file is dynamically loaded through the host application program; and controlling the target section computing power application program to execute grid-connected computing processing corresponding to the target grid-connected computing request. According to the method, a aspect-oriented programming mode is utilized, grid-connected computing management and computing service logic of the computing power application program are separated, maintainability and reusability of codes are improved, and therefore flexibility and computing efficiency of grid-connected computing are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of network-connected computing technology, and in particular to a communication processing method, device and electronic equipment for network-connected computing. Background Art

[0002] Grid computing refers to a computing model that connects multiple computers or servers together, communicates with each other through the network, and collaborates to perform computing tasks. This computing model can realize functions such as resource sharing, load balancing, and high availability, which is conducive to improving computing efficiency and performance. Taking the Android platform as an example, the Android platform mainly uses the MDM (Mobile Device Management) solution to achieve grid computing. Specifically, the MDM solution remotely manages the applications on the device, thereby realizing the function of distributing computing power APP (Application) to Android terminal devices.

[0003] However, the Android devices currently used to perform grid-connected computing based on computing power apps are typically set-top boxes, and users don't actively participate in the app installation process. Therefore, current grid-connected computing requires modifying the Android device's operating system to provide an MDM silent installation and uninstallation management interface to enable silent installation and uninstallation of the computing power app. This results in limited flexibility and inefficiency in grid-connected computing processing. Summary of the Invention

[0004] The purpose of the embodiments of the present invention is to provide a communication processing method, device and electronic device for grid-connected computing, so as to solve the problems of poor flexibility and low efficiency of grid-connected computing processing in the prior art.

[0005] To solve the above technical problems, the embodiments of the present invention are implemented as follows:

[0006] In a first aspect, an embodiment of the present invention provides a communication processing method for grid-connected computing, the method comprising:

[0007] Based on aspect-oriented programming, the grid-connected computing aspect management code is injected into the computing power application code compilation process, and the computing power application is aspect-processed to obtain the aspect computing power application;

[0008] During the operation of the host application, the host application obtains a target grid-connected computing request issued by the computing power task platform based on the host application, the host application is used to perform grid-connected computing management on the aspect computing power application, and the aspect computing power application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request;

[0009] According to the target grid-connected computing request, the installation file of the corresponding target section computing power application is obtained, and the installation file is dynamically loaded through the host application to control the target section computing power application to perform the grid-connected computing processing corresponding to the target grid-connected computing request.

[0010] Optionally, obtaining an installation file of a corresponding target section computing power application according to the target grid-connected computing request, and dynamically loading the installation file through the host application to control the target section computing power application to perform grid-connected computing processing corresponding to the target grid-connected computing request, includes:

[0011] Obtaining a corresponding computing power application installation file according to the target grid-connected computing request, and loading the computing power application installation file into the memory space corresponding to the host application;

[0012] Based on the computing power application installation file, the target aspect computing power application is controlled to execute the grid-connected computing processing corresponding to the target grid-connected computing request through the aspect-based middle layer of the host application in a manner that controls the life cycle of the target aspect computing power application.

[0013] Optionally, the aspect-oriented programming approach injects grid-connected computing aspect management code into the code compilation process of the computing power application, thereby aspect-processing the computing power application to obtain an aspect computing power application, including:

[0014] Based on aspect-oriented programming, in the computing power application, the entry point for aspect processing is determined according to the method of the key class that controls the life cycle of the computing power application;

[0015] Based on the entry point and the timing point corresponding to the entry point, preset program data for controlling the life cycle of the computing power application is inserted to obtain a section computing power application.

[0016] Optionally, the method further includes:

[0017] Creating a dynamic service interface between the host application and the facet computing application;

[0018] The host application is called to dynamically start and stop the slice computing power application based on the dynamic service interface.

[0019] Optionally, the target grid-connected computing service corresponding to the target grid-connected computing request includes any one of a cloud computing-based grid-connected computing service, an edge computing-based grid-connected computing service, and an Internet of Things-based grid-connected computing service.

[0020] Optionally, the host application matches at least one aspect computing power application, and the host application and at least one aspect computing power application are set on any computing power terminal device used for grid-connected computing.

[0021] In a second aspect, an embodiment of the present invention provides a communication processing device for grid-connected computing, the device comprising:

[0022] A facet processing module is used to facet process the computing power application by injecting the grid-connected computing facet management code into the computing power application code compilation process based on the facet-oriented programming method to obtain the facet computing power application;

[0023] A target grid-connected computing request acquisition module is used to acquire a target grid-connected computing request issued by the computing power task platform based on the host application during its operation. The host application is used to perform grid-connected computing management on the aspect computing power application, and the aspect computing power application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request.

[0024] A dynamic loading module is used to obtain the installation file of the corresponding target section computing power application according to the target grid-connected computing request, and dynamically load the installation file through the host application to control the target section computing power application to perform the grid-connected computing processing corresponding to the target grid-connected computing request.

[0025] Optionally, the dynamic loading module includes:

[0026] A computing power application installation file loading unit, configured to obtain a corresponding computing power application installation file according to the target grid-connected computing request, and load the computing power application installation file into a memory space corresponding to the host application;

[0027] The grid-connected computing management unit is used to control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request based on the computing power application installation file and through the aspect-based middle layer of the host application to control the life cycle of the target aspect computing power application.

[0028] Optionally, the section processing module includes:

[0029] An entry point determination unit is configured to determine, based on aspect-oriented programming, an entry point for aspect-based processing in the computing power application according to methods of key classes that control the life cycle of the computing power application;

[0030] The aspect determination unit is used to insert preset program data that controls the life cycle of the computing power application based on the entry point and the timing point corresponding to the entry point to obtain the aspect computing power application.

[0031] Optionally, the device further comprises:

[0032] A dynamic service interface creation module, used to create a dynamic service interface between the host application and the facet computing power application;

[0033] A dynamic start-stop control module is used to call the host application to dynamically start and stop the facet computing power application based on the dynamic service interface.

[0034] Optionally, the target grid-connected computing service corresponding to the target grid-connected computing request in the target grid-connected computing request acquisition module includes: any one of a cloud computing-based grid-connected computing service, an edge computing-based grid-connected computing service, and an Internet of Things-based grid-connected computing service.

[0035] Optionally, a host application in the target grid-connected computing request acquisition module matches at least one aspect computing power application, and the host application and at least one aspect computing power application are set on any computing power terminal device used for grid-connected computing.

[0036] In a third aspect, an embodiment of the present invention provides an electronic device comprising a processor, a memory, and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the communication processing method for grid-connected computing provided in the above embodiment are implemented.

[0037] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the communication processing method for grid-connected computing provided in the above embodiment are implemented.

[0038] In a fifth aspect, an embodiment of the present invention provides a computer program product, which includes a computer program. When the computer program is executed by a processor, it implements the steps of the communication processing method for grid-connected computing provided in the above embodiment.

[0039] It can be seen from the technical solution provided by the above embodiments of the present invention that the embodiments of the present invention are first based on the aspect-oriented programming method, by injecting the grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application, and then during the operation of the host application, the target grid-connected computing request issued by the computing power task platform is obtained based on the host application, and finally the corresponding target computing power application installation file is obtained according to the target grid-connected computing request, and the installation file is dynamically loaded through the host application to control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request. In this way, the aspect-oriented programming method is used to separate the grid-connected computing management and computing business logic of the computing power application, which is conducive to improving the maintainability and reusability of the code, and can effectively improve the flexibility of the grid-connected computing processing. Moreover, when performing management such as installation and uninstallation of the computing power application, the grid-connected computing management can be achieved without modifying the operating system, which can also effectively improve the flexibility of the grid-connected computing processing and the computing efficiency of the grid-connected computing processing. The host application and the aspect computing power application on the computing power terminal device constitute the control end and the controlled end of the grid-connected computing. For the aspect computing power application on the controlled end, by injecting the grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application, which can effectively simplify the development process of the computing power application and is also conducive to improving the computational efficiency of the grid-connected computing. In addition, the present invention dynamically loads the installation file of the target aspect computing power application through the host application, making the management of the aspect computing power application more flexible, which is conducive to improving the flexibility of grid-connected computing processing. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0041] Figure 1 A flow chart of a communication processing method for grid-connected computing according to the present invention;

[0042] Figure 2 A schematic diagram of the principle of aspect-oriented processing of computing power applications based on AOP (Aspect-Oriented Programming) in the present invention;

[0043] Figure 3 Schematic diagram of the source code compilation process in aspect-based processing in the present invention;

[0044] Figure 4 A flow chart of another communication processing method for grid-connected computing according to the present invention;

[0045] Figure 5 This is a schematic diagram of the principle of the host APP dynamically starting and stopping the computing power APP based on the dynamic service interface in the present invention;

[0046] Figure 6 A schematic diagram of the principles of the communication processing method for grid-connected computing in the present invention;

[0047] Figure 7 A schematic structural diagram of a communication processing device for grid-connected computing according to the present invention;

[0048] Figure 8 The figure is a schematic structural diagram of an electronic device of the present invention. DETAILED DESCRIPTION

[0049] Embodiments of the present invention provide a communication processing method, device, and electronic equipment for grid-connected computing.

[0050] In order to enable those skilled in the art to better understand the technical solutions of the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings of the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative efforts should fall within the scope of protection of the present invention.

[0051] like Figure 1 As shown, an embodiment of the present invention provides a communication processing method for grid-connected computing, and the execution subject of the method can be a terminal device. The terminal device can be a certain terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or desktop computer, or an IoT device (specifically, a smart watch, an in-vehicle device, etc.). The method can specifically include the following steps:

[0052] In S102, based on the aspect-oriented programming method, the grid-connected computing aspect management code is injected into the code compilation process of the computing power application, and the computing power application is aspect-processed to obtain the aspect computing power application.

[0053] Grid computing refers to a computing mode in which multiple computers or servers are connected together to communicate with each other and collaborate to perform computing tasks through a network. Through grid computing, functions such as resource sharing, load balancing and high availability can be achieved, which is conducive to improving computing efficiency and performance. The grid computing of the present invention is achieved by the host application set on the computing power terminal device to manage one or more computing power applications after the computing power terminal device obtains the computing power task issued. One computing power task corresponds to one computing power terminal device, and multiple computing power tasks are executed on multiple computing power terminal devices respectively to achieve grid computing processing of multiple computing power tasks.

[0054] Among them, the host application on the computing power terminal device serves as the control end of the grid-connected computing, and one or more aspect computing power applications serve as the controlled end of the grid-connected computing. The aspect computing power application as the controlled end can be compiled in advance by the application developer, and different computing tasks match different computing power applications. In the embodiment of this specification, each computing power application matches one computing task. During the code compilation process of the computing power application, the grid-connected computing aspect management code is injected based on AOP, and the computing power application is aspect-processed to obtain the aspect computing power application (that is, the computing power application after aspect processing).

[0055] Taking the Android code developed in Java as an example, for a certain computing task, the business logic of the computing task can be implemented in the computing power application through the standard Android API (Application Program Interface). After the Android code corresponding to the pages, logic and algorithms related to the computing power application is developed, it needs to be compiled into an executable binary program. At this time, according to the method in the present invention, when compiling the binary program, the grid-connected computing aspect management code can be injected through the compilation tool (for example: 30 lines of other business logic code are added through the aspect plug-in), and then compiled out through the aspect plug-in, so that the computing power application is aspected at the binary code level to obtain the aspect computing power application.

[0056] In practice, the aspect-based processing of computing power applications based on AOP can be achieved by presetting entry points and aspects. Entry points and aspects can also be determined based on the methods of key classes that control the life cycle of computing power applications, but this embodiment of the specification does not limit this.

[0057] In S104, during the operation of the host application, the host application obtains the target grid-connected computing request issued by the computing power task platform based on the host application, and the host application is used to manage the grid-connected computing of the aspect computing power application, and the aspect computing power application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request.

[0058] Target grid-connected computing requests are typically dispatched by the computing task platform to different computing terminal devices. Each computing terminal device is matched with a host application. The host application is the main program running on a computing terminal device used for grid-connected computing. The host application receives the target grid-connected computing request during its execution. The host app and the aspect computing app are then isolated and processed through AOP, then merged into a single application. Ultimately, all aspect computing apps are executed within the host app process of the same computing terminal device.

[0059] The host application is used to manage the grid-connected computing of the aspect computing application, and the aspect computing application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request. In this way, taking the Android computing network platform as an example, on this Android computing network platform, multiple computing terminal devices can obtain computing tasks from the computing task platform through the host application, and each computing task is carried by a aspect computing application.

[0060] In S106, the installation file of the corresponding target aspect computing power application is obtained according to the target grid-connected computing request, and the installation file is dynamically loaded through the host application to control the target aspect computing power application to perform the grid-connected computing processing corresponding to the target grid-connected computing request.

[0061] The host application on the computing power terminal device serves as the controlling end of the grid-connected computing, and one or more aspect computing power applications serve as the controlled ends of the grid-connected computing. In step S102, the computing power application serving as the controlled end is aspect-processed to obtain the aspect computing power application. In step S106, the host application serving as the controlling end can automatically identify the aspect computing power application. After the host application obtains the target grid-connected computing request, it calls the host application to dynamically load the installation file of the corresponding target aspect computing power application, thereby controlling the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request, thereby enabling the host application to manage and control the computing power application.

[0062] The host APP is the main part of the entire application, responsible for managing and loading the computing power APK (Android Application Package) and providing basic services and interface framework. The function of the host APP in the embodiment of this specification is similar to that of the MDM APP. In addition, the host APP can also download the computing power APK according to the computing power task and dynamically load the APK to execute the grid-connected computing processing corresponding to the target grid-connected computing request.

[0063] In the embodiment of this specification, the host application dynamically loads the computing power application, that is, the host application loads the installation file of the corresponding target section computing power application while executing the main program, which is conducive to improving the efficiency of grid-connected computing.

[0064] An embodiment of the present invention provides a communication processing method for grid-connected computing. First, based on the aspect-oriented programming method, the grid-connected computing aspect management code is injected into the code compilation process of the computing power application to subject the computing power application to aspect-based processing to obtain the aspect computing power application. Then, during the operation of the host application, the target grid-connected computing request issued by the computing power task platform is obtained based on the host application. Finally, the corresponding target computing power application installation file is obtained according to the target grid-connected computing request. The installation file is dynamically loaded through the host application to control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request. In this way, the grid-connected computing management and computing business logic of the computing power application are separated by the aspect-oriented programming method, which is conducive to improving the maintainability and reusability of the code, and can effectively improve the flexibility of the grid-connected computing processing. Moreover, when performing management such as installation and uninstallation of the computing power application, the grid-connected computing management can be achieved without modifying the operating system, which can also effectively improve the flexibility of the grid-connected computing processing and the computing efficiency of the grid-connected computing processing. The host application and the aspect computing power application on the computing power terminal device constitute the control end and the controlled end of the grid-connected computing. For the aspect computing power application on the controlled end, by injecting the grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application, which can effectively simplify the development process of the computing power application and is also conducive to improving the computational efficiency of the grid-connected computing. In addition, the present invention dynamically loads the installation file of the target aspect computing power application through the host application, making the management of the aspect computing power application more flexible, which is conducive to improving the flexibility of grid-connected computing processing.

[0065] In the embodiments of this specification, the processing of the above step S102 can be varied. An optional processing method is provided below. For details, please refer to the processing of the following steps S1022-S1024.

[0066] In step S1022, based on the aspect-oriented programming approach, in the computing power application, the entry point for aspect processing is determined according to the method of the key class that controls the life cycle of the computing power application.

[0067] Aspect-oriented programming is a way to achieve unified maintenance of program functions through pre-compilation and runtime dynamic proxy. It extracts aspects from the business processing process. Aspect-oriented programming mainly focuses on a certain step or stage in the processing process to achieve a low-coupling isolation effect between the various parts of the logical process.

[0068] During implementation, the entry point can be determined based on the methods of the key classes that control the life cycle of the computing power application. Taking the Android system as an example, the entry point can be determined based on the methods of the key classes that control the life cycle of the four major Android components (Activity, Service, BroadCastRecevicer and Contentprovider). For example, the key methods such as OnCreate (create) / OnResume (restore) of the component Activity are defined as entry points.

[0069] In step S1024, based on the entry point and the timing point corresponding to the entry point, the preset program data for controlling the life cycle of the computing power application is inserted to obtain the aspect computing power application.

[0070] Taking the Android system as an example, after determining the entry point, preset business logic is inserted based on the entry point and the timing points before and after the entry point (for example, before, after, and around), thereby controlling the lifecycle of the four major Android components in the computing power application. In this case, the code corresponding to the entry point, the timing points before and after the entry point, and the inserted preset business logic constitutes the aspect.

[0071] The schematic diagram of the principle of faceting the computing power application based on AOP in the embodiments of this specification can be found in Figure 2 shown. Figure 2 Here, A is the original program (such as the original computing power application code), A' is the program for determining the entry point, and A" is the program corresponding to the preset business logic inserted based on the entry point. A' and A" together constitute the computing power application code after aspect processing.

[0072] The schematic diagram of the source code compilation process in the aspect-based processing in the embodiments of this specification can be found in Figure 3 As shown by Figure 3 It can be seen that, taking AOP in the Android system as an example, the aspect-based processing of the computing power application in the embodiment of this specification can be automatically inserted into the binary bytecode of the algorithm APK when the code is compiled into APK by the Android AspectJ plug-in in the IDE (Integrated Development Environment) compilation tool.

[0073] In the embodiment of this specification, the processing of the above step S106 can be varied. An optional processing method is provided below. For details, please refer to the processing of the following steps S1062-S1064.

[0074] In step S1062, the corresponding computing power application installation file is obtained according to the target grid-connected computing request, and the computing power application installation file is loaded into the memory space corresponding to the host application.

[0075] The computing power application installation file is the APK file. After the computing power terminal device obtains the target grid-connected computing request through the host application, it obtains the corresponding computing power APK file through the host application and loads the obtained computing power APK file into the memory space corresponding to the host application. The host application does not need to install the APK file to load and control the computing power application.

[0076] In implementation, after obtaining the APK file, you can directly load it and control the operation of the computing power application, or you can load it and then control when the computing power application runs and when it stops according to preset rules. This specification does not limit this.

[0077] In step S1064, based on the computing power application installation file, the host application's aspect-based middle layer is used to control the target aspect computing power application's life cycle, thereby controlling the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request.

[0078] By performing aspect-based processing on the computing power application during the compilation process, the host application, as the control end of the computing power application, can identify the aspect computing power application through the aspect-based middle layer. Through AOP, the aspect computing power application can be enabled within the host application. The aspect computing power application runs in the process of the host application, that is, the two applications use the same process.

[0079] like Figure 4 As shown, in the embodiment of this specification, the above-mentioned communication processing method for grid-connected computing may further include the following steps S108-S110.

[0080] In step S108, a dynamic service interface is created between the host application and the facet computing power application.

[0081] In the Android system, the dynamic service interface can use the service startup broadcast interface, that is, the service interface.

[0082] In step S110, the host application is called to dynamically start and stop the aspect computing power application based on the dynamic service interface.

[0083] Continuing with the Android system as an example, by creating a service launch broadcast interface, we can dynamically control the start and stop of the facet computing application based on the load of the Android computing terminal device, further improving the flexibility of grid-connected computing. The dynamic service interface can also be used to silently install and uninstall the facet computing application without active user interaction, which not only improves the user experience but also helps improve the computing efficiency of grid-connected computing.

[0084] The schematic diagram of the principle of the host APP dynamically starting and stopping the computing power APP based on the dynamic service interface in the embodiment of this specification can be seen in Figure 5 As shown. Figure 5 It can be seen that the host application serves as the control end of the grid-connected computing in a specific computing power terminal device, and the aspect computing power application serves as the controlled end of the grid-connected computing. In addition to controlling and managing the computing power application through AOP, the host application can also control the start and stop of the aspect computing power application through the dynamic service interface.

[0085] The principle of the communication processing method for grid-connected computing in the embodiments of this specification can be found in Figure 6 As shown. Figure 6 It can be seen that, taking the Android platform as an example, the communication processing method for grid-connected computing in the embodiments of this specification mainly includes the following steps A1-A3:

[0086] In step A1, the computing task management platform sends the computing task to the host app;

[0087] In step A2, the host app is called to download the corresponding computing power APK according to the computing task, decompress it, and dynamically load the executable program;

[0088] In step A3, the host APP is called to control the life cycle of the aspect computing APP through the aspect middle layer.

[0089] In the embodiments of this specification, the target on-grid computing service corresponding to the target on-grid computing request in step S104 can be diverse, including any one of cloud computing-based on-grid computing services, edge computing-based on-grid computing services, and Internet of Things-based on-grid computing services. That is, the communication processing method for on-grid computing in the embodiments of this specification can be used in various scenarios requiring on-grid computing (for example, on an Android computing network platform), thereby providing users with efficient computing services.

[0090] In the embodiments of this specification, a host application matches at least one aspect computing application, and the host application and at least one aspect computing application are set on any computing power terminal device used for grid-connected computing. If a computing power terminal device for grid-connected computing has one aspect computing application, the host application can manage the installation, uninstallation, start-up, and other processing of the aspect computing application. If a computing power terminal device for grid-connected computing has multiple aspect computing applications, the host application can manage the installation and uninstallation of each aspect computing application, and can also flexibly control the start-up and stop of each aspect computing application as needed, or control the start-up and stop of multiple aspect computing applications simultaneously.

[0091] In the embodiments of this specification, the tasks of the host application to manage the grid-connected computing of the computing power application include: one or more of the following: application distribution tasks, application installation tasks, application uninstallation tasks, and application update tasks.

[0092] In implementation, if the host application's task of managing grid-connected computing for the computing power application is an offload task of the application, the following steps B1-B2 may be used:

[0093] In step B1, during the operation of the host application, an offload request (i.e., a target grid-connected computing request) issued by the computing power task platform is obtained based on the host application;

[0094] In step B2, according to the uninstall request issued by the computing power task platform, the installation file of the target aspect computing power application corresponding to the uninstall request is searched from the memory space corresponding to the host application, the life cycle of the target aspect computing power application is set to invalid through the host application, and the installation file is deleted from the memory space to control the target aspect computing power application to exit (or cancel) the grid-connected computing processing.

[0095] If the host application's task of managing grid-connected computing for the computing power application is an offload task of the application, the following steps C1-C2 can be used:

[0096] In step C1, during the operation of the host application, an update request of the target aspect computing application issued by the computing task platform is obtained based on the host application, wherein the update request includes a target installation file for updating the installation file;

[0097] In step C2, according to the update request issued by the computing power task platform, the target installation file of the corresponding target aspect computing power application (that is, the new installation file used to replace the original installation file) is obtained, and the target installation file is dynamically loaded through the host application to replace the installation file, so as to control the target aspect computing power application to perform grid-connected computing processing based on the target installation file.

[0098] The above is a communication processing method for grid-connected computing provided by an embodiment of the present invention. Based on the same idea, an embodiment of the present invention also provides a communication processing device for grid-connected computing, such as Figure 7 shown.

[0099] The communication processing device for grid-connected computing includes: a slice processing module 210, a target grid-connected computing request acquisition module 220, and a dynamic loading module 230, wherein:

[0100] Aspect-oriented processing module 210 is used to aspect-process the computing power application by injecting grid-connected computing aspect management code into the code compilation process of the computing power application based on aspect-oriented programming to obtain an aspect computing power application;

[0101] The target grid-connected computing request acquisition module 220 is used to acquire the target grid-connected computing request issued by the computing task platform based on the host application during the operation of the host application. The host application is used to manage the grid-connected computing of the aspect computing application, and the aspect computing application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request;

[0102] The dynamic loading module 230 is used to obtain the installation file of the corresponding target section computing power application according to the target grid-connected computing request, and dynamically load the installation file through the host application to control the target section computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request.

[0103] In an embodiment of the present invention, the dynamic loading module 230 includes:

[0104] A computing power application installation file loading unit is used to obtain the corresponding computing power application installation file according to the target grid-connected computing request, and load the computing power application installation file into the memory space corresponding to the host application;

[0105] The grid-connected computing management unit is used to control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request based on the computing power application installation file and through the aspect-based middle layer of the host application to control the life cycle of the target aspect computing power application.

[0106] In this embodiment of the present invention, the sectioning processing module 210 includes:

[0107] An entry point determination unit is used to determine, based on aspect-oriented programming, entry points for aspect-based processing in computing power applications according to methods of key classes that control the life cycle of computing power applications;

[0108] The aspect determination unit is used to insert preset program data that controls the life cycle of the computing power application based on the entry point and the timing point corresponding to the entry point to obtain the aspect computing power application.

[0109] In an embodiment of the present invention, the communication processing device for grid-connected computing further includes:

[0110] Dynamic service interface creation module, used to create dynamic service interfaces between the host application and the facet computing application;

[0111] The dynamic start and stop control module is used to call the host application to dynamically start and stop the aspect computing power application based on the dynamic service interface.

[0112] In an embodiment of the present invention, the target grid-connected computing service corresponding to the target grid-connected computing request in the target grid-connected computing request acquisition module 220 includes: any one of a cloud computing-based grid-connected computing service, an edge computing-based grid-connected computing service, and an Internet of Things-based grid-connected computing service.

[0113] In an embodiment of the present invention, a host application in the target grid-connected computing request acquisition module 220 matches at least one aspect computing power application, and the host application and at least one aspect computing power application are set on any computing power terminal device used for grid-connected computing.

[0114] The embodiment of the present invention provides a communication processing device for grid-connected computing. First, an aspect processing module is used based on aspect-oriented programming. By injecting grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application. Then, during the operation of the host application, the target grid-connected computing request acquisition module is used to obtain the target grid-connected computing request issued by the computing power task platform based on the host application. Finally, the dynamic loading module is used to obtain the corresponding target computing power application installation file according to the target grid-connected computing request. The installation file is dynamically loaded by the host application to control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request. In this way, the grid-connected computing management and computing business logic of the computing power application are separated by aspect-oriented programming, which is conducive to improving the maintainability and reusability of the code, and can effectively improve the flexibility of grid-connected computing processing. Moreover, when performing management such as installation and uninstallation of the computing power application, grid-connected computing management can be achieved without modifying the operating system, which can also effectively improve the flexibility of grid-connected computing processing and the computing efficiency of grid-connected computing processing. The host application and the aspect computing power application on the computing power terminal device constitute the control end and the controlled end of the grid-connected computing. For the aspect computing power application on the controlled end, by injecting the grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application, which can effectively simplify the development process of the computing power application and is also conducive to improving the computational efficiency of the grid-connected computing. In addition, the present invention dynamically loads the installation file of the target aspect computing power application through the host application, making the management of the aspect computing power application more flexible, which is conducive to improving the flexibility of grid-connected computing processing.

[0115] Those skilled in the art should understand that the above-mentioned communication processing device for grid-connected computing can be used to implement the communication processing method for grid-connected computing described above, and the detailed description should be similar to the description of the method part above. To avoid tediousness, it will not be repeated here.

[0116] Based on the same idea, one or more embodiments of this specification further provide an electronic device, such as Figure 8 The electronic device 300 includes but is not limited to: a radio frequency unit 301, a network module 302, an audio output unit 303, an input unit 304, a sensor 305, a display unit 306, a user input unit 307, an interface unit 308, a memory 309, a processor 310, and a power supply 311. It will be understood by those skilled in the art that Figure 8The electronic device structure shown in the figure does not constitute a limitation on the electronic device. The electronic device may include more or fewer components than shown, or may combine certain components or arrange the components differently. In the embodiments of the present invention, the electronic device includes but is not limited to a mobile phone, a tablet computer, a laptop computer, a PDA, an in-vehicle terminal, a wearable device, and a pedometer.

[0117] Among them, the processor 310 is used to: based on the aspect-oriented programming method, by injecting the grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application; during the operation of the host application, based on the host application, the target grid-connected computing request issued by the computing power task platform is obtained, and the host application is used to perform grid-connected computing management on the aspect computing power application, and the aspect computing power application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request; according to the target grid-connected computing request, the corresponding target aspect computing power application installation file is obtained, and the installation file is dynamically loaded through the host application to control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request.

[0118] Processor 310 is also used to: obtain the corresponding computing power application installation file according to the target grid-connected computing request, and load the computing power application installation file into the memory space corresponding to the host application; based on the computing power application installation file, control the target aspect computing power application to execute the grid-connected computing processing corresponding to the target grid-connected computing request through the aspect-based middle layer of the host application to control the life cycle of the target aspect computing power application.

[0119] The processor 310 is also used to: determine the entry point for aspect processing in the computing power application based on the method of the key class that controls the life cycle of the computing power application based on the aspect-oriented programming method; based on the entry point and the timing point corresponding to the entry point, insert the preset program data that controls the life cycle of the computing power application to obtain the aspect computing power application.

[0120] The processor 310 is further configured to: create a dynamic service interface between the host application and the aspect computing power application; and call the host application to dynamically start and stop the aspect computing power application based on the dynamic service interface.

[0121] In addition, the processor 310 is also used to: set the target grid-connected computing service corresponding to the target grid-connected computing request to include: any one of a cloud computing-based grid-connected computing service, an edge computing-based grid-connected computing service, and an Internet of Things-based grid-connected computing service.

[0122] In addition, the processor 310 is also used to set the host application to match at least one aspect computing power application, and the host application and at least one aspect computing power application are set on any computing power terminal device used for grid-connected computing.

[0123] It should be understood that in this embodiment of the present invention, the RF unit 301 can be used to receive and transmit signals during information transmission or calls. Specifically, it receives downlink data from the base station and transmits it to the processor 310 for processing; in addition, it transmits uplink data to the base station. Typically, the RF unit 301 includes, but is not limited to, an antenna, at least one amplifier, a transceiver, a coupler, a low-noise amplifier, a duplexer, and the like. Furthermore, the RF unit 301 can communicate with the network and other electronic devices via a wireless communication system.

[0124] The electronic device provides users with wireless broadband Internet access through the network module 302, such as helping users to send and receive emails, browse web pages, and access streaming media.

[0125] The audio output unit 303 can convert audio data received by the RF unit 301 or the network module 302 or stored in the memory 309 into an audio signal and output it as sound. In addition, the audio output unit 303 can also provide audio output related to a specific function performed by the electronic device 300 (for example, a call signal reception sound, a message reception sound, etc.). The audio output unit 303 includes a speaker, a buzzer, a receiver, etc.

[0126] The input unit 304 is used to receive audio or video signals. The input unit 304 may include a graphics processing unit (GPU) 3041 and a microphone 3042. The GPU 3041 processes image data of still pictures or videos obtained by an image capture device (such as a camera) in video capture mode or image capture mode. The processed image frames can be displayed on the display unit 306. The image frames processed by the GPU 3041 can be stored in the memory 309 (or other storage medium) or transmitted via the RF unit 301 or the network module 302. The microphone 3042 can receive sound and process such sound into audio data. In the case of a telephone call mode, the processed audio data can be converted into a format that can be sent to a mobile communication base station via the RF unit 301 for output.

[0127] The electronic device 300 also includes at least one sensor 305, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor includes an ambient light sensor and a proximity sensor, wherein the ambient light sensor can adjust the brightness of the display panel 3061 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 3061 and / or the backlight when the electronic device 300 is moved to the ear. As a type of motion sensor, the accelerometer sensor can detect the magnitude of acceleration in all directions (generally three axes), and can detect the magnitude and direction of gravity when stationary. It can be used to identify the posture of the electronic device (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; the sensor 305 can also include a fingerprint sensor, a pressure sensor, an iris sensor, a molecular sensor, a gyroscope, a barometer, a hygrometer, a thermometer, an infrared sensor, etc., which will not be repeated here.

[0128] The display unit 306 is used to display information input by the user or information provided to the user. The display unit 306 may include a display panel 3061, which may be configured in the form of a liquid crystal display (LCD), an organic light-emitting diode (OLED), or the like.

[0129] The user input unit 307 can be used to receive input digital or character information, and to generate key signal input related to the user settings and function control of the electronic device. Specifically, the user input unit 307 includes a touch panel 3071 and other input devices 3072. The touch panel 3071, also known as a touch screen, can collect user touch operations on or near it (such as operations performed by the user using any suitable object or accessory such as a finger, stylus, etc. on or near the touch panel 3071). The touch panel 3071 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch direction and detects the signal caused by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 310, which receives and executes the command sent by the processor 310. In addition, the touch panel 3071 can be implemented using various types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch panel 3071, the user input unit 307 may also include other input devices 3072. Specifically, other input devices 3072 may include but are not limited to a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, and a joystick, which will not be described in detail here.

[0130] Furthermore, the touch panel 3071 may be overlaid on the display panel 3061. When the touch panel 3071 detects a touch operation on or near it, it transmits the information to the processor 310 to determine the type of touch event. Subsequently, the processor 310 provides corresponding visual output on the display panel 3061 according to the type of touch event. Figure 8 In the figure, the touch panel 3071 and the display panel 3061 are two independent components to realize the input and output functions of the electronic device. However, in some embodiments, the touch panel 3071 and the display panel 3061 can be integrated to realize the input and output functions of the electronic device, which is not limited here.

[0131] The interface unit 308 is an interface for connecting external devices to the electronic device 300. For example, the external devices may include a wired or wireless headset port, an external power supply (or battery charger) port, a wired or wireless data port, a memory card port, a port for connecting a device with an identification module, an audio input / output (I / O) port, a video I / O port, a headphone port, etc. The interface unit 308 may be used to receive input (e.g., data information, power, etc.) from the external device and transmit the received input to one or more elements within the electronic device 300, or may be used to transmit data between the electronic device 300 and the external device.

[0132] Memory 309 can be used to store software programs and various data. Memory 309 may primarily include a program storage area and a data storage area. The program storage area may store an operating system and at least one application required for a function (such as a sound playback function or an image playback function); the data storage area may store data generated based on the use of the mobile phone (such as audio data, a phone book, etc.). Furthermore, memory 309 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0133] The processor 310 is the control center of the electronic device. It connects all parts of the electronic device using various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 309 and accessing data stored in the memory 309, it performs various functions of the electronic device and processes data, thereby providing overall monitoring of the electronic device. The processor 310 may include one or more processing units; preferably, the processor 310 may integrate an application processor and a modem processor. The application processor primarily handles the operating system, user interface, and application programs, while the modem processor primarily handles wireless communications. It is understood that the modem processor may not be integrated into the processor 310.

[0134] The electronic device 300 may also include a power supply 311 (such as a battery) to supply power to each component. Preferably, the power supply 311 may be logically connected to the processor 310 through a power management system, thereby managing functions such as charging, discharging, and power consumption through the power management system.

[0135] Preferably, an embodiment of the present invention also provides an electronic device, including a processor 310, a memory 309, and a computer program stored in the memory 309 and executable on the processor 310. When the computer program is executed by the processor 310, the various processes of the above-mentioned communication processing method embodiment for grid-connected computing are implemented, and the same technical effect can be achieved. To avoid repetition, it will not be described here.

[0136] An embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program implements the various processes of the embodiment of the communication processing method for grid-connected computing described above and can achieve the same technical effect. To avoid repetition, the details are not described here. The computer-readable storage medium is, for example, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0137] An embodiment of the present invention also provides a computer program product, including a computer program. When the computer program is executed by a processor, it implements the various processes of the above-mentioned communication processing method embodiment for grid-connected computing and can achieve the same technical effect. To avoid repetition, it will not be repeated here.

[0138] It will be understood by those skilled in the art that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0139] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as combinations of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0140] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device that implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0141] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0142] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.

[0143] Memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. Memory is an example of a computer-readable medium.

[0144] Computer-readable media include permanent and non-permanent, removable and non-removable media that can be used to store information by any method or technology. Information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include temporary computer-readable media (transitory media), such as modulated data signals and carrier waves.

[0145] It should also be noted that the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, commodity, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, commodity, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not preclude the presence of other identical elements in the process, method, commodity, or apparatus comprising the element.

[0146] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, systems, or computer program products. Thus, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0147] The foregoing is merely an embodiment of the present invention and is not intended to limit the present invention. It will be apparent to those skilled in the art that various modifications and variations of the present invention are possible. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention are intended to be included within the scope of the claims of the present invention.

Claims

1. A communication processing method for grid-connected computing, characterized in that: The method comprises: Based on the aspect-oriented programming method, by injecting the grid-connected computing aspect management code during the code compilation process of the computing power application, the computing power application is aspect-processed to obtain the aspect computing power application; During the operation of the host application, the host application obtains the target grid-connected computing request issued by the computing task platform based on the host application, the host application is used to perform grid-connected computing management on the aspect computing application, and the aspect computing application is used to execute the grid-connected computing processing corresponding to the target grid-connected computing request; According to the target grid-connected computing request, the installation file of the corresponding target aspect computing power application is obtained, and the installation file is dynamically loaded through the host application to control the target aspect computing power application to perform the grid-connected computing processing corresponding to the target grid-connected computing request.

2. The method according to claim 1, characterized in that The step of obtaining the installation file of the corresponding target section computing power application program according to the target grid-connected computing request, and dynamically loading the installation file through the host application program to control the target section computing power application program to perform the grid-connected computing processing corresponding to the target grid-connected computing request includes: Acquire a corresponding computing power application installation file according to the target grid-connected computing request, and load the computing power application installation file into the memory space corresponding to the host application; Based on the computing power application installation file, the target aspect computing power application is controlled to execute the grid-connected computing processing corresponding to the target grid-connected computing request by controlling the life cycle of the target aspect computing power application through the aspect middle layer of the host application.

3. The method according to claim 1, characterized in that The aspect-oriented programming method injects the grid-connected computing aspect management code into the code compilation process of the computing power application program, and performs aspect processing on the computing power application program to obtain the aspect computing power application program, including: Based on the aspect-oriented programming approach, in the computing power application, the entry point for aspect processing is determined according to the method of the key class that controls the life cycle of the computing power application; Based on the entry point and the timing point corresponding to the entry point, preset program data for controlling the life cycle of the computing power application is inserted to obtain a section computing power application.

4. The method according to claim 1, characterized in that The method further comprises: Creating a dynamic service interface between the host application and the facet computing application; The host application is called to dynamically start and stop the slice computing power application based on the dynamic service interface.

5. The method according to claim 1, characterized in that The target grid-connected computing service corresponding to the target grid-connected computing request includes: any one of a cloud computing-based grid-connected computing service, an edge computing-based grid-connected computing service, and an Internet of Things-based grid-connected computing service.

6. The method according to claim 1, characterized in that The host application matches at least one aspect computing application, and the host application and at least one aspect computing application are set on any computing terminal device used for grid-connected computing.

7. A communication processing device for grid-connected computing, characterized in that: The device comprises: Aspect-oriented processing module, which is used to perform aspect-oriented processing on the computing power application by injecting the grid-connected computing aspect management code into the code compilation process of the computing power application based on aspect-oriented programming to obtain the aspect computing power application; A target grid-connected computing request acquisition module is used to acquire a target grid-connected computing request issued by a computing task platform based on a host application during the operation of the host application, wherein the host application is used to perform grid-connected computing management on the aspect computing application, and the aspect computing application is used to perform grid-connected computing processing corresponding to the target grid-connected computing request; A dynamic loading module is used to obtain the installation file of the corresponding target section computing power application according to the target grid-connected computing request, and dynamically load the installation file through the host application to control the target section computing power application to perform the grid-connected computing processing corresponding to the target grid-connected computing request.

8. An electronic device, characterized in that: The invention comprises a processor, a memory and a computer program stored in the memory and executable on the processor, wherein when the computer program is executed by the processor, the steps of the communication processing method for grid-connected computing as claimed in any one of claims 1 to 6 are implemented.

9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the communication processing method for grid-connected computing according to any one of claims 1 to 6 are implemented.

10. A computer program product, characterized in that The invention comprises a computer program, which, when executed by a processor, implements the steps of the communication processing method for grid-connected computing according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Methods and devices for installing and operating application

    CN104714828A

  • Network monitoring method and device based on plug-in, computing equipment and storage medium

    CN111427621A

  • Method and device for loading plug-in in host

    CN112083968A