CN111176708B - SDK file processing method and device, electronic equipment and storage medium - Google Patents

SDK file processing method and device, electronic equipment and storage medium Download PDF

Info

Publication number
CN111176708B
CN111176708B CN201911329387.4A CN201911329387A CN111176708B CN 111176708 B CN111176708 B CN 111176708B CN 201911329387 A CN201911329387 A CN 201911329387A CN 111176708 B CN111176708 B CN 111176708B
Authority
CN
China
Prior art keywords
sdk
file
processor
identification information
local interface
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
CN201911329387.4A
Other languages
Chinese (zh)
Other versions
CN111176708A (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.)
Nanjing Leading Technology Co Ltd
Original Assignee
Nanjing Leading 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 Nanjing Leading Technology Co Ltd filed Critical Nanjing Leading Technology Co Ltd
Priority to CN201911329387.4A priority Critical patent/CN111176708B/en
Publication of CN111176708A publication Critical patent/CN111176708A/en
Application granted granted Critical
Publication of CN111176708B publication Critical patent/CN111176708B/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/70Software maintenance or management
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/16File or folder operations, e.g. details of user interfaces specifically adapted to file systems
    • G06F16/162Delete operations
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F21/00Security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F21/60Protecting data
    • G06F21/602Providing cryptographic facilities or services
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2221/00Indexing scheme relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/21Indexing scheme relating to G06F21/00 and subgroups addressing additional information or applications relating to security arrangements for protecting computers, components thereof, programs or data against unauthorised activity
    • G06F2221/2107File encryption

Abstract

The present invention relates to the field of computers, and in particular, to a method and an apparatus for processing an SDK file, an electronic device, and a storage medium. The embodiment of the invention receives a request message containing SDK identification information sent by a client, and selects an SDK processor and a local interface corresponding to the SDK identification information from an SDK container; the SDK processor and the local interface are created and stored in the SDK container when the SDK files corresponding to the SDK identification information are integrated, the local interface is a standard interface in a preset format, and the local interface is called by the SDK processor to run the SDK files, so that the SDK files can be called by unifying the local interface and the SDK processor created for different SDK files when the SDK files are loaded in the system, the calling operation can be conveniently and quickly carried out without professional staff, and the cost is reduced.

Description

SDK file processing method and device, electronic equipment and storage medium
Technical Field
The present invention relates to the field of computers, and in particular, to a method and an apparatus for processing an SDK file, an electronic device, and a storage medium.
Background
SDK (Software Development Kit) is a collection of Development tools used to create application Software for a particular Software package, Software framework, hardware platform, operating system, etc. The developer can integrate different third parties into the system aiming at the SDK of a certain function to realize the corresponding function of the product, so that the developer does not need to develop each function of the product, and the development time and cost are reduced.
At present, a method for calling an SDK commonly used in the industry is to load an SDK file through a loader corresponding to the SDK file, and different SDK files correspond to different loaders because different SDK files correspond to different call interfaces; the calling of the SDK can be realized only through a calling program corresponding to the SDK; and the loader and the caller used for calling the SDK file are that when the SDK file is integrated in the server, the SDK file developer writes the loader and the caller of the SDK file, and the loader and the caller are integrated in the server in a hard coding mode, and the server needs to be stopped in the integration process, and after the SDK file is integrated in the server, the server is restarted to call the corresponding SDK through the caller. In the current SDK file calling method, a developer can call the SDK only after changing a program code of a system core and restarting a server, and the operation is complex and the cost is high.
Disclosure of Invention
The invention provides a method, a device, electronic equipment and a storage medium for processing an SDK file, which are used for solving the problems that the SDK can be called only after a system core program code needs to be changed and a server needs to be restarted, the operation is complex and the cost is high.
Based on the foregoing problems, in a first aspect, an embodiment of the present invention provides an SDK file processing method, including:
receiving a request message containing SDK identification information sent by a client, and selecting an SDK processor and a local interface corresponding to the SDK identification information from an SDK container; the SDK processor and the local interface are created and stored in an SDK container when an SDK file corresponding to the SDK identification information is integrated, and the local interface is a standard interface with a preset format;
and calling a local interface through the SDK processor to run the SDK file.
Optionally, the SDK identification information is a character string obtained by encrypting an SDK file name through an encryption algorithm;
wherein the encryption algorithm is an MD5 encryption algorithm or a hash algorithm.
Optionally, if the request message includes a plurality of SDK identification information;
calling a local interface through an SDK processor to run the SDK file, wherein the operation comprises the following steps:
determining the operation sequence of the SDK files corresponding to the plurality of SDK identification information according to a preset rule, and calling a local interface to operate the SDK files through an SDK processor according to the determined operation sequence; or
And simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information.
Optionally, the invoking a local interface by the SDK processor according to the determined operation sequence to operate the SDK file includes:
determining an SDK file corresponding to SDK identification information needing to be operated currently according to the determined operation sequence, and calling a local interface corresponding to the SDK identification information to operate the SDK file through an SDK processor corresponding to the SDK identification information;
judging whether an SDK file corresponding to the unoperated SDK identification information exists or not;
if so, determining and operating the SDK file corresponding to the next SDK identification information to be operated according to the operation sequence until all the SDK files corresponding to the SDK identification information contained in the request message are operated.
Optionally, the SDK file is integrated according to the following:
after detecting the SDK files to be integrated in the monitoring directory, distributing corresponding SDK identification information for the SDK files;
loading the SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file;
and storing the created local interface corresponding to the SDK file and the SDK processor into an SDK container.
Optionally, the method further comprises:
and after detecting that the integrated SDK file is deleted in the monitoring directory, unloading the SDK file from a system memory, and deleting the SDK processor and the local interface corresponding to the SDK file from the SDK container.
In a second aspect, an embodiment of the present invention provides an SDK file processing apparatus, including:
the selection unit is configured to execute receiving of a request message containing the SDK identification information sent by the client, and select the SDK processor and the local interface corresponding to the SDK identification information from the SDK container; the SDK processor and the local interface are created and stored in an SDK container when an SDK file corresponding to the SDK identification information is integrated, and the local interface is a standard interface with a preset format;
and the operation unit is configured to execute the operation of calling a local interface through the SDK processor to operate the SDK file.
Optionally, the SDK identification information is a character string obtained by encrypting an SDK file name through an encryption algorithm;
wherein the encryption algorithm is an MD5 encryption algorithm or a hash algorithm.
Optionally, if the request message includes a plurality of SDK identification information, the running unit is configured to determine a running order of SDK files corresponding to the plurality of SDK identification information according to a preset rule, and call a local interface to run the SDK files through the SDK processor according to the determined running order; or
And simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information.
Optionally, the running unit is configured to determine, according to the determined running sequence, an SDK file corresponding to the SDK identification information that needs to be currently run, and call, through an SDK processor corresponding to the SDK identification information, a local interface corresponding to the SDK identification information to run the SDK file;
judging whether an SDK file corresponding to the unoperated SDK identification information exists or not;
if so, determining and operating the SDK file corresponding to the next SDK identification information to be operated according to the operation sequence until all the SDK files corresponding to the SDK identification information contained in the request message are operated.
Optionally, the running unit is configured to integrate the SDK file according to the following:
after detecting the SDK files to be integrated in the monitoring directory, distributing corresponding SDK identification information for the SDK files;
loading the SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file;
and storing the created local interface corresponding to the SDK file and the SDK processor into an SDK container.
Optionally, the running unit is configured to unload the SDK file from a system memory after detecting that the integrated SDK file is deleted in the monitoring directory, and delete the SDK processor and the local interface corresponding to the SDK file from the SDK container.
In a third aspect, an embodiment of the present invention provides an electronic device, including:
a memory for storing executable instructions;
a processor configured to read and execute the executable instructions stored in the memory to implement the method for processing the SDK file according to any one of the first aspect of the embodiments of the present invention.
In a fourth aspect, embodiments of the present invention provide a computer-readable medium on which a computer program is stored, which when executed by a processor, performs the steps of the method according to the first aspect.
Due to the embodiment of the invention, when the SDK file is loaded in the system, the SDK processor and the local interface corresponding to the SDK file can be automatically created, and the SDK processor and the local interface are stored in the SDK container; after receiving a request message containing SDK identification information sent by a client, selecting an SDK processor and a local interface corresponding to the SDK identification information from an SDK container, and calling the local interface to run an SDK file through the selected SDK processor, so that calling of the SDK file can be realized through corresponding standard local interfaces and SDK processors which are uniformly created for different SDK files, developers do not need to write calling programs respectively aiming at different calling interfaces of different SDK files, and the servers do not need to be stopped.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the invention and together with the description, serve to explain the principles of the invention and are not to be construed as limiting the invention.
FIG. 1 is a schematic diagram of an application scenario illustrating a method of SDK file processing according to an exemplary embodiment;
FIG. 2 is a flow diagram illustrating a method of SDK file processing in accordance with an exemplary embodiment;
FIG. 3 is a block diagram illustrating the operation of a processor of a first type of server in accordance with an illustrative embodiment;
FIG. 4 is a block diagram illustrating the operation of a processor of a second type of server in accordance with an illustrative embodiment;
FIG. 5 is a block diagram illustrating an SDK container architecture in accordance with an exemplary embodiment;
FIG. 6 is a flow diagram illustrating a complete method of SDK file processing according to an exemplary embodiment;
FIG. 7 is a block diagram illustrating the structure of face recognition SDK file integration, deletion, and operation according to an exemplary embodiment;
FIG. 8 is a block diagram illustrating an apparatus for SDK file processing in accordance with an exemplary embodiment;
FIG. 9 is a block diagram illustrating an electronic device in accordance with an exemplary embodiment;
FIG. 10 is a block diagram illustrating another electronic device in accordance with an example embodiment.
Detailed Description
In order to make those skilled in the art better understand the technical solution of the present invention, the technical solution in the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings.
It should be noted that the terms "first," "second," and the like in the description and claims of the present invention and in the drawings described above are used for distinguishing between similar elements and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used is interchangeable under appropriate circumstances such that the embodiments of the invention described herein are capable of operation in sequences other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present invention. Rather, they are merely examples of apparatus and methods consistent with certain aspects of the invention, as detailed in the appended claims.
The term "and/or" in the embodiments of the present invention describes an association relationship of associated objects, and indicates that three relationships may exist, for example, a and/or B may indicate: a exists alone, A and B exist simultaneously, and B exists alone. The character "/" generally indicates that the former and latter associated objects are in an "or" relationship.
Fig. 1 is an application scenario of an SDK file processing method according to an embodiment of the present invention. Including user 12, terminal device 10, server 11.
When a user 12 triggers an instruction for executing an operation on a client, the client sends a request message containing SDK identification information to a server 11 through a terminal device 10, the server 11 responds to the request message sent by the client, selects an SDK processor and a local interface corresponding to an SDK identification from an SDK container, and calls the local interface to run an SDK file through the SDK processor.
Based on the SDK file processing method provided by the embodiment of the invention, when the SDK file is loaded in the system, the SDK processor and the local interface corresponding to the SDK file are automatically created, and the SDK processor and the local interface are stored in the SDK container; after receiving a request message which is sent by a client and contains SDK identification information, an SDK processor and a local interface corresponding to an SDK identification are selected from an SDK container, the local interface is called by the SDK processor to run an SDK file, so that the SDK file can be called by the corresponding standard local interface and the SDK processor which are uniformly created for different SDK files, a developer does not need to write calling programs respectively for different calling interfaces of different SDK files, the server does not need to be stopped, the calling programs are integrated in the server in a hard coding mode, the SDK file can be called without professionals, the operation is convenient and rapid, and the cost is reduced.
An embodiment of the present invention provides an SDK file processing method, as shown in fig. 2, the method includes the following steps:
step S201, receiving a request message containing SDK identification information sent by a client, and selecting an SDK processor and a local interface corresponding to the SDK identification information from an SDK container;
the SDK processor and the local interface are created and stored in the SDK container when an SDK file corresponding to the SDK identification information is integrated, and the local interface is a standard interface with a preset format;
and step S202, calling a local interface through the SDK processor to run the SDK file.
In the embodiment of the invention, the standard local interface is preset according to a uniform format, and each SDK provider needs to standardize the provided SDK file according to the standard local interface, wherein the SDK file comprises a method name, an access parameter, a return value type and the like for standardizing the SDK file.
The SDK identification information can be a character string obtained by performing an MD5 encryption algorithm according to the SDK file name; for example, the SDK identification information may be a 32-bit long string, such as b6cb5db3fd6f4d39b550dcd1eb13c78 c.
Before the server receives the request message containing the SDK identification information sent by the client, an optional implementation is that the client determines a file name of the SDK file to be run, and determines the SDK identification information according to the file name.
The server receives a request message containing the SDK identification information sent by the client, selects the SDK processor and the local interface corresponding to the SDK identification information from a plurality of SDK processors and local interfaces stored in the SDK container, and calls the local interface to run an SDK file through the SDK processor.
In the embodiment of the invention, the SDK processor is an entity class object for executing calling operation on the local interface to run the SDK file, and the entity class object comprises an internal program for calling the local interface to run the SDK file, an internal program for calling cache data in the SDK container, a program responsible for processing transfer of a link and the like.
In implementation, after receiving a request message containing SDK identification information sent by a client, a server determines the SDK identification information that is the same as the SDK identification information contained in the request message from a plurality of SDK identification information stored in an SDK container, selects an SDK processor and a local interface corresponding to the same SDK identification information from a plurality of stored SDK processors and local interfaces, and calls the local interface to run an SDK file through the SDK processor.
When the request message sent by the client contains a plurality of SDK identification information, the embodiment of the invention can operate SDK files corresponding to a plurality of SDK identification information in parallel or operate SDK files corresponding to a plurality of SDK identification information in series; the following are described separately:
1. calling a local interface through an SDK processor to operate the SDK file according to the determined operation sequence;
if the request message sent by the client contains a plurality of pieces of SDK identification information, the running sequence of the SDK files corresponding to the plurality of pieces of SDK identification information needs to be determined according to a preset rule.
Specifically, the operation sequence of the SDK file may be determined according to the following preset rules:
and 1, determining the running sequence of the SDK files according to the time sequence of the integration of the SDK files in the system memory.
In an implementation, for example, the processor of the server selects, according to a request message containing the SDK identification information sent by the client, SDK processors corresponding to a plurality of SDK identification information from a plurality of SDK processors stored in the SDK container as SDK processor 1, SDK processor 2, and SDK processor 3, and the time sequence in which the SDK file 1, SDK file 2, and SDK file 3 respectively corresponding to the SDK processor 1, SDK processor 2, and SDK processor 3 are integrated in the system memory is SDK file 1-SDK file 2-SDK file 3, and then it is determined that the running sequence of the SDK files is SDK file 1-SDK file 2-SDK file 3.
Rule 2, determining the running sequence of the SDK files according to the time sequence created by the SDK processor.
In implementation, for example, the processor of the server selects, according to a request message containing the SDK identification information sent by the client, the SDK processors corresponding to a plurality of SDK identification information from the plurality of SDK processors stored in the SDK container, and the SDK processors are respectively the SDK processor 1, the SDK processor 2, and the SDK processor 3; the SDK processor 1, the SDK processor 2 and the SDK processor 3 correspond to the SDK file 1, the SDK file 2 and the SDK file 3 respectively, and the time sequence established by the SDK processor 1, the SDK processor 2 and the SDK processor 3 is the SDK processor 1, the SDK processor 2 and the SDK processor 3, so that the running sequence of the SDK file is determined to be the SDK file 1, the SDK file 2 and the SDK file 3.
And 3, determining the running sequence of the SDK files according to the time sequence of the creation of the local interface.
In implementation, for example, the processor of the server selects, according to a request message containing the SDK identification information sent by the client, the SDK processors corresponding to a plurality of SDK identification information from the plurality of SDK processors stored in the SDK container, and the SDK processors are respectively the SDK processor 1, the SDK processor 2, and the SDK processor 3; the SDK processor 1, the SDK processor 2 and the SDK processor 3 correspond to the SDK file 1, the SDK file 2 and the SDK file 3 respectively, and the time sequence established by the local interface 1, the local interface 2 and the local interface 3 corresponding to the SDK processor 1, the SDK processor 2 and the SDK processor 3 respectively is the local interface 1-the local interface 2-the local interface 3, so that the running sequence of the SDK file is determined to be the SDK file 1-the SDK file 2-the SDK file 3.
After the operation sequence is determined, determining the SDK file corresponding to the SDK identification information needing to be operated at present according to the determined operation sequence, and calling a local interface corresponding to the SDK identification information to operate the SDK file through an SDK processor corresponding to the SDK identification information;
judging whether an SDK file corresponding to the unoperated SDK identification information exists or not;
if so, determining and operating the SDK file corresponding to the next SDK identification information to be operated according to the operation sequence until the SDK files corresponding to the SDK identification information contained in the request message are all operated.
In implementation, as shown in fig. 3, assuming that the request message includes N SDK identification information, the processor of the server selects N SDK processors and local interfaces corresponding to the SDK identification information from the SDK container after receiving the request message including the SDK identification information sent by the client; and after the operation sequence is determined, the processor of the server sends the request message to the SDK processor corresponding to the first SDK file in the determined operation sequence of the SDK files, and the SDK processor calls the local interface to operate the first SDK file. And after the operation of the second SDK file is finished, the request message, the operation result of the first SDK file and the operation result of the second SDK file are sent to the SDK processor corresponding to the next SDK file according to the determined operation sequence. And repeating the steps until the SDK processor corresponding to the SDK file which runs last in the determined running sequence calls the local interface to run the last SDK file.
After the SDK files corresponding to the SDK identification information contained in the request message are all operated, the operation results corresponding to the plurality of SDK files and the SDK file identification information are bound and then returned to the client;
and the client determines the operation result corresponding to each SDK file according to the SDK file identification information.
In implementation, according to the determined operation sequence, the last SDK processor corresponding to the last SDK file in the operation sequence returns all operation results to the last SDK processor, and so on, and finally after the first SDK processor returns all operation results to the processor of the server, the processor of the server binds the operation results corresponding to all SDK files and the identification information of the SDK files and returns the operation results to the client, so that the client can determine the operation results corresponding to each SDK file according to the identification information of the SDK files.
2. And simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information.
In implementation, as shown in fig. 4, assuming that the request message includes N SDK identification information, the processor of the server selects N SDK processors and local interfaces corresponding to the SDK identification information from the SDK container after receiving the request message including the SDK identification information sent by the client; and the processor of the server sends the request message to all the SDK processors, and simultaneously calls the local interface through all the SDK processors to run the SDK files corresponding to the plurality of SDK identification information.
After the SDK files corresponding to the SDK identification information contained in the request message are all operated, the operation results corresponding to the plurality of SDK files are collected, and the operation results are bound with the SDK file identification information and then returned to the client;
and the client determines the operation result corresponding to each SDK file according to the SDK file identification information.
In the embodiment of the invention, if the SDK container has the cache data, the cache data is read firstly to run the SDK file, so that the running efficiency is improved.
When an SDK file to be integrated needs to be integrated, an embodiment of the present invention further provides a method for integrating an SDK file, where the method includes:
after detecting the SDK files to be integrated in the monitoring directory, distributing corresponding SDK identification information for the SDK files; loading an SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file; and storing the local interface and the SDK processor corresponding to the created SDK file into the SDK container.
In implementation, a user can copy and paste an SDK file to be integrated in a monitoring directory, a file listener in a server monitors creation information of the SDK file to be integrated in the directory and sends the creation information to a file processor, the file processor can independently start a process after receiving the creation information, and corresponding SDK identification information is distributed to the SDK file after the SDK file is determined to be created through a file name sent by the file listener; loading an SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file; and storing the local interface corresponding to the created SDK file and the SDK processor into an SDK container to complete the integration of the SDK file to be integrated.
In the embodiment of the invention, the file processor in the server also stores the SDK identification information, the SDK file name and the configuration information into the SDK container;
wherein the configuration information includes: SDK processor configuration information, thread information, cache time information, snoop directory information, and the like.
Fig. 5 is a block diagram illustrating the structure of an SDK container, where the SDK container includes a thread pool, a cache container, SDK file information, a dynamic proxy object, an SDK processor, configuration information, and the like.
Because the file listener in the server can monitor the creation information of the SDK files in the directory and send the creation information to the file processor, and the file processor can complete the integration of the SDK files to be integrated according to the received creation information, the integration of the SDK files can be efficiently and quickly realized without technical personnel, the core codes in the system are not required to be changed, and the integration cost is reduced.
When the integrated SDK file needs to be uninstalled, an embodiment of the present invention further provides a method for uninstalling an SDK file, where the method includes:
and after detecting that the integrated SDK file is deleted, unloading the SDK file from a system memory, and deleting the corresponding file identifier, the local interface, the SDK processor, the file name and the configuration information from the SDK container.
In implementation, after a user deletes an integrated SDK file in a monitoring directory, a file listener in a server monitors deletion information of the integrated SDK file in the directory and sends the deletion information to a file processor, the file processor can independently start a process after receiving the deletion information, and after the completion of the deletion of the SDK file is determined, the integrated SDK file corresponding to the deletion information is unloaded from a system memory, and a corresponding file identifier, a local interface, the SDK processor, a file name and configuration information are deleted from an SDK container, so that the unloading of the integrated SDK file is completed.
In the embodiment of the invention, the file listener in the server can monitor the deleting information of the SDK file in the directory and send the deleting information to the file processor, and the file processor can unload the integrated SDK file according to the received deleting information, so that the deleting of the SDK file can be efficiently and quickly realized without technical personnel and the internal core code of the system is not required to be changed.
Fig. 6 is a flowchart of a complete SDK file processing method according to an exemplary embodiment, which specifically includes the following steps:
step S601, after a file monitor in a server monitors the creating information of the SDK file to be integrated in the directory, the creating information is sent to a file processor;
step S602, the file processor receives the creation information, and after the SDK file to be integrated is determined to be created, corresponding SDK identification information is distributed for the SDK file;
step S603, the file processor loads the SDK file to be integrated into a system memory, and creates a local interface corresponding to the SDK file and the SDK processor;
step S604, storing the created local interface corresponding to the SDK file, the SDK processor, the SDK file identifier, the SDK file name and the configuration information into an SDK container;
step S605, receiving a request message containing SDK identification information sent by a client, and selecting an SDK processor and a local interface corresponding to the SDK identification information from an SDK container;
step S606, determining the operation sequence of the SDK files corresponding to the plurality of SDK identification information according to a preset rule, and calling a local interface to operate the SDK files through the SDK processor according to the determined operation sequence; or, simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information;
step S607, the processor of the server binds the operation results corresponding to the multiple SDK files with the SDK file identification information and then returns the binding result to the client, so that the client determines the operation result corresponding to each SDK file according to the SDK file identification information.
Step S608, after the file monitor in the server monitors the deletion information of the integrated SDK file in the directory, the deletion information is sent to the file processor;
step S609, the file processor receives the deletion information, unloads the SDK file from the system memory after it is determined that the deletion of the integrated SDK file is completed, and deletes the local interface corresponding to the SDK file, the SDK processor, the SDK file identifier, the SDK file name, and the configuration information from the SDK container.
Taking the case that the client needs to perform the face recognition operation as an example, the client sends a request message containing the SDK identification information to the server, where the SDK identification information contained in the request message is identification information of a face recognition SDK file to request the server to implement the face recognition function.
Fig. 7 is a block diagram of a structure of integrating, deleting and operating a face recognition SDK file.
Each face recognition SDK file supplier needs to standardize the provided face recognition SDK files according to a standard local interface;
after the user stores the standard face recognition SDK file to be integrated in the monitoring directory, a file monitor in the server monitors the creation information of the face recognition SDK file to be integrated and sends the creation information to a file processor;
after receiving the creation information, the file processor judges whether the creation of the face recognition SDK file to be integrated is completed or not according to the name, the size and the creation time of the face recognition SDK file collected in the file attribute collector;
after the file processor determines that the face recognition SDK file to be integrated is established, distributing SDK identification information for the face recognition SDK file to be integrated, and establishing a local interface and an SDK processor corresponding to the face recognition SDK file to be integrated;
after the creation is completed, the file processor puts the relevant resources corresponding to the face recognition SDK file to be integrated into the SDK container.
A processor of a server receives a request message which is sent by a client and used for carrying out face recognition operation, wherein the request message comprises a face image used for carrying out the face recognition operation; selecting N personal face identification SDK processors and local interfaces corresponding to the SDK identification information from the SDK container according to the N SDK identification information contained in the request message;
and after the operation sequence is determined, the processor of the server sends the request message to the determined first face recognition SDK processor, and the first face recognition SDK processor calls a local interface to operate a first face recognition SDK file. And after the operation of the first face recognition SDK file is finished, the first face recognition SDK processor sends the request message and the operation result to a second face recognition SDK processor, so that the second face recognition SDK processor calls a local interface to operate the second face recognition SDK file, after the operation of the second face recognition SDK file is finished, the request message, the operation result of the first face recognition SDK file and the operation result of the second face recognition SDK file are sent to the next face recognition SDK processor according to the determined operation sequence, and so on until the Nth face recognition SDK processor calls the local interface to operate the Nth SDK file.
After all the face recognition SDK files corresponding to the SDK identification information contained in the request message are operated, according to the determined operation sequence, the Nth face recognition SDK processor in the operation sequence returns all the operation results to the last SDK processor, and so on, finally, after the first face recognition SDK processor returns all the operation results to the processor of the server, the processor of the server binds the operation results corresponding to all the SDK face recognition SDK files and the SDK file identification information and returns the operation results to the client.
After the user deletes the integrated face recognition SDK file from the monitoring directory, a file monitor in the server monitors the deletion information of the integrated face recognition SDK file and sends the deletion information to a file processor;
and after receiving the deletion information and determining that the integrated face recognition SDK file is deleted, the file processor unloads the face recognition SDK file corresponding to the deletion information from the system memory and deletes corresponding related resources from the SDK container.
Based on the same inventive concept, the embodiment of the present invention further provides an SDK file processing apparatus, and as the principle of the apparatus for processing SDK files is similar to the method for processing SDK files provided by the embodiment of the present invention, the implementation of the apparatus may refer to the implementation of the method, and repeated details are not repeated.
FIG. 8 is a block diagram illustrating an apparatus for SDK file processing in accordance with an exemplary embodiment. Referring to fig. 8, the apparatus includes a selecting unit 800 and an operating unit 801.
A selecting unit 800, configured to receive a request message that includes SDK identification information and is sent by a client, and select an SDK processor and a local interface corresponding to the SDK identification information from an SDK container; the SDK processor and the local interface are created and stored in an SDK container when an SDK file corresponding to the SDK identification information is integrated, and the local interface is a standard interface with a preset format;
an execution unit 801 configured to execute the running of the SDK file by calling a local interface through an SDK processor.
Optionally, the SDK identification information is a character string obtained by encrypting an SDK file name through an encryption algorithm;
wherein the encryption algorithm is an MD5 encryption algorithm or a hash algorithm.
Optionally, if the request message includes multiple SDK identification information, the running unit 801 is configured to determine a running order of SDK files corresponding to the multiple SDK identification information according to a preset rule, and call a local interface to run the SDK file through the SDK processor according to the determined running order; or
And simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information.
Optionally, the operation unit 801 is configured to determine, according to the determined operation sequence, an SDK file corresponding to the SDK identification information that needs to be currently operated, and call, through an SDK processor corresponding to the SDK identification information, a local interface corresponding to the SDK identification information to operate the SDK file;
judging whether an SDK file corresponding to the unoperated SDK identification information exists or not;
if so, determining and operating the SDK file corresponding to the next SDK identification information to be operated according to the operation sequence until all the SDK files corresponding to the SDK identification information contained in the request message are operated.
Optionally, the running unit 801 is configured to integrate the SDK file according to the following manner:
after detecting the SDK files to be integrated in the monitoring directory, distributing corresponding SDK identification information for the SDK files;
loading the SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file;
and storing the created local interface corresponding to the SDK file and the SDK processor into an SDK container.
Optionally, the running unit 801 is configured to, after detecting that an integrated SDK file is deleted in the monitoring directory, unload the SDK file from the system memory, and delete an SDK processor and a local interface corresponding to the SDK file from the SDK container.
Fig. 9 is a block diagram illustrating an electronic device 900 according to an example embodiment, the electronic device 900 including:
a processor 910;
a memory 920 for storing instructions executable by the processor 910;
wherein the processor 910 is configured to execute the instructions to implement the method for processing the SDK file in the embodiment of the present invention.
FIG. 10 is a block diagram illustrating another electronic device 1000, according to an example embodiment, that includes: a Radio Frequency (RF) circuit 1010, a power supply 1020, a processor 1030, a memory 1040, an input unit 1050, a display unit 1060, a camera 1070, a communication interface 1080, and a Wireless Fidelity (WiFi) module 1090. Those skilled in the art will appreciate that the configuration of the electronic device shown in fig. 10 does not constitute a limitation of the electronic device, and that the electronic device provided by the embodiments of the present invention may include more or less components than those shown, or may combine some components, or may be arranged in different components.
The following describes each component of the electronic device 1000 in detail with reference to fig. 10:
the RF circuitry 1010 may be used for receiving and transmitting data during a communication or conversation. Specifically, RF circuit 1010 receives downlink data from the base station and sends the received downlink data to processor 1030 for processing; and in addition, sending the uplink data to be sent to the base station. In general, RF circuit 1010 includes, but is not limited to, an antenna, at least one Amplifier, a transceiver, a coupler, a Low Noise Amplifier (LNA), a duplexer, and the like.
In addition, the RF circuit 1010 may also communicate with networks and other terminals through wireless communication. The wireless communication may use any communication standard or protocol, including but not limited to Global System for Mobile communications (GSM), General Packet Radio Service (GPRS), Code Division Multiple Access (CDMA), Wideband Code Division Multiple Access (WCDMA), Long Term Evolution (LTE), email, Short Messaging Service (SMS), etc.
The WiFi technology belongs to a short-distance wireless transmission technology, and the electronic device 1000 may Access an Access Point (AP) through the WiFi module 1090, thereby implementing Access to a data network. The WiFi module 1090 may be used for receiving and transmitting data during communication.
Electronic device 1000 may be physically connected to other terminals via communication interface 1080. Optionally, the communication interface 1080 is connected to a communication interface of another terminal through a cable, so as to implement data transmission between the electronic device 1000 and the other terminal.
In the embodiment of the present invention, the electronic device 1000 can implement a communication service to send information to other contacts, so that the electronic device 1000 needs to have a data transmission function, that is, the electronic device 1000 needs to include a communication module inside. Although fig. 10 illustrates communication modules such as RF circuit 1010, WiFi module 1090, and communication interface 1080, it is understood that at least one of the above components or other communication modules (e.g., bluetooth modules) for enabling communication may be present in electronic device 1000 for data transmission.
For example, when the electronic device 1000 is a mobile phone, the electronic device 1000 may include the RF circuit 1010 and may further include the WiFi module 1090; when the electronic device 1000 is a computer, the electronic device 1000 may include a communication interface 1080 and may further include a WiFi module 1090; when the electronic device 1000 is a tablet computer, the electronic device 1000 may include a WiFi module 1090.
Memory 1040 may be used to store software programs and modules. The processor 1030 executes the software programs and modules stored in the memory 1040, so as to execute various functional applications and data processing of the electronic device 1000, and after the processor 1030 executes the program codes in the memory 1040, part or all of the processes in fig. 2 to 7 of the embodiments of the present invention can be implemented.
Alternatively, the memory 1040 may mainly include a program storage area and a data storage area. Wherein, the storage program area can store an operating system, various application programs (such as communication application), various modules for WLAN connection, and the like; the storage data area may store data created according to use of the electronic device, and the like.
Further, the memory 1040 may include high speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
The input unit 1050 may be used to receive numeric or character information input by a user and generate key signal inputs related to user settings and function control of the electronic device 1000.
Alternatively, the input unit 1050 may include a touch panel 1051 and other input terminals 1052.
The touch panel 1051, also called a touch screen, may collect touch operations of a user (for example, operations of a user on or near the touch panel 1051 by using any suitable object or accessory such as a finger or a stylus pen) and drive the corresponding connection device according to a preset program. Alternatively, the touch panel 1051 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 1030, and can receive and execute commands sent by the processor 1030. In addition, the touch panel 1051 may be implemented by various types such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave.
Optionally, other input terminals 1052 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 1060 may be used to display information input by or provided to the user and various menus of the electronic device 1000. The display unit 1060 is a display system of the electronic device 1000, and is used for presenting an interface to implement human-computer interaction.
The display unit 1060 may include a display panel 1061. Alternatively, the Display panel 1061 may be configured in the form of a Liquid Crystal Display (LCD), an Organic Light-Emitting Diode (OLED), or the like.
Further, the touch panel 1051 may cover the display panel 1061, and when the touch panel 1051 detects a touch operation on or near the touch panel 1051, the touch panel may transmit the touch operation to the processor 1030 to determine the type of the touch event, and then the processor 1030 may provide a corresponding visual output on the display panel 1061 according to the type of the touch event.
Although in fig. 10, the touch panel 1051 and the display panel 1061 are two separate components to implement the input and output functions of the electronic device 1000, in some embodiments, the touch panel 1051 and the display panel 1061 may be integrated to implement the input and output functions of the electronic device 1000.
The processor 1030 is a control center of the electronic device 1000, connects various components using various interfaces and lines, and performs various functions of the electronic device 1000 and processes data by operating or executing software programs and/or modules stored in the memory 1040 and calling data stored in the memory 1040, thereby implementing various services based on the electronic device.
Processor 1030 may optionally include one or more processing units. Optionally, processor 1030 may integrate an application processor that handles primarily operating systems, user interfaces, and applications, and a modem processor that handles primarily wireless communications. It is to be appreciated that the modem processor described above may not be integrated into the processor 1030.
The camera 1070 is configured to implement a shooting function of the electronic device 1000, and shoot pictures or videos.
The electronic device 1000 also includes a power supply 1020 (such as a battery) for powering the various components. Optionally, the power supply 1020 may be logically connected to the processor 1030 through a power management system, so that the power management system may manage charging, discharging, power consumption, and the like.
Although not shown, the electronic device 1000 may further include at least one sensor, audio circuit, etc., which are not described in detail herein.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present application may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present application may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (14)

1. A method for processing an SDK file is applied to a server and comprises the following steps:
receiving a request message containing SDK identification information sent by a client, and selecting an SDK processor and a local interface corresponding to the SDK identification information from an SDK container; the SDK processor and the local interface are created and stored in an SDK container when an SDK file corresponding to the SDK identification information is integrated, and the local interface is a standard interface with a preset format;
and calling a local interface through the SDK processor to run the SDK file.
2. The method according to claim 1, wherein the SDK identification information is a character string obtained by encrypting an SDK file name by an encryption algorithm;
wherein the encryption algorithm is an MD5 encryption algorithm or a hash algorithm.
3. The method of claim 1, wherein if the request message includes a plurality of SDK identification information;
calling a local interface through an SDK processor to run the SDK file, wherein the operation comprises the following steps:
determining the operation sequence of the SDK files corresponding to the plurality of SDK identification information according to a preset rule, and calling a local interface to operate the SDK files through an SDK processor according to the determined operation sequence; or
And simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information.
4. The method of claim 3, wherein said invoking a local interface by the SDK processor to execute the SDK file according to the determined execution order comprises:
determining an SDK file corresponding to SDK identification information needing to be operated currently according to the determined operation sequence, and calling a local interface corresponding to the SDK identification information to operate the SDK file through an SDK processor corresponding to the SDK identification information;
judging whether an SDK file corresponding to the unoperated SDK identification information exists or not;
if so, determining and operating the SDK file corresponding to the next SDK identification information to be operated according to the operation sequence until all the SDK files corresponding to the SDK identification information contained in the request message are operated.
5. The method of claim 1, wherein the integration of the SDK file is according to the following:
after detecting the SDK file to be integrated in the monitoring directory, distributing corresponding SDK identification information for the SDK file;
loading the SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file;
and storing the created local interface corresponding to the SDK file and the SDK processor into an SDK container.
6. The method of claim 1, further comprising:
and after detecting that the integrated SDK file is deleted in the monitoring directory, unloading the SDK file from a system memory, and deleting the SDK processor and the local interface corresponding to the SDK file from the SDK container.
7. An apparatus for SDK file processing, comprising:
the selection unit is configured to execute receiving of a request message containing the SDK identification information sent by the client, and select the SDK processor and the local interface corresponding to the SDK identification information from the SDK container; the SDK processor and the local interface are created and stored in an SDK container when an SDK file corresponding to the SDK identification information is integrated, and the local interface is a standard interface with a preset format;
and the operation unit is configured to execute the operation of calling a local interface through the SDK processor to operate the SDK file.
8. The apparatus of claim 7, wherein the SDK identification information is a character string obtained by encrypting an SDK file name by an encryption algorithm;
wherein the encryption algorithm is an MD5 encryption algorithm or a hash algorithm.
9. The apparatus of claim 7, wherein if the request message includes a plurality of SDK identification information; the operation unit is configured to determine an operation sequence of the SDK files corresponding to the plurality of SDK identification information according to a preset rule, and call a local interface to operate the SDK files through the SDK processor according to the determined operation sequence; or
And simultaneously calling a local interface through the SDK processor to operate the SDK files corresponding to the plurality of SDK identification information.
10. The apparatus according to claim 9, wherein the running unit is configured to determine, according to the determined running order, an SDK file corresponding to SDK identification information that needs to be currently run, and call, by an SDK processor corresponding to the SDK identification information, a local interface corresponding to the SDK identification information to run the SDK file;
judging whether an SDK file corresponding to the unoperated SDK identification information exists or not;
if so, determining and operating the SDK file corresponding to the next SDK identification information to be operated according to the operation sequence until all the SDK files corresponding to the SDK identification information contained in the request message are operated.
11. The apparatus of claim 7, wherein the execution unit is configured to integrate the SDK file according to:
after detecting the SDK files to be integrated in the monitoring directory, distributing corresponding SDK identification information for the SDK files;
loading the SDK file to be integrated into a system memory, and creating a local interface and an SDK processor corresponding to the SDK file;
and storing the created local interface corresponding to the SDK file and the SDK processor into an SDK container.
12. The apparatus of claim 7, wherein the execution unit is configured to, after detecting that the integrated SDK file is deleted in the listening directory, unload the SDK file from a system memory, and delete an SDK processor and a local interface corresponding to the SDK file from the SDK container.
13. An electronic device, comprising:
a processor;
a memory for storing the processor-executable instructions;
wherein the processor is configured to execute the instructions to implement the method of SDK file processing according to any of claims 1-6.
14. A computer storage medium having computer program instructions stored therein which, when run on a computer, cause the computer to perform the method of any one of claims 1 to 6.
CN201911329387.4A 2019-12-20 2019-12-20 SDK file processing method and device, electronic equipment and storage medium Active CN111176708B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911329387.4A CN111176708B (en) 2019-12-20 2019-12-20 SDK file processing method and device, electronic equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911329387.4A CN111176708B (en) 2019-12-20 2019-12-20 SDK file processing method and device, electronic equipment and storage medium

Publications (2)

Publication Number Publication Date
CN111176708A CN111176708A (en) 2020-05-19
CN111176708B true CN111176708B (en) 2022-05-13

Family

ID=70657449

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911329387.4A Active CN111176708B (en) 2019-12-20 2019-12-20 SDK file processing method and device, electronic equipment and storage medium

Country Status (1)

Country Link
CN (1) CN111176708B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113342419B (en) * 2021-06-25 2023-09-19 北京奇艺世纪科技有限公司 Push system loading method and device, electronic equipment and storage medium

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220132A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 A kind of monitor method, equipment and the storage medium of document creation information
CN108549576A (en) * 2018-04-19 2018-09-18 Oppo广东移动通信有限公司 File monitor method, apparatus, electronic equipment and storage medium
CN109359091A (en) * 2018-09-26 2019-02-19 Oppo广东移动通信有限公司 File management method, device, terminal and computer readable storage medium
CN109657179A (en) * 2018-12-07 2019-04-19 北京奇虎科技有限公司 A kind of method for processing business, system and storage medium
CN110401724A (en) * 2019-08-22 2019-11-01 北京旷视科技有限公司 File management method, ftp server and storage medium

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107220132A (en) * 2017-05-26 2017-09-29 努比亚技术有限公司 A kind of monitor method, equipment and the storage medium of document creation information
CN108549576A (en) * 2018-04-19 2018-09-18 Oppo广东移动通信有限公司 File monitor method, apparatus, electronic equipment and storage medium
CN109359091A (en) * 2018-09-26 2019-02-19 Oppo广东移动通信有限公司 File management method, device, terminal and computer readable storage medium
CN109657179A (en) * 2018-12-07 2019-04-19 北京奇虎科技有限公司 A kind of method for processing business, system and storage medium
CN110401724A (en) * 2019-08-22 2019-11-01 北京旷视科技有限公司 File management method, ftp server and storage medium

Also Published As

Publication number Publication date
CN111176708A (en) 2020-05-19

Similar Documents

Publication Publication Date Title
US11025963B2 (en) Data processing method, apparatus, and system for live streaming page
EP3174253B1 (en) Message withdrawal method and apparatus, computer program and recording medium
US11061857B2 (en) Data processing method and device
CN113568884A (en) File management method and device, electronic equipment and storage medium
CN104616138A (en) Resource transferring method, system and device
CN111078275B (en) Resource allocation method, device, storage medium and server
CN111095199B (en) Application loading method and terminal equipment
CN111858112B (en) Method, client and server for detecting memory leakage
CN112579264B (en) Application program jumping method, terminal and computer storage medium
CN111176708B (en) SDK file processing method and device, electronic equipment and storage medium
CN111414265B (en) Service framework and method for calling system resources
CN105302589B (en) A kind of method and device obtaining unloading information
CN111104281A (en) Game performance monitoring method, device, system and storage medium
CN107463524A (en) A kind of method and relevant device for accessing data
CN108804434B (en) Message query method, server and terminal equipment
CN112866422B (en) Data request processing method and device
CN104951506A (en) Method and device for acquiring multimedia file
CN107122204A (en) The unloaded state detection method and device of application
CN109002535B (en) Data updating method and device
CN111625283A (en) Hardware updating method, device, system and computer readable storage medium
CN110688344A (en) File scanning method and device, computer readable storage medium and terminal
EP3518513A1 (en) Streaming data acquisition method, device, and system
CN115048463B (en) Data migration method, system and storage medium
CN106294025A (en) The method for down loading of a kind of terminal software and device
CN108572858B (en) Method and device for loading notification bar

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