Processing method and device, electronic equipment and storage medium

By identifying application modules and their dependencies in cross-platform software projects, classifying module types, and determining function libraries and dependency libraries, modular design was achieved, solving compatibility issues of existing tools in cross-platform software project development, and improving code organization and development flexibility.

CN119621010BActive Publication Date: 2026-01-23BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311182098.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2026-01-23
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

Existing software project development management tools have limited compatibility with cross-platform software projects and cannot be fully applied to the development of cross-platform software projects, especially in terms of their ability to implement specific functions for each platform.

Method used

By identifying the application modules and their dependencies in a cross-platform project, classifying module types, and determining function libraries and dependency libraries, and using the same encapsulation format to encode and encapsulate each application module, modular design is achieved.

Benefits of technology

It enhances the modular design of the project, improves the overall code structure and organization, reduces modification costs, and provides development flexibility across different programming languages ​​and operating system platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621010B_ABST
    Figure CN119621010B_ABST
Patent Text Reader

Abstract

The present disclosure relates to a processing method, device, electronic equipment and storage medium. The processing method comprises: determining a plurality of application modules of a to-be-processed project and a dependency relationship between the plurality of application modules, the to-be-processed project being a cross-platform project, the platform comprising at least one of: an operating system platform and a programming language platform; determining a module type to which each application module belongs, determining a function library of each application module according to a library type corresponding to the module type; obtaining a dependency rule between the module types, determining a dependency library of each application module according to the dependency relationship and the dependency rule; and encoding each application module according to the function library and the dependency library, and encapsulating each function library and each dependency library of each encoded application module. The method can enhance the modular design of the project, improve the overall code structure and code organization of the project, and reduce the modification cost of the project.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of computer technology, and in particular to a processing method, apparatus, electronic device and storage medium. Background Technology

[0002] With the rapid development and diversity of electronic devices, software applications need to adapt to different operating systems. Cross-platform software, capable of adapting to various operating systems, possesses high interoperability, scalability, and efficiency, leading to an increasing demand for it. In the development of cross-platform software projects, modular code organization methods are typically employed to improve code maintainability, flexibility, and scalability. However, existing software project development management tools have limited compatibility, usually supporting only a single programming language and focusing on implementing shared functions across platforms, while offering limited capabilities for implementing platform-specific functions. Therefore, they are not fully suitable for cross-platform software project development. Summary of the Invention

[0003] To overcome the problems existing in the related technologies, this disclosure provides a processing method, apparatus, electronic device and storage medium.

[0004] According to a first aspect of the present disclosure, a processing method is provided, the method comprising:

[0005] Determine the multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: operating system platform and programming language platform.

[0006] Determine the module type to which each application module belongs, and determine the function library for each application module based on the library type corresponding to the module type;

[0007] Obtain the dependency rules between the module types, and determine the dependency library of each application module based on the dependency relationship and the dependency rules;

[0008] Each application module is encoded according to the function library and the dependency library, and each function library and each dependency library of each encoded application module are encapsulated.

[0009] In an exemplary embodiment, the module type includes a first module type, a second module type, and a third module type. The first module type represents an application module that can be implemented on multiple platforms, the second module type represents an application module that can only be implemented on a specific platform, and the third module type represents the project entry point of the project to be processed.

[0010] In an exemplary embodiment, determining the module type to which each application module belongs includes:

[0011] If the functionality of the application module does not depend on a specific platform, the module type of the application module is determined to be the first module type;

[0012] If the functionality of the application module depends on a specific platform, the module type of the application module is determined to be the second module type;

[0013] If the application module is the project entry point of the project to be processed, the module type of the application module is determined to be the third module type.

[0014] In one exemplary embodiment, the library type corresponding to the module type includes:

[0015] The first module type includes a shared library, the second module type includes a shared API library and multiple platform implementation libraries, and the third module type includes multiple project entry points. The number of platform implementation libraries is consistent with the number of platforms of the project to be processed, and the number of project entry points is greater than or equal to the number of platforms of the project to be processed.

[0016] In an exemplary embodiment, determining the function library of each application module based on the library type corresponding to the module type includes:

[0017] If the application module belongs to the first module type, the function library of the application module is determined to be the shared library of the application module;

[0018] If the application module belongs to the second module type, the function library of the application module is determined to be the shared API library of the application module and the multiple platform implementation libraries of the application module;

[0019] If the application module belongs to the third module type, the function library of the application module is determined to be multiple project entry points for the project to be processed.

[0020] In one exemplary embodiment, the dependency rules between the module types include:

[0021] If any of the module types depends on the first module type, the dependency library of the application module belonging to any of the module types is determined as the shared library;

[0022] If the second module type depends on the second module type, the dependent library of the application module belonging to the second module type is determined to be the shared API library or the platform implementation library;

[0023] If the first module type depends on the second module type, the dependency library of the application module belonging to the first module type is determined to be the shared API library;

[0024] If the third module type depends on the second module type, the dependency library of the application module belonging to the third module type is determined to be the platform implementation library.

[0025] In an exemplary embodiment, the encapsulation of each function library and each dependency library of each encoded application module includes:

[0026] Each of the function libraries and each of the dependencies of each of the coded application modules are encapsulated using the same encapsulation format.

[0027] According to a second aspect of the present disclosure, a processing apparatus is provided, the apparatus comprising:

[0028] The first determining module is configured to determine multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: an operating system platform and a programming language platform.

[0029] The second determining module is configured to determine the module type to which each application module belongs, and to determine the function library of each application module according to the library type corresponding to the module type;

[0030] The third determining module is configured to obtain the dependency rules between the module types, and determine the dependency library of each application module based on the dependency relationship and the dependency rules;

[0031] The encapsulation module is configured to encode each application module according to the function library and the dependency library, and encapsulate each function library and each dependency library of each encoded application module.

[0032] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0033] processor;

[0034] Memory used to store processor-executable instructions;

[0035] The processor is configured to perform the processing method as described in the first aspect of the embodiments of this disclosure.

[0036] According to a fourth aspect of the present disclosure, a non-transitory computer-readable storage medium is provided, wherein when instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to perform the processing method as described in the first aspect of the present disclosure.

[0037] The above-described method of this disclosure has the following beneficial effects: the method in the embodiments of this disclosure can enhance the modular design of the project, improve the overall code structure and code organization of the project, reduce the modification cost of the project, and in addition, the modular development approach can enable the project development to adapt to various programming languages ​​and operating system platforms, providing developers with the flexibility to develop in different environments.

[0038] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0039] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0040] Figure 1 This is a flowchart illustrating a processing method according to an exemplary embodiment;

[0041] Figure 2 This is a flowchart illustrating a processing method according to an exemplary embodiment;

[0042] Figure 3 This is a block diagram illustrating a processing apparatus according to an exemplary embodiment;

[0043] Figure 4 This is a block diagram illustrating an electronic device according to an exemplary embodiment. Detailed Implementation

[0044] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. When the following description relates to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.

[0045] Among related technologies, Gradle, Apache Ant, and Apache Maven are commonly used project build automation tools. Although they provide a centralized project management approach, their management methods have limited compatibility with programming languages. In particular, Apache Ant and Apache Maven have poor compatibility with non-Java programming languages, while Gradle has poor compatibility with non-JVM-based projects. In addition, they are also poor at handling the implementation of platform-specific functions. Therefore, they all lack management methods for cross-platform software projects and implementation mechanisms for platform-specific functions.

[0046] In exemplary embodiments of this disclosure, to overcome the problems existing in cross-platform software project development in related technologies, a processing method is provided, comprising: determining multiple application modules of a project to be processed and the dependencies between the multiple application modules, wherein the project to be processed is a cross-platform project, and the platform includes at least one of the following: an operating system platform and a programming language platform; determining the module type to which each application module belongs, and determining the function library of each application module according to the module type; obtaining the dependency rules between module types, and determining the dependency library of each application module according to the dependency relationship and the dependency rules; encoding each application module according to the function library and the dependency library, and encapsulating each function library and each dependency library of each encoded application module. The method in the embodiments of this disclosure can enhance the modular design of the project, improve the overall code structure and code organization of the project, reduce the modification cost of the project, and, in addition, the modular development approach can enable project development to adapt to various programming languages ​​and operating system platforms, providing developers with the flexibility to develop in different environments.

[0047] In an exemplary embodiment of this disclosure, a processing method is provided. Figure 1 This is a flowchart illustrating a processing method according to an exemplary embodiment, such as... Figure 1 As shown, it includes the following steps:

[0048] Step S101: Determine the multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: operating system platform and programming language platform.

[0049] Step S102: Determine the module type to which each application module belongs, and determine the function library of each application module according to the library type corresponding to the module type;

[0050] Step S103: Obtain the dependency rules between module types, and determine the dependency libraries of each application module based on the dependency relationships and dependency rules;

[0051] Step S104: Encode each application module according to the function library and dependency library, and encapsulate each function library and each dependency library of each encoded application module.

[0052] The method in this disclosure is applied to an electronic device, which is a computer device or terminal device capable of running software development tools. The method in this disclosure can be applied to Gradle project build management tools, or to any other script-based project build management tool.

[0053] In step S101, the project to be processed represents a cross-platform project to be developed. It can be a project across operating system platforms, such as an application that can run on both smartphones and smartwatches, i.e., an application that can run on both Android and embedded operating systems. It can also be a project across programming language platforms, such as an application that can support both Java and Python programming languages. Alternatively, it can be a project that is both across programming language platforms and operating system platforms, such as an application that can run on both smartphones and smartwatches and supports both Java and Python programming languages.

[0054] Application modules represent modules with relatively independent and practical functions within a project. Developing each application module independently improves the autonomy, encapsulation, and testability of the code within each module. This means that modifying or testing the code of a single application module reduces the need to modify related code, improving development and testing efficiency. The division of application modules can be determined based on actual project requirements. For example, an application might include a login module, a payment module, a membership module, and a marketplace module. Dependencies between application modules represent the calling relationships between them and can be determined based on the relationships between the modules. For instance, in the above application, both the marketplace module and the membership module depend on the payment module.

[0055] In step S102, the module type division can be determined based on the application module division and the coding requirements of the application modules. Module types can be divided into general modules and non-general modules. General modules are modules that can be shared among multiple application modules, while non-general modules are modules that cannot be shared among multiple application modules. Module types can also be divided into cross-platform shared modules and platform-bound modules. Cross-platform shared modules are modules that are not limited to a specific platform and can be implemented on multiple platforms, while platform-bound modules are modules that can only be implemented on a specific platform. The library type corresponding to each module type represents the library files that the application module of that type needs to implement, and the function library represents the library files that the application module needs to implement. Therefore, the function library of an application module is the library type corresponding to its module type.

[0056] In one example, module types are divided into general modules and non-general modules. The library type corresponding to general modules is a general library, while the library type corresponding to non-general modules is a library specific to each application module. If the application includes a payment module, a membership module, and a shopping mall module, where the payment module is a general module and the membership and shopping mall modules are non-general modules, then the payment module's function library is a general library, meaning the payment module needs to implement the general library to make it applicable to the other two modules. The membership and shopping mall modules' function libraries are non-general libraries, meaning each needs to implement its own specific library.

[0057] In step S103, the dependency rules between module types are determined based on the module type classification and are used to indicate the dependency libraries of each application module. After determining the dependency relationships between multiple application modules, multiple pairs of dependency relationships are obtained. Each pair of dependency relationships includes a dependent module and a dependent module. For example, if application module 1 depends on application module 2, then application module 1 is the dependent module and application module 2 is the dependent module. The module type to which the dependent module and the dependent module in each pair of dependency relationships belong is determined. According to the dependency rules between module types, the dependency library of the dependent module in each pair of dependency relationships can be determined to be the library file related to the dependent module. For example, the dependency rule includes: if an application module belonging to module type 1 depends on an application module belonging to module type 2, the dependency library of the application module of module type 1 is the library file related to the application module of module type 2. Therefore, when application module 1 belonging to module type 1 depends on application module 2 belonging to module type 2, the dependency library of application module 1 can be determined to be the library file related to application module 2.

[0058] In step S104, when coding each application module, it is necessary to call its dependent libraries and implement its function libraries. Different programming languages ​​can be used for coding the function libraries, or the same programming language can be used. After coding is complete, each function library and dependent library of each application module is encapsulated. The encapsulation format can be determined according to requirements, for example, it can be encapsulated as a software artifact JAR package.

[0059] In some possible implementations, to ensure consistency among application modules, the same encapsulation format is used to encapsulate each function library and each dependency of each coded application module.

[0060] In the exemplary embodiments of this disclosure, after determining the multiple application modules of the project to be processed and the dependencies between the multiple application modules, the function library of each application module is determined according to the module type to which each application module belongs. The dependency library of each application module is determined according to the dependency rules between the dependency relationships and module types. Based on the function library and dependency library of each application module, each application module is coded and encapsulated. After encapsulation, it can be applied to the subsequent project development stage. In the subsequent project development process, since the implementation and dependencies of each application module are as separate libraries, if it is necessary to modify or improve a certain application module or a certain library, there is no need to modify other application modules or libraries. This can enhance the modular design of the project, improve the overall code structure and code organization of the project, and reduce the modification cost of the project. In addition, the modular development method can make the project development adaptable to various programming languages ​​and operating system platforms, providing developers with the flexibility of development in different environments.

[0061] In an exemplary embodiment of this disclosure, a processing method is provided. Figure 2 This is a flowchart illustrating a processing method according to an exemplary embodiment, such as... Figure 2 As shown, it includes the following steps:

[0062] Step S201: Determine the multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: operating system platform and programming language platform.

[0063] Step S202: Obtain the module type and the corresponding library type for each module type;

[0064] Step S203: Determine the module type to which each application module belongs;

[0065] Step S204: Determine the function library for each application module based on the library type corresponding to the module type;

[0066] Step S205: Obtain the dependency rules between module types, and determine the dependency libraries of each application module based on the dependency relationships and dependency rules;

[0067] Step S206: Encode each application module according to the function library and dependency library, and encapsulate each function library and each dependency library of each encoded application module.

[0068] The specific implementation methods of steps S201 and S206 are described in steps S101 and S104, and will not be repeated here.

[0069] In step S202, in some possible implementations, the module type includes a first module type, a second module type, and a third module type, wherein the first module type represents an application module that can be implemented on multiple platforms, the second module type represents an application module that can only be implemented on a specific platform, and the third module type represents the project entry point of the project to be processed.

[0070] In some possible implementations, the library types corresponding to each module type include:

[0071] The first module type includes shared libraries, the second module type includes shared API libraries and multiple platform implementation libraries, and the third module type includes multiple project entry points. The number of platform implementation libraries is consistent with the number of platforms of the projects to be processed, and the number of project entry points is greater than or equal to the number of platforms of the projects to be processed.

[0072] The shared library corresponding to the first module type is applicable to all platforms and does not depend on any specific platform. It can be used as an API library or a platform implementation library. The shared API library corresponding to the second module type is applicable to all platforms. If an application module belongs to the second module type, other application modules can call the functions of that application module through its shared API library. The platform implementation library corresponding to the second module type is an implementation library for each specific platform. The number of platform implementation libraries depends on the number of platforms supported by the project to be processed. For example, if the project to be processed supports Android, embedded operating systems, and Windows operating systems, then the platform implementation libraries include Android implementation libraries, embedded implementation libraries, and Windows implementation libraries. The multiple project entry points corresponding to the third module type represent the executable files of the project to be processed on various platforms. The number of project entry points can be equal to or greater than the number of platforms supported by the project to be processed. For example, on the same platform, there may be two project entry points, one for the official server and one for the test server.

[0073] In step S203, in some possible implementations, if the function implementation of the application module does not depend on a specific platform, the module type of the application module is determined to be a first module type; if the function implementation of the application module depends on a specific platform, the module type of the application module is determined to be a second module type; if the application module is the project entry point of the project to be processed, the module type of the application module is determined to be a third module type.

[0074] If an application module does not depend on a specific platform, it means that the application module can be implemented on multiple platforms, and thus belongs to the first module type; if an application module depends on a specific platform, it means that the application module can only be implemented on that specific platform, and thus belongs to the second module type; if the application module is the project entry point of the project to be processed, it belongs to the third module type.

[0075] In step S204, in some possible implementations, if the application module belongs to the first module type, the function library of the application module is determined to be the shared library of the application module; if the application module belongs to the second module type, the function library of the application module is determined to be the shared API library of the application module and the multiple platform implementation libraries of the application module; if the application module belongs to the third module type, the function library of the application module is determined to be the multiple project entry points of the project to be processed.

[0076] In one example, application module 1 supports both Android and embedded operating systems. If application module 1 belongs to the first module type, its function library includes the shared library of application module 1. If application module 1 belongs to the second module type, its function library includes the shared API library of application module 1 and the Android platform implementation library and embedded platform implementation library of application module 1. If application module 1 belongs to the third module type, its function library is the Android platform project entry point and the embedded platform project entry point of the project to be processed.

[0077] In step S205, in some possible implementations, the dependency rules between module types include:

[0078] If any module type depends on the first module type, the dependency library of the application module belonging to any module type is determined to be a shared library;

[0079] If the second module type depends on the second module type, determine that the dependent library of the application module belonging to the second module type is a shared API library or a platform implementation library;

[0080] If the first module type depends on the second module type, the dependency library of the application module belonging to the first module type is determined to be the shared API library;

[0081] If the third module type depends on the second module type, the dependency library of the application module belonging to the third module type is determined to be the platform implementation library.

[0082] It should be noted that when the first module type depends on the second module type, since the first module type represents an application module that can be implemented on multiple platforms, if the dependent library of the application module belonging to the first module type is a platform implementation library, then the first module type can only be implemented on a specific platform, which does not meet the characteristics of the first module type. Therefore, in this case, the dependent library of the application module belonging to the first module type cannot include the platform implementation library.

[0083] In an exemplary embodiment of this disclosure, a processing method is provided, comprising the following steps:

[0084] Step S3-1: Determine the multiple application modules of the project to be processed and the dependencies between the multiple application modules.

[0085] The project to be processed needs to support two operating system platforms: PC (Personal Computer) operating system and Android operating system. The project to be processed includes four application modules: A, B, C, and D. The dependency relationship between the four dependent modules is as follows: A depends on B, B depends on C and D, and C depends on E.

[0086] Step S3-2: Obtain the module type and the corresponding library type for each module type.

[0087] The application modules include cross-platform shared modules, platform-bound modules, and executable modules. Cross-platform shared modules include a shared library, platform-bound modules include a shared API library and multiple platform implementation libraries, and executable modules include project entry points for multiple platforms.

[0088] Step S3-3: Determine the module type of each application module, and determine the function library of each application module based on the module type.

[0089] In the application modules of the project to be processed, module A is an executable module, modules B and D are cross-platform shared modules, and modules C and E are platform-bound modules.

[0090] In the project to be processed, the function library of application module A is: the project entry point on the Android platform and the project entry point on the PC platform;

[0091] The function library of application module B is: B's shared library;

[0092] The functional libraries of application module C are: C's shared API library, C's Android platform implementation library, and C's PC platform implementation library;

[0093] The function library of application module D is: the shared library of D;

[0094] The functional libraries of application module E are: E's shared API library, E's Android platform implementation library, and E's PC platform implementation library.

[0095] Step S3-4: Obtain the dependency rules between module types.

[0096] The dependency rules between different module types are as follows: When any module type depends on a cross-platform shared module, the referencing module of any module type depends on the shared library; when a platform-bound module depends on a platform-bound module, the application module of the platform-bound module depends on the shared API library or the platform implementation library; when a cross-platform shared module depends on a platform-bound module, the application module of the cross-platform shared module depends on the shared API library, but does not depend on the platform implementation library; when an executable module depends on a platform-bound module, the application module of the executable module depends on the implementation library of the current platform.

[0097] Step S3-5: Determine the dependency libraries for each application module based on the dependency relationships and dependency rules.

[0098] Based on the dependencies between application modules, A depends on B, and B's module type is a cross-platform shared module. According to the dependency rules mentioned above, A's dependency library includes B's shared library. Since B depends on C and D, and C depends on E, according to the dependency inheritance relationship, A also depends on C, D, and E. C and E are both platform-bound modules, and D's module type is a cross-platform shared module. According to the dependency rules mentioned above, A's dependency library also includes C's platform implementation library, E's platform implementation library, and D's shared library. Since B depends on D, and B and D's module types are both cross-platform shared modules, according to the dependency inheritance relationship, it is not necessary to explicitly say that A depends on D. Therefore, the dependency libraries of application module A on the Android platform are: B's shared library, C's Android platform implementation library, and E's Android platform implementation library; the dependency libraries of application module A on the PC platform are: B's shared library, C's PC platform implementation library, and E's PC platform implementation library.

[0099] Based on the dependencies between application modules, B depends on C and D, and C depends on E. According to the dependency inheritance relationship, B depends on C, D, and E. Furthermore, B's module type is a cross-platform shared module, while C and E are both platform-bound modules, and D's module type is also a cross-platform shared module. According to the above dependency rules, B's dependency libraries include C's shared API library, E's shared API library, and D's shared library. Since C depends on E, and C and E have the same module type, according to the dependency inheritance relationship, it is not necessary to explicitly state that B depends on E. Therefore, application module B's dependency libraries are: C's shared API library and D's shared library.

[0100] Based on the dependencies between application modules, C depends on E, and both C and E are platform-bound modules. According to the above dependency rules, the dependent libraries of application module C are: E's shared API library, E's Android platform implementation library, or E's PC platform implementation library.

[0101] Based on the dependencies between application modules, application modules D and E do not depend on other application modules; therefore, application modules D and E have no dependency libraries.

[0102] Steps S3-6: Encode each application module according to the function library and dependency library, and encapsulate each function library and each dependency library of each encoded application module.

[0103] The four application modules of the project to be processed contain a total of 2+1+3+1+3=10 function libraries. When coding each application module, its dependent libraries are called and its function libraries are implemented. Each function library and each dependent library of each application module after coding is packaged into a software artifact JAR package. That is, the Android platform project entry and PC platform project entry of application module A are packaged into a JAR package respectively, the shared library of application module B is packaged into a JAR package, the shared library of application module D is packaged into a JAR package, the shared API library, Android platform implementation library and PC platform implementation library of application module C are packaged into a JAR package respectively, and the shared API library, Android platform implementation library and PC platform implementation library of application module E are packaged into a JAR package respectively, for a total of 10 JAR packages.

[0104] In an exemplary embodiment of this disclosure, a processing apparatus is provided. Figure 3 This is a block diagram illustrating a processing apparatus according to an exemplary embodiment, such as... Figure 3 As shown, the processing device includes:

[0105] The first determining module 301 is configured to determine multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: operating system platform and programming language platform.

[0106] The second determining module 302 is configured to determine the module type to which each application module belongs, and determine the function library of each application module according to the library type corresponding to the module type;

[0107] The third module 303 is configured to obtain the dependency rules between module types and determine the dependency libraries of each application module based on the dependency relationships and dependency rules.

[0108] The encapsulation module 304 is configured to encode each application module based on the function library and the dependency library, and to encapsulate each function library and each dependency library of each encoded application module.

[0109] In an exemplary embodiment, the module type includes a first module type, a second module type, and a third module type. The first module type represents an application module that can be implemented on multiple platforms, the second module type represents an application module that can only be implemented on a specific platform, and the third module type represents the project entry point of the project to be processed.

[0110] In one exemplary embodiment, the second determining module 302 is further configured to:

[0111] If the functionality of an application module does not depend on a specific platform, the module type of the application module is determined to be the first module type;

[0112] If the functionality of an application module depends on a specific platform, the module type of the application module is determined to be the second module type;

[0113] If the application module is the project entry point of the project to be processed, the module type of the application module is determined to be the third module type.

[0114] In one exemplary embodiment, the library type corresponding to the module type includes:

[0115] The first module type includes shared libraries, the second module type includes shared API libraries and multiple platform implementation libraries, and the third module type includes multiple project entry points. The number of platform implementation libraries is consistent with the number of platforms of the projects to be processed, and the number of project entry points is greater than or equal to the number of platforms of the projects to be processed.

[0116] In one exemplary embodiment, the second determining module 302 is further configured to:

[0117] If the application module belongs to the first module type, the function library of the application module is determined to be the shared library of the application module;

[0118] If the application module belongs to the second module type, the function library of the application module is determined to be the shared API library of the application module and the multiple platform implementation libraries of the application module;

[0119] If the application module belongs to the third module type, the function library of the application module is determined to be multiple project entry points of the project to be processed.

[0120] In one exemplary embodiment, the dependency rules between module types include:

[0121] If any module type depends on the first module type, the dependency library of the application module belonging to any module type is determined to be a shared library;

[0122] If the second module type depends on the second module type, determine that the dependent library of the application module belonging to the second module type is a shared API library or a platform implementation library;

[0123] If the first module type depends on the second module type, the dependency library of the application module belonging to the first module type is determined to be the shared API library;

[0124] If the third module type depends on the second module type, the dependency library of the application module belonging to the third module type is determined to be the platform implementation library.

[0125] In one exemplary embodiment, the encapsulation module 304 is further configured to:

[0126] Each application module's functional library and each dependency are encapsulated using the same encapsulation format.

[0127] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.

[0128] Figure 4 This is a block diagram illustrating an electronic device 400 according to an exemplary embodiment.

[0129] Reference Figure 4 The electronic device 400 may include one or more of the following components: processing component 402, memory 404, power supply component 406, multimedia component 408, audio component 410, input / output (I / O) interface 412, sensor component 414, and communication component 416.

[0130] Processing component 402 typically controls the overall operation of electronic device 400, such as operations associated with display, telephone calls, data communication, camera operation, and recording. Processing component 402 may include one or more processors 420 to execute instructions to perform all or part of the steps of the methods described above. Furthermore, processing component 402 may include one or more modules to facilitate interaction between processing component 402 and other components. For example, processing component 402 may include a multimedia module to facilitate interaction between multimedia component 408 and processing component 402.

[0131] Memory 404 is configured to store various types of data to support the operation of electronic device 400. Examples of this data include instructions for any application or method operating on electronic device 400, contact data, phonebook data, messages, pictures, videos, etc. Memory 404 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0132] Power supply component 406 provides power to various components of electronic device 400. Power supply component 406 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 400.

[0133] Multimedia component 408 includes a screen that provides an output interface between the electronic device 400 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of the touch or swipe action but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 408 includes a front-facing camera and / or a rear-facing camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0134] Audio component 410 is configured to output and / or input audio signals. For example, audio component 410 includes a microphone (MIC) configured to receive external audio signals when electronic device 400 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 404 or transmitted via communication component 416. In some embodiments, audio component 410 also includes a speaker for outputting audio signals.

[0135] I / O interface 412 provides an interface between processing component 402 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0136] Sensor assembly 414 includes one or more sensors for providing state assessments of various aspects of electronic device 400. For example, sensor assembly 414 may detect the on / off state of electronic device 400, the relative positioning of components such as the display and keypad of electronic device 400, changes in position of electronic device 400 or a component of electronic device 400, the presence or absence of user contact with electronic device 400, orientation or acceleration / deceleration of electronic device 400, and temperature changes of electronic device 400. Sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 414 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 414 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0137] Communication component 416 is configured to facilitate wired or wireless communication between electronic device 400 and other devices. Electronic device 400 can access wireless networks based on communication standards, such as WiFi, 2G, or 3G, or combinations thereof. In one exemplary embodiment, communication component 416 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, communication component 416 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0138] In an exemplary embodiment, the electronic device 400 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0139] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 404 including instructions, which can be executed by a processor 420 of an electronic device 400 to perform the above-described method. For example, the non-transitory computer-readable storage medium may be a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0140] A non-transitory computer-readable storage medium, wherein instructions in the storage medium, when executed by a processor of an electronic device, enable the electronic device to perform a processing method, the method comprising any of the methods described above.

[0141] Other embodiments of this disclosure will readily occur to those skilled in the art upon consideration of the specification and practice of the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of this disclosure that follow the general principles of this disclosure and include common knowledge or customary techniques in the art not disclosed herein. The specification and examples are to be considered exemplary only, and the true scope and spirit of this disclosure are indicated by the following claims.

[0142] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A processing method, characterized in that, The method includes: Determine the multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: operating system platform and programming language platform. The module type of each application module is determined, and the function library of each application module is determined according to the library type corresponding to the module type. The module type includes a first module type, a second module type, and a third module type. The first module type represents an application module that can be implemented on multiple platforms, the second module type represents an application module that can only be implemented on a specific platform, and the third module type represents the project entry point of the project to be processed. The library types corresponding to the module types include: the first module type includes a shared library, the second module type includes a shared API library and multiple platform implementation libraries, and the third module type includes multiple project entry points. The number of platform implementation libraries is consistent with the number of platforms of the project to be processed, and the number of project entry points is greater than or equal to the number of platforms of the project to be processed. Obtain the dependency rules between the module types, and determine the dependency library of each application module based on the dependency relationship and the dependency rules; Based on the function library and the dependency library, each application module is encoded, and each function library and each dependency library of each encoded application module are encapsulated. Specifically, determining the dependency library for each application module based on the dependency relationships and dependency rules includes: If any of the module types depends on the first module type, the dependency library of the application module belonging to any of the module types is determined as the shared library; If the second module type depends on the second module type, the dependent library of the application module belonging to the second module type is determined to be the shared API library or the platform implementation library; If the first module type depends on the second module type, the dependency library of the application module belonging to the first module type is determined to be the shared API library; If the third module type depends on the second module type, the dependency library of the application module belonging to the third module type is determined to be the platform implementation library.

2. The processing method according to claim 1, characterized in that, Determining the module type to which each application module belongs includes: If the functionality of the application module does not depend on a specific platform, the module type of the application module is determined to be the first module type; If the functionality of the application module depends on a specific platform, the module type of the application module is determined to be the second module type; If the application module is the project entry point of the project to be processed, the module type of the application module is determined to be the third module type.

3. The processing method according to claim 1, characterized in that, The step of determining the function library for each application module based on the library type corresponding to the module type includes: If the application module belongs to the first module type, the function library of the application module is determined to be the shared library of the application module; If the application module belongs to the second module type, the function library of the application module is determined to be the shared API library of the application module and the multiple platform implementation libraries of the application module; If the application module belongs to the third module type, the function library of the application module is determined to be multiple project entry points for the project to be processed.

4. The processing method according to claim 1, characterized in that, The process of encapsulating each function library and each dependency library of each encoded application module includes: Each of the function libraries and each of the dependency libraries of each of the coded application modules are encapsulated using the same encapsulation format.

5. A processing apparatus, characterized in that, The device includes: The first determining module is configured to determine multiple application modules of the project to be processed and the dependencies between the multiple application modules. The project to be processed is a cross-platform project, and the platform includes at least one of the following: an operating system platform and a programming language platform. The second determining module is configured to determine the module type to which each application module belongs, and to determine the function library of each application module according to the library type corresponding to the module type. The module type includes a first module type, a second module type, and a third module type. The first module type represents an application module that can be implemented on multiple platforms, the second module type represents an application module that can only be implemented on a specific platform, and the third module type represents the project entry point of the project to be processed. The library types corresponding to the module types include: the first module type includes a shared library, the second module type includes a shared API library and multiple platform implementation libraries, and the third module type includes multiple project entry points. The number of platform implementation libraries is consistent with the number of platforms of the project to be processed, and the number of project entry points is greater than or equal to the number of platforms of the project to be processed. The third determining module is configured to obtain the dependency rules between the module types, and determine the dependency library of each application module based on the dependency relationship and the dependency rules; The encapsulation module is configured to encode each application module according to the function library and the dependency library, and encapsulate each function library and each dependency library of each encoded application module; Specifically, determining the dependency library for each application module based on the dependency relationships and dependency rules includes: If any of the module types depends on the first module type, the dependency library of the application module belonging to any of the module types is determined as the shared library; If the second module type depends on the second module type, the dependent library of the application module belonging to the second module type is determined to be the shared API library or the platform implementation library; If the first module type depends on the second module type, the dependency library of the application module belonging to the first module type is determined to be the shared API library; If the third module type depends on the second module type, the dependency library of the application module belonging to the third module type is determined to be the platform implementation library.

6. An electronic device, characterized in that, include: processor; Memory used to store processor-executable instructions; The processor is configured to perform the processing method as described in any one of claims 1-4.

7. A non-transitory computer-readable storage medium, characterized in that, When the instructions in the storage medium are executed by the processor of the electronic device, the electronic device is able to perform the processing method as described in any one of claims 1-4.

Citation Information

Patent Citations

  • Dynamic library dependency obtaining method and device

    CN113742002A

  • Cross-platform implementation method and device for bracket electric control system, electronic equipment and storage medium

    CN114443123A