Nothing Special   »   [go: up one dir, main page]

CN111338651A - Method and device for providing downloaded resources and method and device for downloading resources - Google Patents

Method and device for providing downloaded resources and method and device for downloading resources Download PDF

Info

Publication number
CN111338651A
CN111338651A CN202010102873.9A CN202010102873A CN111338651A CN 111338651 A CN111338651 A CN 111338651A CN 202010102873 A CN202010102873 A CN 202010102873A CN 111338651 A CN111338651 A CN 111338651A
Authority
CN
China
Prior art keywords
function
sub
code
generating
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.)
Granted
Application number
CN202010102873.9A
Other languages
Chinese (zh)
Other versions
CN111338651B (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

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The present disclosure provides a download resource providing method and apparatus, and a resource downloading method and apparatus, wherein, a plurality of sub-functions of a target software tool development kit SDK are determined first; then, generating a target code base for realizing each sub function; and finally, generating a sub SDK capable of realizing each 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. The target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction. The method and the device realize that the required sub-SDKs are provided for the service access end instead of the whole SDK with all functions, thereby effectively reducing the volume of the SDKs required to be downloaded by the service access end and avoiding potential problems of abnormal functions and the like caused by useless codes in the SDKs.

Description

Method and device for providing downloaded resources and method and device for downloading resources
Technical Field
The present disclosure relates to the field of computer technology and software processing, and in particular, to a method and an apparatus for providing a download resource, and a method and an apparatus for downloading a resource.
Background
The software development kit SDK is generally a collection of development tools in building application software for a particular software package, software framework, hardware platform, operating system, etc. In the specific application, the resource providing terminal provides the SDK for the service access terminal, and after the service access terminal downloads the SDK, the service access terminal uses the downloaded SDK to access the technical middle station.
Because the function that the platform can provide in the technique is perfect day by day, SDK's volume is also bigger and bigger, so after SDK after the business incoming end downloads, the corresponding APP in the business incoming end also can occupy the bigger volume of business incoming end. 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 may easily cause problems such as function abnormality by using HOOK function HOOK.
Disclosure of Invention
In view of the above, the present disclosure at least provides a method and an apparatus for providing a download resource, and a method and an apparatus for downloading a resource.
In a first aspect, the present disclosure provides a download resource providing method, including:
determining a plurality of sub-functions of a target software tool development kit (SDK);
aiming at each subfunction, generating a target code base corresponding to the subfunction; the target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction;
and generating the sub-SDK corresponding to the sub-function based on the target code base 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 embodiment, the function code block comprises a function code block in a three-party library on which the corresponding sub-function depends;
for each subfunction, generating a target code base corresponding to the subfunction comprises:
respectively acquiring a three-party library depended by each subfunction;
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 block;
and respectively generating a target code base of the subfunction and a target code base corresponding to other subfunctions, wherein the target code base comprises the subfunctions of the basic code base, based on the basic code base and the three-party base corresponding to the subfunctions.
In a possible implementation manner, generating a target code base corresponding to other sub-functions based on the basic code base and a three-party base corresponding to each sub-function further includes:
and for each other subfunction, removing the function code blocks which exist in the basic code base simultaneously and in the three-party base depended by each other subfunction to obtain a duplication removing function code base, and generating the target code base corresponding to each other subfunction based on the duplication removing function code base depended by each other subfunction.
In a possible implementation manner, the generating, based on the target code library, a sub SDK corresponding to a sub function includes:
acquiring service implementation codes corresponding to the other subfunctions;
and respectively generating the sub SDKs based on the service implementation codes corresponding to the basic code base and the service implementation codes corresponding to the duplicate removal function code base.
In a possible implementation manner, the plurality of sub-functions include a basic function and at least one service function, and the generating of the sub-SDK corresponding to the sub-function based on the target code library includes:
respectively acquiring a basic function and a service implementation code corresponding to the at least one service function;
generating a basic function SDK based on the service implementation code of the basic function and the service implementation 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 deduplication function code base.
In a second aspect, the present disclosure provides a resource downloading method, including:
generating a resource downloading request comprising the function requirement information;
sending the resource downloading 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 realizing the corresponding sub-function by using the received target sub-SDK.
In a possible implementation manner, the resource downloading method 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 respective three-party libraries on which respective sub-functions of the resource providing base-based target software tool development kit SDK depend.
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 target software tool development kit SDK;
the code base determining module is used for generating a target code base corresponding to each subfunction; the target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction;
and the tool kit 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 embodiment, the function code block comprises a function code block in a three-party library on which the corresponding sub-function depends;
when the code base determining module generates a target code base corresponding to each sub-function, the code base determining module is configured to:
respectively acquiring a three-party library depended by each subfunction;
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 block;
and respectively generating a target code base of the subfunction and a target code base corresponding to other subfunctions, wherein the target code base comprises the subfunctions of the basic code base, based on the basic code base and the three-party base corresponding to the subfunctions.
In a possible implementation manner, when the code library determining module generates the target code library corresponding to the other sub-function based on the base code library and the three-party library corresponding to the sub-function, the code library determining module is further configured to:
and for each other subfunction, removing the function code blocks which exist in the basic code base simultaneously and in the three-party base depended by each other subfunction to obtain a duplication removing function code base, and generating the target code base corresponding to each other subfunction based on the duplication removing function code base depended by each other subfunction.
In a possible implementation manner, when the tool pack generating module generates a sub SDK corresponding to a sub function based on the target code library, the tool pack generating module is configured to:
acquiring service implementation codes corresponding to the other subfunctions;
and respectively generating the sub SDKs based on the service implementation codes corresponding to the basic code base and the service implementation codes corresponding to the duplicate removal function code base.
In one possible embodiment, the plurality of sub-functions comprises a base function and at least one business function;
the tool pack generation module is used for generating a sub SDK corresponding to a sub function based on the target code library, and is used for:
respectively acquiring a basic function and a service implementation code corresponding to the at least one service function;
generating a basic function SDK based on the service implementation code of the basic function and the service implementation 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 deduplication function code base.
In a fourth aspect, the present disclosure provides a resource downloading device, including:
the download request generating module is used for generating a resource download request comprising the function demand 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 realization module is used for realizing the corresponding sub-functions 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, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating via the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the download resource providing method or the download resource 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 the above-described download resource providing method or resource downloading method.
The above-described apparatus, electronic device, and computer-readable storage medium of the present disclosure contain at least technical features that are substantially the same as or similar to the technical features of any aspect or any implementation of any aspect of the above-described method of the present disclosure.
The present disclosure at least provides a download resource providing method and apparatus, and a resource downloading method and apparatus, wherein, a plurality of sub-functions of a target software tool development kit SDK are determined first; then, generating a target code base for realizing each sub function; and finally, generating a sub SDK capable of realizing each 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. The target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction. The method and the device realize the supply of the required sub-SDKs for the service access terminal instead of the whole SDK with all functions, thereby effectively reducing the volume of the SDKs required to be downloaded by the service access terminal and avoiding potential problems of abnormal functions and the like caused by redundant codes in the SDKs.
Drawings
To more clearly illustrate the technical solutions of the embodiments of the present disclosure, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present disclosure and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings may be obtained from the drawings without inventive effort.
Fig. 1 shows a flowchart of a download resource providing method provided by an embodiment of the present disclosure;
FIG. 2 illustrates a schematic structural diagram of an SDK in an embodiment of the present disclosure;
FIG. 3 is a schematic diagram illustrating the structure of a sub-SDK directly formed by using a three-party library in the embodiment of the present disclosure;
fig. 4 is a flowchart illustrating a method for providing a download resource according to another embodiment of the present disclosure to generate an object code library implementing a sub-function;
FIG. 5 is a diagram illustrating a structure of forming a sub-SDK using a target code library in an embodiment of the present disclosure;
FIG. 6 is a flowchart illustrating a resource downloading method provided by an embodiment of the present disclosure;
fig. 7 is a schematic structural diagram illustrating a download resource providing apparatus according to an embodiment of the present disclosure;
fig. 8 is a schematic structural diagram illustrating a resource downloading apparatus provided by an embodiment of the present disclosure;
fig. 9 shows a schematic structural diagram of an electronic device provided in an embodiment of the present disclosure.
Detailed Description
To make the objects, technical solutions and advantages of the embodiments of the present disclosure more clear, the technical solutions of the embodiments of the present disclosure will be clearly and completely described below with reference to the drawings in the embodiments of the present disclosure, and it should be understood that the drawings in the present disclosure are for illustrative and descriptive purposes only and are not used to limit the scope of the present disclosure. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this disclosure illustrate operations implemented according to some embodiments of the present disclosure. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. In addition, one skilled in the art, under the direction of the present disclosure, may add one or more other operations to the flowchart, and may remove one or more operations from the flowchart.
In addition, the described embodiments are only a few embodiments of the present disclosure, not all embodiments. The components of the embodiments of the present disclosure, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present disclosure, presented in the figures, is not intended to limit the scope of the claimed disclosure, but is merely representative of selected embodiments of the disclosure. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the disclosure without making creative efforts, shall fall within the protection scope of the disclosure.
To enable those skilled in the art to use the present disclosure, the following embodiments are given in conjunction with the specific application scenario "providing download resources for service access in 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 where it is desirable to provide download resources for service access terminals 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 service access in a mobile operating system iOS, it should be understood that this is merely one exemplary embodiment.
It is to be noted that the term "comprising" will be used in the disclosed embodiments to indicate the presence of the features stated hereinafter, but does not exclude 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 provider that needs to provide a download resource for a service access terminal, and specifically, the method may include the following steps:
and S110, determining a plurality of sub functions of the target software tool development kit SDK.
Here, the resource providing end firstly splits the target SDK itself according to the function granularity based on the functions that the platform can provide in the technology, so as to obtain a plurality of sub-functions. The sub-functions may include a base function and at least one business function. The basic functions may include a network function, a log function, a point-of-burial function, etc. The service function is other functions that the SDK can implement, such as a charging function, on the basis of the basic function.
S120, generating a target code base corresponding to each subfunction; the target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction.
The implementation of the sub-functions needs to rely on at least one three-party library, which includes all function code blocks implementing the corresponding sub-functions. Because there may be overlapped function code blocks between different three-party libraries in the at least one three-party library, the three-party libraries need to be split, merged, and the like to obtain a target code library corresponding to the sub-function. The target code library corresponding to the sub-function may only include a part of the function code blocks for implementing the corresponding sub-function. There are no overlapping blocks of function code between different target code libraries.
As shown in fig. 2, the basic function in the sub-functions depends on the basic three-party library, the business function 1 depends on the three-party library 1, the business function 2 depends on the three-party library 2, and the business function 3 depends on the three-party library 3.
Overlapping function code blocks may exist between three-party libraries on which different sub-functions depend, for example, the overlapping function code blocks 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 function code blocks overlapped 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 the three-party libraries on which different sub-functions depend may have overlapped function code blocks, if the sub-functions and the three-party libraries on which the sub-functions depend are simply packaged into the sub-SDKs, as shown in fig. 3, the overlapped function code blocks in the three-party libraries are repeatedly packaged, and after the service access terminal downloads a plurality of sub-SDKs including the overlapped code blocks, an error may be caused by repeatedly introducing the function code blocks in the three-party libraries. Therefore, 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 existing in two or more three-party libraries at the same time are separated from the original three-party library and packed to form a basic code library, and then, a target 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 function code blocks overlapped with the function code blocks in the other three-party library in the three-party library are removed, the library formed by the residual function code blocks can also be called a duplicate function code library.
In addition, for the basic function, the packaged basic code base and the target code base corresponding to the formed basic function can be merged to obtain a final target code base corresponding to the basic function.
Because the overlapped function code blocks do not exist between different target code libraries, the sub SDK formed based on the target code libraries does not have the problem of errors caused by repeatedly introducing the function code blocks in the three-party library.
S130, based on the target code base, generating a sub SDK corresponding to the sub function, so as to provide the sub SDK corresponding to the sub function requested by the downloading request for the service access terminal based on the downloading request of the service access terminal.
After determining the target code base on which the sub-function is realized, acquiring a service realization code for realizing the sub-function, and then packaging the service realization code and the target code base to obtain the sub-SDK capable of realizing the sub-function. As shown in fig. 2, the service implementation code of each sub-function may be considered to exist with the SDK code implementation layer.
The above embodiment realizes that the sub-SDKs required by the service access terminal are provided for the service access terminal, rather than the whole SDK including all functions, so that the volume of the SDKs required to be downloaded by the service access terminal can be effectively reduced, and potential problems such as functional abnormality caused by useless codes in the SDKs can be avoided.
In some embodiments, as shown in fig. 4, the generating of the target code library corresponding to each sub-function may specifically be implemented by the following steps:
and S410, respectively acquiring a three-party library depended by each sub-function.
And S420, aiming at each three-party library, screening out the functional code blocks which exist in other three-party libraries simultaneously from the three-party library to obtain basic functional code blocks.
Here, the function code blocks existing in two or more three-party libraries at the same time are screened out from each three-party library, the screened-out function code blocks are used as basic function code blocks, and the remaining function code blocks may be referred to as non-basic function code blocks.
And S430, generating a basic code base based on the obtained basic function code block.
S440, respectively generating a target code base of the subfunction comprising the basic code base and a target code base corresponding to other subfunctions based on the basic code base and the three-party base corresponding to the subfunction.
The sub-functions include a basic function and at least one service function. The target code base corresponding to the basic function can be formed by the following steps for the basic function:
and merging the target code base corresponding to the determined basic function and the basic code base to obtain a final target code base corresponding to the basic function.
After obtaining the final target code base corresponding to the basic function, the sub-SDKs corresponding to the basic function may be formed by using the following steps: 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 target code base corresponding to the business function can be formed by the following steps:
and removing the other subfunctions, namely the functional code blocks which exist in the basic code base simultaneously in the three-party base depended by the other business functions to obtain a duplication removing function code base, and generating a target code base corresponding to each other subfunction based on the duplication removing function code base depended by each other subfunction.
After obtaining the target code base corresponding to the other service function, the sub-SDKs corresponding to the other service function may be formed by using the following steps:
and generating a service function sub-SDK based on the service realization code of the at least one service function and the corresponding deduplication function code base.
In this way, after receiving the resource downloading request sent by the service access terminal, the resource providing terminal needs to send the sub SDKs corresponding to the sub functions requested by the resource downloading request to the service access terminal, and also needs to send the sub SDKs corresponding to the basic functions, that is, the basic functions SDKs are sent to the service access terminal at the same time. Then, the service access terminal can use the received SDK to implement the sub-function requested by the resource download request.
In addition, the basic function and the business function can not be distinguished, and the corresponding target code base is formed by using the same method for each sub-function: namely, functional code blocks which exist in the three-party library and depend on the subfunction and exist in the basic code library at the same time can be removed; and then, generating a target code library corresponding to the sub-function based on the residual function code blocks in the three-party library depended by the sub-function.
As can be seen from the above description, with the present embodiment, the target code base corresponding to the basic function and the target code base corresponding to the business function can be formed, where the methods for forming the target code base of the basic function and the target code base corresponding to the business function are the same.
After the target code base corresponding to the basic function and the service function is formed by using the method of this embodiment, the sub SDKs corresponding to each sub function may be respectively generated based on the service implementation code corresponding to each sub function and the target code base. In addition, the service implementation code corresponding to the basic code library is also required to be 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 downloading request sent by the service access terminal, the resource providing terminal needs to send the basic SDK to the service access terminal simultaneously, in addition to sending the sub SDK corresponding to the sub function requested by the resource downloading request to the service access terminal. Then, the service access terminal can use the received SDK to implement the sub-function requested by the resource download request.
In the above, all basic function code blocks in all three-party libraries are merged to form a basic code library, and all non-basic function code blocks in all three-party libraries corresponding to each sub-function are merged to form a target code library of the sub-function, and in the specific implementation, the following pseudo codes can be used to complete the following steps:
Figure BDA0002387455410000111
Figure BDA0002387455410000121
in the above code, S0Is a set of basic function code blocks, S1~SnA set of function code blocks, S, in the object code base, each of which is relied upon by each of the n sub-functionsallA set of 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. Di-jIs the jth function code block in all three-party libraries on which the sub-function i depends.
The method for forming the target code base by the pseudo code is as follows: traversing each case that i takes a value from 0 to n, and j takes a value from 1 to m if D is being processedi-jPut into set SallBefore oneAnd SallThen, set Sall(ii) the number of elements in (D) is not changed (the set has a property of not repeatedly storing the same element), which shows thati-jHas previously been put into SallIs i.e. Di-jFor overlapping function code blocks between multiple three-party libraries, in which case Di-jI.e. the basic function code block, will be the Di-jStoring in a base code library S0Performing the following steps; if D is in processi-jPut into set SallFront and SallThen, set SallIf the number of the elements in (B) is changed, it means that D is the samei-jI.e. non-basic function code block, and using Di-jAnd putting the sub-functions into the target code base of the corresponding sub-functions.
When the specific implementation of the target code base corresponding to each sub-function is formed, the method can also be implemented through the following steps: judgment of Di-jIf not, D is judged to be in the basic code basei-jAnd putting the sub-functions into the target code base of the corresponding sub-functions.
After the target code base is determined, as shown in fig. 5, the target code base 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, which is applied to a service access end that needs to download an SDK, and specifically includes:
s610, generating a resource downloading request comprising the function requirement information.
When the service access terminal needs to access the technical middlebox, a resource downloading request is generated based on the self requirement. The resource downloading request comprises function requirement information, wherein 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, sending the resource downloading request to a resource providing end so that the resource providing end determines the sub-functions corresponding to the function requirement information and feeds back the target sub-software tool development kit SDK corresponding to the sub-functions.
In specific implementation, the sub-functions required by the service access terminal may include a basic function, and the sub-SDK corresponding to the basic function enables the service access terminal to obtain or implement the corresponding basic function from the technical middle station. In addition, the sub-functions required by the service access terminal may further include one or more service functions, and the service access terminal can acquire or implement the corresponding service functions from the technical middle station based on the sub-SDK corresponding to the service function.
S630, the received target sub-SDK is used for realizing the corresponding sub-function.
The embodiment downloads the corresponding sub-SDK based on the requirement of the service access terminal, and can effectively reduce the volume of the SDK required to be downloaded by the service access terminal.
The resource downloading method may further include the steps of:
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 respective three-party libraries on which respective sub-functions of the resource providing base-based target software tool development kit SDK depend.
Corresponding to the above download resource providing method, the embodiment of the present disclosure further provides a download resource providing device, which is applied to a resource providing end that provides a download resource for a service access end, and the device and each module thereof can perform the same method steps as the download resource providing method, and can achieve the same or similar beneficial effects, so that repeated parts are not 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 library determining module 720, configured to generate, for each sub-function, a target code library corresponding to the sub-function; the target code library comprises at least one functional code block, and each functional code block corresponds to a functional module under the subfunction;
and a tool kit generating module 730, configured to generate, based on the target 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 comprise function code blocks in a three-party library on which the corresponding sub-function depends;
the code library determining module 720, when generating, for each sub-function, a target code library corresponding to the sub-function, is configured to:
respectively acquiring a three-party library depended by each subfunction;
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 block;
and respectively generating a target code base of the subfunction and a target code base corresponding to other subfunctions, wherein the target code base comprises the subfunctions of the basic code base, based on the basic code base and the three-party base corresponding to the subfunctions.
In some embodiments, the code library determining module 720, when generating the target code library including the sub-functions of the basic code library and the target code libraries corresponding to other sub-functions based on the basic code library and the three-party library corresponding to each sub-function, is further configured to:
and aiming at each other subfunction, removing the function code blocks which exist in the basic code base simultaneously and in the three-party base depended by each other subfunction to obtain a duplication removing function code base, and generating a target code base corresponding to each other subfunction based on the duplication removing function code base depended by each other subfunction.
In some embodiments, the kit generating module 730, when generating the sub SDK corresponding to the sub function based on the target code library, is configured to:
acquiring service implementation codes corresponding to other subfunctions;
and respectively generating the sub SDKs based on the service implementation codes corresponding to the basic code base and the service implementation codes corresponding to the duplicate removal function code base.
In some embodiments, the plurality of sub-functions includes a base function and at least one business function; the tool kit generating module 730, when generating the sub SDK corresponding to the sub function based on the target code library, is configured to:
respectively acquiring service implementation codes corresponding to a basic function and at least one service function;
generating a basic function SDK based on the service implementation code of the basic function and the service implementation 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 deduplication function code base.
Corresponding to the above resource downloading method, the embodiment of the present disclosure further provides a resource downloading device, which is applied to a service access end, and the device and each module thereof can perform the same method steps as the resource downloading method and can achieve the same or similar beneficial effects, so repeated parts are not described again.
Specifically, as shown in fig. 8, a resource downloading apparatus of the present disclosure includes:
a download request generating module 810, configured to generate a resource download request including the 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;
and a function implementing module 830, configured to implement the corresponding sub-function by using the received target sub-SDK.
An embodiment of the present disclosure discloses an electronic device, as shown in fig. 9, including: a processor 901, a memory 902, and a bus 903, wherein the memory 902 stores machine readable instructions executable by the processor 901, and when the electronic device is operated, the processor 901 and the memory 902 communicate via the bus 903.
The machine readable instructions, when executed by the processor 901, perform the following steps of the download resource providing method:
determining a plurality of sub-functions of a target software tool development kit (SDK);
aiming at each subfunction, generating a target code base corresponding to the subfunction; the target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction;
and generating the sub-SDK corresponding to the sub-function based on the target code base 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.
The machine readable instructions, when executed by the processor 901, may further perform the steps of the resource download method of:
generating a resource downloading request comprising the function requirement information;
sending the resource downloading 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 realizing the corresponding sub-function by using the received target sub-SDK.
In addition, when the processor 901 executes the machine readable instructions, the method contents in any embodiment described in the above method part can also be executed, which is not described herein again.
A computer program product corresponding to the method and the apparatus provided in the embodiments of the present disclosure includes a computer readable storage medium storing a program code, where instructions included in the program code may be used to execute the method in the foregoing method embodiments, and specific implementation may refer to the method embodiments, which is not described herein again.
The foregoing description of the various embodiments is intended to highlight various differences between the embodiments, and the same or similar parts may be referred to one another, which are not repeated herein for brevity.
It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this disclosure. In the several embodiments provided in the present disclosure, it should be understood that the disclosed system, apparatus, and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.
The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present disclosure may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into 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 the form of a software product, which is stored in a storage medium and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present disclosure. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above are only specific embodiments of the present disclosure, but the scope of the present disclosure is not limited thereto, and any person skilled in the art can easily conceive of changes or substitutions within the technical scope of the present disclosure, and shall be covered by the scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the protection scope of the claims.

Claims (15)

1. A download resource providing method, comprising:
determining a plurality of sub-functions of a target software tool development kit (SDK);
aiming at each subfunction, generating a target code base corresponding to the subfunction; the target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction;
and generating the sub-SDK corresponding to the sub-function based on the target code base 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.
2. The download resource providing method according to claim 1, wherein the function code block comprises a function code block in a three-party library on which the corresponding sub-function depends;
for each subfunction, generating a target code base corresponding to the subfunction comprises:
respectively acquiring a three-party library depended by each subfunction;
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 block;
and respectively generating a target code base of the subfunction and a target code base corresponding to other subfunctions, wherein the target code base comprises the subfunctions of the basic code base, based on the basic code base and the three-party base corresponding to the subfunctions.
3. The download resource providing method according to claim 2, wherein generating a target code library corresponding to other sub-functions based on the basic code library and a three-party library corresponding to each of the sub-functions further comprises:
and for each other subfunction, removing the function code blocks which exist in the basic code base simultaneously and in the three-party base depended by each other subfunction to obtain a duplication removing function code base, and generating the target code base corresponding to each other subfunction based on the duplication removing function code base depended by each other subfunction.
4. The download resource providing method as claimed in claim 3, wherein generating the sub SDK corresponding to the sub function based on the target code library comprises:
acquiring service implementation codes corresponding to the other subfunctions;
and respectively generating the sub SDKs based on the service implementation codes corresponding to the basic code base and the service implementation codes corresponding to the duplicate removal function code base.
5. The download resource providing method as claimed in claim 3, wherein the plurality of sub-functions comprise a basic function and at least one service function, and the generating of the sub-SDK corresponding to the sub-function based on the target code library comprises:
respectively acquiring a basic function and a service implementation code corresponding to the at least one service function;
generating a basic function SDK based on the service implementation code of the basic function and the service implementation 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 deduplication function code base.
6. A method for downloading resources, comprising:
generating a resource downloading request comprising the function requirement information;
sending the resource downloading 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 realizing the corresponding sub-function by using the received target sub-SDK.
7. The resource downloading method of claim 6, 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 respective three-party libraries on which respective sub-functions of the resource providing base-based target software tool development kit SDK depend.
8. A download resource providing apparatus, comprising:
the function splitting module is used for determining a plurality of sub-functions of the target software tool development kit SDK;
the code base determining module is used for generating a target code base corresponding to each subfunction; the target code library comprises at least one function code block, and each function code block corresponds to one function module of the subfunction;
and the tool kit 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.
9. The download resource providing apparatus as claimed in claim 8, wherein the function code block comprises a function code block in a three-party library on which the corresponding sub-function depends;
when the code base determining module generates a target code base corresponding to each sub-function, the code base determining module is configured to:
respectively acquiring a three-party library depended by each subfunction;
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 block;
and respectively generating a target code base of the subfunction and a target code base corresponding to other subfunctions, wherein the target code base comprises the subfunctions of the basic code base, based on the basic code base and the three-party base corresponding to the subfunctions.
10. The apparatus as claimed in claim 9, wherein the code library determining module, when generating the target code libraries corresponding to other sub-functions based on the base code library and the three-party library corresponding to the sub-functions, is further configured to:
and for each other subfunction, removing the function code blocks which exist in the basic code base simultaneously and in the three-party base depended by each other subfunction to obtain a duplication removing function code base, and generating the target code base corresponding to each other subfunction based on the duplication removing function code base depended by each other subfunction.
11. The download resource providing apparatus as claimed in claim 10, wherein the tool kit generating module, when generating the sub SDK corresponding to the sub function based on the target code library, is configured to:
acquiring service implementation codes corresponding to the other subfunctions;
and respectively generating the sub SDKs based on the service implementation codes corresponding to the basic code base and the service implementation codes corresponding to the duplicate removal function code base.
12. The download resource providing apparatus as claimed in claim 10, wherein the plurality of sub-functions comprises a basic function and at least one service function;
the tool pack generation module is used for generating a sub SDK corresponding to a sub function based on the target code library, and is used for:
respectively acquiring a basic function and a service implementation code corresponding to the at least one service function;
generating a basic function SDK based on the service implementation code of the basic function and the service implementation 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 deduplication function code base.
13. A resource downloading apparatus, comprising:
the download request generating module is used for generating a resource download request comprising the function demand 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 realization module is used for realizing the corresponding sub-functions by utilizing the received target sub-SDK.
14. An electronic device, comprising: a processor, a storage medium and a bus, wherein the storage medium stores machine-readable instructions executable by the processor, when an electronic device runs, the processor and the storage medium communicate through the bus, and the processor executes the machine-readable instructions to execute the download resource providing method according to any one of claims 1 to 5 or the resource downloading method according to any one of claims 6 to 7.
15. A computer-readable storage medium, having a computer program stored thereon, wherein the computer program is executed by a processor to perform the method for providing download resource according to any one of claims 1 to 5 or the method for downloading resource according to any one of claims 6 to 7.
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 true CN111338651A (en) 2020-06-26
CN111338651B 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 (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070180441A1 (en) * 2005-12-23 2007-08-02 Yong Ding Method and system for avoidance of software conflict
CN102393845A (en) * 2011-06-30 2012-03-28 北京新媒传信科技有限公司 Shared library management method and system
US20130036400A1 (en) * 2011-08-02 2013-02-07 International Business Machines Corporation Pre-merge conflict avoidance
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
US20150106790A1 (en) * 2013-10-15 2015-04-16 International Business Machines Corporation Detecting merge conflicts and compilation errors in a collaborative integrated development environment
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
US20160321067A1 (en) * 2015-04-28 2016-11-03 Google Inc. Infrastructure for hosting and publishing software packages
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
US20190114160A1 (en) * 2017-10-17 2019-04-18 Appdome Ltd. Automated mobile application integration
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

Patent Citations (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070180441A1 (en) * 2005-12-23 2007-08-02 Yong Ding Method and system for avoidance of software conflict
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
US20130036400A1 (en) * 2011-08-02 2013-02-07 International Business Machines Corporation Pre-merge conflict avoidance
US20150106790A1 (en) * 2013-10-15 2015-04-16 International Business Machines Corporation Detecting merge conflicts and compilation errors in a collaborative integrated development environment
CN104239056A (en) * 2014-09-16 2014-12-24 国家电网公司 Software generation method, device and system
US20160321067A1 (en) * 2015-04-28 2016-11-03 Google Inc. Infrastructure for hosting and publishing software packages
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
US20190114160A1 (en) * 2017-10-17 2019-04-18 Appdome Ltd. Automated mobile application integration
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
CN111338651B (en) 2023-04-21

Similar Documents

Publication Publication Date Title
CN110740188B (en) Mirror image file uploading method, device, equipment and computer readable storage medium
CN111083013B (en) Test method and device based on flow playback, electronic equipment and storage medium
CN105446827A (en) Data storage method and device for database at failure
CN113296737A (en) Random number generation system, method and device and cloud server
CN112905880A (en) Information pushing method, system and platform based on block chain offline payment
CN109150643B (en) Service processing abnormity detection method and device
CN111611160B (en) Software testing method, device, equipment and storage medium
CN111338651A (en) Method and device for providing downloaded resources and method and device for downloading resources
CN115729727A (en) Fault repairing method, device, equipment and medium
CN113179295A (en) Message processing method and device
CN113869989B (en) Information processing method and device
CN111737057A (en) APFS file system data recovery method and device and electronic equipment
CN111562928B (en) Resource providing method and device, and resource downloading method and device
CN109783272B (en) Disk snapshot processing method, device and equipment
CN110704301B (en) TPC-E automatic test method and TPC-E test system
CN106649352B (en) Data processing method and device
CN104407846B (en) Information processing method and device
CN114610732A (en) Bottom-pocketing data processing method and device
CN107704557B (en) Processing method and device for operating mutually exclusive data, computer equipment and storage medium
CN108234615B (en) Table item processing method, mainboard and main network equipment
CN115705258A (en) Test method, test device, storage medium and electronic equipment
CN114237988B (en) Memory snapshot processing method and device, storage medium and electronic device
CN111225075A (en) Configuration method and device for Internet of things directional access service
CN115269161B (en) Abnormal process reverse rollback method and system
CN105094764B (en) The generation method and device of electronic apparatus application

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.