Resource acquisition method, device, computer equipment and storage medium

By determining the identification of the resources required by the component in the SDK, generating requests and judging the update situation, and only issuing necessary resources, it solves the performance and bandwidth waste problems caused by traditional full downloads, and realizes efficient management of SDK resources.

CN114721698BActive Publication Date: 2025-08-12TENCENT TECHNOLOGY (SHENZHEN) CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110004470.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-01-04
Publication Date
2025-08-12
Estimated Expiration
2041-01-04

AI Technical Summary

Technical Problem

The full download of traditional SDK resource packages results in a lot of dirty data, reducing SDK performance and wasting network bandwidth. The existing optimization solution will still issue full resources when some resources are updated, affecting performance and wasting bandwidth.

Method used

By responding to user operations, determine the target component to be called in the SDK, obtain the resource identification of the resource required by the component, and generate a resource acquisition request. The SDK server determines whether the resource is updated based on the identification, and only issues the updated resource or empty information, and the terminal calls the component based on the local resources.

Benefits of technology

It realizes the on-demand issuance of SDK resources, reduces the amount of dirty data, improves SDK performance and saves bandwidth.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114721698B_ABST
    Figure CN114721698B_ABST
Patent Text Reader

Abstract

The present application provides a resource acquisition method, apparatus, computer device, and storage medium. The method comprises: determining a target component to be called in an SDK in response to a user operation; determining at least one resource required for the SDK to call the target component; obtaining a first resource identifier for each of at least one resource currently stored locally, wherein the first resource identifier of the resource represents the version of the resource currently stored locally; generating and sending a resource acquisition request to an SDK server based on the first resource identifier of at least one resource; and receiving the updated at least one resource locally stored on the SDK server in response to the resource acquisition request, upon determining that at least one resource has been updated based on the first resource identifier. The present application implements on-demand resource delivery, reduces the amount of dirty data returned to the accessing party SDK, improves SDK performance, and saves bandwidth.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer processing technology, and more specifically, to a resource acquisition method, apparatus, computer equipment, and storage medium. Background Art

[0002] A software development kit (SDK, full name: Software Development Kit) is a collection of development tools used by software engineers to build applications for specific software packages, software frameworks, hardware platforms, operating systems, and so on. Generally speaking, when common functionality is involved in software development, it is abstracted into an SDK, such as sharing, login, and payment functions. When an SDK is provided to a user, it comes with a number of resources, which are typically packaged into an SDK resource package and provided to the user. However, due to the continuous iteration of SDK functionality, many resources need to be downloaded and updated from the server.

[0003] Traditionally, the accessing SDK downloads and updates the required SDK resource packages at specific times. For example, it requests resources from the SDK server at each startup. Upon receiving the resource request, the SDK server sends the required resource package to the accessing SDK. The accessing SDK then filters the required resources based on whether the local resources exist or are the latest. This approach requires a full download of the SDK resource package each time, which not only returns a large amount of dirty data to the accessing SDK, reducing SDK performance, but also wastes network bandwidth.

[0004] The existing technology optimizes the traditional technology. When the access party SDK sends a resource request to the SDK server, the resource request indicates the SDK version required by the current access party SDK. The SDK server compares the SDK version indicated by the current resource request with the SDK version indicated by the most recent resource request sent by the access party SDK before sending the current resource request, and determines whether the SDK version indicated by the current resource request is the same as the SDK version indicated by the most recent resource request sent by the access party SDK before sending the current resource request. If they are the same, empty data is sent to the access party SDK. If they are not the same, it determines that the SDK version indicated by the current resource request is a changed business relative to the SDK version indicated by the most recent resource request sent by the access party SDK before sending the current resource request, and sends the resources related to the changed business to the access party SDK. Although the existing technology avoids the full delivery of SDK resource packages to a certain extent, if the resource request only needs to update part of the resources in the business, the full resources of the business will still be delivered, which not only affects the SDK performance but also causes network bandwidth waste. Summary of the Invention

[0005] In view of this, and to solve the above problems, the present invention provides a resource acquisition method, apparatus, computer device, and storage medium to deliver resources on demand in response to operations on the access party SDK, thereby reducing the amount of dirty data returned to the access party SDK, improving SDK performance, and saving bandwidth. The technical solution is as follows:

[0006] A resource acquisition method, comprising:

[0007] In response to a user operation, determining a target component to be called in a software development kit (SDK) of an access party, wherein the SDK is composed of one or more services, and each of the services is composed of one or more components;

[0008] Determine at least one resource required by the SDK to call the target component;

[0009] Obtaining a first resource identifier of each of the at least one resource currently stored locally, where the first resource identifier of the resource represents a version of the resource currently stored locally;

[0010] Generate a resource acquisition request according to the first resource identifier of the at least one resource and send it to the SDK server;

[0011] When the SDK server determines that the at least one resource is updated according to the first resource identifier in response to the resource acquisition request, the updated at least one resource stored locally in the SDK server is returned.

[0012] A resource acquisition method, comprising:

[0013] The receiving terminal generates a resource acquisition request in response to a user operation according to a target component to be called in a software development kit (SDK) of the access party, wherein the SDK is composed of one or more services, and each of the services is composed of one or more components;

[0014] Obtaining a first resource identifier of each of at least one resource required by the SDK to call the target component and carried in the resource acquisition request and currently stored locally on the terminal;

[0015] Determining whether the at least one resource has been updated according to the first resource identifier of the at least one resource carried in the resource acquisition request;

[0016] If the at least one resource is updated, the at least one updated resource currently stored locally is returned to the terminal.

[0017] A resource acquisition device, comprising:

[0018] A target component determination unit, configured to determine, in response to a user operation, a target component to be called in a software development kit (SDK) of an access party, wherein the SDK is composed of one or more services, and each of the services is composed of one or more components;

[0019] A resource determining unit, configured to determine at least one resource required by the SDK to call the target component;

[0020] A first identification obtaining unit, configured to obtain a first resource identification of each of the at least one resource currently stored locally, wherein the first resource identification of the resource represents a version of the resource currently stored locally;

[0021] a resource acquisition request sending unit, configured to generate a resource acquisition request according to the first resource identifier of the at least one resource and send the resource acquisition request to the SDK server;

[0022] The resource receiving unit is configured to receive the updated at least one resource stored locally on the SDK server, which is returned by the SDK server in response to the resource acquisition request when the SDK server determines that the at least one resource is updated according to the first resource identifier.

[0023] A resource acquisition device, comprising:

[0024] A resource acquisition request receiving unit, configured to receive a resource acquisition request generated by a terminal in response to a user operation according to a target component to be called in an access-party software development kit (SDK), wherein the SDK is composed of one or more services, and each of the services is composed of one or more components;

[0025] A second identification obtaining unit is configured to obtain a first resource identification of each of at least one resource required by the SDK to call the target component and carried in the resource obtaining request and stored locally on the terminal;

[0026] a determining unit, configured to determine whether the at least one resource has been updated according to the first resource identifier of the at least one resource carried in the resource acquisition request;

[0027] The resource returning unit is configured to return the updated at least one resource currently stored locally to the terminal if the at least one resource is updated.

[0028] A computer device comprises: a processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is used to call and execute a program stored in the memory; and the memory is used to store a program, wherein the program is used to implement the resource acquisition method.

[0029] A computer-readable storage medium stores a computer program, which is loaded and executed by a processor to implement the steps of the resource acquisition method.

[0030] The present application provides a resource acquisition method, apparatus, computer device, and storage medium. The SDK accessed by the access party on a terminal is composed of one or more services, each of which is composed of one or more components. By presetting the resources required for each component in the SDK to be called, the corresponding resources can be retrieved from the SDK server on a component-by-component basis in response to user operations. This enables the SDK server to deliver resources to the access party SDK on demand in response to user operations on the access party SDK, reducing the amount of dirty data returned to the access party SDK, improving SDK performance, and saving bandwidth. BRIEF DESCRIPTION OF THE DRAWINGS

[0031] 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 merely embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying any creative work.

[0032] Figure 1 A schematic diagram of a resource acquisition system provided in an embodiment of the present application;

[0033] Figure 2 A timing diagram of a resource acquisition method provided in an embodiment of the present application;

[0034] Figure 3 A flow chart of a resource acquisition method provided in an embodiment of the present application;

[0035] Figure 4 A flow chart of another resource acquisition method provided in an embodiment of the present application;

[0036] Figure 5 A schematic diagram of a resource acquisition method provided in an embodiment of the present application;

[0037] Figure 6 A schematic diagram of a resource acquisition method scenario provided in an embodiment of the present application;

[0038] Figure 7 A schematic diagram of the structure of a resource acquisition device provided in an embodiment of the present application;

[0039] Figure 8 A schematic diagram of the structure of another resource acquisition device provided in an embodiment of the present application;

[0040] Figure 9A hardware structure block diagram of a computer device applicable to a resource acquisition method provided in an embodiment of the present application. DETAILED DESCRIPTION

[0041] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. 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 are within the scope of protection of the present invention.

[0042] Based on the above background technology, whether it is traditional technology or existing technology, when the SDK server sends resources to the access party SDK, there is a serious situation of sending dirty data to the access party, which not only wastes bandwidth but also affects the performance of the SDK.

[0043] Dirty data refers to data in the source system that is not within the given range or is meaningless to the actual business, or the data format is illegal, or there is non-standard coding and ambiguous business logic in the source system.

[0044] In view of this, the present application provides a resource acquisition method, apparatus, computer equipment and storage medium to respond to the user's operation on the access party SDK and send the resources required for the operation to the access party SDK. This realizes the on-demand delivery of resources, reduces the amount of dirty data returned to the access party SDK, improves SDK performance, and saves bandwidth.

[0045] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.

[0046] A resource acquisition method provided in an embodiment of the present application is applied to a resource acquisition system, such as Figure 1 As shown, the resource acquisition system consists of a terminal and a server. The terminal has an application installed, the application is connected to the SDK, and the SDK server provides service support for the SDK connected to the application. It should be noted that the application connected to the SDK can be considered as the SDK access party.

[0047] In the embodiment of the present application, the SDK connected to the application can be called an SDK interface. The SDK interface provides one or more services, each of which is composed of one or more components. Taking a service as an example, the functions of the service can be considered to be composed of the functions of all components that constitute the service.

[0048] For example, the SDK provides sharing functionality, which may include WeChat sharing services, QQ sharing services, Weibo sharing services, etc. Taking a sharing service as an example, the sharing service may be implemented by one or more sharing steps, each of which corresponds to one or more components. The components corresponding to all sharing steps in the sharing service can be considered as the components that constitute the sharing service.

[0049] In an embodiment of the present application, a user performs an operation related to an accessed SDK in an application on a terminal. For example, a one-step operation requires the invocation of a component in the SDK, which in turn requires corresponding resources. In this case, the SDK needs to send a resource acquisition request to the SDK server based on the resources required by the component to be called in the SDK. The SDK server then sends the resources related to the operation to the SDK based on the resource acquisition request.

[0050] For example, the application installed by the user on the terminal can be connected to the SDK. When the user performs an operation related to the SDK on the terminal, the SDK on the terminal can respond to the user operation to determine the component in the SDK corresponding to the current user operation (that is, the SDK responds to the user operation to determine the component to be called. For the sake of distinction, the component to be called can be referred to as the target component), and obtain at least one resource required to call the target component, and then generate a resource acquisition request based on the resource identifier of each resource in at least one resource stored locally on the current terminal (for the sake of distinction, the resource identifier of the resource stored locally on the current terminal is referred to as the first resource identifier), and send the resource acquisition request to the SDK server.

[0051] Accordingly, after receiving the resource acquisition request, the SDK server can determine the above-mentioned at least one resource based on the first resource identifier carried in the resource acquisition request, and then obtain the resource identifier of each resource in the at least one resource locally stored by the current SDK server (for the sake of convenience of distinction, the resource identifier of the resource locally stored by the current SDK server is referred to as the second resource identifier), and determine whether there is an update to the at least one resource locally stored by the current SDK server relative to the at least one resource locally stored by the current terminal based on the first resource identifier and the second resource identifier of the at least one resource; if there is an update, the SDK server sends the at least one locally stored resource to the terminal, and the terminal relies on the at least one resource sent by the SDK server to call the target component; if there is no update, the SDK server returns empty information to the terminal, and the terminal relies on the at least one resource locally stored by the current terminal to call the target component. Empty information can be considered as an empty set.

[0052] Exemplarily, the terminal can be any electronic product that can interact with the user through one or more methods such as a keyboard, touchpad, touch screen, remote control, voice interaction or handwriting device. Exemplarily, the terminal can be a mobile phone, tablet computer, laptop computer, PDA, personal computer, smart speaker, wearable device, smart TV, smart watch, etc., but is not limited to these. It should be noted that Figure 1 Only two examples of terminals are shown in the figure. Regarding the specific form of the terminal, those skilled in the art can set it according to their own needs, and it is not limited here.

[0053] The server can be an independent physical server, a server cluster or distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms. The terminal and the server can be directly or indirectly connected through wired or wireless communication to provide a resource acquisition method, which is not limited in this application.

[0054] This application provides a resource acquisition system consisting of a terminal and an SDK server. The SDK accessed by the terminal is composed of one or more services, each of which is composed of one or more components. By presetting the resources required for each component in the SDK to be called, the corresponding resources can be retrieved from the SDK server on a component-by-component basis in response to user operations. This enables the SDK server to deliver resources to the accessing SDK on demand in response to user operations on the accessing SDK, reducing the amount of dirty data returned to the accessing SDK, improving SDK performance, and saving bandwidth.

[0055] The following describes in detail a resource acquisition method provided by an embodiment of the present application from the perspective of interaction between the terminal and the server. Figure 2 A timing diagram of a resource acquisition method is shown.

[0056] like Figure 2 As shown, the method includes:

[0057] S201: The terminal determines the target component to be called in the access party SDK in response to a user operation. The SDK is composed of one or more services, and each service is composed of one or more components.

[0058] In this embodiment of the present application, a user can install an application on a terminal, and the application can be connected to an SDK. When the application is connected to the SDK, the application can be referred to as the access party, and the SDK connected to the application can be referred to as the access party SDK. An SDK is composed of one or more services, and a service is composed of one or more components.

[0059] For example, the user performs SDK-related operations on the terminal application (access party). The SDK can respond to the user operation, query the correspondence between the pre-set operations and components, and determine the component corresponding to the current user operation. For easy distinction, the component corresponding to the current user operation is called the target component. The target component can be considered as the component that needs to be called in response to the current user operation.

[0060] S202: The terminal determines at least one resource required for the SDK to call the target component;

[0061] In this embodiment of the application, the SDK is composed of one or more services, and a service is composed of one or more components. The SDK is pre-set with the corresponding relationship between components and resources. Taking a component as an example, the pre-set resources corresponding to the component can be considered as the resources required to call the component.

[0062] The resources corresponding to different components may be the same or different. The specific contents of the resources corresponding to the components can be set by those skilled in the art according to their needs and are not limited here.

[0063] Exemplarily, after determining the target component to be called in the access party SDK in response to a user operation, the correspondence between pre-set components and resources can be queried to determine all resources corresponding to the target component, and the determined resources can be determined as the resources required to call the target component.

[0064] It should be noted that the number of resources corresponding to the target component may be one or more. For the sake of distinction, all the resources corresponding to the target component can be referred to as at least one resource, which is all the resources required to call the target component.

[0065] S203. The terminal obtains a first resource identifier of each resource in at least one resource currently stored locally, where the first resource identifier of the resource represents a version of the resource currently stored locally;

[0066] In an embodiment of the present application, the SDK will carry the SDK's resource package when accessing the application. That is, when the user installs the application on the terminal, if the SDK is accessed in the application, the SDK accessed in the application will carry the SDK's resource package. This resource package can also be considered as the SDK's resource package stored locally on the terminal. The SDK's resource package carries all the resources required by the SDK.

[0067] For example, an SDK is composed of one or more services, and a service is composed of one or more components. Therefore, the SDK can be considered to be composed of one or more components, and the SDK resources include the resources required to carry each component used to constitute the SDK.

[0068] SDK resource packages can be divided according to business functions and resource types. For example, a business in the SDK consists of one or more steps, each of which corresponds to one or more components. Executing a step requires calling the corresponding component. It should be noted that typically, one step corresponds to one component. For example, responding to a step executed by a user requires calling a component corresponding to that step.

[0069] Exemplarily, an SDK consists of one or more services. Taking a service as an example, each step that constitutes the service can be considered a service function. A service function corresponds to a component, and a component requires one or more resources. For example, in the Scan SDK, the resource package of the Scan SDK contains files, images, text information, etc., which can be directly divided into file a, file b, file c, image d, image e, image f, text g, text h, and text i according to resource type. According to the service, it can be divided into "Bank Card Number Identification" service and "ID Number Identification" service. The "Bank Card Number Identification" service includes the "Scan Page" step and the "Bank Card Number Identification" step. The "ID Number Identification" service includes the "Scan Page" step and the "ID Number Identification" step. The "Scan Page" step requires text g, text h, text i, image d, and image e. The "ID Number Identification" step and the "Bank Card Number Identification" step both require algorithm model resource files and basic resource images. For example, the "ID Number Identification" step and the "Bank Card Number Identification" step both require file a, text b, file c, image e, and image f.

[0070] When the SDK is connected to the application, it will carry the SDK resource package. Correspondingly, after the application connected to the SDK is installed on the terminal, the application installed on the terminal will carry the SDK resource package. It can also be considered that the terminal locally stores the SDK resource package. The SDK resource package includes all the resources required by the SDK. Each resource carries a resource identifier. The resource identifier carried by the resource not only indicates the resource but also the version of the resource.

[0071] Furthermore, after the terminal receives the resources returned from the SDK server, if the corresponding resources do not exist in the SDK resource package stored locally in the terminal, the received resources can be added to the SDK resource package stored locally in the terminal; if the corresponding resources exist in the SDK resource package stored locally in the terminal, the received resources can be used to update the corresponding resources in the SDK resource package stored locally in the terminal, for example, replacing the resources stored locally in the terminal with the corresponding resources returned from the SDK server.

[0072] For example, after a terminal receives a resource returned from an SDK server, if the SDK resource package locally stored on the terminal contains a target resource that indicates the resource and carries a resource identifier, then the terminal considers that the SDK resource package locally stored on the terminal contains a resource corresponding to the received resource. If the SDK resource package locally stored on the terminal does not contain a target resource that indicates the resource and carries a resource identifier, then the terminal considers that the SDK resource package locally stored on the terminal does not contain a resource corresponding to the received resource. The target resource can be considered to be the resource corresponding to the received resource.

[0073] It should be noted that the SDK server can modify resources. Taking a resource as an example, each time a modification is completed on the resource, the version of the resource is updated. Accordingly, the resource indicated by the resource identifier of the resource has not changed, but the resource version indicated by the resource identifier of the resource has changed. In addition, the SDK server can also create resources. After the SDK on the terminal responds to the user operation and determines that the target component to be called requires a newly created resource, the newly created resource can be obtained from the SDK server. The newly created resource carries a unique resource identifier, which indicates the newly created resource and the current version of the newly created resource. The terminal stores the resources obtained from the SDK server in the local SDK resource package of the terminal.

[0074] The resource identifier carried by a resource can not only indicate the resource, but also indicate the resource version. Exemplarily, the resource identifier carried by a resource can be composed of the resource name and the resource modification time, where the resource name indicates the resource and the resource modification time indicates the resource version. If the resource is a newly created resource, the resource identifier of the resource is composed of the resource name and the resource creation time, where the resource creation time indicates the resource version; further, each time a modification of the resource is completed, the resource identifier of the resource can be updated, and the updated resource identifier is composed of the resource name and the modification time of the resource. For example, the updated resource identifier can be composed of the resource name and the modification completion time of the resource.

[0075] S204. The terminal generates a resource acquisition request according to a first resource identifier of at least one resource;

[0076] In an embodiment of the present application, after the terminal determines the target component to be called in the SDK in response to a user operation and determines at least one resource required for the SDK to call the target component, it can obtain the resource identifier carried by each resource in at least one resource stored locally on the terminal. For ease of distinction, the resource identifier of the resource stored locally on the terminal can be referred to as the first resource identifier of the resource, and then a resource acquisition request is generated based on the first resource identifiers of all resources in the at least one resource.

[0077] Exemplarily, an information calculation method is pre-set in the SDK, and the information calculation method is used to calculate the first resource identifiers of all resources in at least one resource to generate first information representing at least one resource, and then a resource acquisition request is generated based on the first resource identifiers and first information of all resources in at least one resource, and the resource acquisition request is sent to the SDK server.

[0078] S205, the terminal sends a resource acquisition request to the SDK server;

[0079] In this embodiment of the present application, the resource acquisition request carries the first resource identifiers of all resources in at least one resource and first information generated by calculating all the first resource identifiers in at least one resource.

[0080] Exemplarily, a method of using an information calculation method to calculate the first resource identifiers of all resources in at least one resource to generate first information representing at least one resource can be: sorting at least one resource according to a preset sorting rule to generate a resource sequence, splicing the first resource identifiers of each resource in the resource sequence into first splicing information according to the sorting of the resources in the resource sequence, and converting the first splicing information into an md5 value. The md5 value obtained by the conversion can be considered as the first information generated based on the first resource identifiers of all resources in at least one resource.

[0081] S206. The SDK server receives a resource acquisition request generated by the terminal in response to the user operation according to the target component to be called in the access party's software development kit SDK, where the SDK is composed of one or more services, and each service is composed of one or more components;

[0082] In an embodiment of the present application, after the SDK on the terminal generates a resource acquisition request, the SDK can send the resource acquisition request to the SDK server through the terminal. Correspondingly, the SDK server can receive the resource acquisition request sent by the terminal.

[0083] S207. The SDK server obtains a first resource identifier of each resource in at least one resource required for the SDK to call the target component stored locally on the current terminal and carried in the resource acquisition request;

[0084] In the embodiment of the present application, after the SDK server receives the resource acquisition request sent by the SDK through the terminal, it can obtain each first resource identifier and first information carried in the resource acquisition request.

[0085] Because the first resource identifier indicates the existence of resources, the SDK server can determine at least one resource required by the SDK on the terminal based on the first resource identifiers carried in the resource acquisition request, and then the SDK server can obtain the resource identifier of each resource in at least one resource stored locally on the SDK server. For ease of distinction, the resource identifier of the resource obtained locally from the SDK server can be called the second resource identifier.

[0086] In an embodiment of the present application, the SDK server may use the above-mentioned information calculation method to calculate the second resource identifiers of all resources in at least one resource to generate second information representing at least one resource stored locally on the SDK server.

[0087] Exemplarily, the SDK server uses the above-mentioned information calculation method to calculate the second resource identifiers of all resources in at least one resource to generate the second information representing at least one resource stored locally on the SDK server. The method can be: the SDK server sorts at least one resource according to the above-mentioned sorting rule to obtain a resource sequence, splices the second resource identifiers of each resource in the resource sequence into second splicing information according to the sorting of the resources in the resource sequence, and converts the second splicing information into an md5 value. The md5 value obtained by the conversion can be considered as the second information generated based on the second resource identifiers of all resources in at least one resource stored locally on the SDK server.

[0088] In an embodiment of the present application, the SDK server can compare whether the first information and the second information are the same. If the first information and the second information are the same, the SDK server can determine that at least one resource locally stored on the current SDK server has not been updated relative to at least one resource locally stored on the current terminal (i.e., at least one resource has not been updated); if the first information and the second information are not the same, the SDK server can determine that at least one resource locally stored on the current SDK server has been updated relative to at least one resource locally stored on the current terminal (i.e., at least one resource has been updated).

[0089] S208. When the SDK server determines, based on the first resource identifier of the at least one resource carried in the resource acquisition request, that at least one resource has been updated, the SDK server returns the updated at least one resource currently stored locally to the terminal;

[0090] In an embodiment of the present application, when the SDK server determines, based on the first resource identifier of at least one resource carried in the resource acquisition request, that at least one resource currently stored locally on the SDK server is updated relative to at least one resource currently stored locally on the terminal, the SDK server can return the at least one resource currently stored locally to the terminal.

[0091] Exemplarily, the SDK server can determine whether the current SDK server locally stores resources carrying the second information. If it is determined that the current SDK server locally stores resources carrying the second information, the resources carrying the second information stored locally on the current SDK server can be directly returned to the terminal, so that the SDK on the terminal relies on the resource call target component returned by the SDK server, and updates the corresponding resources in the SDK resource package stored locally on the terminal according to the resources returned by the SDK server. On the contrary, if it is determined that the current SDK server does not locally store resources carrying the second information, at least one resource stored locally on the current SDK server can be integrated to obtain a resource (for ease of distinction, the obtained resource can be referred to as an integrated resource), and the second information can be set for the integrated resource so that the integrated resource carries the second information, and then the integrated resource carrying the second information is stored locally on the SDK server, and the integrated resource carrying the second information is returned to the terminal, so that the SDK on the terminal relies on the resource call target component returned by the SDK server, and updates the corresponding resources in the SDK resource package stored locally on the terminal according to the resources returned by the SDK server.

[0092] In the embodiment of the present application, integrating at least one resource may be considered as putting at least one resource together.

[0093] This application is based on the integration and storage of resources. The next time the current terminal or other terminals request the same resources, there is no need to integrate the resources, but the resources can be directly distributed, thereby improving the SDK performance.

[0094] Furthermore, when the SDK server determines, based on the first resource identifier of at least one resource carried in the resource acquisition request, that at least one resource stored locally on the current SDK server has not been updated relative to at least one resource stored locally on the current terminal, the SDK server may return empty information to the terminal. Exemplarily, the empty information may be an empty set. Accordingly, after receiving the empty information returned by the SDK server, the SDK on the terminal may learn that at least one resource stored locally on the current SDK server has not been updated relative to at least one resource stored locally on the current terminal, and the SDK on the terminal may then directly call the target component based on at least one resource stored locally on the current terminal.

[0095] S209: When the terminal receives the SDK server's response to the resource acquisition request and determines according to the first resource identifier that at least one resource is updated, the terminal returns the updated at least one resource stored locally in the SDK server.

[0096] Exemplarily, after the SDK on the terminal receives at least one resource returned by the SDK server, it uses the at least one received resource to call the target component, and updates the corresponding resources in the SDK resource package stored locally on the current terminal based on the at least one received resource; after the SDK on the terminal receives the empty information returned by the SDK server, it directly uses the at least one resource stored locally on the current terminal to call the target component.

[0097] This application provides a resource acquisition method. The SDK accessed by the access party on the terminal consists of one or more services, each of which consists of one or more components. By pre-setting the resources required for each component in the SDK to be called, the corresponding resources can be obtained from the SDK server on a component-by-component basis in response to user operations. This enables the SDK server to deliver resources to the access party SDK on demand in response to user operations on the access party SDK, reducing the amount of dirty data returned to the access party SDK, improving SDK performance, and saving bandwidth.

[0098] The following takes a terminal as an example to describe in detail a resource acquisition method provided by an embodiment of the present application. Figure 3 As shown, the method includes:

[0099] S301: Determine, in response to a user operation, a target component to be called in the access party's software development kit (SDK), where the SDK consists of one or more services, and each service consists of one or more components;

[0100] S302, determining at least one resource required for the SDK to call the target component;

[0101] S303: Obtain a first resource identifier of each resource in at least one resource currently stored locally, where the first resource identifier of the resource represents a version of the resource currently stored locally;

[0102] S304: Generate a resource acquisition request based on a first resource identifier of at least one resource and send it to the SDK server;

[0103] S305: Receive the updated at least one resource stored locally on the SDK server in response to the resource acquisition request, if the SDK server determines that at least one resource has been updated according to the first resource identifier;

[0104] S306: Receive empty information returned by the SDK server in response to the resource acquisition request when it is determined based on the first resource identifier that at least one resource does not have an update.

[0105] An embodiment of the present application provides a resource acquisition method, applied to a terminal, wherein the SDK accessed by the access party on the terminal is composed of one or more services, each of which is composed of one or more components. By pre-setting the resources required for each component in the SDK to be called, the corresponding resources can be obtained from the SDK server on a component-by-component basis in response to user operations. This enables the SDK server to deliver resources to the access party SDK on demand in response to user operations on the access party SDK, reduces the amount of dirty data returned to the access party SDK, improves SDK performance, and saves bandwidth.

[0106] The following takes the SDK server as an example to describe in detail a resource acquisition method provided by the embodiment of the present application. Figure 4 As shown, the method includes:

[0107] S401: The receiving terminal responds to a user operation and generates a resource acquisition request based on a target component to be called in the access party's software development kit (SDK). The SDK is composed of one or more services, and each service is composed of one or more components.

[0108] S402: Obtain a first resource identifier of each resource in at least one resource required for the SDK to call a target component stored locally on the current terminal and carried in the resource acquisition request;

[0109] S403. Determine whether at least one resource has been updated based on the first resource identifier of at least one resource carried in the resource acquisition request. If it is determined that at least one resource has been updated based on the first resource identifier of at least one resource carried in the resource acquisition request, execute step S404. If it is determined that at least one resource has not been updated based on the first resource identifier of at least one resource carried in the resource acquisition request, execute step S405.

[0110] S404: Return at least one updated resource currently stored locally to the terminal;

[0111] S405: Return empty information to the terminal.

[0112] The present application provides a resource acquisition method, in which an SDK server can receive a resource acquisition request generated and sent by an SDK on a terminal in response to a user operation. The resource acquisition request indicates obtaining at least one resource required by a target component to be called by the SDK in response to the user operation. When the SDK server determines that at least one resource locally stored on the current SDK server is updated relative to at least one resource locally stored on the current terminal, the SDK server sends at least one resource locally stored on the current SDK server to the terminal. The SDK server responds to the resource acquisition request to implement on-demand resource delivery based on user operations, and user operations correspond to components of the services in the SDK, rather than to services in the SDK. In this way, the resources required by the user operation are delivered to the SDK, reducing the amount of dirty data returned to the SDK, improving SDK performance, and saving bandwidth.

[0113] Moreover, when the SDK server determines that at least one resource stored locally on the current SDK server has not been updated relative to at least one resource stored locally on the current terminal, it does not send at least one resource to the SDK. Instead, the SDK uses at least one resource stored locally on the current terminal to call the target component, thereby further improving SDK performance and saving bandwidth.

[0114] The following is combined with Figure 5 The resource acquisition method schematic diagram shown provides a detailed description of a resource acquisition method provided in an embodiment of the present application.

[0115] like Figure 5 As shown in the figure, the resource acquisition process includes the following steps:

[0116] 1. The SDK segments the required resources. The segmentation rules can be based on business functions, resource types, or both. Different SDKs have different segmentation rules.

[0117] In the embodiment of the present application, after the SDK responds to the user operation and determines the target component to be called, it can be considered that the SDK is about to be updated. At this time, it is necessary to check the resource module (the resource module here can be considered as the SDK resource package stored locally on the current terminal). Figure 5 The resources A and B in the figure are just a schematic diagram of the resource segmentation of the SDK resource package stored locally on the current terminal. It does not limit the resources in the SDK resource package to be divided into resources A and resources B. Technical personnel in this field can segment the SDK resource package according to their own needs, which is not limited here.

[0118] For example, in the Scan SDK, the resource package of the Scan SDK contains files, pictures, text information, etc., which can be directly divided into file a, file b, file c, picture d, picture e, picture f, text g, text h, and text i according to the resource type. According to the business, it can be divided into "Bank Card Number Identification" business and "ID Number Identification" business. The "Bank Card Number Identification" business includes the "Scan Page" step and the "Bank Card Number Identification" step. The "ID Number Identification" business includes the "Scan Page" step and the "ID Number Identification" step. Among them, the "Scan Page" step requires text g, text h, text i, picture d, and picture e. The "ID Number Identification" step and the "Bank Card Number Identification" step both require algorithm model resource files and basic resource pictures. For example, the "ID Number Identification" step and the "Bank Card Number Identification" step both require file a, text b, file c, picture e, and picture f.

[0119] For example, in the SDK, after responding to the user operation to determine the target component, if the resources required to call the target component include files and pictures, the required files include file a and file b, and the required pictures include picture c, then when requesting the SDK interface, the resource identifier of file a, the resource identifier of file b, and the resource identifier of picture c stored locally on the terminal, and the resource identifier of file a, the resource identifier of file b, and the resource identifier of picture c stored locally on the terminal are converted into md5 values (first information) and transmitted to the server (i.e., SDK server) through a resource acquisition request.

[0120] 2. After receiving the resource acquisition request, the SDK server attempts to match the segmented data with the corresponding resource by verifying the first information. For example, the SDK can determine that the target component needs file a, file b, and image c based on the resource identifier carried in the resource acquisition request. At this time, the SDK server obtains the resource identifier of file a, the resource identifier of text b, and the resource identifier of image c stored locally, and converts the obtained resource identifier of file a, text b, and image c stored locally on the SDK server into an md5 value (second information); determines whether the first information and the second information are consistent. If the first information and the second information are inconsistent, the SDK server queries the corresponding resource locally and sends it to the terminal SDK; if the first information and the second information are consistent, the SDK server sends an empty set to the terminal SDK.

[0121] 3. When the SDK server matches the first information and the second information and finds that they are inconsistent, it queries the database for the corresponding resource information and sends it to the terminal SDK. In particular, if the first information and the second information are completely consistent, an empty set is sent to the terminal SDK.

[0122] Exemplarily, the resources stored in the database of the SDK server may be considered as resources stored locally on the SDK server.

[0123] In an embodiment of the present application, when the first information and the second information are inconsistent, if a resource carrying the second information is queried from the database, it is considered that the resource required by the SDK is matched. At this time, the queried resource carrying the second information is directly sent to the terminal SDK; conversely, when the first information and the second information are inconsistent, if the resource carrying the second information is not queried from the database, file a, file b and picture c can be integrated to generate a resource consisting of file a, file b and picture c. After setting the second information for the resource, the resource carries the second information, and the resource carrying the second information is stored in the database.

[0124] Subset: If set M has three elements a, b, and c, then its subsets are a, b, c, ab, ac, bc, abc, and the empty set.

[0125] Binary algorithm: an algorithm that calculates all subsets of a set. For example, if a set M has three elements a, b, and c, this algorithm can be used to construct eight sets: a, b, c, ab, ac, bc, abc, and the empty set, which are subsets of M.

[0126] In an embodiment of the present application, the SDK can segment the SDK resource package it needs, view the SDK resource package as an M set, and view each segmented data of the SDK resource package as an element in the M set. In this way, the SDK resource package (M set) is composed of multiple elements, and a subset of the M set is generated in advance using a binary algorithm. Each subset of the M set is composed of index information of the elements that constitute the subset, and the subsets of the M set are stored. In this way, when integrating the resources corresponding to the subset, the elements can be directly obtained according to the index of the elements that constitute the subset, and the obtained elements can be integrated into resources, thereby improving data processing speed.

[0127] For example, if the SDK segments the required SDK resource package into file a, file b, picture c, and picture d, then the new data set obtained by using the binary algorithm to generate subsets of the SDK resource package (set M) is a subset of abcd, where the non-empty subsets are a, b, c, ab, ac, bc, and abc respectively.

[0128] See for example Figure 6A schematic diagram of a resource acquisition scenario is shown. If the SDK segments its required resources (SDK resource package) into file A, file B, and image C, the SDK server generates corresponding subsets in advance based on the segmentation results (a subset consisting of the index information of file A, a subset consisting of the index information of file B, a subset consisting of the index information of image C, a subset consisting of the index information of file A and the index information of file B, a subset consisting of the index information of file A and the index information of image C, a subset consisting of the index information of file A, the index information of text B, and the index information of image C); in this way, the SDK determines the target component to be called in response to the user operation, and generates and sends a resource acquisition request to the SDK server based on the segmented data required to call the target component; accordingly, after receiving the resource acquisition request, the SDK server performs a subset operation on the segmented data required for the resource acquisition request to generate the corresponding resource and sends it to the terminal SDK.

[0129] For example, a method for performing a subset operation on the segmented data required for a resource acquisition request to generate the corresponding resource may include determining a subset corresponding to the segmented data required for the resource acquisition request, obtaining the corresponding segmented data based on index information carried by the subset, integrating the obtained segmented data into a resource, and delivering the resource to the terminal SDK. The index information of the segmented data may be the index information stored in the database for the segmented data.

[0130] This application provides a resource acquisition method in which a terminal SDK segments resources and uploads them to an SDK server. The SDK server then uses a binary algorithm to perform a subset operation on the resources, generating the resources actually required by the SDK and then sending them back to the SDK. This method not only reduces dirty data returned by the server, shortens the SDK's data parsing time, improves SDK performance, but also conserves bandwidth resources.

[0131] Figure 7 A schematic diagram of the structure of a resource acquisition device provided in an embodiment of the present application.

[0132] like Figure 7 As shown, the device includes:

[0133] The target component determination unit 701 is configured to determine, in response to a user operation, a target component to be called in the access-party software development kit (SDK). The SDK is composed of one or more services, and each service is composed of one or more components.

[0134] A resource determination unit 702 is configured to determine at least one resource required by the SDK to call a target component;

[0135] A first identification obtaining unit 703 is configured to obtain a first resource identification of each resource in at least one resource currently stored locally, where the first resource identification of the resource represents a version of the resource currently stored locally;

[0136] A resource acquisition request sending unit 704 is configured to generate a resource acquisition request according to a first resource identifier of at least one resource and send the resource acquisition request to the SDK server;

[0137] The resource receiving unit 705 is configured to receive at least one updated resource stored locally in the SDK server, which is returned by the SDK server in response to the resource acquisition request when the SDK server determines that at least one resource is updated according to the first resource identifier.

[0138] In the embodiment of the present application, preferably, the resource receiving unit is further used to: receive empty information returned by the SDK server in response to the resource acquisition request when it is determined that there is no update for at least one resource according to the first resource identifier.

[0139] In the embodiment of the present application, preferably, the resource acquisition request sending unit includes:

[0140] A first information generating unit, configured to calculate a first resource identifier of at least one resource and generate first information representing at least one resource currently stored locally;

[0141] a resource acquisition request generating unit, configured to generate a resource acquisition request according to a first resource identifier and first information of at least one resource;

[0142] The resource acquisition request sending subunit is used to send a resource acquisition request to the SDK server.

[0143] Figure 8 A schematic diagram of another resource acquisition device provided in an embodiment of the present application.

[0144] like Figure 8 As shown, the device includes:

[0145] The resource acquisition request receiving unit 801 is configured to receive a resource acquisition request generated by a terminal in response to a user operation based on a target component to be called in the access-party software development kit (SDK). The SDK is composed of one or more services, and each service is composed of one or more components.

[0146] The second identifier obtaining unit 802 is configured to obtain a first resource identifier of each resource in at least one resource required for the SDK to call the target component stored locally on the current terminal and carried in the resource obtaining request;

[0147] An update determination unit 803 is configured to determine whether at least one resource has been updated according to a first resource identifier of at least one resource carried in a resource acquisition request;

[0148] The resource returning unit 804 is configured to return the updated at least one resource currently stored locally to the terminal if at least one resource is updated.

[0149] In the embodiment of the present application, preferably, the update judgment unit includes:

[0150] A resource determining unit, configured to determine at least one resource according to a first resource identifier carried in a resource acquisition request;

[0151] an acquiring unit, configured to acquire a second resource identifier of each resource in at least one resource currently stored locally;

[0152] a generating unit, configured to calculate a second resource identifier of at least one resource and generate second information representing at least one resource currently stored locally;

[0153] A comparison unit, configured to compare the first information and the second information to determine whether they are identical;

[0154] a first determining unit, configured to determine that there is no update of at least one resource if the first information and the second information are the same;

[0155] The second determining unit is configured to determine that at least one resource is updated if the first information and the second information are different.

[0156] In the embodiment of the present application, preferably, the resource returning unit includes:

[0157] a resource determination unit, configured to determine whether a resource carrying the second information is currently stored locally;

[0158] A first returning unit, configured to return the resource carrying the second information to the terminal if a resource carrying the second information is currently stored locally;

[0159] The second returning unit is used to integrate at least one resource currently stored locally into a resource carrying the second information if no resource carrying the second information is currently stored locally, locally store the integrated resource, and return the integrated resource to the terminal.

[0160] like Figure 9 FIG. 1 is a block diagram of an implementation of a computer device provided in an embodiment of the present application. The electronic device includes:

[0161] Memory 901, used for storing programs;

[0162] Processor 902 is configured to execute a program, wherein the program is specifically configured to:

[0163] In response to a user operation, the target component to be called in the access party's software development kit (SDK) is determined. The SDK consists of one or more services, and each service consists of one or more components.

[0164] Determine at least one resource required by the SDK to call the target component;

[0165] Obtaining a first resource identifier of each resource in at least one resource currently stored locally, where the first resource identifier of the resource represents a version of the resource currently stored locally;

[0166] Generate a resource acquisition request based on a first resource identifier of at least one resource and send it to an SDK server;

[0167] receiving, in response to the resource acquisition request, at least one updated resource locally stored on the SDK server, when the SDK server determines according to the first resource identifier that at least one resource has been updated;

[0168] or,

[0169] The receiving terminal responds to the user operation and generates a resource acquisition request based on the target component to be called in the access party's software development kit SDK. The SDK consists of one or more services, and each service consists of one or more components.

[0170] Obtaining a first resource identifier of each resource in at least one resource required for the SDK to call the target component stored locally on the current terminal and carried in the resource acquisition request;

[0171] Determining whether at least one resource has been updated according to the first resource identifier of at least one resource carried in the resource acquisition request;

[0172] If at least one resource is updated, the at least one updated resource currently stored locally is returned to the terminal.

[0173] The processor 902 may be a central processing unit (CPU) or an application-specific integrated circuit (ASIC).

[0174] The control device may further include a communication interface 903 and a communication bus 904 , wherein the memory 901 , the processor 902 and the communication interface 903 communicate with each other via the communication bus 904 .

[0175] An embodiment of the present application also provides a readable storage medium on which a computer program is stored. The computer program is loaded and executed by a processor to implement the various steps of the above-mentioned resource acquisition method. The specific implementation process can refer to the description of the corresponding part of the above-mentioned embodiment, and will not be repeated in this embodiment.

[0176] This application also provides a computer program product or computer program, which includes computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the methods provided in the various optional implementations of the resource acquisition method or resource acquisition apparatus described above. The specific implementation process can be referred to the description of the corresponding embodiments above and is not described in detail here.

[0177] The present application provides a resource acquisition method, apparatus, computer device, and storage medium. The SDK accessed by the access party on a terminal is composed of one or more services, each of which is composed of one or more components. By presetting the resources required for each component in the SDK to be called, the corresponding resources can be retrieved from the SDK server on a component-by-component basis in response to user operations. This enables the SDK server to deliver resources to the access party SDK on demand in response to user operations on the access party SDK, reducing the amount of dirty data returned to the access party SDK, improving SDK performance, and saving bandwidth.

[0178] The above is a detailed introduction to a resource acquisition method, device, computer equipment and storage medium provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.

[0179] It should be noted that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. Reference can be made to the common and similar parts between the various embodiments. For the devices disclosed in the embodiments, since they correspond to the methods disclosed in the embodiments, the description is relatively simple, and the relevant parts can be referred to the method description.

[0180] It should also be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that the process, method, article, or apparatus comprising a series of elements inherent to the elements, or also including elements inherent to these processes, methods, articles, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or apparatus comprising the element.

[0181] The above description of the disclosed embodiments is intended to enable one skilled in the art to implement or use the present invention. Various modifications to these embodiments will be readily apparent to one skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention is not limited to the embodiments shown herein but is intended to conform to the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A resource acquisition method, characterized in that: include: In response to a user operation, a target component to be called in the access party's software development kit (SDK) is determined. The SDK is composed of one or more services, each of which is composed of one or more components. The SDK segments its required resource packages, uses each segmented data as an element in an M set, calculates all subsets of the M set, each subset of the M set is composed of index information of the elements constituting the subset, and stores the subsets of the M set. Determine at least one resource required by the SDK to call the target component; Obtaining a first resource identifier of each of the at least one resource currently stored locally, where the first resource identifier of the resource represents a version of the resource currently stored locally; Generate and send a resource acquisition request to the SDK server based on the first resource identifiers and first information of all resources in the at least one resource, where the first information is generated based on the first resource identifiers of all resources in the at least one resource, and the first information includes an MD5 value; When receiving the SDK server's response to the resource acquisition request and determining that at least one resource has been updated based on the first information and the second information, determine the subset corresponding to the segmented data required for the resource acquisition request, and return the updated at least one resource locally stored on the SDK server based on the index information carried by the subset. The second information is generated based on the second resource identifier of all resources in the at least one resource locally stored on the SDK server, and the second information includes an md5 value.

2. The method according to claim 1, characterized in that Also includes: Receive empty information returned by the SDK server in response to the resource acquisition request when it is determined according to the first resource identifier that there is no update for the at least one resource.

3. The method according to claim 1, characterized in that The generating and sending a resource acquisition request to the SDK server according to the first resource identifiers and the first information of all resources in the at least one resource includes: Calculating a first resource identifier of the at least one resource to generate first information representing the at least one resource currently stored locally; generating a resource acquisition request according to the first resource identifier of the at least one resource and the first information; Send the resource acquisition request to the SDK server.

4. A resource acquisition method, characterized in that: include: The receiving terminal generates a resource acquisition request in response to a user operation based on a target component to be called in the access party's software development kit (SDK). The SDK is composed of one or more services, each of which is composed of one or more components. The SDK segments its required resource package, uses each segmented data as an element in an M set, calculates all subsets of the M set, each subset of the M set is composed of index information of the elements constituting the subset, and stores the subsets of the M set. Obtaining first information of at least one resource required by the SDK to call the target component, which is currently stored locally on the terminal and carried in the resource acquisition request, wherein the first information is generated based on first resource identifiers of all resources in the at least one resource, and the first information includes an MD5 value; Determining whether the at least one resource has been updated based on first information and second information of the at least one resource carried in the resource acquisition request, where the second information is generated based on second resource identifiers of all resources in the at least one resource locally stored on the SDK server, and the second information includes an MD5 value; If the at least one resource is updated, a subset corresponding to the segmented data required by the resource acquisition request is determined, and the at least one updated resource currently stored locally is returned to the terminal according to index information carried by the subset.

5. The method according to claim 4, characterized in that The determining, according to the first information and the second information of the at least one resource carried in the resource acquisition request, whether the at least one resource has been updated includes: Determining the at least one resource according to the first resource identifier carried in the resource acquisition request; Obtaining a second resource identifier of each of the at least one resource currently stored locally; Calculating a second resource identifier of the at least one resource to generate second information representing the at least one resource currently stored locally; comparing the first information and the second information to determine whether they are identical; If the first information and the second information are the same, determining that there is no update to the at least one resource; If the first information and the second information are different, it is determined that the at least one resource is updated.

6. The method according to claim 5, characterized in that The returning the updated at least one resource currently stored locally to the terminal includes: Determining whether a resource carrying the second information is currently stored locally; If a resource carrying the second information is currently stored locally, returning the resource carrying the second information to the terminal; If no resource carrying the second information is currently stored locally, the at least one resource currently stored locally is integrated into a resource carrying the second information, the integrated resource is locally stored, and the integrated resource is returned to the terminal.

7. A resource acquisition device, characterized in that: include: A target component determination unit is configured to determine, in response to a user operation, a target component to be called in a software development kit (SDK) of an access party. The SDK is composed of one or more services, each of which is composed of one or more components. The SDK segments its required resource packages, uses each segmented data as an element in an M set, calculates all subsets of the M set, each subset of the M set is composed of index information of the elements constituting the subset, and stores the subsets of the M set. A resource determining unit, configured to determine at least one resource required by the SDK to call the target component; A first identification obtaining unit, configured to obtain a first resource identification of each of the at least one resource currently stored locally, wherein the first resource identification of the resource represents a version of the resource currently stored locally; a resource acquisition request sending unit, configured to generate and send a resource acquisition request to the SDK server based on first resource identifiers and first information of all resources in the at least one resource, wherein the first information is generated based on the first resource identifiers of all resources in the at least one resource, and the first information includes an MD5 value; A resource receiving unit is used to receive the SDK server's response to the resource acquisition request, and when it is determined that the at least one resource has been updated based on the first information and the second information, determine the subset corresponding to the segmented data required for the resource acquisition request, and return the updated at least one resource locally stored on the SDK server based on the index information carried by the subset, wherein the second information is generated based on the second resource identifier of all resources in the at least one resource locally stored on the SDK server, and the second information includes an md5 value.

8. The device according to claim 7, characterized in that The resource receiving unit is further configured to receive null information returned by the SDK server in response to the resource acquisition request when the SDK server determines, based on the first resource identifier, that no update exists for the at least one resource.

9. The device according to claim 7, characterized in that The resource acquisition request sending unit includes: A first information generating unit, configured to calculate a first resource identifier of the at least one resource and generate first information representing the at least one resource currently stored locally; a resource acquisition request generating unit, configured to generate a resource acquisition request according to the first resource identifier of the at least one resource and the first information; The resource acquisition request sending subunit is used to send the resource acquisition request to the SDK server.

10. A resource acquisition device, characterized in that: include: A resource acquisition request receiving unit is configured to receive a resource acquisition request generated by a terminal in response to a user operation based on a target component to be called in an access-party software development kit (SDK). The SDK is composed of one or more services, each of which is composed of one or more components. The SDK segments its required resource package, uses each segmented data as an element in an M set, calculates all subsets of the M set, each subset of the M set is composed of index information of the elements constituting the subset, and stores the subsets of the M set. A second identification acquisition unit is configured to acquire first information from at least one resource required by the SDK to call the target component and currently stored locally on the terminal and carried in the resource acquisition request, wherein the first information is generated based on first resource identifiers of all resources in the at least one resource, and the first information includes an MD5 value; a determining unit, configured to determine whether the at least one resource has been updated based on first information and second information of the at least one resource carried in the resource acquisition request, wherein the second information is generated based on second resource identifiers of all resources in the at least one resource locally stored on the SDK server, and the second information includes an MD5 value; The resource returning unit is configured to determine a subset corresponding to the segmented data required for the resource acquisition request if the at least one resource is updated, and return the updated at least one resource currently stored locally to the terminal according to index information carried by the subset.

11. The device according to claim 10, characterized in that The update judgment unit includes: a resource determining unit, configured to determine the at least one resource according to the first resource identifier carried in the resource acquisition request; an acquiring unit, configured to acquire a second resource identifier of each of the at least one resource currently stored locally; a generating unit, configured to calculate a second resource identifier of the at least one resource and generate second information representing the at least one resource currently stored locally; a comparing unit, configured to compare whether the first information and the second information are identical; a first determining unit, configured to determine that there is no update to the at least one resource if the first information and the second information are the same; The second determining unit is configured to determine that an update exists on the at least one resource if the first information and the second information are different.

12. The device according to claim 11, characterized in that The resource returning unit includes: a resource determination unit, configured to determine whether a resource carrying the second information is currently stored locally; a first returning unit, configured to return the resource carrying the second information to the terminal if a resource carrying the second information is currently stored locally; The second returning unit is used to integrate the at least one resource currently stored locally into a resource carrying the second information if no resource carrying the second information is currently stored locally, locally store the integrated resource, and return the integrated resource to the terminal.

13. A computer device, characterized in that: include: A processor and a memory, wherein the processor and the memory are connected via a communication bus; wherein the processor is configured to call and execute a program stored in the memory; The memory is used to store a program, and the program is used to implement the resource acquisition method according to any one of claims 1 to 3 or the resource acquisition method according to any one of claims 4 to 6.

14. A computer-readable storage medium, characterized in that A computer program is stored thereon, and the computer program is loaded and executed by a processor to implement the steps of the resource acquisition method according to any one of claims 1 to 3 or the steps of the resource acquisition method according to any one of claims 4 to 6.

15. A computer program product comprising a computer program, characterized in that When the method is run on a computer device, the computer device executes each step of the resource acquisition method according to any one of claims 1 to 3 or each step of the resource acquisition method according to any one of claims 4 to 6.

Citation Information

Patent Citations

  • Application resource management method, use method and device

    CN108287758A