CN111338651B - Method and device for providing download resource, and method and device for downloading resource - Google Patents

Method and device for providing download resource, and method and device for downloading resource Download PDF

Info

Publication number
CN111338651B
CN111338651B CN202010102873.9A CN202010102873A CN111338651B CN 111338651 B CN111338651 B CN 111338651B CN 202010102873 A CN202010102873 A CN 202010102873A CN 111338651 B CN111338651 B CN 111338651B
Authority
CN
China
Prior art keywords
function
sub
code
library
sdk
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010102873.9A
Other languages
Chinese (zh)
Other versions
CN111338651A (en
Inventor
周暄承
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Douyin Vision Co Ltd
Douyin Vision Beijing Co Ltd
Original Assignee
Beijing ByteDance Network Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Beijing ByteDance Network Technology Co Ltd filed Critical Beijing ByteDance Network Technology Co Ltd
Priority to CN202010102873.9A priority Critical patent/CN111338651B/en
Publication of CN111338651A publication Critical patent/CN111338651A/en
Application granted granted Critical
Publication of CN111338651B publication Critical patent/CN111338651B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • G06F8/61Installation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Abstract

The present disclosure provides a method and an apparatus for providing download resources, and a method and an apparatus for downloading resources, wherein, a plurality of sub-functions of a target software tool development kit SDK are first determined; then, generating an object code base for realizing each sub-function; and finally, generating a sub-SDK capable of realizing each sub-function based on the object code library so as to provide the sub-SDK corresponding to the sub-function requested in the download request based on the download request of the service access terminal. The object code library comprises at least one function code block, and each function code block corresponds to one function module of the sub-function. The method and the device realize that the needed sub SDK is provided for the service access terminal instead of the whole SDK comprising all functions, so that the volume of the SDK which is needed to be downloaded by the service access terminal can be effectively reduced, and potential problems such as abnormal functions and the like caused by useless codes in the SDK can be avoided.

Description

Method and device for providing download resource, and method and device for downloading resource
Technical Field
The present disclosure relates to the field of computer technology and software processing, and in particular, to a method and apparatus for providing a download resource, and a method and apparatus for downloading a resource.
Background
Software development kit SDKs are typically collections of development tools that build application software for a particular software package, software framework, hardware platform, operating system, or the like. In a specific application, the resource providing terminal provides the SDK for the service access terminal, and the service access terminal accesses the technical platform by using the downloaded SDK after downloading the SDK.
As the functions provided by the technical platform are increasingly perfect and the volume of the SDK is also increased, the corresponding APP in the service access terminal occupies the larger volume of the service access terminal after the service access terminal downloads the SDK. In addition, the SDK downloaded by the service access terminal may include some codes that are not needed by the current service access terminal, and these redundant codes use HOOK function HOOK to easily cause problems such as abnormal functions.
Disclosure of Invention
Accordingly, the present disclosure provides at least a method and apparatus for providing download resources, and a method and apparatus for downloading resources.
In a first aspect, the present disclosure provides a download resource providing method, including:
determining a plurality of sub-functions of the development kit SDK of the target software tool;
generating an object code base corresponding to each sub-function aiming at each sub-function; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function;
And generating a sub-SDK corresponding to the sub-function based on the object code library so as to provide the sub-SDK corresponding to the sub-function requested in the download request based on the download request of the service access terminal.
In one possible implementation, the function code blocks include function code blocks in a three-party library on which the corresponding sub-functions depend;
the generating, for each sub-function, an object code library corresponding to the sub-function includes:
respectively acquiring a three-party library on which each sub-function depends;
screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks;
generating a basic code base based on the obtained basic function code blocks;
and respectively generating an object code library of the sub-function and an object code library corresponding to other sub-functions comprising the basic code library based on the basic code library and the three-party library corresponding to the sub-function.
In one possible implementation manner, based on the base code library and the three-party library corresponding to each sub-function, generating an object code library corresponding to other sub-functions further includes:
and removing function code blocks which exist in the basic code library simultaneously in the three-party library relied by each other sub-function aiming at each other sub-function to obtain a duplicate removal function code library, and generating the target code library corresponding to each other sub-function based on the duplicate removal function code library relied by each other sub-function.
In a possible implementation manner, the generating, based on the object code library, a sub SDK corresponding to a sub function includes:
acquiring service realization codes corresponding to the other sub-functions;
and respectively generating the sub SDKs based on the service realization codes corresponding to the basic code library and the service realization codes corresponding to the duplicate removal function code library.
In one possible implementation manner, the plurality of sub-functions include a basic function and at least one business function, and generating a sub-SDK corresponding to the sub-function based on the object code library includes:
respectively acquiring service realization codes corresponding to the basic function and the at least one service function;
generating a basic function SDK based on the service realization code of the basic function and the service realization code corresponding to the basic code library;
and generating a service function sub SDK based on the service realization code of the at least one service function and the corresponding duplicate removal function code library.
In a second aspect, the present disclosure provides a resource downloading method, including:
generating a resource downloading request comprising function requirement information;
the resource downloading request is sent to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information and feeds back a target sub-software tool development kit SDK corresponding to the sub-function;
And realizing the corresponding sub-function by utilizing the received target sub-SDK.
In one possible implementation manner, the method for downloading resources further includes:
receiving a basic SDK sent by the resource providing end in response to the resource downloading request; wherein the base SDK comprises overlapping function code blocks in three-party libraries on which the resource provider end depends on the sub-functions of the target software tool development kit SDK.
In a third aspect, the present disclosure provides a download resource providing apparatus, including:
the function splitting module is used for determining a plurality of sub functions of the SDK of the target software tool development kit;
the code base determining module is used for generating an object code base corresponding to each sub-function; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function;
and the tool package generating module is used for generating the sub SDK corresponding to the sub function based on the target code library so as to provide the sub SDK corresponding to the sub function requested in the downloading request based on the downloading request of the service access terminal.
In one possible implementation, the function code blocks include function code blocks in a three-party library on which the corresponding sub-functions depend;
The code base determining module is used for generating an object code base corresponding to each sub-function when the object code base corresponding to the sub-function is generated:
respectively acquiring a three-party library on which each sub-function depends;
screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks;
generating a basic code base based on the obtained basic function code blocks;
and respectively generating an object code library of the sub-function and an object code library corresponding to other sub-functions comprising the basic code library based on the basic code library and the three-party library corresponding to the sub-function.
In one possible implementation manner, the code base determining module is further configured to, when generating the object code base corresponding to the other sub-functions based on the base code base and the three-party base corresponding to the sub-functions:
and removing function code blocks which exist in the basic code library simultaneously in the three-party library relied by each other sub-function aiming at each other sub-function to obtain a duplicate removal function code library, and generating the target code library corresponding to each other sub-function based on the duplicate removal function code library relied by each other sub-function.
In one possible implementation manner, the tool kit generating module is configured to, when generating the sub SDK corresponding to the sub function based on the object code library:
acquiring service realization codes corresponding to the other sub-functions;
and respectively generating the sub SDKs based on the service realization codes corresponding to the basic code library and the service realization codes corresponding to the duplicate removal function code library.
In one possible implementation, the plurality of sub-functions includes a base function and at least one business function;
the tool kit generation module is used for generating a sub SDK corresponding to a sub function based on the target code library, wherein the sub SDK is as follows:
respectively acquiring service realization codes corresponding to the basic function and the at least one service function;
generating a basic function SDK based on the service realization code of the basic function and the service realization code corresponding to the basic code library;
and generating a service function sub SDK based on the service realization code of the at least one service function and the corresponding duplicate removal function code library.
In a fourth aspect, the present disclosure provides a resource downloading apparatus, including:
a download request generation module for generating a resource download request including function requirement information;
A download request sending module, configured to send the resource download request to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information, and feeds back a target sub-software tool development kit SDK corresponding to the sub-function;
and the function realizing module is used for realizing the corresponding sub-function by utilizing the received target sub-SDK.
In a fifth aspect, the present disclosure provides an electronic device comprising: a processor, a memory and a bus, said memory storing machine readable instructions executable by said processor, said processor and said memory communicating via the bus when the electronic device is running, said machine readable instructions when executed by said processor performing the steps of the download resource providing method or the resource downloading method as described above.
In a sixth aspect, the present disclosure also provides a computer readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of a download resource providing method or a resource downloading method as described above.
The apparatus, electronic device, and computer-readable storage medium of the present disclosure include at least technical features substantially the same as or similar to technical features of any one embodiment of any one of the above-described methods of the present disclosure.
The present disclosure provides at least one method and apparatus for providing download resources, and a method and apparatus for downloading resources, wherein, first, a plurality of sub-functions of a target software tool development kit SDK are determined; then, generating an object code base for realizing each sub-function; and finally, generating a sub-SDK capable of realizing each sub-function based on the object code library so as to provide the sub-SDK corresponding to the sub-function requested in the download request based on the download request of the service access terminal. The object code library comprises at least one function code block, and each function code block corresponds to one function module of the sub-function. The method and the device realize that the needed sub SDK is provided for the service access terminal instead of the whole SDK comprising all functions, so that the volume of the SDK which is needed to be downloaded by the service access terminal can be effectively reduced, and potential problems such as abnormal functions and the like caused by redundant codes in the SDK can be avoided.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are needed in the embodiments will be briefly described below, it being understood that the following drawings only illustrate certain embodiments of the present disclosure and therefore should not be considered as limiting the scope, and other related drawings may be obtained according to these drawings without inventive effort for a person of ordinary skill in the art.
FIG. 1 illustrates a flowchart of a download resource provisioning method provided by an embodiment of the present disclosure;
FIG. 2 shows a schematic diagram of the structure of an SDK in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram of a configuration of forming a child SDK directly using a three-party library in an embodiment of the present disclosure;
FIG. 4 is a flowchart of generating an implementation sub-function object code library in yet another download resource providing method provided by an embodiment of the present disclosure;
FIG. 5 illustrates a schematic diagram of a structure of forming a child SDK using an object code library in an embodiment of the present disclosure;
FIG. 6 shows a flowchart of a resource downloading method provided by an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram of a download resource providing apparatus according to an embodiment of the present disclosure;
fig. 8 illustrates a schematic structural diagram of a resource downloading device according to an embodiment of the present disclosure;
fig. 9 shows a schematic structural diagram of an electronic device according to an embodiment of the disclosure.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions of the embodiments of the present disclosure will be clearly and completely described with reference to the accompanying drawings in the embodiments of the present disclosure, it should be understood that the drawings in the present disclosure are for the purpose of illustration and description only, and are not intended to limit the scope of protection of the present disclosure. In addition, it should be understood that the schematic drawings are not drawn to scale. A flowchart, as used in this disclosure, illustrates operations implemented according to some embodiments of the present disclosure. It should be understood that the operations of the flow diagrams may be implemented out of order and that steps without logical context may be performed in reverse order or concurrently. Moreover, one or more other operations may be added to or removed from the flow diagrams by those skilled in the art in light of the present disclosure.
In addition, the described embodiments are only some, but not all, of the embodiments of the present disclosure. The components of the embodiments of the present disclosure, which are generally described and illustrated in the figures herein, may be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the disclosure, as claimed, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be made by those skilled in the art based on the embodiments of this disclosure without making any inventive effort, are intended to be within the scope of this disclosure.
In order to enable those skilled in the art to use the present disclosure, the following embodiments are presented in connection with a specific application scenario "providing download resources for a service access in a mobile operating system iOS". It will be apparent to those skilled in the art that the general principles defined herein may be applied to other embodiments and application scenarios in which it is desirable to provide download resources for a service access without departing from the spirit and scope of the present disclosure. Although the present disclosure is primarily described in the context of providing download resources for a service access in a mobile operating system iOS, it should be understood that this is but one exemplary embodiment.
It should be noted that the term "comprising" will be used in embodiments of the present disclosure to indicate the presence of the stated features hereinafter, but not to preclude the addition of further features.
As shown in fig. 1, an embodiment of the present disclosure provides a method for providing a download resource, where the method is applied to a resource providing end that needs to provide a download resource for a service access end, and specifically may include the following steps:
s110, determining a plurality of sub-functions of the development kit SDK of the target software tool.
Here, the resource providing terminal first splits the target SDK itself according to the granularity of the function based on the function that the technical platform can provide, to obtain a plurality of sub-functions. The sub-functions may include a base function and at least one business function. The base functions may include a network function, a log function, a buried point function, etc. The service function is other functions that the SDK can implement on the basis of the basic function, such as a billing function, etc.
S120, generating an object code library corresponding to each sub-function for realizing the sub-function; the object code library comprises at least one function code block, and each function code block corresponds to one function module of the sub-function.
Implementation of the sub-functions described above requires reliance on at least one three-party library that includes all of the functional code blocks implementing the corresponding sub-functions. Because overlapping function code blocks may exist between different three-party libraries in the at least one three-party library, the three-party libraries need to be split, combined and the like to obtain the target code library corresponding to the sub-function. The object code library corresponding to the sub-function may only include a part of function code blocks for realizing the corresponding sub-function. There are no overlapping blocks of functional code between different object code libraries.
As shown in fig. 2, the basic function in the sub-functions depends on a basic three-party library, the service function 1 depends on a three-party library 1, the service function 2 depends on a three-party library 2, and the service function 3 depends on a three-party library 3.
Overlapping function code blocks may exist between the three-party libraries on which different sub-functions depend, for example, the function code blocks overlapped between the three-party library 1 and the three-party library 2 include a function code block e, a function code block g, a function code block h and a function code block i; the overlapped function code blocks between the three-party library 2 and the three-party library 3 comprise a function code block l, a function code block h and a function code block i.
Because overlapping function code blocks may exist in the three-party libraries depending on different sub-functions, if the sub-functions and the three-party libraries depending on the sub-functions are simply packaged into sub-SDKs, as shown in FIG. 3, overlapping function code blocks in the repeatedly packaged three-party libraries occur, and after the service access terminal downloads a plurality of sub-SDKs including the overlapping code blocks, errors are caused by repeatedly introducing the function code blocks in the three-party libraries. In this step, the function code blocks in the three-party library on which the sub-functions depend are processed, specifically, the function code blocks in two or more three-party libraries simultaneously exist are separated from the original three-party library and packaged to form a basic code library, and then the object code library corresponding to each sub-function is formed based on the remaining function code blocks in the three-party library corresponding to each sub-function. After the overlapped function code blocks in the three-party library and other three-party libraries are removed, the library formed by the rest function code blocks can also be called a duplicate removal function code library.
In addition, for the basic function, the encapsulated basic code library and the object code library corresponding to the formed basic function can be combined to obtain the final object code library corresponding to the basic function.
Because no overlapped functional code blocks exist between different object code libraries, the problem of errors caused by repeated introduction of the functional code blocks in the three-party library does not occur based on the sub SDK formed by the object code libraries.
And S130, generating a sub SDK corresponding to the sub function based on the object code library so as to provide the sub SDK corresponding to the sub function requested by the download request for the service access terminal based on the download request of the service access terminal.
After determining an object code library on which the sub-function is realized, acquiring a service realization code for realizing the sub-function, and packaging the service realization code and the object code library to obtain a sub-SDK capable of realizing the sub-function. As shown in fig. 2, the service implementation code of each sub-function may be regarded as having a layer of implementation with the SDK code.
The embodiment realizes that the needed sub SDK is provided for the service access terminal instead of the whole SDK comprising all functions, thereby effectively reducing the volume of the SDK which is needed to be downloaded by the service access terminal and avoiding the potential problems of function abnormality and the like caused by useless codes in the SDK.
In some embodiments, as shown in fig. 4, the generating, for each sub-function, the object code library corresponding to the sub-function may be implemented specifically by the following steps:
S410, respectively acquiring the three-party libraries on which each sub-function depends.
And S420, screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks.
Here, the function code blocks existing in two or more three-party libraries simultaneously are screened out from each three-party library, the screened function code blocks are taken as basic function code blocks, and the rest function code blocks can be called non-basic function code blocks.
S430, generating a basic code base based on the obtained basic function code blocks.
S440, respectively generating an object code library of the sub-function and an object code library corresponding to other sub-functions comprising the basic code library based on the basic code library and the three-party library corresponding to the sub-function.
The sub-functions include a base function and at least one business function. For the basic function, the following steps can be utilized to form an object code base corresponding to the basic function:
and merging the object code library corresponding to the determined basic function with the basic code library to obtain a final object code library corresponding to the basic function.
After obtaining the final target code library corresponding to the basic function, the following steps can be used to form the sub-SDKs corresponding to the basic function, namely the following basic function SDKs: and generating a basic function SDK based on the service realization code of the basic function, the service realization code corresponding to the basic code library and the final target code library corresponding to the basic function.
For other business functions, the following steps can be used to form an object code library corresponding to the business function:
and removing all other sub-functions, namely function code blocks which exist in the basic code library at the same time in the three-party library on which the other business functions depend, so as to obtain a duplicate removal function code library, and generating target code libraries corresponding to all other sub-functions based on the duplicate removal function code library on which the other sub-functions depend.
After obtaining the object code library corresponding to other service functions, the following steps can be used to form the sub-SDK corresponding to other service functions:
and generating a service function sub SDK based on the service realization code of the at least one service function and the corresponding duplicate removal function code library.
In this way, after receiving the resource download request sent by the service access terminal, the resource providing terminal needs to send the sub-SDK corresponding to the basic function, that is, the basic function SDK, to the service access terminal at the same time, in addition to sending the sub-SDK corresponding to the sub-function requested by the resource download request to the service access terminal. And then, the service access terminal can utilize the received SDK to realize the sub-function requested by the resource downloading request.
In addition, the basic function and the business function can not be distinguished, and the same method is used for each sub-function to form a corresponding target code library: namely, firstly eliminating function code blocks which exist in the base code library at the same time in the three-party library on which the sub-function depends; and then, generating an object code library corresponding to the sub-function based on the residual function code blocks in the three-party library on which the sub-function depends.
As can be seen from the above description, with the present embodiment, the object code library corresponding to the basic function and the object code library corresponding to the business function can be formed, where the methods for forming the object code library of the basic function and the object code library corresponding to the business function are the same.
After the object code library corresponding to the basic function and the service function is formed by using the method of the embodiment, the sub SDK corresponding to each sub function may be generated based on the service implementation code corresponding to each sub function and the object code library. In addition, the service implementation code corresponding to the basic code library is acquired, and the basic SDK, that is, the sub SDK corresponding to the basic code library, is generated based on the service implementation code corresponding to the basic code library and the basic code library.
In this way, after receiving the resource download request sent by the service access terminal, the resource providing terminal sends the sub-SDK corresponding to the sub-function requested by the resource download request to the service access terminal, and also needs to send the basic SDK to the service access terminal at the same time. And then, the service access terminal can utilize the received SDK to realize the sub-function requested by the resource downloading request.
Above, all basic function code blocks in all three-party libraries are combined to form a basic code library, all non-basic function code blocks in all three-party libraries corresponding to each sub-function are combined to form an object code library of the sub-function, and when in specific implementation, the method can be completed by using the following pseudo codes:
Figure BDA0002387455410000111
Figure BDA0002387455410000121
In the above code, S 0 Is a set of basic function code blocks S 1 ~S n A set of function code blocks in the object code library on which each of the n sub-functions depends, S all And (3) collecting all function code blocks corresponding to all sub-functions. m is the total number of function code blocks in all three-party libraries on which a certain sub-function depends. D (D) i-j The j-th function code block in all the three-party libraries on which the sub-function i depends.
The method for forming the target code base by the pseudo code comprises the following steps: traversing each case where i takes a value from 0 to n, j takes a value from 1 to m, if D is to be taken i-j Put into a collection S all Before and S all Thereafter, set S all The number of elements in the list is unchanged (the collection has the property of not repeatedly storing the same element), which indicates D i-j Has been put into S before all D, i.e i-j Is a functional code block overlapped among a plurality of three-party libraries, and at the moment, the D i-j I.e. the basic function code block, will be D i-j Store into a base code library S 0 In (a) and (b); if at D i-j Put into a collection S all Before and S all Thereafter, set S all In (a) elementsThe number of elements is changed to indicate D i-j I.e. non-basic functional code block, the D is calculated i-j And placing the target code library of the corresponding sub-function.
When the specific implementation of the object code library corresponding to each sub-function is formed, the method can be realized by the following steps: judgment D i-j Whether the code exists in the basic code base, if not, D is carried out i-j And placing the target code library of the corresponding sub-function.
After the above-mentioned object code library is determined, as shown in fig. 5, the object code library of each sub-function and the corresponding service implementation code are packaged to obtain each sub-SDK.
As shown in fig. 6, the present disclosure further provides a resource downloading method, where the method is applied to a service access terminal that needs to download an SDK, and specifically includes:
s610, generating a resource downloading request comprising function requirement information.
When a service access terminal needs to access a technical platform, a resource downloading request can be generated based on the self requirement. The resource downloading request comprises function requirement information, the function requirement information corresponds to the sub-functions of the SDK, and the sub-functions required to be acquired or used by the service access terminal can be determined based on the function requirement information.
S620, the resource downloading request is sent to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information and feeds back a target sub-software tool development kit SDK corresponding to the sub-function.
In specific implementation, the sub-functions required by the service access terminal can include basic functions, and the corresponding basic functions can be acquired or realized from the technical platform by the service access terminal based on the sub-SDKs corresponding to the basic functions. In addition, the sub-functions required by the service access terminal can also include one or more service functions, and the service access terminal can acquire or realize the corresponding service functions from the technical platform based on the sub-SDKs corresponding to the service functions.
S630, the corresponding sub-function is realized by utilizing the received target sub-SDK.
According to the embodiment, the corresponding sub SDK is downloaded based on the requirement of the service access terminal, so that the volume of the SDK required to be downloaded by the service access terminal can be effectively reduced.
The resource downloading method may further include the following steps:
receiving a basic SDK sent by the resource providing end in response to the resource downloading request; wherein the base SDK comprises overlapping function code blocks in three-party libraries on which the resource provider end depends on the sub-functions of the target software tool development kit SDK.
Corresponding to the above-mentioned download resource providing method, the embodiment of the present disclosure further provides a download resource providing device, where the device is applied to a resource providing terminal that provides a download resource for a service access terminal, and the device and its respective modules can perform the same method steps as the above-mentioned download resource providing method, and achieve the same or similar beneficial effects, so that repeated parts will not be described again.
Specifically, as shown in fig. 7, the download resource providing apparatus of the present disclosure includes:
a function splitting module 710 for determining a plurality of sub-functions of the target software tool development kit SDK;
A code base determining module 720, configured to generate, for each sub-function, an object code base corresponding to the sub-function; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module under the sub-function;
and the tool pack generating module 730 is configured to generate, based on the object code library, a sub SDK corresponding to the sub function, so as to provide, based on a download request of the service access terminal, the sub SDK corresponding to the sub function requested in the download request.
In some embodiments, the function code blocks include function code blocks in a three-party library on which the corresponding sub-function depends;
the code base determining module 720 is configured to, for each sub-function, when generating an object code base corresponding to the sub-function:
respectively acquiring a three-party library on which each sub-function depends;
screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks;
generating a basic code base based on the obtained basic function code blocks;
and respectively generating an object code library of the sub-function and an object code library corresponding to other sub-functions comprising the basic code library based on the basic code library and the three-party library corresponding to the sub-function.
In some embodiments, the code base determining module 720 is further configured to, when generating, based on the base code base and the three-party base corresponding to each of the sub-functions, an object code base including the sub-functions of the base code base and an object code base corresponding to other sub-functions:
and removing function code blocks which exist in the basic code library simultaneously in the three-party library relied by each other sub-function aiming at each other sub-function to obtain a duplicate removal function code library, and generating target code libraries corresponding to each other sub-function based on the duplicate removal function code library relied by each other sub-function.
In some embodiments, the tool pack generating module 730 is configured to, when generating, based on the object code library, a child SDK corresponding to the child function:
acquiring service realization codes corresponding to other sub-functions;
and respectively generating the sub SDKs based on the service realization codes corresponding to the basic code library and the service realization codes corresponding to the duplicate removal function code library.
In some embodiments, the plurality of sub-functions includes a base function and at least one business function; the tool pack generating module 730 is configured to, when generating a sub SDK corresponding to a sub function based on the object code library:
Respectively acquiring service realization codes corresponding to the basic function and at least one service function;
generating a basic function SDK based on the service realization code of the basic function and the service realization code corresponding to the basic code library;
and generating a service function sub SDK based on the service realization code of the at least one service function and the corresponding duplicate removal function code library.
Corresponding to the above-mentioned resource downloading method, the embodiment of the present disclosure further provides a resource downloading device, where the device is applied to a service access terminal, and the device and its respective modules can execute the same method steps as the above-mentioned resource downloading method, and can achieve the same or similar beneficial effects, so that repeated parts will not be repeated.
Specifically, as shown in fig. 8, a resource downloading apparatus of the present disclosure includes:
a download request generation module 810 for generating a resource download request including function requirement information;
a download request sending module 820, configured to send the resource download request to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information, and feeds back a target sub-software tool development kit SDK corresponding to the sub-function;
The function implementation module 830 is configured to implement a corresponding sub-function by using the received target sub-SDK.
The embodiment of the disclosure discloses an electronic device, as shown in fig. 9, including: a processor 901, a memory 902 and a bus 903, the memory 902 storing machine readable instructions executable by the processor 901, the processor 901 and the memory 902 communicating over the bus 903 when the electronic device is running.
The machine readable instructions, when executed by the processor 901, perform the steps of a download resource provisioning method:
determining a plurality of sub-functions of the development kit SDK of the target software tool;
generating an object code base corresponding to each sub-function aiming at each sub-function; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function;
and generating a sub-SDK corresponding to the sub-function based on the object code library so as to provide the sub-SDK corresponding to the sub-function requested in the download request based on the download request of the service access terminal.
The machine readable instructions, when executed by the processor 901, may also perform the steps of a resource download method of:
generating a resource downloading request comprising function requirement information;
The resource downloading request is sent to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information and feeds back a target sub-software tool development kit SDK corresponding to the sub-function;
and realizing the corresponding sub-function by utilizing the received target sub-SDK.
In addition, when the machine-readable instructions are executed by the processor 901, the method content in any embodiment described in the method section above may be executed, which is not described herein.
The embodiment of the disclosure also provides a computer program product corresponding to the above method and apparatus, including a computer readable storage medium storing program code, where instructions included in the program code may be used to execute the method in the foregoing method embodiment, and specific implementation may refer to the method embodiment and will not be described herein.
The foregoing description of various embodiments is intended to highlight differences between the various embodiments, which may be the same or similar to each other by reference, and is not repeated herein for the sake of brevity.
It will be clearly understood by those skilled in the art that, for convenience and brevity of description, specific working procedures of the above-described system and apparatus may refer to corresponding procedures in the method embodiments, and will not be described in detail in this disclosure. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices, and methods may be implemented in other manners. The above-described apparatus embodiments are merely illustrative, and the division of the modules is merely a logical function division, and there may be additional divisions when actually implemented, and for example, multiple modules or components may be combined or integrated into another system, or some features may be omitted or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be through some communication interface, indirect coupling or communication connection of devices or modules, electrical, mechanical, or other form.
The modules described as separate components may or may not be physically separate, and components shown as modules may or may not be physical units, may be located in one place, or may be distributed over multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present disclosure may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer readable storage medium executable by a processor. Based on such understanding, the technical solution of the present disclosure may be embodied in essence or a part contributing to the prior art or a part of the technical solution, or in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in the embodiments of the present disclosure. And the aforementioned storage medium includes: a usb disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk, etc.
The foregoing is merely a specific embodiment of the disclosure, but the protection scope of the disclosure is not limited thereto, and any person skilled in the art can easily think about changes or substitutions within the technical scope of the disclosure, and it should be covered in the protection scope of the disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (13)

1. A download resource providing method, comprising:
determining a plurality of sub-functions of the development kit SDK of the target software tool;
respectively acquiring a three-party library on which each sub-function depends;
screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks;
generating a basic code base based on the obtained basic function code blocks;
based on the basic code library and the three-party library corresponding to the sub-function, respectively generating an object code library of the sub-function comprising the basic code library and object code libraries corresponding to other sub-functions; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function; the function code blocks comprise function code blocks in a three-party library on which the corresponding sub-functions depend;
And generating a sub-SDK corresponding to the sub-function based on the object code library so as to provide the sub-SDK corresponding to the sub-function requested in the download request based on the download request of the service access terminal.
2. The download resource providing method as claimed in claim 1, wherein generating the object code library corresponding to the other sub-functions based on the base code library and the three-party library corresponding to each of the sub-functions, further comprises:
and removing function code blocks which exist in the basic code library simultaneously in the three-party library relied by each other sub-function aiming at each other sub-function to obtain a duplicate removal function code library, and generating the target code library corresponding to each other sub-function based on the duplicate removal function code library relied by each other sub-function.
3. The download resource providing method as claimed in claim 2, wherein generating a sub SDK corresponding to a sub function based on the object code library comprises:
acquiring service realization codes corresponding to the other sub-functions;
and respectively generating the sub SDKs based on the service realization codes corresponding to the basic code library and the service realization codes corresponding to the duplicate removal function code library.
4. The download resource providing method as claimed in claim 2, wherein the plurality of sub-functions includes a base function and at least one service function, generating a sub-SDK corresponding to the sub-function based on the object code library, comprising:
respectively acquiring service realization codes corresponding to the basic function and the at least one service function;
generating a basic function SDK based on the service realization code of the basic function and the service realization code corresponding to the basic code library;
and generating a service function sub SDK based on the service realization code of the at least one service function and the corresponding duplicate removal function code library.
5. A method for downloading resources, comprising:
generating a resource downloading request comprising function requirement information;
the resource downloading request is sent to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information and feeds back a target sub-software tool development kit SDK corresponding to the sub-function; the target software tool development kit SDK is determined by: acquiring a three-party library on which the sub-function corresponding to the function demand information depends; screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks; generating a basic code base based on the obtained basic function code blocks; based on the basic code library and the three-party library corresponding to the sub-function, respectively generating an object code library of the sub-function comprising the basic code library and object code libraries corresponding to other sub-functions; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function; the function code blocks comprise function code blocks in a three-party library on which the corresponding sub-functions depend; generating the target sub-software tool development kit SDK corresponding to the sub-function based on the target code library;
And realizing the corresponding sub-function by utilizing the received target sub-software tool development kit SDK.
6. The resource downloading method as claimed in claim 5, further comprising:
receiving a basic SDK sent by the resource providing end in response to the resource downloading request; wherein the base SDK comprises overlapping function code blocks in three-party libraries on which the resource provider end depends on the sub-functions of the target software tool development kit SDK.
7. A download resource providing apparatus, comprising:
the function splitting module is used for determining a plurality of sub functions of the SDK of the target software tool development kit;
the code base determining module is used for respectively acquiring the three-party base on which each sub-function depends; screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks; generating a basic code base based on the obtained basic function code blocks; based on the basic code library and the three-party library corresponding to the sub-function, respectively generating an object code library of the sub-function comprising the basic code library and object code libraries corresponding to other sub-functions; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function; the function code blocks comprise function code blocks in a three-party library on which the corresponding sub-functions depend;
And the tool package generating module is used for generating the sub SDK corresponding to the sub function based on the target code library so as to provide the sub SDK corresponding to the sub function requested in the downloading request based on the downloading request of the service access terminal.
8. The download resource providing apparatus as claimed in claim 7, wherein the code library determining module, when generating the object code library corresponding to the other sub-function based on the base code library and the three-party library corresponding to the sub-function, is further configured to:
and removing function code blocks which exist in the basic code library simultaneously in the three-party library relied by each other sub-function aiming at each other sub-function to obtain a duplicate removal function code library, and generating the target code library corresponding to each other sub-function based on the duplicate removal function code library relied by each other sub-function.
9. The download resource providing apparatus as claimed in claim 8, wherein the toolkit generating module, when generating the sub SDK corresponding to the sub function based on the object code library, is configured to:
acquiring service realization codes corresponding to the other sub-functions;
and respectively generating the sub SDKs based on the service realization codes corresponding to the basic code library and the service realization codes corresponding to the duplicate removal function code library.
10. The download resource providing apparatus as defined in claim 8, wherein the plurality of sub-functions comprises a base function and at least one business function;
the tool kit generation module is used for generating a sub SDK corresponding to a sub function based on the target code library, wherein the sub SDK is as follows:
respectively acquiring service realization codes corresponding to the basic function and the at least one service function;
generating a basic function SDK based on the service realization code of the basic function and the service realization code corresponding to the basic code library;
and generating a service function sub SDK based on the service realization code of the at least one service function and the corresponding duplicate removal function code library.
11. A resource downloading apparatus, comprising:
a download request generation module for generating a resource download request including function requirement information;
a download request sending module, configured to send the resource download request to a resource providing end, so that the resource providing end determines a sub-function corresponding to the function requirement information, and feeds back a target sub-software tool development kit SDK corresponding to the sub-function; the target software tool development kit SDK is determined by: acquiring a three-party library on which the sub-function corresponding to the function demand information depends; screening out function code blocks which exist in other three-party libraries simultaneously from the three-party libraries aiming at each three-party library to obtain basic function code blocks; generating a basic code base based on the obtained basic function code blocks; based on the basic code library and the three-party library corresponding to the sub-function, respectively generating an object code library of the sub-function comprising the basic code library and object code libraries corresponding to other sub-functions; the object code library comprises at least one functional code block, and each functional code block corresponds to one functional module of the sub-function; the function code blocks comprise function code blocks in a three-party library on which the corresponding sub-functions depend; generating the target sub-software tool development kit SDK corresponding to the sub-function based on the target code library;
And the function realization module is used for realizing the corresponding sub-function by utilizing the received target sub-software tool development kit SDK.
12. An electronic device, comprising: a processor, a storage medium and a bus, the storage medium storing machine-readable instructions executable by the processor, the processor and the storage medium communicating over the bus when the electronic device is running, the processor executing the machine-readable instructions to perform the download resource providing method as claimed in any one of claims 1 to 4 or the resource downloading method as claimed in any one of claims 5 to 6.
13. A computer-readable storage medium, wherein a computer program is stored on the computer-readable storage medium, which when executed by a processor performs the download resource providing method according to any one of claims 1 to 4 or the resource downloading method according to any one of claims 5 to 6.
CN202010102873.9A 2020-02-19 2020-02-19 Method and device for providing download resource, and method and device for downloading resource Active CN111338651B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010102873.9A CN111338651B (en) 2020-02-19 2020-02-19 Method and device for providing download resource, and method and device for downloading resource

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010102873.9A CN111338651B (en) 2020-02-19 2020-02-19 Method and device for providing download resource, and method and device for downloading resource

Publications (2)

Publication Number Publication Date
CN111338651A CN111338651A (en) 2020-06-26
CN111338651B true CN111338651B (en) 2023-04-21

Family

ID=71185315

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010102873.9A Active CN111338651B (en) 2020-02-19 2020-02-19 Method and device for providing download resource, and method and device for downloading resource

Country Status (1)

Country Link
CN (1) CN111338651B (en)

Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102393845A (en) * 2011-06-30 2012-03-28 北京新媒传信科技有限公司 Shared library management method and system
US8522207B1 (en) * 2006-09-19 2013-08-27 United Services Automobile Association (Usaa) Systems and methods for automated centralized build/merge management
CN104239056A (en) * 2014-09-16 2014-12-24 国家电网公司 Software generation method, device and system
US9047106B1 (en) * 2010-06-29 2015-06-02 Emc Corporation Managing application features
CN104932901A (en) * 2015-07-08 2015-09-23 成都梦工厂网络信息有限公司 Cross-platform mobile SDK access method
CN107066291A (en) * 2017-02-09 2017-08-18 阿里巴巴集团控股有限公司 Packaging method, device and the equipment of SDK, computer-readable recording medium
CN107589947A (en) * 2017-08-02 2018-01-16 成都极娱网络科技有限公司 A kind of SDK cut-in methods, client and system
CN108595186A (en) * 2018-03-27 2018-09-28 天津麒麟信息技术有限公司 Multiversion software management method based on total function on a kind of platform of soaring
CN108829405A (en) * 2018-06-04 2018-11-16 网易(杭州)网络有限公司 The generation method and device of channel packet, storage medium, electronic device
CN110321131A (en) * 2019-07-05 2019-10-11 北京百佑科技有限公司 Service Component packaging method, system and server
CN110502239A (en) * 2019-08-19 2019-11-26 武汉蓝星科技股份有限公司 A kind of method for developing and producing and device of onboard system SDK
CN110502222A (en) * 2019-07-23 2019-11-26 北京字节跳动网络技术有限公司 AAR method, apparatus, medium and the equipment in outgoing dependence inner base library
CN110554885A (en) * 2019-08-29 2019-12-10 五八有限公司 Sub-application generation method and device, electronic equipment and storage medium
CN110569063A (en) * 2019-08-30 2019-12-13 五八有限公司 sub-application APP generation method and generation device

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN100492301C (en) * 2005-12-23 2009-05-27 国际商业机器公司 Method and system for avoiding software conflict
US8826222B2 (en) * 2011-08-02 2014-09-02 International Business Machines Corporation Pre-merge conflict avoidance
US9158658B2 (en) * 2013-10-15 2015-10-13 International Business Machines Corporation Detecting merge conflicts and compilation errors in a collaborative integrated development environment
US9632770B2 (en) * 2015-04-28 2017-04-25 Google Inc. Infrastructure for hosting and publishing software packages
WO2019079504A1 (en) * 2017-10-17 2019-04-25 Appdome Ltd. Automated mobile application integration

Patent Citations (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8522207B1 (en) * 2006-09-19 2013-08-27 United Services Automobile Association (Usaa) Systems and methods for automated centralized build/merge management
US9047106B1 (en) * 2010-06-29 2015-06-02 Emc Corporation Managing application features
CN102393845A (en) * 2011-06-30 2012-03-28 北京新媒传信科技有限公司 Shared library management method and system
CN104239056A (en) * 2014-09-16 2014-12-24 国家电网公司 Software generation method, device and system
CN104932901A (en) * 2015-07-08 2015-09-23 成都梦工厂网络信息有限公司 Cross-platform mobile SDK access method
CN107066291A (en) * 2017-02-09 2017-08-18 阿里巴巴集团控股有限公司 Packaging method, device and the equipment of SDK, computer-readable recording medium
CN107589947A (en) * 2017-08-02 2018-01-16 成都极娱网络科技有限公司 A kind of SDK cut-in methods, client and system
CN108595186A (en) * 2018-03-27 2018-09-28 天津麒麟信息技术有限公司 Multiversion software management method based on total function on a kind of platform of soaring
CN108829405A (en) * 2018-06-04 2018-11-16 网易(杭州)网络有限公司 The generation method and device of channel packet, storage medium, electronic device
CN110321131A (en) * 2019-07-05 2019-10-11 北京百佑科技有限公司 Service Component packaging method, system and server
CN110502222A (en) * 2019-07-23 2019-11-26 北京字节跳动网络技术有限公司 AAR method, apparatus, medium and the equipment in outgoing dependence inner base library
CN110502239A (en) * 2019-08-19 2019-11-26 武汉蓝星科技股份有限公司 A kind of method for developing and producing and device of onboard system SDK
CN110554885A (en) * 2019-08-29 2019-12-10 五八有限公司 Sub-application generation method and device, electronic equipment and storage medium
CN110569063A (en) * 2019-08-30 2019-12-13 五八有限公司 sub-application APP generation method and generation device

Also Published As

Publication number Publication date
CN111338651A (en) 2020-06-26

Similar Documents

Publication Publication Date Title
CN108279892B (en) Method, device and equipment for splitting large-scale application service into micro-service
CN110740188B (en) Mirror image file uploading method, device, equipment and computer readable storage medium
CN108228444B (en) Test method and device
CN106936659B (en) Public cloud dial testing method and device
CN105045602A (en) Method and device for constructing Hadoop application development framework and electronic device
CN114465998A (en) Multi-device file transmission method and device, terminal device and readable storage medium
CN111596927A (en) Service deployment method and device and electronic equipment
GB2504728A (en) Second failure data capture in co-operating multi-image systems
CN111338651B (en) Method and device for providing download resource, and method and device for downloading resource
CN113746879B (en) Data processing method and device based on Virtual Private Cloud (VPC)
CN107544894B (en) Log processing method and device and server
CN116048533B (en) Implementation method and system for achieving dependency isolation in Flink task running
CN111562928B (en) Resource providing method and device, and resource downloading method and device
CN107179918B (en) Software processing method, device and system
CN110275701B (en) Data processing method, device, medium and computing equipment
CN109934016B (en) Application signature verification method and device and electronic equipment
CN111416888A (en) Addressing method and device based on service gateway
CN110609707B (en) Online data processing system generation method, device and equipment
CN111225032A (en) Method, system, device and medium for separating application service and file service
CN111198853A (en) Data processing method and device, electronic equipment and computer readable storage medium
CN113934552A (en) Method and device for determining function code, storage medium and electronic device
CN114327593A (en) Method and system for generating aar by Unity packaging Android and electronic device
CN112860398A (en) Data processing method, device, equipment and medium based on rule engine
CN110391952B (en) Performance analysis method, device and equipment
CN114691445A (en) Cluster fault processing method and device, electronic equipment and readable storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Douyin Vision Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: Tiktok vision (Beijing) Co.,Ltd.

Address after: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee after: Tiktok vision (Beijing) Co.,Ltd.

Address before: 100041 B-0035, 2 floor, 3 building, 30 Shixing street, Shijingshan District, Beijing.

Patentee before: BEIJING BYTEDANCE NETWORK TECHNOLOGY Co.,Ltd.