Method and device for calling aggregated application service resources
By obtaining and completing the application service SDK collection of the participating group of resource aggregation, compiling into an independent application package and deploying it in a remote server, the problems of SDK integration errors, APP volume increases and stability in the existing technology are solved, and efficient and stable application service resource calls are achieved.
Patent Information
- Application Number
- CN202411788444.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-06
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2044-12-06
AI Technical Summary
The prior art is prone to errors and omissions when integrating the SDKs of each resource provider. As the number of SDKs increases, the APP volume increases significantly, reducing the stability of the APP and increasing maintenance costs, affecting the efficiency and stability of the resource aggregator calling the application service resources.
By obtaining the application service SDK collection of resource aggregation participation group response, it performs completion processing and compiles into an independent application package, deploys it in a remote server, and establishes the associated logical relationship between resource providers, application packages and service resource applications.
The process of providing SDK files by resource providers is simplified, the workload of resource providers is reduced, the problems of increasing APP volume and reducing stability are avoided, maintenance costs are reduced, and the efficiency and stability of resource aggregators calling application service resources are improved.
Smart Images

Figure CN119718647A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computers, and in particular to a method and device for invoking aggregated application service resources. Background Art
[0002] With the rapid development of information technology and network technology, the number of application resource providers (such as Himalaya Novels, Kugou Music, Uncle Kai's Storytelling, etc.) has grown rapidly. In order to use various application resources, users often need to download multiple applications (APPs) and need to switch between different applications, which is very cumbersome and time-consuming.
[0003] In order to facilitate users to use various application service resources, resource aggregators often integrate SDKs of different resource providers to facilitate calling the application service resources of each resource provider. The application functions of different resource providers are often different, and they usually implement their own application functions according to their own independent protocol specifications. In related technologies, it is usually necessary to directly combine the SDKs (Software Development Kits) of different resource providers into one APP to integrate the SDKs of different resource providers, so that the resource aggregator can call the application service resources of each resource provider through the APP.
[0004] However, this approach is not only prone to errors and omissions when integrating the SDKs of various resource providers, but also will cause the size of the APP to increase significantly as the number of connected SDKs increases (usually the size of the APP will increase by about 10M for each SDK connected). It will also reduce the stability of the APP and have a high maintenance cost, which will in turn affect the efficiency and stability of the resource aggregator's subsequent calls to the application service resources of various resource providers. Summary of the invention
[0005] In view of this, an embodiment of the present application provides a method and device for calling aggregated application service resources to solve the problem that the prior art is not only prone to errors and omissions when integrating the SDKs of various resource providers, but also that the size of the APP will increase significantly as the number of connected SDKs increases, while also reducing the stability of the APP and having high maintenance costs, thereby affecting the efficiency and stability of the resource aggregator's subsequent calls to the application service resources of each resource provider.
[0006] According to a first aspect of an embodiment of the present application, a method for invoking an aggregated application service resource is provided, comprising:
[0007] Obtaining an application service SDK set returned by at least one resource aggregation participating group in response to a resource aggregation request; wherein the resource aggregation request includes an application service SDK to be completed provided by a resource scheduler; and the application service SDK set includes completed application service SDKs obtained by completing the application service SDK to be completed by each resource provider in the resource aggregation participating group;
[0008] Compile the completed application service SDKs of each resource provider and package them into independent application packages;
[0009] Based on each application package, the service resource application corresponding to each resource provider is deployed in the remote server, and the associated logical relationship between each resource provider, application package and service resource application is established.
[0010] According to a second aspect of an embodiment of the present application, there is provided a device for invoking aggregated application service resources, including:
[0011] The first acquisition module is configured to acquire an application service SDK set returned by at least one resource aggregation participating group in response to a resource aggregation request; wherein the resource aggregation request includes an application service SDK to be completed provided by a resource scheduler; and the application service SDK set includes completed application service SDKs obtained by completing the application service SDK to be completed by each resource provider in the resource aggregation participating group;
[0012] A compilation module is configured to compile the completed application service SDKs of various resource providers and encapsulate them into independent application packages;
[0013] The deployment module is configured to deploy the service resource applications corresponding to each resource provider in the remote server based on each application package, and establish an associated logical relationship between each resource provider, application package and service resource application.
[0014] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above method when executing the computer program.
[0015] According to a fourth aspect of an embodiment of the present application, a readable storage medium is provided, which stores a computer program, and when the computer program is executed by a processor, the steps of the above method are implemented.
[0016] Compared with the prior art, the embodiments of the present application have at least the following beneficial effects: First, the resource providers of each resource aggregation participating group only need to call their own API to complete the private content in the application service SDK to be completed according to the application service SDK to be completed provided by the resource dispatcher, without processing other logic (such as business logic, etc.), which can greatly simplify the process of the resource provider providing the SDK file and reduce the workload of the resource provider. Second, the remote server compiles and encapsulates the completed application service SDK provided by each resource provider into an independent application package, and installs it on the remote server to obtain the service resource application corresponding to each resource provider. In this way, with the help of the physical isolation between the resource dispatcher and the remote server, the aggregated player application deployed on the resource dispatcher and the various service resource applications deployed on the remote server can also be physically isolated. Since the aggregated player application and the various service resource applications are parallel and independent, the various service resource applications are not combined into one APP (specifically the aggregated player application), which well solves the problem that the traditional integration method is not only prone to errors and omissions, but also leads to a significant increase in the size of the APP as the number of connected SDKs increases, and the stability of the APP is also reduced. Third, by establishing the associated logical relationship between each resource provider, application package and service resource application, it is convenient for the remote server to uniformly manage and maintain the service resource applications and application packages of each resource provider, which is conducive to reducing maintenance costs. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 It is a schematic diagram of an application scenario of an embodiment of the present application;
[0019] Figure 2 It is a flowchart of a method for calling aggregated application service resources provided in an embodiment of the present application;
[0020] Figure 3 It is a structural diagram of a device for retrieving aggregated application service resources provided in an embodiment of the present application;
[0021] Figure 4 It is a structural schematic diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0022] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.
[0023] A method and device for invoking aggregated application service resources according to an embodiment of the present application will be described in detail below with reference to the accompanying drawings.
[0024] Figure 1 It is a scenario diagram of an application scenario of an embodiment of the present application. The application scenario may include a remote server 101, a resource dispatcher 102, and resource aggregation participating groups 103, 104, and 105. Among them, the remote server 101 can be a server that provides various services, specifically a single server, or a server cluster composed of several servers, or a cloud computing service center, which is not limited by the embodiment of the present application. The resource dispatcher 102 can be a terminal device that wants to access application service resources from different resource providers, such as a vehicle, a mobile phone, a computer, etc.
[0025] Resource providers in the same resource aggregation participation group may be resource providers that have the same or similar types of application service resources and confirm that they want to participate in the application service resource aggregation project published by the resource scheduler 102. Resource providers between different resource aggregation participation groups may be resource providers that have different types of application service resources and confirm that they want to participate in the application service resource aggregation project published by the resource scheduler 102.
[0026] Exemplarily, resource aggregation participating group 103 may be a combination of music service resource providers, including but not limited to Kugou Music provider 1031, QQ Music provider 1032, and NetEase Cloud Music provider 1033. Resource aggregation participating group 104 may be a combination of story service resource providers, including but not limited to Uncle Kai's storytelling provider 1041, children's story provider 1042, and Himalaya provider 1043. Resource aggregation participating group 105 may be a combination of video service resource providers, including but not limited to Tencent Video provider 1051, Pioneer Video provider 1052, and LeTV Video provider 1053. Each resource provider in resource aggregation participating group 103 has music service resources. Resource providers between resource aggregation participating groups 103, 104, and 105 have different application service resources.
[0027] The remote server 101 can communicate with the resource scheduler 102 and the resource aggregation participating groups 103, 104 and 105 respectively through a wired network or a wireless network. The resource scheduler 102 can communicate with the resource aggregation participating groups 103, 104 and 105 respectively through a wired network or a wireless network. The wired network can be a coaxial cable, a twisted pair, an optical fiber, etc. The wireless network can be Bluetooth, near field communication, infrared, etc.
[0028] It should be noted that the specific types, quantities and combinations of the remote server 101, resource scheduler 102, resource aggregation participating groups 103, 104 and 105, and resource providers can be adjusted according to the actual needs of the application scenario, and the embodiments of the present application do not limit this.
[0029] Figure 2 It is a flow chart of a method for calling aggregated application service resources provided in an embodiment of the present application. Figure 2 The method for calling the aggregate application service resource can be Figure 1 The remote server 101 executes.
[0030] See also Figure 2 The method for retrieving aggregated application service resources provided in the embodiment of the present application includes the following steps:
[0031] Step S201: Obtain an application service SDK set returned by at least one resource aggregation participating group in response to a resource aggregation request.
[0032] Among them, a resource aggregation participant group includes at least one resource provider; the resource aggregation request includes the application service SDK to be completed provided by the resource scheduler; the application service SDK set includes the completed application service SDK obtained by each resource provider completing the application service SDK to be completed. The application service SDK to be completed includes public content and private content, the public content is the content that does not require the resource provider to complete the application function, and the private content is the content that requires the resource provider to call its application program interface (API) to complete the application function.
[0033] As an example, see Figure 1 The resource scheduler 102 can use Android studio (Android integrated development tool) to create an Android project and create a subfolder (called module in Android project) named template-sdk. Create an aidl folder under the template-sdk folder and create an IMediaBinder.aidl file in the aidl folder. Define functions according to actual business scenarios and use aidl language (cross-process description language in Android) to describe them.
[0034] For example, the content of IMediaBinder.aidl is as follows:
[0035]
[0036] The above IMediaBinder.aidl content is explained as follows: void play(String source) represents a play function, accepts a source field, which is used to describe the application service resource of the resource provider that is expected to be played. void pause(String source) represents the pause play function, accepts a source field, which is used to describe the application service resource of the resource provider that is expected to be paused.
[0037] In some implementations, the IMediaBinder.aidl file may be added or modified according to specific services.
[0038] After defining the above IMediaBinder.aidl file, the resource scheduler 102 may use a compilation tool to generate a corresponding IMediaBinder.java interface file according to the above defined IMediaBinder.aidl file.
[0039] Create a new java folder in the template-sdk folder, create a BaseMediaService.kt file, and define a BaseMediaService class in the BaseMediaService.kt file. The BaseMediaService class inherits from Service (Service in the four major components of Android) and implements the interface class (IMediaBinder interface) in the IMediaBinder.java interface file.
[0040] Exemplarily, the code implementing the IMediaBinder interface is as follows:
[0041]
[0042] Override the onBind method of Service (the onBind method is a required method for aidl cross-process in android service, and must be overridden when inputting android system requirements). The return value of the onBind method is the specific implementation of the above-mentioned IMediaBinder interface.
[0043] In this embodiment, the onBind method returns MyMediaBinderImp, which inherits from the IMediaBinder.Stub class. The IMediaBinder.Stub class is the interface class in the IMediaBinder.java file generated by the above compilation step.
[0044] Among them, the definition of MyMediaBinderImp is as follows:
[0045]
[0046] It can be seen that MyMediaBinderImp actually uses the proxy mode (a code design mode) to proxy IMediaBinder (here it can also be understood that MyMediaBinderImp is BaseMediaService). BaseMediaService is an abstract class. The specific implementation requires the resource provider to call its own API (application programming interface) to complete the application function.
[0047] At this point, the design and development of Template-sdk has been completed. Next, the resource scheduler 102 can use the package command to generate an aar file (a packaged compression format of the android sub-project) from the template-sdk folder and send it to each resource provider. The aar file here is the application service SDK to be completed, where the public content in the application service SDK to be completed refers to the content in the aar file that does not require the resource provider to complete the application function, and the private content is the resource provider who needs to call his own API to complete the application function to implement the BaseMediaService class.
[0048] The completed application service SDK refers to a file obtained by each resource provider after obtaining the application service SDK to be completed issued by the resource scheduler 102 and calling its own API to complete the private content in the application service SDK to be completed.
[0049] As an example, taking the resource provider as Kugou Music provider, the specific solution for Kugou Music provider to call its own API to complete the application service SDK for application function completion is as follows:
[0050] Kugou Music providers can create a new Android project, create a KugouMediaService in the Android project to inherit BaseMediaService, and complete the implementation method. The code is as follows:
[0051]
[0052] The above content is the specific implementation of the BaseMediaService class mentioned above.
[0053] Next, the Kugou Music provider declares KugouMediaService in the manifest. The sample code is as follows:
[0054]
[0055]
[0056] At this point, the Kugou music provider has completed the completion process of the application service SDK to be completed and obtained the completed application service SDK. Afterwards, the Kugou music provider uploads the completed application service SDK to the remote server 101.
[0057] Similarly, other resource providers can complete the application service SDK to be completed in the same manner, and upload the completed application service SDK to the remote server 101 .
[0058] Step S202 : compile the completed application service SDK of each resource provider and encapsulate it into an independent application package.
[0059] As an example, see Figure 1 , it is assumed that the remote server 101 receives the application service SDK sets 1, 2 and 3 returned by the resource aggregation participating groups 103, 104 and 105, wherein the application service SDK set 1 includes the completed application service SDKs 1, 2 and 3 provided by the resource providers 1031, 1032 and 1033 in the resource aggregation participating group 103; the application service SDK set 2 includes the completed application service SDKs 4, 5 and 6 provided by the resource providers 1041, 1042 and 1043 in the resource aggregation participating group 104; the application service SDK set 3 includes the completed application service SDKs 7, 8 and 9 provided by the resource providers 1051, 1052 and 1053 in the resource aggregation participating group 105. Next, the remote server 101 sets up a compilation environment, and compiles the completed application service SDKs 1 to 9 respectively in the compilation environment, and packages them into independent application packages 1 to 9.
[0060] Step S203: deploying service resource applications corresponding to each resource provider in the remote server based on each application package, and establishing an associated logical relationship between each resource provider, application package and service resource application.
[0061] For ease of description, the above example is continued to be used, and the above application packages 1 to 9 are installed and deployed on the remote server 101 to form service resource applications 1 to 9, and an associated logical relationship is established between the resource providers 1031, 1032, 1033, 1041, 1042, 1043, 1051, 1052 and 1053, the application packages 1 to 9 and the service resource applications 1 to 9.
[0062] The associated logical relationship between the resource provider, the application package and the service resource application can be a list container (List in java) and named mediaServiceList. Exemplarily, the associated logical relationship between the resource provider, the application package and the service resource application is shown in Table 1 below.
[0063] Table 1 Logical relationship table between resource providers, application packages and service resource applications
[0064]
[0065] In Table 1, Group_1 to Group_3 represent resource aggregation participating groups 103, 104, and 105, respectively; Group_11 to Group_13 represent resource providers 1031, 1032, and 1033 in resource aggregation participating group 103, respectively; Pack_11 to Pack_13 represent application packages 11, 12, and 13 of resource providers 1031, 1032, and 1033, respectively; and APP_11 to APP_13 represent service resource applications 11, 12, and 13, respectively. For example, Group_1 represents resource aggregation participating group 103, Group_11 is resource provider 1031 in resource aggregation participating group 103, Pack_11 is application package 11 of resource provider 1031, and APP_11 is service resource application 11 corresponding to application package 11. Group_21 to Group_23 represent resource providers 1041, 1042, 1043 in resource aggregation participating group 104, respectively; Pack_21 to Pack_23 represent application packages 21, 22, 23 of resource providers 1041, 1042, 1043, respectively; APP_21 to APP_23 represent service resource applications 21, 22, 23 corresponding to application packages 21, 22, 23, respectively. Group_31 to Group_33 represent resource providers 1051, 1052, and 1053 in resource aggregation participating group 105, respectively; Pack_31 to Pack_33 represent application packages 31, 32, 33 of resource providers 1051, 1052, and 1053, respectively; APP_31 to APP_33 represent service resource applications 31, 32, 33 corresponding to application packages 31, 32, 33, respectively.
[0066] In some embodiments, the above method may further include the following steps:
[0067] In response to a resource call request sent by a resource dispatcher through an aggregated player application, a target resource aggregation participant group and its corresponding target service resource application group are determined based on an associated logical relationship, and the aggregated player application is deployed on the resource dispatcher;
[0068] Acquire aggregated application service resources based on the target service resource application group, and cache the aggregated application service resources in a resource buffer, wherein the resource buffer is deployed in a remote server;
[0069] A mapping relationship between the resource buffer and the resource calling window set by the aggregate player application is established so that the resource scheduler can call the aggregate application service resources from the resource calling window based on the mapping relationship.
[0070] The resource acquisition request includes group identification information of the target resource aggregation participating group.
[0071] The group identification information is used to distinguish different resource aggregation participating groups, and can be at least one of numbers, words or letters, or any combination thereof. For example, the group identification information of resource aggregation participating groups 103, 104 and 105 can be Group_1, Group_2 and Group_3, respectively.
[0072] Aggregate player application, used to call and play application service resources provided by different resource providers.
[0073] The resource scheduler 102 may be a vehicle (such as a new energy vehicle, etc.), and the aggregated player application may be installed and deployed in the vehicle's cockpit software system.
[0074] As an example, the resource scheduler 102 may send a resource retrieval request to the remote server 101 through the aggregated player application. The resource retrieval request carries group identification information to indicate which aggregated application service resource of the resource aggregation participant group needs to be retrieved.
[0075] The remote server 101 responds to the resource retrieval request sent by the resource scheduler 102 (for example, carrying the group identification information "Group_1"), and queries the above Table 1 through the group identification information "Group_1", and can determine that the target resource aggregation participating group is the resource aggregation participating group 103, and the target service resource application group includes the target service resource applications APP_11~APP_13.
[0076] For ease of understanding, continue to use the above example and assume that the target service resource application group includes target service resource applications APP_11 to APP_13 . Then the aggregated application service resources include application service resources provided by resource providers 1031 , 1032 , and 1033 .
[0077] As an example, the remote server 101 obtains application service resources provided by resource providers 1031 , 1032 , and 1033 based on the target service resource applications APP_11 ˜ APP_13 , and caches these application service resources in its resource buffer.
[0078] For ease of understanding, continuing with the above example, after the remote server 101 caches the application service resources provided by the acquired resource providers 1031, 1032, and 1033 into the resource buffer, a mapping relationship is established between the resource buffer and the resource retrieval window set by the aggregated player application deployed in the resource scheduler 102. In this way, the resource scheduler 102 can directly read the application service resources provided by the resource providers 1031, 1032, and 1033 through the resource retrieval window of the aggregated player application, and play these application service resources through the aggregated player application.
[0079] The technical solution provided by the embodiment of the present application deploys a resource buffer on the remote server, caches the aggregated application service resources corresponding to the resource retrieval request sent by the resource dispatcher in the resource buffer, and establishes a mapping relationship between the resource buffer and the resource retrieval window deployed in the resource dispatcher, so that the resource dispatcher can directly read the aggregated application service resources it needs through the resource retrieval window, with high data reading efficiency and good stability. The remote server can greatly enrich the diversity of aggregated application service resources available for retrieval by integrating and deploying resource aggregation participating groups with different types of application service resources.
[0080] In some embodiments, before the step of obtaining the completed application service SDK returned by at least one resource aggregation participating group in response to the resource aggregation request, the step further includes:
[0081] Obtaining a resource aggregation indicator sent by a resource scheduler, where the resource aggregation indicator includes at least one required resource type and a resource aggregation scale corresponding to each required resource type;
[0082] At least one resource aggregation participating group is determined based on the resource aggregation indicator.
[0083] The required resource type may be at least one of various multimedia resources such as music service resources, story service resources, video service resources, and news service resources.
[0084] Resource aggregation scale is used to indicate the aggregation capacity (sample size) corresponding to the required resource type. For example, if the required resource type is music service resources, its aggregation capacity (sample size) includes at least y songs.
[0085] As an example, the resource scheduler 102 may send a resource aggregation indicator to the remote server 101 according to actual needs. The resource aggregation indicator includes relevant information such as the required resource type and the corresponding resource aggregation scale.
[0086] In some embodiments, based on the resource aggregation indicator, determining at least one resource aggregation participating group includes:
[0087] For each required resource type, clustering is performed based on the resource information provided by multiple resource providers confirmed to participate in resource aggregation to obtain a resource provider cluster, where the resource provider cluster has a cluster center;
[0088] Each cluster center is used as a control node within the cluster to aggregate the application service resources owned by each resource provider within the resource provider cluster to obtain a resource aggregation participant group that meets the resource aggregation scale.
[0089] Resource information indicates the application service resources owned by the resource provider. For example, if the Kugou Music provider owns music service resources, its resource information indicates music service resources. For another example, if the Kaishu Storytelling provider owns story service resources, its resource information indicates story service resources.
[0090] As an example, the resource dispatcher 102 can publish an application service resource aggregation project, which contains information such as participation methods, participation time, and required resources (such as music, stories, news, videos, etc.). Each resource provider can determine whether to participate in the application service resource aggregation project based on its own actual needs. If it is determined to participate, it can return a participation application form to the resource dispatcher 102, which contains relevant information such as the application service resources and resource quantity (sample size) it owns, whether to confirm participation in the application service resource aggregation project, etc. The resource dispatcher 102 counts the participation application forms submitted by each resource provider, confirms the resource providers participating in resource aggregation, and reports them to the remote server 101.
[0091] Assume that the required resource types include music service resources, story service resources and video service resources. The resource aggregation scale of music service resources includes at least y songs, the resource aggregation scale of story service resources includes t stories, and the resource aggregation scale of video service resources includes r videos.
[0092] Taking the required resource type as music service resource as an example, the specific scheme for obtaining the resource aggregation participation group corresponding to the music service resource is as follows:
[0093] The remote server 101 clusters the resource providers that have music service resources to obtain a resource provider cluster, that is, selects a resource provider cluster whose resource information (having music service resources) matches the required resource type (required music service resources) from a large number of resource providers. Then, the cluster center of the resource provider cluster is used as the control node within the cluster to aggregate the application service resources owned by each resource provider within the resource provider cluster to obtain a resource aggregation participant group that meets the resource aggregation scale. For example, the resource provider cluster includes resource providers 1 to 5, which respectively have sample sizes of application service resources of y1, y2, y3, y4 and y5, among which y1+y2+y3>y, satisfying the resource aggregation scale of music application service resources (including at least y songs); y1+y2+y3+y4+y5>y, satisfying the resource aggregation scale of music application service resources (including at least y songs), then it can be determined that the resource aggregation participating group is a combination including resource providers 1 to 3 or a combination including resource providers 1 to 5.
[0094] Similarly, the resource aggregation participating groups corresponding to the story service resources and the video service resources may be determined by referring to the above implementation manner, which will not be described in detail here.
[0095] Through the above method, resource providers with the same or similar types of application service resources can be aggregated into the same resource aggregation participant group, which is conducive to expanding the sample size with the same or similar types of application service resources and facilitates management and maintenance.
[0096] In some embodiments, obtaining the aggregated application service resource provided by the target resource aggregation participating group based on the target service resource application group includes:
[0097] Acquire an application information set corresponding to the target service resource application group; wherein the application information set includes application information corresponding to each target service resource application in the target service resource application group;
[0098] Based on the application information set, a resource call link is established between the remote server and the target service resource application group;
[0099] Based on the resource call link, the aggregated application service resources provided by the target service resource application group are obtained.
[0100] Application information, including the application identifier of the target service resource application and the package identifier of the target application package.
[0101] As an example, assuming that the remote server 102 obtains a resource retrieval request sent by the resource scheduler 102 (carrying the group identification information of the resource aggregation participating group, such as "Group_1"), then by querying the above Table 1, it can be determined that the target resource aggregation participating group is Group_1 (corresponding to resource aggregation participating group 103), and Group_1 includes three target service resource applications APP_11 to APP_13.
[0102] The remote server 102 can write a TemplateKit class and add a register method in the TemplateKit class. When receiving a resource retrieval request sent by the resource scheduler 102 through the aggregate player application, the register method is called to obtain the aggregate application service resources provided by the target service resource application group, and then the aggregate application service resources are written into the resource buffer.
[0103] As an example, the specific steps for the remote server 102 to call the register method to obtain the aggregated application service resources provided by the target service resource application group are as follows:
[0104] The remote server 102 queries the system through PackageManager.queryIntentServices (android framework method) in the register method and adds it in the manifest<action android:name="action_seres_media" / > The target service resource application is obtained, and application information such as packageName (the name of the target application package corresponding to the target service resource application) and ServiceName (the service name of the target service resource application) corresponding to the target service resource application are returned.
[0105] The remote server can dynamically load the corresponding ecological capabilities by dynamically scanning the target service resource application registered with action_seres_media, saving the access cost and the need to repeatedly write access codes. It only needs to install the target service resource application in the remote server.
[0106] Next, the remote server 102 can connect to the service through bindService (androidframework method) based on the application information found above. After the service is successfully connected, the corresponding binder object will be returned in the onServiceConnected callback method. Binder is the return value of the onBind method described in the BaseMediaService class above. Through this binder object, the method in the target service resource application is called, that is, the resource call link between the remote server and the target service resource application is established.
[0107] For example, the target service resource application APP_11 is the Kugou Music application. By calling the method in KugouMediaService through the returned binder object, a resource call link between the remote server and the Kugou Music application is established. Songs of the Kugou Music application can be obtained through this resource call link.
[0108] The sample code is as follows:
[0109]
[0110]
[0111] Similarly, a resource calling link can be established between the remote server and the target service resource applications APP_12-APP_13 in the same manner, thereby calling the application service resources provided by them.
[0112] In some embodiments, the above method may further include:
[0113] Send the update logic for the completed application service SDK to each resource aggregation participating group;
[0114] According to the preset update cycle, the update interface implemented by each resource aggregation participating group based on the update logic is called to obtain the update SDK set of each resource aggregation participating group; wherein the update SDK set includes the update SDK corresponding to each resource provider of the resource aggregation participating group;
[0115] Based on the updated SDK set, the associated logical relationship is updated.
[0116] Update logic, which can be SDK update specification.
[0117] The preset update cycle can be one day, one week, one month, etc., and can be set according to actual conditions. This application does not impose any restrictions on this.
[0118] As an example, the remote server 101 can set the update logic for the completed application service SDK and send it to each resource provider of each resource aggregation participating group. Each resource provider can implement the update interface according to the update logic sent by the remote server 101. The remote server 101 can call the update interface of each resource provider of each resource aggregation participating group according to a preset update cycle (such as one day) to obtain the update SDK corresponding to each resource provider, and use these update SDKs to update the association logic relationship table between resource providers, application packages and service resource applications.
[0119] Through the above method, if the resource provider updates its SDK (for example, to modify a bug, etc.), the remote server can regularly call the update interface to find that the resource provider's completed application service SDK has been updated, and promptly update the associated logical relationship between the resource provider, application package and service resource application.
[0120] In some embodiments, based on updating the SDK set, updating the associated logical relationship includes:
[0121] Compile each update SDK to obtain the update application package corresponding to each resource provider;
[0122] Use the update application package to update the associated logical relationship.
[0123] As an example, the remote server 101 can compile each acquired update SDK separately in the compilation environment to obtain the updated application package corresponding to each resource provider, and then use the updated application package to update the associated logical relationship between the resource provider, the application package and the service resource application. Specifically, the application package in the above Table 1 is updated to the updated application package accordingly, and the service resource applications of each resource provider are updated synchronously.
[0124] In some other embodiments, based on updating the SDK set, the associated logical relationship is updated, including:
[0125] Compile each update SDK to obtain a first update application package corresponding to each resource provider;
[0126] Calling a code detection interface to detect the first updated application package and marking a vulnerable code area in the first updated application package;
[0127] Repairing the code in the vulnerable code area to obtain a second updated application package;
[0128] The associated logical relationship is updated using the second update application package.
[0129] As an example, the remote server 101 compiles each update SDK in a compilation environment to obtain a first update application package corresponding to each resource provider; then, the code detection interface (such as an AI artificial intelligence algorithm interface) is called to detect the first update application package, and the vulnerability code area (such as a buggy code area) in the first update application package is marked; thereafter, AI (artificial intelligence) repair is performed on the vulnerability code area to obtain a second update application package; finally, the second update application package is used to update the associated logical relationship between the resource provider, the application package, and the service resource application. Specifically, the application package in the above Table 1 is correspondingly updated to the second update application package, and the service resource application corresponding to each resource provider is synchronously updated.
[0130] Through the above method, the remote server can realize automatic compilation, automatic code detection and automatic code repair of the update SDK, which is beneficial to reduce the update management and maintenance workload of the remote server's operation and maintenance personnel on the SDK files of various resource providers, thereby reducing maintenance costs; at the same time, the first update application package compiled by the update SDK can be streamlined, the memory space occupied by the first update application package can be reduced, and the code quality and stability of the first update application package can be improved.
[0131] All the above optional technical solutions can be arbitrarily combined to form optional embodiments of the present application, which will not be described one by one here.
[0132] The following are device embodiments of the present application, which can be used to execute the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0133] Figure 3 Schematic diagram of a device for retrieving aggregated application service resources provided in an embodiment of the present application. Figure 3 As shown, the device for invoking aggregated application service resources includes:
[0134] The first acquisition module 301 is configured to acquire an application service SDK set returned by at least one resource aggregation participating group in response to a resource aggregation request; wherein the resource aggregation request includes an application service SDK to be completed provided by a resource scheduler; and the application service SDK set includes completed application service SDKs obtained by completing the application service SDK to be completed by each resource provider in the resource aggregation participating group;
[0135] The compiling module 302 is configured to compile the completed application service SDK of each resource provider and encapsulate it into an independent application package;
[0136] The deployment module 303 is configured to deploy the service resource applications corresponding to each resource provider in the remote server based on each application package, and establish an association logical relationship between each resource provider, application package and service resource application.
[0137] In some embodiments, the above device may further include:
[0138] A response module, configured to respond to a resource call request sent by a resource scheduler through an aggregated player application, determine a target resource aggregation participant group and its corresponding target service resource application group based on an associated logical relationship, and the aggregated player application is deployed on the resource scheduler;
[0139] A cache module is configured to obtain aggregated application service resources based on the target service resource application group, and cache the aggregated application service resources to a resource buffer, wherein the resource buffer is deployed in a remote server;
[0140] The establishment module is configured to establish a mapping relationship between the resource buffer and the resource calling window set by the aggregate player application, so that the resource scheduler can call the aggregate application service resources from the resource calling window based on the mapping relationship.
[0141] In some embodiments, the cache module includes:
[0142] A first acquisition unit is configured to acquire an application information set corresponding to the target service resource application group; wherein the application information set includes application information corresponding to each target service resource application in the target service resource application group;
[0143] An establishing unit configured to establish a resource calling link between a remote server and a target service resource application group based on the application information set;
[0144] The second acquisition unit is configured to acquire the aggregated application service resources provided by the target service resource application group based on the resource call link.
[0145] In some embodiments, the above apparatus further comprises:
[0146] A sending module, configured to send update logic for the completed application service SDK to each resource aggregation participating group;
[0147] The calling module is configured to call the update interface implemented by each resource aggregation participating group based on the update logic according to a preset update cycle to obtain the update SDK set of each resource aggregation participating group; wherein the update SDK set includes the update SDK corresponding to each resource provider of the resource aggregation participating group;
[0148] The update module is matched to update the associated logical relationship based on the update SDK set.
[0149] In some embodiments, the above-mentioned update module includes:
[0150] A first compiling unit is configured to compile each update SDK to obtain an update application package corresponding to each resource provider;
[0151] The first updating unit is configured to update the associated logical relationship using an update application package.
[0152] In some other embodiments, the above-mentioned update module includes:
[0153] A second compiling unit is configured to compile each update SDK to obtain a first update application package corresponding to each resource provider;
[0154] a detection unit configured to call a code detection interface to detect the first update application package and mark a vulnerability code area in the first update application package;
[0155] a repair unit configured to repair the code in the vulnerable code area to obtain a second updated application package;
[0156] The second updating unit is configured to update the associated logical relationship using a second updated application package.
[0157] In some embodiments, the above apparatus further comprises:
[0158] A second acquisition module is configured to acquire a resource aggregation index sent by a resource scheduler, where the resource aggregation index includes at least one required resource type and a resource aggregation scale corresponding to each required resource type;
[0159] The determination module is configured to determine at least one resource aggregation participating group based on the resource aggregation indicator.
[0160] In some embodiments, the above-mentioned determination module includes:
[0161] The clustering unit is configured to cluster, for each required resource type, resource information provided by multiple resource providers confirmed to participate in resource aggregation to obtain a resource provider cluster, wherein the resource provider cluster has a cluster center;
[0162] The aggregation unit is configured to use each cluster center as a control node within the cluster to aggregate the application service resources owned by each resource provider within the resource provider cluster to obtain a resource aggregation participant group that meets the resource aggregation scale.
[0163] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present application.
[0164] Figure 4 Schematic diagram of an electronic device 4 provided in an embodiment of the present application. Figure 4 As shown, the electronic device 4 of this embodiment includes: a processor 401, a memory 402, and a computer program 403 stored in the memory 402 and executable on the processor 401. When the processor 401 executes the computer program 403, the steps in the above-mentioned method embodiments are implemented. Alternatively, when the processor 401 executes the computer program 403, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0165] The electronic device 4 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 4 may include, but is not limited to, a processor 401 and a memory 402. Those skilled in the art will appreciate that Figure 4 The electronic device 4 is merely an example and does not limit the electronic device 4 , and may include more or less components than those shown in the figure, or different components.
[0166] The processor 401 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.
[0167] The memory 402 may be an internal storage unit of the electronic device 4, for example, a hard disk or memory of the electronic device 4. The memory 402 may also be an external storage device of the electronic device 4, for example, a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device 4. The memory 402 may also include both an internal storage unit and an external storage device of the electronic device 4. The memory 402 is used to store computer programs and other programs and data required by the electronic device.
[0168] Those skilled in the art can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units.
[0169] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium (e.g., a computer-readable storage medium). Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. Computer-readable storage media may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0170] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A method for retrieving aggregate application service resources, characterized in that: include: Obtaining an application service SDK set returned by at least one resource aggregation participating group in response to a resource aggregation request; wherein the resource aggregation request includes an application service SDK to be completed provided by a resource scheduler; the application service SDK set includes a completed application service SDK obtained by each resource provider in the resource aggregation participating group completing the application service SDK to be completed; Compile the completed application service SDK of each resource provider and encapsulate it into an independent application package; Based on each of the application packages, the service resource applications corresponding to each resource provider are deployed in the remote server, and an associated logical relationship is established between each of the resource providers, the application packages and the service resource applications.
2. The method according to claim 1, characterized in that The method further comprises: In response to a resource retrieval request sent by the resource scheduler through the aggregated player application, determining a target resource aggregation participant group and its corresponding target service resource application group based on the associated logical relationship, the aggregated player application being deployed on the resource scheduler; Acquire aggregated application service resources based on the target service resource application group, and cache the aggregated application service resources in a resource buffer, wherein the resource buffer is deployed in the remote server; A mapping relationship between the resource buffer and the resource calling window set by the aggregate player application is established, so that the resource scheduler calls the aggregate application service resource from the resource calling window based on the mapping relationship.
3. The method according to claim 2, characterized in that Acquiring the aggregated application service resources provided by the target resource aggregation participating group based on the target service resource application group includes: Acquire an application information set corresponding to the target service resource application group; wherein the application information set includes application information corresponding to each target service resource application in the target service resource application group; Based on the application information set, establishing a resource call link between the remote server and the target service resource application group; Based on the resource call link, the aggregated application service resources provided by the target service resource application group are obtained.
4. The method according to claim 2, characterized in that: The method further comprises: Sending the update logic for the completed application service SDK to each of the resource aggregation participating groups; According to a preset update cycle, the update interface implemented by each resource aggregation participating group based on the update logic is called to obtain an update SDK set of each resource aggregation participating group; wherein the update SDK set includes the update SDK corresponding to each resource provider of the resource aggregation participating group; Based on the updated SDK set, the associated logical relationship is updated.
5. The method according to claim 4, characterized in that Based on the updated SDK set, the associated logical relationship is updated, including: Compiling each of the update SDKs to obtain an update application package corresponding to each of the resource providers; The associated logical relationship is updated using the update application package.
6. The method according to claim 4, characterized in that Based on the updated SDK set, the associated logical relationship is updated, including: Compiling each of the update SDKs to obtain a first update application package corresponding to each of the resource providers; Calling a code detection interface to detect the first update application package and mark a vulnerable code area in the first update application package; Repairing the code in the vulnerable code area to obtain a second updated application package; The associated logical relationship is updated using the second update application package.
7. The method according to claim 1, characterized in that Before obtaining the completed application service SDK returned by at least one resource aggregation participating group in response to the resource aggregation request, the method further includes: Acquire a resource aggregation index sent by a resource scheduler, where the resource aggregation index includes at least one required resource type and a resource aggregation scale corresponding to each required resource type; Based on the resource aggregation indicator, at least one resource aggregation participating group is determined.
8. The method according to claim 7, characterized in that Based on the resource aggregation indicator, determining at least one resource aggregation participating group includes: For each of the required resource types, clustering is performed based on the resource information provided by multiple resource providers confirmed to participate in resource aggregation to obtain a resource provider cluster, wherein the resource provider cluster has a cluster center; Each of the cluster centers is used as a control node within the cluster to aggregate the application service resources owned by each resource provider within the resource provider cluster to obtain a resource aggregation participating group that meets the resource aggregation scale.
9. A device for retrieving aggregated application service resources, characterized in that: include: The first acquisition module is configured to acquire an application service SDK set returned by at least one resource aggregation participating group in response to a resource aggregation request; wherein the resource aggregation request includes an application service SDK to be completed provided by a resource scheduler; and the application service SDK set includes a completed application service SDK obtained by each resource provider in the resource aggregation participating group completing the application service SDK to be completed; A compiling module, configured to compile the completed application service SDK of each resource provider and encapsulate it into an independent application package; The deployment module is configured to deploy the service resource applications corresponding to each resource provider in the remote server based on each of the application packages, and establish an associated logical relationship between each of the resource providers, application packages and service resource applications.
10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Patent Citations
Resource management method and device, equipment and storage medium
CN115129423A
Lightweight terminal resource pre-installation method oriented to application service
CN115297120A
Operator calling system, operator generating method and electronic equipment
CN115309562A
Data processing method, data interaction method and related device
CN118069174A
Geo-replicated service management
US20220229705A1