Method and device for dynamic function plug-in, equipment and storage medium
By obtaining and adjusting the configuration file of the dynamic function plug-in, the problem of dynamic function module not being able to find resources during compilation is solved, and the normal operation and high success rate compilation of the dynamic function plug-in are achieved.
Patent Information
- Application Number
- CN202410472673.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-18
- Publication Date
- 2025-10-24
AI Technical Summary
In the prior art, during the compilation process, dynamic function modules cannot find the program package where the resources are located, resulting in compilation errors, which affects the functional expansion of the application.
Obtain a configuration file of the first dynamic function plug-in and information about the second dynamic function plug-in on which it depends, adjust the configuration file based on the information of the second dynamic function plug-in, generate a new configuration file, and compile the first dynamic function plug-in based on the new configuration file to generate an executable file.
Prevent dynamic function plug-ins from making errors during compilation, ensure their normal operation, and improve compilation success rate.
Smart Images

Figure CN120832145A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] Embodiments of the present disclosure relate to the technical field of application development, and particularly relate to a method, device, apparatus and storage medium for dynamic function plug-in. BACKGROUND
[0002] An application publishing tool generates and provides an optimized application package for each device configuration, that is, a device only downloads the code and resources required to run the application, so that a user can obtain a smaller and better application package.
[0003] The application publishing tool can split some functions in the application into dynamic function modules in the form of plug-ins. In the related art, for a low version of the application publishing tool, when one dynamic function module uses the resources of another dynamic function module, an error occurs in the compilation process, affecting the normal operation of the dynamic function module. SUMMARY
[0004] Embodiments of the present disclosure provide a method, device, apparatus and storage medium for dynamic function plug-in, which can prevent the dynamic function plug-in from having an error in the compilation process and ensure the normal operation of the dynamic function plug-in.
[0005] In a first aspect, embodiments of the present disclosure provide a method for dynamic function plug-in, comprising:
[0006] obtaining a configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in relied on by the first dynamic function plug-in;
[0007] adjusting the configuration file based on the information of the second dynamic function plug-in to obtain a new configuration file;
[0008] compiling the first dynamic function plug-in based on the new configuration file to obtain an executable file.
[0009] In a second aspect, embodiments of the present disclosure further provide a device for dynamic function plug-in, comprising:
[0010] a dependent dynamic function plug-in information obtaining module configured to obtain a configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in relied on by the first dynamic function plug-in,
[0011] a new configuration file obtaining module configured to adjust the configuration file based on the information of the second dynamic function plug-in to obtain a new configuration file;
[0012] a compiling module configured to compile the first dynamic function plug-in based on the new configuration file to obtain an executable file.
[0013] In a third aspect, the embodiments of the present disclosure further provide an electronic device, the electronic device comprising:
[0014] one or more processors;
[0015] a storage device configured to store one or more programs,
[0016] When the one or more programs are executed by the one or more processors, the one or more processors implement the method for dynamic function plug-in as described in the embodiments of the present disclosure.
[0017] In a fourth aspect, the embodiments of the present disclosure further provide a storage medium containing computer executable instructions for performing the method for dynamic function plug-in as described in the embodiments of the present disclosure when executed by a computer processor.
[0018] The embodiments of the present disclosure disclose a method, device, equipment and storage medium for dynamic function plug-in. The configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in relied on by the first dynamic function plug-in are acquired. The configuration file is adjusted based on the information of the second dynamic function plug-in to obtain a new configuration file. The first dynamic function plug-in is compiled based on the new configuration file to obtain an executable file. The method for dynamic function plug-in provided by the embodiments of the present disclosure adjusts the configuration file of the first dynamic function plug-in based on the information of the second dynamic function plug-in relied on, which can prevent the dynamic function plug-in from being wrong in the compiling process, ensure the normal operation of the dynamic function plug-in, and improve the success rate of the dynamic function plug-in compilation. BRIEF DESCRIPTION OF DRAWINGS
[0019] The above and other features, advantages, and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the drawings, same or similar reference numerals can represent same or similar elements. It should be understood that the drawings are schematic, and the original and elements are not necessarily drawn according to the scale.
[0020] Figure 1 is a method flow diagram for dynamic function plug-in provided by the embodiments of the present disclosure;
[0021] Figure 2 is a device structure diagram for dynamic function plug-in provided by the embodiments of the present disclosure;
[0022] Figure 3 is a structure diagram of an electronic device provided by the embodiments of the present disclosure. DETAILED DESCRIPTION
[0023] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. While certain embodiments of the present disclosure are shown in the drawings, it is understood that the present disclosure can be embodied in various forms and should not be interpreted as being limited to the embodiments set forth herein; rather, these embodiments are provided so as to more completely and thoroughly understand the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for illustrative purposes and are not intended to limit the scope of protection of the present disclosure.
[0024] It should be understood that each of the steps recited in the method embodiments of the present disclosure can be performed in different orders and / or in parallel. In addition, the method embodiments can include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] The term "comprising" and variations thereof as used herein are open-ended, that is "including but not limited to". The term "based on" is "based, at least in part, on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". Related terms are defined in the following description.
[0026] It should be noted that the terms "first", "second", and the like in the present disclosure are only used to distinguish different devices, modules or units, and are not intended to limit the order or interdependence of the functions performed by these devices, modules or units.
[0027] It should be noted that the terms "one", "multiple" in the present disclosure are illustrative and not limiting, and those skilled in the art should understand that unless otherwise explicitly stated in the context, it should be understood as "one or more".
[0028] The names of the messages or information exchanged between the devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0029] It can be understood that before using the technical solutions disclosed in the embodiments of the present disclosure, the type, scope of use, use scenario, etc. of the personal information involved in the present disclosure should be informed to the user and the authorization of the user should be obtained in a proper manner according to relevant laws and regulations.
[0030] For example, when responding to the active request of the user, the user is sent a prompt message to explicitly prompt the user that the operation requested to be performed will require the acquisition and use of the personal information of the user. Thus, the user can voluntarily choose whether to provide personal information to the software or hardware, such as electronic devices, application programs, servers or storage media, etc. that perform the operation of the technical solutions of the present disclosure according to the prompt information.
[0031] As an optional but non-limiting implementation, in response to receiving the active request of the user, the manner of sending the prompt information to the user may be, for example, a pop-up window manner in which the prompt information may be presented in a text manner. In addition, the pop-up window may also carry a selection control for the user to select "agree" or "disagree" to provide the personal information to the electronic device.
[0032] It can be understood that the above notification and user authorization process is only illustrative and does not limit the implementation of the present disclosure. Other manners that meet the relevant laws and regulations can also be applied to the implementation of the present disclosure.
[0033] It can be understood that the data involved in the technical solution (including but not limited to the data itself, the acquisition or use of the data) should comply with the requirements of the relevant laws and regulations and the relevant provisions.
[0034] In the related art, when developing a dynamic function module, if the dynamic function module uses the resource of another dynamic function module, when the related resource is referenced in the dynamic function module, since the program package where the resource is located cannot be found in the configuration file, an error occurs when the resource mapping file is generated based on the configuration file, and then the subsequent compilation operation is affected, thereby affecting the function extension of the application program.
[0035] Figure 1 A flowchart of a method for a dynamic function plug-in provided by the embodiment of the present disclosure, the embodiment of the present disclosure is applicable to the case of compiling the dynamic function plug-in of the application program, and the method can be executed by a device for a dynamic function plug-in. The device can be realized in the form of software and / or hardware, and can be realized by an electronic device, which can be a mobile terminal, a PC terminal, or a server.
[0036] As shown in Figure 1 , the method comprises:
[0037] S110, obtaining a configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in depended by the first dynamic function plug-in.
[0038] The first dynamic function plug-in and the second dynamic function plug-in can be function modules that split part of the functions of the application program and provide in the form of plug-ins. The dynamic function plug-in does not need to be packaged, such as an application package. After the user installs the application package, the dynamic function plug-in can be downloaded according to the demand. The configuration file of the first dynamic function plug-in can be a file that aggregates the configuration information of the first dynamic function plug-in, which can be represented in the form of "<tag>: content".
[0039] Specifically, the manner of obtaining the configuration file of the first dynamic function plug-in can be: obtaining configuration information of the first dynamic function plug-in; and performing packaging processing on the configuration information to obtain the configuration file.
[0040] The configuration information of the first dynamic function plug-in can be configuration information of all functional units included in the first dynamic function plug-in. The packaging processing on the configuration information can be understood as: merging the configuration information to obtain the configuration file. In this embodiment, the configuration information can be packaged by using a configuration tool in an application publishing tool.
[0041] Specifically, the manner of obtaining the information of the second dynamic function plug-in relied on by the first dynamic function plug-in can be: obtaining a dependency relationship tree of the first dynamic function plug-in; and determining the information of the second dynamic function plug-in relied on by the first dynamic function plug-in according to the dependency relationship tree.
[0042] The information of the second dynamic function plug-in includes the name of the second dynamic function plug-in. The first dynamic function plug-in relying on the second dynamic function plug-in can be understood as the first dynamic function plug-in referencing a resource in the second dynamic function plug-in. For example, the first dynamic function plug-in includes an object "smart terminal" and needs to reference a "smart terminal picture" resource in the second dynamic function plug-in. In this embodiment, the process of obtaining the dependency relationship tree of the first dynamic function plug-in can be: first, parsing the engineering code of the first dynamic function plug-in, and extracting the dependency relationship tree based on the parsing result. The dependency relationship tree is composed of the names of multiple dynamic function plug-ins, and therefore, the name of the second dynamic function plug-in relied on by the first dynamic function plug-in can be determined from the dependency relationship tree. The name of the dynamic function plug-in can uniquely identify the dynamic function plug-in.
[0043] S120, adjusting the configuration file based on the information of the second dynamic function plug-in to obtain a new configuration file.
[0044] The information of the second dynamic function plug-in can be information for uniquely identifying the second dynamic function plug-in, for example, the name of the second dynamic function plug-in. The manner of adjusting the configuration file based on the information of the second dynamic function plug-in can be: writing the name of the second dynamic function plug-in into the configuration file of the first dynamic function plug-in, that is, adding the name of the second dynamic function plug-in to the configuration file of the first dynamic function plug-in.
[0045] Specifically, the manner of writing the information of the second dynamic function plug-in into the configuration file to obtain a new configuration file can be: extracting a dependency relationship tag in the configuration file; and adjusting the content corresponding to the dependency relationship tag based on the information of the second dynamic function plug-in to obtain the new configuration file.
[0046] In the above formula, the dependency relationship label can be understood as a field representing a dependency relationship. For example, the dependency relationship label can be represented as <uses-split>The content corresponding to the dependency relationship label can be understood as a specific value of the dependency relationship label. The configuration file can be an Extensible Markup Language (XML) file. By parsing the configuration file, the dependency relationship label in the configuration file is obtained, and finally the content corresponding to the dependency relationship label is adjusted based on the information of the second dynamic function plug-in.
[0047] Specifically, the manner of adjusting the content corresponding to the dependency relationship label based on the information of the second dynamic function plug-in to obtain a new configuration file can be: adding the information of the second dynamic function plug-in to the content corresponding to the dependency relationship label to obtain a new configuration file.
[0048] In this embodiment, adding the information of the second dynamic function plug-in to the content corresponding to the dependency relationship label can be understood as adding the information of the second dynamic function plug-in to the content corresponding to the dependency relationship label. For example, assuming that the first dynamic function plug-in is DF1, the second dynamic function plug-in is DF2, and the dependency relationship label in the original configuration file is represented as: <uses-split name="DF1">, the dependency relationship label of the adjusted configuration file is represented as: <uses-split name="DF1, DF2">. In this embodiment, the information of the second dynamic function plug-in is added to the content corresponding to the dependency relationship label, so that the first dynamic function plug-in can accurately find the resource when referencing the resource of the second dynamic function plug-in.
[0049] S130, compiling the first dynamic function plug-in based on the new configuration file to obtain an executable file.
[0050] The executable file can be a file that can be recognized by a virtual machine, for example: for a JAVA virtual machine, the executable file can be a class file. The process of compiling the first dynamic function plug-in based on the new configuration file can be: first generating a code file based on the configuration file, and finally compiling the code file.
[0051] Specifically, the manner of compiling the first dynamic function plug-in based on the new configuration file to obtain an executable file can be: obtaining resource information of the first dynamic function plug-in; generating a code file of the first dynamic function plug-in according to the resource information and the new configuration file; and compiling the code file to obtain an executable file.
[0052] The resource information can include resource type and resource name, etc. The code file can be a code file formed in a set programming language, for example: a JAVA file, a C++ file. In this embodiment, the manner of compiling the code file can be: using a compiling tool in an application publishing tool to compile the code file.
[0053] Optionally, the manner of generating the code file of the first dynamic function plug-in according to the resource information and the new configuration file can be: allocating resource identifiers to the resource information based on the new configuration file, obtaining a resource mapping relationship; generating a resource mapping file based on the resource mapping relationship; and generating the code file of the first dynamic function plug-in according to the resource mapping file.
[0054] The resource mapping relationship is a mapping relationship between the resource information and the resource identifier. The process of allocating the resource identifiers to the resource information based on the new configuration file can be: obtaining the resource package (i.e., the dynamic function plug-in or the third-party function module) to which each resource information belongs according to the new configuration file, and then allocating the resource identifiers to each resource information based on the resource package to which the resource information belongs, so as to establish the mapping relationship between the resource information and the resource identifier, thereby searching for the corresponding resource information through the resource identifier. The resource mapping file can be understood as a text file composed of the resource mapping relationship.
[0055] In this embodiment, the manner of generating the code file of the first dynamic function plug-in according to the resource mapping file can be: first grouping the resource mapping relationship in the resource mapping file according to the resource type, and combining the resource name and the resource identifier by using a set operator (such as "="), to obtain an intermediate file; and finally inputting the intermediate file into a third-party code generation tool, so as to generate the code file of the first dynamic function plug-in.
[0056] The technical scheme of the embodiment of the present disclosure obtains the configuration file of the first dynamic function plug-in and the information of the second dynamic function plug-in relied on by the first dynamic function plug-in, adjusts the configuration file based on the information of the second dynamic function plug-in, obtains a new configuration file, and compiles the first dynamic function plug-in based on the new configuration file to obtain an executable file. The method for dynamic function plug-ins provided by the embodiment of the present disclosure adjusts the configuration file of the first dynamic function plug-in based on the information of the second dynamic function plug-in relied on by the first dynamic function plug-in, which can prevent the dynamic function plug-in from being wrong in the compiling process, ensure the normal operation of the dynamic function plug-in, and improve the success rate of the compilation of the dynamic function plug-in.
[0057] Figure 2 The structure diagram of a device for dynamic function plug-ins provided by the embodiment of the present disclosure is shown in FIG. 2. Figure 2 As shown in FIG. 2, the device includes:
[0058] The dependent dynamic function plug-in information obtaining module 210 is configured to obtain the configuration file of the first dynamic function plug-in and the information of the second dynamic function plug-in relied on by the first dynamic function plug-in.
[0059] The new configuration file obtaining module 220 is configured to adjust the configuration file based on the information of the second dynamic function plug-in, to obtain a new configuration file.
[0060] The compiling module 230 is configured to compile the first dynamic function plug-in based on the new configuration file to obtain an executable file.
[0061] Optionally, the new configuration file obtaining module 220 is further configured to:
[0062] extract a dependency relationship tag in the configuration file;
[0063] adjust content corresponding to the dependency relationship tag based on information of the second dynamic function plug-in to obtain the new configuration file.
[0064] Optionally, the new configuration file obtaining module 220 is further configured to:
[0065] add the information of the second dynamic function plug-in to the content corresponding to the dependency relationship tag to obtain the new configuration file.
[0066] Optionally, the dynamic function plug-in information obtaining module 210 is further configured to:
[0067] obtain configuration information of the first dynamic function plug-in;
[0068] pack the configuration information to obtain the configuration file.
[0069] Optionally, the dynamic function plug-in information obtaining module 210 is further configured to:
[0070] obtain a dependency relationship tree of the first dynamic function plug-in;
[0071] determine information of a second dynamic function plug-in relied on by the first dynamic function plug-in according to the dependency relationship tree, wherein the information of the second dynamic function plug-in comprises a name of the second dynamic function plug-in.
[0072] Optionally, the compiling module 230 is further configured to:
[0073] obtain resource information of the first dynamic function plug-in;
[0074] generate a code file of the first dynamic function plug-in according to the resource information and the new configuration file;
[0075] compile the code file to obtain an executable file.
[0076] Optionally, the compiling module 230 is further configured to:
[0077] allocate a resource identifier to the resource information based on the new configuration file to obtain a resource mapping relationship, wherein the resource mapping relationship is a mapping relationship between the resource information and the resource identifier;
[0078] generate a resource mapping file based on the resource mapping relationship;
[0079] Generate a code file of the first dynamic function plug-in according to the resource mapping file.
[0080] The apparatus for a dynamic function plug-in provided by an embodiment of the present disclosure can execute the method for a dynamic function plug-in provided by any embodiment of the present disclosure, and has functional modules and beneficial effects corresponding to the execution method.
[0081] It is worth noting that the various units and modules included in the above-mentioned device are only divided according to functional logic, but are not limited to the above-mentioned division, as long as the corresponding functions can be achieved; in addition, the specific names of the functional units are only for the convenience of distinguishing each other, and are not used to limit the protection scope of the embodiments of the present disclosure.
[0082] Figure 3 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 3 , which shows an electronic device (eg Figure 3 The terminal device in the embodiments of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), in-vehicle terminals (such as in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 3 The electronic device shown is only an example and should not limit the functions and scope of use of the embodiments of the present disclosure.
[0083] like Figure 3 As shown, the electronic device 500 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 501, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 502 or a program loaded from a storage device 508 into a random access memory (RAM) 503. Various programs and data required for the operation of the electronic device 500 are also stored in the RAM 503. The processing device 501, the ROM 502, and the RAM 503 are connected to each other via a bus 504. An edit / output (I / O) interface 505 is also connected to the bus 504.
[0084] Typically, the following devices may be connected to the I / O interface 505: an input device 506 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; an output device 507 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; a storage device 508 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 509. The communication device 509 may allow the electronic device 500 to communicate with other devices wirelessly or by wire to exchange data. Although Figure 3 The electronic device 500 is shown with various components, but it is understood that not all of the shown components are required to implement or be present in the electronic device. More or fewer components can alternatively be implemented or present.
[0085] In particular, the processes described above with reference to the flowcharts can be implemented as a computer software program according to embodiments of the present disclosure. For example, embodiments of the present disclosure include a computer program product comprising a computer program carried on a non-transitory computer-readable medium, the computer program containing program code for executing the methods illustrated by the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via the communication device 509, or installed from the storage device 508, or installed from the ROM 502. When the computer program is executed by the processing device 501, the above-mentioned functions defined in the methods of embodiments of the present disclosure are performed.
[0086] The names of the messages or information exchanged between the plurality of devices in the embodiments of the present disclosure are only for illustrative purposes, and are not intended to limit the scope of the messages or information.
[0087] The electronic device provided by the embodiments of the present disclosure and the method for dynamic function plug-in provided by the above embodiments belong to the same inventive concept, and the technical details not described in detail in the present embodiment can be referred to the above embodiments, and the present embodiment has the same beneficial effects as the above embodiments.
[0088] The embodiments of the present disclosure provide a computer storage medium, which stores a computer program, and the program is executed by a processor to implement the method for dynamic function plug-in provided by the above embodiments.
[0089] It should be noted that the computer-readable medium described above can be a computer-readable signal medium or a computer-readable storage medium or any combination thereof. The computer-readable storage medium, for example, can be, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any suitable combination of the foregoing. More specific examples of the computer-readable storage medium can include, but are not limited to, an electrical connection having one or more wires, a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In the disclosure, the computer-readable storage medium can be any tangible medium that contains or stores a program used by or in connection with an instruction execution system, apparatus or device. In the disclosure, the computer-readable signal medium can include a data signal propagated in baseband or as part of a carrier wave, in which the computer-readable program code is contained. Such a propagated data signal can take any of a variety of forms, including, but not limited to, an electromagnetic signal, an optical signal, or any suitable combination of the foregoing. The computer-readable signal medium can also be any computer-readable medium that is not a storage medium and that can communicate, propagate or transport a program for use by or in connection with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium can be transmitted using any suitable medium, including, but not limited to, wire, cable, RF (radio frequency), etc., or any suitable combination of the foregoing.
[0090] In some embodiments, the client, server, or both can communicate using any current known or future developed network protocol, such as HTTP (HyperText Transfer Protocol), and can be interconnected with any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include local area networks ("LAN"), wide area networks ("WAN"), the Internet, and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any current known or future developed networks.
[0091] The computer-readable medium described above can be included in the electronic device described above; or can exist separately from the electronic device, and can be accessed via the electronic device.
[0092] The computer-readable medium described above carries one or more programs, which, when executed by the electronic device, cause the electronic device to:
[0093] The computer readable medium described above carries one or more programs, when the one or more programs are executed by the electronic device, cause the electronic device to: acquire a configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in relied on by the first dynamic function plug-in, adjust the configuration file based on the information of the second dynamic function plug-in, and obtain a new configuration file; and compile the first dynamic function plug-in based on the new configuration file, and obtain an executable file.
[0094] Computer program code for carrying out operations of the present disclosure can be written in any one or more of a variety of programming languages or combinations of languages including an object oriented programming language such as Java, Smalltalk, C++ or the like and conventional procedural programming languages such as the "C" programming language or similar programming languages. The program code can execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server. In the latter scenario, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or the connection can be made to an external computer (for example, through the Internet using an Internet Service Provider).
[0095] The flow diagrams and the block diagrams in the drawings are illustrations of architectures, functionalities, and operations of possible implementations of systems, methods, and computer program products according to various embodiments of present disclosure. In this regard, each block in the flow diagrams or block diagrams can represent a module, a procedure, or a part of code, which comprises one or more executable instructions for implementing the specified logical functions. It should also be noted that in some alternative implementations, the functions noted in the blocks can occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently or in the reverse order, depending on the functionality involved. It is also noted that each block of the block diagrams and / or flow diagrams and combinations of blocks in the block diagrams and / or flow diagrams can be implemented by special-purpose hardware-based systems which perform the specified functions or operations, or combinations of hardware and computer instructions.
[0096] The units described in the embodiments of the present disclosure can be implemented by software, or by hardware. In some cases, the name of the unit does not constitute a limitation on the unit itself. For example, the first obtaining unit can also be described as a unit for obtaining at least two Internet protocol addresses.
[0097] The functionality described above in this document can be performed, at least in part, by one or more hardware logic components. For example, and without limitation, non- transitory machine-readable media can include RAM, ROM, programmable ROM (EPROM, EEPROM or flash memory), or any other storage device(s) through which program instructions can be stored and executed by a processing unit. The above described functions can be implemented as software modules or software functions using object-oriented design methodology, or using any other suitable programming technique.
[0098] In the context of the present disclosure, a machine-readable medium can be a tangible medium that contains or stores a program for use by or in connection with an instruction execution system, apparatus, or device. The machine-readable medium can be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium can include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any suitable combination of the foregoing. More specific examples of the machine-readable storage medium will include one or more of: a portable computer diskette, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
[0099] The foregoing description merely exemplifies the preferred embodiments of the disclosure and the principles of the technology involved. It is believed that those skilled in the art can accomplish the disclosure with the enclosed claims without any creative work. The scope of the disclosure should not be limited by the technical features of the specific embodiments described above, but should include all the technical solutions falling within the concept of the disclosure, which are obtained by combining the technical features described above or equivalent features thereof in any manner. For example, the technical solutions formed by replacing the above-described features with the technical features disclosed in the disclosure (but not limited to) having similar functions.
[0100] Further, while operations are depicted in a particular order, this should not be understood as requiring the operations to be performed in the particular order shown or in sequential order, and that certain operations can be performed in parallel or in any order. Also, while the above discussion has included several specific implementations, it will be understood by those skilled in the art that the above description has been presented for the purpose of example only, and not in limitation of the disclosure. Certain features that are described in the context of separate embodiments can also be implemented in combination in a single embodiment. Conversely, various features that are described in the context of a single embodiment can also be implemented in multiple embodiments separately or in any suitable sub-combination. Accordingly, the particular implementation described is presented for purposes of clarity and explanation and is not limiting of the disclosure.
[0101] Although the subject matter has been described in language specific to structural features and / or methodological acts, it is to be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or acts described above. Rather, the specific features and acts described above are disclosed as example forms of implementing the claims.
Claims
1. A method for dynamic function plugins, characterized by, The method comprises the following steps: obtaining a configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in relied by the first dynamic function plug-in; adjusting the configuration file based on the information of the second dynamic function plug-in to obtain a new configuration file; compiling the first dynamic function plug-in based on the new configuration file to obtain an executable file.
2. The method of claim 1, wherein, The method for adjusting the configuration file based on the information of the second dynamic function plug-in to obtain a new configuration file comprises the following steps: extracting a dependency relationship tag in the configuration file; adjusting content corresponding to the dependency relationship tag based on the information of the second dynamic function plug-in to obtain a new configuration file.
3. The method of claim 2, wherein, The method for adjusting the content corresponding to the dependency relationship tag based on the information of the second dynamic function plug-in to obtain a new configuration file comprises the following steps: adding the information of the second dynamic function plug-in to the content corresponding to the dependency relationship tag to obtain a new configuration file.
4. The method of claim 1, wherein, The method for obtaining a configuration file of a first dynamic function plug-in comprises the following steps: obtaining configuration information of the first dynamic function plug-in; packing the configuration information to obtain a configuration file.
5. The method of claim 1, wherein, The method for obtaining information of a second dynamic function plug-in relied by a first dynamic function plug-in comprises the following steps: obtaining a dependency relationship tree of the first dynamic function plug-in; determining information of a second dynamic function plug-in relied by the first dynamic function plug-in according to the dependency relationship tree; wherein the information of the second dynamic function plug-in comprises a name of the second dynamic function plug-in.
6. The method of claim 1, wherein, The method for compiling the first dynamic function plug-in based on the new configuration file to obtain an executable file comprises the following steps: obtaining resource information of the first dynamic function plug-in; generating a code file of the first dynamic function plug-in according to the resource information and the new configuration file; compiling the code file to obtain an executable file.
7. The method of claim 6, wherein, The method for generating a code file of the first dynamic function plug-in according to the resource information and the new configuration file comprises the following steps: allocating a resource identifier to the resource information based on the new configuration file to obtain a resource mapping relationship; wherein the resource mapping relationship is a mapping relationship between the resource information and the resource identifier; generating a resource mapping file based on the resource mapping relationship; generating a code file of the first dynamic function plug-in according to the resource mapping file.
8. An apparatus for dynamic function plugins, characterized by, The method comprises the following steps: a dynamic function plug-in information obtaining module is configured to obtain a configuration file of a first dynamic function plug-in and information of a second dynamic function plug-in relied by the first dynamic function plug-in; a new configuration file obtaining module is configured to adjust the configuration file based on the information of the second dynamic function plug-in to obtain a new configuration file; a compiling module is configured to compile the first dynamic function plug-in based on the new configuration file to obtain an executable file.
9. An electronic device, comprising: The electronic device comprises: one or more processors; a storage device configured to store one or more programs, when the one or more programs are executed by the one or more processors, the one or more processors implement the method for dynamic function plug-in according to any one of claims 1-7.
10. A storage medium containing computer-executable instructions for performing the method for dynamic function plugins of any of claims 1-7 when executed by a computer processor.