Mobile terminal application program function extension method, SDK (Software Development Kit) and server

Through the SDK of the mobile terminal application interacting with the server, receiving and executing a single functional data in the dynamic jar file stream, the problem of integration and version compatibility of multiple SDKs in the prior art is solved, and functional expansion and security improvement are achieved.

CN120034529APending Publication Date: 2025-05-23SHENZHEN WORKEC TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510156419.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-12
Publication Date
2025-05-23

AI Technical Summary

Technical Problem

In the prior art, mobile terminal applications need to integrate multiple different SDKs, causing developers to spend a lot of time and effort on integration and adaptation. The versions of different SDKs are updated frequently, and the interface may change, resulting in compatibility issues.

Method used

Provides a mobile terminal application function extension method, sending event ID to the server through the SDK of the main application, receiving a dynamic jar file stream, and executing an extension function according to the file stream. Dynamic jar file streams contain execution data with a single function, reducing data volume and processing time.

Benefits of technology

Different functions and docking with different applications can be completed without configuring various functions and multiple SDKs, which enhances the security and controllability of the main application and reduces the burden of developers to maintain.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120034529A_ABST
    Figure CN120034529A_ABST
Patent Text Reader

Abstract

The invention relates to a mobile terminal application program function extension method, an SDK (Software Development Kit) and a server, the method is applied to an SDK of a main application program, and the method comprises the following steps: the SDK of the main application program sends an event ID (Identity) to the server; the SDK of the main application program receives a dynamic jar file stream sent by the server; the SDK of the main application program executes an extended function according to the dynamic jar file stream; wherein the dynamic jar file stream comprises execution data with a single function. Different functions and docking with different application programs can be completed without configuring various functions and a plurality of SDKs, and the safety and controllability of the main application program can be enhanced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of communications, and in particular to a method for extending the functions of a mobile terminal application program, an SDK and a server. Background Art

[0002] With the development of information technology and the Internet, mobile terminals, such as mobile phones and tablet computers, have become indispensable entertainment and work partners for people.

[0003] An application is a program package that performs various functions on a mobile terminal, and an SDK (Software development kit) is a software development kit, which is usually composed of a collection of interface API files and can assist the application to complete various functions.

[0004] Existing technologies usually implement various functions by integrating multiple different SDKs.

[0005] Applications come from different manufacturers and / or suppliers. One application usually needs to open some unique interfaces to other applications. For example, the payment function needs to integrate the payment SDK of manufacturer A and the payment SDK of manufacturer B respectively; the third-party sharing function needs to integrate the sharing SDK of manufacturer C and the sharing SDK of manufacturer D, etc.

[0006] In the prior art, applications need to inherit too many SDKs, and each functional module requires an independent SDK, which causes developers to spend a lot of time and energy on integration and adaptation. In addition, different SDK versions are updated frequently, and interfaces may change. Developers need to constantly follow up and adjust the code to ensure compatibility. In addition, multiple SDKs will also take up more storage space, and there may be conflicts or adaptation issues between different SDKs.

[0007] It can be seen that the SDK solution adopted by existing applications is difficult to meet the application's extended function requirements. Summary of the invention

[0008] In order to solve the above technical problem or at least partially solve the above technical problem, the present invention provides a mobile terminal application function expansion method, SDK and server.

[0009] In a first aspect, the present invention provides a method for extending the functions of a mobile terminal application program, the method being applied to an SDK of a main application program, the method comprising:

[0010] The SDK of the main application sends the event ID to the server;

[0011] The SDK of the main application receives the dynamic jar file stream sent by the server;

[0012] The SDK of the main application executes the extended function according to the dynamic jar file stream;

[0013] The dynamic jar file stream includes execution data of a single function.

[0014] Optionally, the SDK of the main application executes the extended function according to the dynamic jar file stream, including:

[0015] Obtain a first file name and a first timestamp of the jar file stream, where the first timestamp is the time when the server generates the jar file stream;

[0016] According to the first file name of the jar file stream, determine whether there is a local jar data packet with the same file name in the local area where the main application is located;

[0017] If there is no local jar data package with the same file name, save the jar file stream as a local jar data package;

[0018] If there is a local jar data package with the same file name, determine whether the local jar data package needs to be updated according to the first timestamp and the second timestamp of the local jar data package,

[0019] If the first timestamp and the second timestamp are different, the jar file stream is saved as the updated local jar data packet.

[0020] Optionally, the method further includes:

[0021] The SDK of the main application receives the SO dynamic link library from the server and saves it into the main application;

[0022] After receiving the server command, the SDK of the main application transparently transmits it to the SO dynamic link library to implement the function corresponding to the server command;

[0023] The SDK of the main application receives the feedback parameters sent by the SO dynamic link library;

[0024] The SDK of the main application sends the feedback parameter to the server.

[0025] Optionally, the method further includes:

[0026] The SDK of the main application receives the deletion command sent by the server;

[0027] The SDK of the main application deletes the SO dynamic link library from the main application.

[0028] Optionally, before the SDK of the main application sends the event ID to the server, the method further includes:

[0029] The SDK of the main application sends an identity identification request to the server, so that the server determines whether the main application is a legitimate main application according to the identity identification request, and generates a command to allow sending or a command to prohibit sending;

[0030] The allow-send command is a command generated by the server after determining that the main application is a legal main application, and the prohibit-send command is a command generated by the server after determining that the main application is an illegal main application.

[0031] Optionally, after the SDK of the main application executes the extended function according to the dynamic jar file stream, the method further includes:

[0032] The SDK of the main application determines whether there is uploaded data after executing the extended function;

[0033] If there is the uploaded data, the SDK of the main application sends the uploaded data to the server.

[0034] In a second aspect, a method for extending the function of a mobile terminal application is provided, the method being applied to a server, the method comprising:

[0035] The server receives the event ID sent by the SDK of the main application;

[0036] The server sends the dynamic jar file stream to the SDK of the main application according to the event ID, so that the SDK of the main application executes the extended function according to the dynamic jar file stream;

[0037] The dynamic jar file stream includes data of a single function.

[0038] Optionally, the method further includes:

[0039] The server maintains a connection with the SDK of the main application via websocket;

[0040] The server monitors whether the main application is illegally invaded;

[0041] If illegal intrusion is detected, a deletion command is sent to the SDK of the main application so that the SDK of the main application deletes the SO dynamic link library from the main application.

[0042] In a third aspect, an SDK is provided, including:

[0043] A first sending unit, used for sending an event ID to a server;

[0044] A first receiving unit, used for receiving a dynamic jar file stream sent by the server;

[0045] An execution unit, used for executing an extended function according to the dynamic jar file stream;

[0046] The dynamic jar file stream includes execution data of a single function.

[0047] In a fourth aspect, a server is provided, including:

[0048] A second receiving unit, used for receiving an event ID sent by the SDK of the main application;

[0049] A second sending unit is used to send the dynamic jar file stream to the SDK of the main application according to the event ID, so that the SDK of the main application executes the extended function according to the dynamic jar file stream;

[0050] The embodiment of the present invention provides a method for extending the function of a mobile terminal application, an SDK and a server. The method is applied to the SDK of a main application, and the method includes: the SDK of the main application sends an event ID to the server; the SDK of the main application receives the dynamic jar file stream sent by the server; the SDK of the main application executes the extended function according to the dynamic jar file stream; wherein the dynamic jar file stream includes the execution data of a single function. The present invention can complete different functions and docking with different applications without configuring various functions and multiple SDKs, and can also enhance the security and controllability of the main application. The dynamic jar file stream includes the execution data of a single function, which can be, for example, a function of making a phone call or a function of sending a text message, which makes the amount of data contained in the jar file stream smaller. Since the jar file stream comes from the server, the amount of data that the SDK of the main application and the server need to transmit is smaller, and since it is the execution data of a single function, the processing speed is fast. In addition, since the dynamic jar file stream comes from the server, the server can set multiple functions, so the SDK of the main application can complete different functions and docking with different applications without configuring various functions and multiple SDKs, and can also enhance the security and controllability of the main application. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] 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.

[0052] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.

[0053] Figure 1 The figure shows an application environment diagram of a method for extending the function of a mobile terminal application program in one embodiment;

[0054] Figure 2 It is a flow chart of a method for extending the function of a mobile terminal application program according to an embodiment of the present invention;

[0055] Figure 3 It is a flow chart of a method for extending the function of a mobile terminal application program according to an embodiment of the present invention;

[0056] Figure 4 Shown is a structural block diagram of the SDK according to an embodiment of the present invention. DETAILED DESCRIPTION

[0057] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0058] Figure 1 FIG. 1 is an application environment diagram of a method for extending the function of a mobile terminal application program in an embodiment. Figure 1 , the mobile terminal application function expansion method is applied to the mobile terminal application function expansion system. The mobile terminal application function expansion method includes a mobile terminal 110 and a server 120. The mobile terminal 110 and the server 120 are connected through a network. The mobile terminal 110 can be at least one of a mobile phone, a tablet computer, etc. The server 120 can be implemented by an independent server or a server cluster composed of multiple servers.

[0059] Figure 2 The flowchart shown is a method for extending the functions of a mobile terminal application according to an embodiment of the present invention. The method is applied to the mobile terminal 110, and is specifically applied to the SDK of the main application of the mobile terminal.

[0060] The main application in the embodiment of the present invention is also a common application, which is specially named only to distinguish it from other third-party applications.

[0061] like Figure 2 As shown, the method of the embodiment of the present invention includes:

[0062] Step 210, the SDK of the main application sends the event ID to the server;

[0063] Step 220, the SDK of the main application receives the dynamic jar file stream sent by the server;

[0064] Step 230, the SDK of the main application executes the extended function according to the dynamic jar file stream;

[0065] The dynamic jar file stream includes execution data of a single function.

[0066] In the embodiment of the present invention, the event ID includes system behavior ID, system data ID, third-party application behavior ID, third-party application ID, calling parameters, etc. The server sends the corresponding jar file stream according to the event ID.

[0067] In the method of the embodiment of the present invention, the expandable functions can be system behavior, system data, third-party application data, third-party application behavior, etc. For example, the system behavior can be making a call and sending a text message; the system data can be the mobile phone system address book and mobile phone call records; the third-party application data can be the third-party application authorization to obtain a friend list and the map data of a certain map application; the third-party application behavior can be sharing a certain application, logging in to a certain application, paying for a certain application, etc.

[0068] In the embodiment of the present invention, the dynamic jar file stream includes the execution data of a single function, such as the function of making a phone call or sending a text message, which makes the amount of data contained in the jar file stream smaller. Since the jar file stream comes from the server, the amount of data that the SDK of the main application and the server need to transmit is smaller, and since it is the execution data of a single function, the processing speed is fast. In addition, since the dynamic jar file stream comes from the server, the server can set multiple functions, so the SDK of the main application can complete different functions and docking with different applications without configuring various functions and multiple SDKs, and can also enhance the security and controllability of the main application.

[0069] In the embodiment of the present invention, the SDK of the main application executes the extended function according to the dynamic jar file stream, including:

[0070] Obtain a first file name and a first timestamp of the jar file stream, where the first timestamp is the time when the server generates the jar file stream;

[0071] According to the first file name of the jar file stream, determine whether there is a local jar data packet with the same file name in the local area where the main application is located;

[0072] If there is no local jar data package with the same file name, save the jar file stream as a local jar data package;

[0073] If there is a local jar data package with the same file name, determine whether the local jar data package needs to be updated according to the first timestamp and the second timestamp of the local jar data package,

[0074] If the first timestamp and the second timestamp are different, the jar file stream is saved as the updated local jar data packet.

[0075] The method of the embodiment of the present invention determines whether the local jar data package needs to be saved or updated according to the file name and timestamp, so that the executed local jar data package can be the latest data, thereby avoiding execution failure and improving execution efficiency. At the same time, the dynamic timestamp can also improve the security performance of the system.

[0076] In an embodiment of the present invention, the method further includes:

[0077] The SDK of the main application receives the SO dynamic link library from the server and saves it into the main application;

[0078] After receiving the server command, the SDK of the main application transparently transmits it to the SO dynamic link library to implement the function corresponding to the server command;

[0079] The SDK of the main application receives the feedback parameters sent by the SO dynamic link library;

[0080] The SDK of the main application sends the feedback parameter to the server.

[0081] In an embodiment of the present invention, the method further includes:

[0082] The SDK of the main application receives the deletion command sent by the server;

[0083] The SDK of the main application deletes the SO dynamic link library from the main application.

[0084] In the embodiment of the present invention, when the SDK receives a deletion command, the SO library can be completely deleted. Moreover, since the SDK of the main application in the embodiment of the present invention is completely isolated from the SDKs of other applications and will not be called by other applications, the method in the embodiment of the present invention can improve the security performance of the system.

[0085] In the embodiment of the present invention, before the SDK of the main application sends the event ID to the server, the method further includes:

[0086] The SDK of the main application sends an identity identification request to the server, so that the server determines whether the main application is a legitimate main application according to the identity identification request, and generates a command to allow sending or a command to prohibit sending;

[0087] The main application program sends a command according to permission or prohibition of sending a command;

[0088] The allow-send command is a command generated by the server after determining that the main application is a legal main application, and the prohibit-send command is a command generated by the server after determining that the main application is an illegal main application.

[0089] In the embodiment of the present invention, the identity recognition request can also improve the security performance of the system.

[0090] In the embodiment of the present invention, after the SDK of the main application executes the extended function according to the dynamic jar file stream, the method further includes:

[0091] The SDK of the main application determines whether there is uploaded data after executing the extended function;

[0092] If there is the uploaded data, the SDK of the main application sends the uploaded data to the server.

[0093] In an embodiment of the present invention, the uploaded data generated by the SDK of the main application can be in json format. There is an optional field value in json: other_upload. If it is true, the server will pass the uploaded data to the Http interface opened by the third-party application after receiving the uploaded data, thereby realizing data interaction, functional interaction, etc. between the main application and the third-party application.

[0094] Figure 3 FIG. 1 is a flow chart of a method for extending the function of a mobile terminal application program according to an embodiment of the present invention. Figure 3 As shown, the method is applied to the server, and the method includes:

[0095] Step 310, the server receives the event ID sent by the SDK of the main application;

[0096] Step 320, the server sends the dynamic jar file stream to the SDK of the main application according to the event ID, so that the SDK of the main application executes the extended function according to the dynamic jar file stream;

[0097] The dynamic jar file stream includes data of a single function.

[0098] In an embodiment of the present invention, the method further includes:

[0099] The server maintains a connection with the SDK of the main application via WebSocket;

[0100] The server monitors whether the main application is illegally invaded;

[0101] If illegal intrusion is detected, a deletion command is sent to the SDK of the main application so that the SDK of the main application deletes the SO dynamic link library from the main application.

[0102] WebSocket is a protocol for full-duplex communication over a single TCP connection.

[0103] In the embodiment of the present invention, the server maintains a long connection with the SDK of the main application through WebSocket. One server in the embodiment of the present invention can connect to the SDKs of multiple main applications. If the SDK of a main application encounters human damage or illegal behavior, the server monitors the illegal intrusion and sends a delete command to the SDK of the linked application. The command can be "-99".

[0104] When the application SDK receives "-99", it starts self-defense monitoring, stops all functions in the SO dynamic link library, and deletes the SO dynamic link library. Without the SO dynamic link library, the core function of sending event IDs is unavailable, which can improve the security performance of the system.

[0105] According to the method of the embodiment of the present invention, the SDK of the main application can complete different functions and dock with different applications without configuring various functions and multiple SDKs, and can also enhance the security and controllability of the main application.

[0106] Figure 4 FIG. 1 is a schematic diagram showing the structure of an SDK device according to an embodiment of the present invention. Figure 4 As shown, the SDK is set up with the main application, and the SDK device includes:

[0107] A first sending unit 410 is used to send an event ID to a server;

[0108] A first receiving unit 420 is used to receive a dynamic jar file stream sent by the server;

[0109] An execution unit 430, configured to execute an extended function according to the dynamic jar file stream;

[0110] The dynamic jar file stream includes execution data of a single function.

[0111] In the embodiment of the present invention, the execution unit 430 is further used for:

[0112] Obtain a first file name and a first timestamp of the jar file stream, where the first timestamp is the time when the server generates the jar file stream;

[0113] According to the first file name of the jar file stream, determine whether there is a local jar data packet with the same file name in the local area where the main application is located;

[0114] If there is no local jar data package with the same file name, save the jar file stream as a local jar data package;

[0115] If there is a local jar data package with the same file name, determine whether the local jar data package needs to be updated according to the first timestamp and the second timestamp of the local jar data package,

[0116] If the first timestamp and the second timestamp are different, the jar file stream is saved as the updated local jar data packet.

[0117] In the embodiment of the present invention, the first receiving unit 420 is further used to receive the SO dynamic link library from the server and save it into the main application;

[0118] The first sending unit 410 is also used to transmit the received server command to the SO dynamic link library to implement the function corresponding to the server command;

[0119] The first receiving unit 420 is further configured to receive feedback parameters sent by the SO dynamic link library;

[0120] The first sending unit 410 is further configured to send the feedback parameter to the server.

[0121] In the embodiment of the present invention, the first receiving unit 420 is further configured to receive a deletion command sent by the server;

[0122] The execution unit 430 is further configured to delete the SO dynamic link library from the main application.

[0123] In the embodiment of the present invention, the first sending unit 410 is further used to send an identification request to the server, so that the server determines whether the main application is a legitimate main application according to the identity identification request, and generates a permission to send command or a prohibition to send command;

[0124] Among them, the allowed send command is a command generated by the server after determining that the main application is a legal main application, and the prohibited send command is a command generated by the server after determining that the main application is an illegal main application.

[0125] In an embodiment of the present invention, the execution unit 430 is further configured to determine whether there is uploaded data after executing the extended function;

[0126] The first sending unit 410 is further configured to, if there is the uploaded data, send the uploaded data to the server.

[0127] An embodiment of the present invention further provides a server, which includes:

[0128] A second receiving unit, configured to receive an event ID sent by the SDK of the main application;

[0129] A second sending unit, configured to send a dynamic jar file stream to the SDK of the main application according to the event ID, so that the SDK of the main application executes an extended function according to the dynamic jar file stream;

[0130] Among them, the dynamic jar file stream includes data of a single function.

[0131] In an embodiment of the present invention, the server further includes a control unit, configured to maintain a connection with the SDK of the main application through websocket;

[0132] The control unit is further configured to monitor whether the main application is illegally invaded;

[0133] The second sending unit is further configured to, if an illegal invasion is monitored, send a deletion command to the SDK of the main application, so that the SDK of the main application deletes the SO dynamic link library from the main application.

[0134] In an embodiment of the present invention, the SDK of the main application can complete different functions and docking with different applications without configuring various functions and multiple SDKs, and can also enhance the security and controllability of the main application.

[0135] Figures 2 to 3 It is a flowchart of a method for extending the functions of a mobile terminal application in an embodiment. It should be understood that although Figures 2 to 3 the steps in the flowchart are shown in sequence according to the indication of the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless there is a clear indication in this article, the execution of these steps has no strict order limit, and these steps can be executed in other orders. Moreover, Figures 2 to 3At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.

[0136] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiments can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a non-volatile computer-readable storage medium. When the program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided by the present invention can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).

[0137] It should be noted that, in this article, relational terms such as "first" and "second" are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the existence of other identical elements in the process, method, article or device including the elements.

[0138] The foregoing is merely a specific embodiment of the present invention, which enables those skilled in the art to understand or implement the present invention. Various modifications to these embodiments will be apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present invention. Therefore, the present invention will not be limited to the embodiments shown herein, but rather to the widest scope consistent with the principles and novel features claimed herein.

Claims

1. A method for extending the function of a mobile terminal application, characterized in that: The method is applied to the SDK of the main application, and the method includes: The SDK of the main application sends the event ID to the server; The SDK of the main application receives the dynamic jar file stream sent by the server; The SDK of the main application executes the extended function according to the dynamic jar file stream; The dynamic jar file stream includes execution data of a single function.

2. The method according to claim 1, characterized in that The SDK of the main application executes the extended function according to the dynamic jar file stream, including: Obtain a first file name and a first timestamp of the jar file stream, where the first timestamp is the time when the server generates the jar file stream; According to the first file name of the jar file stream, determine whether there is a local jar data packet with the same file name in the local area where the main application is located; If there is no local jar data package with the same file name, save the jar file stream as a local jar data package; If there is a local jar data package with the same file name, determine whether the local jar data package needs to be updated according to the first timestamp and the second timestamp of the local jar data package, If the first timestamp and the second timestamp are different, the jar file stream is saved as the updated local jar data packet.

3. The method according to claim 1, characterized in that The method further comprises: The SDK of the main application receives the SO dynamic link library from the server and saves it into the main application; After receiving the server command, the SDK of the main application transparently transmits it to the SO dynamic link library to implement the function corresponding to the server command; The SDK of the main application receives the feedback parameters sent by the SO dynamic link library; The SDK of the main application sends the feedback parameter to the server.

4. The method according to claim 3, characterized in that The method further comprises: The SDK of the main application receives the deletion command sent by the server; The SDK of the main application deletes the SO dynamic link library from the main application.

5. The method according to claim 1, characterized in that Before the SDK of the main application sends the event ID to the server, the method further includes: The SDK of the main application sends an identity identification request to the server, so that the server determines whether the main application is a legitimate main application according to the identity identification request, and generates a command to allow sending or a command to prohibit sending; The allow-send command is a command generated by the server after determining that the main application is a legal main application, and the prohibit-send command is a command generated by the server after determining that the main application is an illegal main application.

6. The method according to claim 1, characterized in that After the SDK of the main application executes the extended function according to the dynamic jar file stream, the method further comprises: The SDK of the main application determines whether there is uploaded data after executing the extended function; If there is the uploaded data, the SDK of the main application sends the uploaded data to the server.

7. A method for extending the function of a mobile terminal application program, characterized in that: The method is applied to the server, and the method includes: The server receives the event ID sent by the SDK of the main application; The server sends the dynamic jar file stream to the SDK of the main application according to the event ID, so that the SDK of the main application executes the extended function according to the dynamic jar file stream; The dynamic jar file stream includes data of a single function.

8. The method according to claim 7, characterized in that The method further comprises: The server maintains a connection with the SDK of the main application via WebSocket; The server monitors whether the main application is illegally invaded; If illegal intrusion is detected, a deletion command is sent to the SDK of the main application so that the SDK of the main application deletes the SO dynamic link library from the main application.

9. An SDK, characterized in that: The SDK includes: A first sending unit, used for sending an event ID to a server; A first receiving unit, used to receive the dynamic jar file stream sent by the server; An execution unit, used for executing an extended function according to the dynamic jar file stream; The dynamic jar file stream includes execution data of a single function.

10. A server, characterized in that: The server includes: A second receiving unit, used for receiving an event ID sent by the SDK of the main application; A second sending unit is used to send the dynamic jar file stream to the SDK of the main application according to the event ID, so that the SDK of the main application executes the extended function according to the dynamic jar file stream; The dynamic jar file stream includes data of a single function.