Processing method and device, electronic equipment and storage medium

By determining the application module and its dependencies in cross-platform software projects and encapsulating the function library and dependency library according to the module type, the problem of limited compatibility of the existing technology's mid-to-cross-platform software project development management tools is solved, and more efficient code organization and more flexible platform adaptability is achieved.

CN119621010AActive Publication Date: 2025-03-14BEIJING XIAOMI MOBILE SOFTWARE CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202311182098.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2025-03-14
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

The existing software project development management tools have limited compatibility in cross-platform software project development, making it difficult to effectively adapt to different operating systems and programming language platforms, especially in realizing specific functions of each platform.

Method used

By determining the application modules and their dependencies in cross-platform projects, determining the function library and dependency library according to the module type, and encoding and encapsulating it, the function library and dependency library of each application module is encapsulated.

Benefits of technology

Enhanced the modular design of the project, improve the overall code structure and code organization, reduce the project's modification costs, and provide flexibility to adapt to various programming languages ​​and operating system platforms.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119621010A_ABST
    Figure CN119621010A_ABST
Patent Text Reader

Abstract

The invention relates to a processing method and device, electronic equipment and a storage medium. The processing method comprises: determining a plurality of application modules of a to-be-processed project and a dependency relationship among the plurality of application modules, the to-be-processed project being a cross-platform project, and the platform comprising at least one of the following: an operating system platform and a programming language platform; determining a module type to which each application module belongs, and 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, and determining a dependency library of each application module according to the dependency relationship and the dependency rule; and according to the function libraries and the dependency libraries, encoding each application module, and packaging 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] The present disclosure relates to the field of computer technology, and in particular to a processing method, device, electronic device and storage medium. Background Art

[0002] With the rapid development of electronic devices, the diversity of electronic devices requires software applications to adapt to different operating systems. Cross-platform software can adapt to different operating systems and has a high degree of interoperability, scalability and efficiency. Therefore, the demand for cross-platform software is increasing. In the project development process of cross-platform software, a modular code organization method is usually adopted to improve the maintainability, flexibility and scalability of the code. However, the compatibility of existing software project development management tools is limited. They usually only support development in a single programming language and focus on the implementation capabilities of shared functions on each platform. However, the implementation capabilities of specific functions on each platform are relatively poor, so they cannot be fully applied to the development of cross-platform software projects. Summary of the invention

[0003] In order to overcome the problems existing in the related art, the present disclosure provides a processing method, an apparatus, an electronic device and a storage medium.

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

[0005] Determine multiple application modules of a project to be processed and 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;

[0006] Determine the module type to which each of the application modules belongs, and determine the function library of each of the application modules according to the library type corresponding to the module type;

[0007] Obtaining dependency rules between the module types, and determining a dependency library of each of the application modules according to the dependency relationship and the dependency rules;

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

[0009] In an exemplary embodiment, the module types include 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 a project entry of the project to be processed.

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

[0011] If the function implementation of the application module does not depend on a specific platform, determining that the module type of the application module is the first module type;

[0012] If the function implementation of the application module depends on a specific platform, determining that the module type of the application module is the second module type;

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

[0014] In an exemplary embodiment, the library types corresponding to the module types include:

[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 entries, wherein the number of the platform implementation libraries is consistent with the number of platforms of the projects to be processed, and the number of the project entries is greater than or equal to the number of platforms of the projects to be processed.

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

[0017] If the application module belongs to the first module type, determining that the function library of the application module is a shared library of the application module;

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

[0019] If the application module belongs to the third module type, it is determined that the function library of the application module is a plurality of project entries of the project to be processed.

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

[0021] If any of the module types depends on the first module type, determining that a dependent library of an application module belonging to any of the module types is the shared library;

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

[0023] If the first module type depends on the second module type, determining that the dependent library of the application module belonging to the first module type is the shared API library;

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

[0025] In an exemplary embodiment, encapsulating each function library and each dependent library of each encoded application module includes:

[0026] Each of the function libraries and each of the dependency books of each of the encoded application modules are packaged using the same packaging format.

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

[0028] A first determining module is configured to determine a plurality of application modules of a project to be processed and dependencies between the plurality of 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;

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

[0030] A third determination module is configured to obtain dependency rules between the module types, and determine a dependency library of each of the application modules according to the dependency relationship and the dependency rules;

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

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

[0033] processor;

[0034] a memory for storing processor-executable instructions;

[0035] The processor is configured to execute the processing method as described in the first aspect of the embodiment of the present disclosure.

[0036] According to the fourth aspect of an embodiment of the present disclosure, a non-temporary computer-readable storage medium is provided. When instructions in the storage medium are executed by a processor of an electronic device, the electronic device can execute the processing method described in the first aspect of the embodiment of the present disclosure.

[0037] The above-mentioned method of the present disclosure has the following beneficial effects: the method in the embodiment of the present disclosure 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 adapt to various programming languages ​​and operating system platforms, providing developers with the flexibility of development in different environments.

[0038] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0040] Figure 1 is a flow chart showing a processing method according to an exemplary embodiment;

[0041] Figure 2 is a flow chart showing a processing method according to an exemplary embodiment;

[0042] Figure 3 is a block diagram of a processing device according to an exemplary embodiment;

[0043] Figure 4 It is a block diagram of an electronic device according to an exemplary embodiment. DETAILED DESCRIPTION

[0044] Exemplary embodiments will be described in detail herein, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, the same numbers in different drawings represent the same or similar elements unless otherwise indicated. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. Instead, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

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

[0046] In an exemplary embodiment of the present disclosure, in order to overcome the problems existing in the cross-platform software project development in the related art, a processing method is provided, including: determining multiple application modules of a project to be processed and the dependency relationship between 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; 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 the 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 embodiment of the present disclosure 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 adapt the project development to various programming languages ​​and operating system platforms, and provide developers with the flexibility of development in different environments.

[0047] In an exemplary embodiment of the present disclosure, a processing method is provided. Figure 1 is a flowchart of a processing method according to an exemplary embodiment. Figure 1 As shown, the following steps are included:

[0048] Step S101, determining multiple application modules of a project to be processed and 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;

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

[0050] Step S103, obtaining dependency rules between module types, and determining the dependency library of each application module according to the dependency relationship and dependency rules;

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

[0052] The method in the disclosed embodiment is applied to an electronic device, which is a computer device or terminal device capable of running a software development tool. The method in the disclosed embodiment can be applied to a Gradle project build management tool, or can be applied to any other project build management tool implemented by a script.

[0053] In step S101, the project to be processed represents a cross-platform project to be developed, which may be a cross-operating system platform project, such as an application that can run on both a smartphone and a smart watch, that is, an application that can run on both an Android operating system and an embedded operating system; it may also be a cross-programming language platform project, such as an application that can support both Java programming language development and Python programming language development; it may also be a cross-programming language platform and cross-operating system platform project, such as an application that can run on both a smartphone and a smart watch, and can support both Java programming language development and Python programming language development.

[0054] An application module represents a module with relatively independent practical functions in a pending project. The independent development of each application module is conducive to improving the autonomy, encapsulation and testability of the code in each application module, that is, when modifying or testing the code of a single application module, it can reduce the changes to the associated code and improve the development and testing efficiency. The division of application modules can be determined according to the actual project requirements. For example, the application includes a login module, a payment module, a membership module, and a shopping mall module. The dependency relationship between application modules represents the calling relationship between each application module, which can be determined based on the association relationship between each application module. For example, in the above application, the shopping mall module and the membership module both depend on the payment module.

[0055] In step S102, the division of module types can be determined according to the division of application modules and the coding requirements of application modules. Module types can be divided into general modules and non-general modules. General modules refer to modules that can be shared among multiple application modules, and non-general modules refer to 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 refer to modules that are not limited to a specific platform and can be implemented on multiple platforms, and platform-bound modules refer to modules that can only be implemented on a specific platform. The library type corresponding to each module type represents the library file that the application module of that type needs to implement, and the function library represents the library file to be implemented by the application module. Therefore, the function library of the application module is the library type corresponding to the module type to which it belongs.

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

[0057] In step S103, the dependency rules between module types are determined according to the division of module types, and are used to indicate the dependency library of each application module. After determining the dependency relationship 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 a dependent module, and application module 2 is a dependent module. The module types to which the dependent module and the dependent module in each pair of dependency relationships belong are 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 a library file related to the dependent module. For example, the dependency rules include: 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 a library file related to the application module belonging to module type 2, then when application module 1 belonging to module type 1 depends on application module 2 belonging to module type 2, it can be determined that the dependency library of application module 1 is a library file related to application module 2.

[0058] In step S104, when encoding each application module, it is necessary to call its dependent library and implement its function library. When implementing its function library, different programming languages ​​can be used for encoding, or the same programming language can be used for encoding. After the encoding is completed, each function library and dependent library of each application module is packaged, and its packaging format can be determined according to the requirements, for example, it is packaged into a software product JAR package.

[0059] In some possible implementations, in order to ensure the consistency of each application module, each function library and each dependency book of each encoded application module are packaged using the same packaging format.

[0060] In an exemplary embodiment of the present disclosure, after determining multiple application modules of a 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, and the dependency library of each application module is determined according to the dependency rules between the dependency relationship and the module type. Based on the function library and dependency library of each application module, each application module is encoded, and each encoded application module is packaged. After packaging, it can be applied to subsequent project development stages. In the subsequent project development process, since the implementation and dependency of each application module are treated as separate libraries, if it is necessary to modify or improve a certain application module or a certain library separately, 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 cost of project changes. In addition, the modular development method can make project development adapt to various programming languages ​​and operating system platforms, and provide developers with the flexibility of development in different environments.

[0061] In an exemplary embodiment of the present disclosure, a processing method is provided. Figure 2 is a flowchart of a processing method according to an exemplary embodiment. Figure 2 As shown, the following steps are included:

[0062] Step S201, determining multiple application modules of a project to be processed and 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;

[0063] Step S202, obtaining module types and library types corresponding to each module type;

[0064] Step S203, determining the module type to which each application module belongs;

[0065] Step S204, determining the function library of each application module according to the library type corresponding to the module type;

[0066] Step S205, obtaining dependency rules between module types, and determining the dependency library of each application module according to the dependency relationship and dependency rules;

[0067] Step S206, encoding each application module according to the function library and the dependent library, and encapsulating each function library and each dependent library of each encoded application module.

[0068] The specific implementation of step S201 and step S206 refers to step S101 and step S104, which 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 a project entry for a 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 entries, wherein the number of platform implementation libraries is consistent with the number of platforms of the projects to be processed, and the number of project entries is greater than or equal to the number of platforms of the projects to be processed.

[0072] Among them, the shared library corresponding to the first module type is applicable to various platforms, does not depend on a specific platform, and 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 various platforms. If the application module belongs to the second module type, other application modules can call the functions of the application module through the shared API library of the application module. 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 operating system, embedded operating system and Windows operating system at the same time, the platform implementation library includes Android implementation library, embedded implementation library and Windows implementation library; the multiple project entries corresponding to the third module type represent the executable files of the project to be processed on each platform. The number of project entries can be equal to the number of platforms supported by the project to be processed, or it can be greater than the platform data supported by the project to be processed. For example, two project entries are included on the same platform, namely the project entry for the official service and the project entry for the test service.

[0073] In step S203, in some possible implementations, if the functional 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 functional 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 a project entry of a project to be processed, the module type of the application module is determined to be a third module type.

[0074] If the application module does not depend on the feature platform, it means that the application module can be implemented on multiple platforms, and it belongs to the first module type; if the application module depends on a specific platform, it means that the application module can only be implemented on a specific platform, and it belongs to the second module type; if the application module is the project entry 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 a 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 a shared API library of the application module and 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 entries of the projects to be processed.

[0076] In one example, application module 1 supports the Android operating system and the embedded operating system. If application module 1 belongs to the first module type, the function library of application module 1 includes the shared library of application module 1; if application module 1 belongs to the second module type, the function library of application module 1 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, the function library of application module 1 is the Android platform project entry and the embedded platform project entry 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, determining that the dependent library of the application module belonging to any module type is a shared library;

[0079] If the second module type depends on the second module type, determining 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, determining that the dependent library of the application module belonging to the first module type is a shared API library;

[0081] If the third module type depends on the second module type, it is determined that the dependent library of the application module belonging to the third module type is 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, the first module type can only be implemented on a specific platform, which does not meet the characteristics of the first module type. Therefore, at this time, 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 the present disclosure, a processing method is provided, comprising the following steps:

[0084] Step S3-1, determining 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, and the dependency relationship between the four dependent modules is: A depends on B, B depends on C and D, and C depends on E.

[0086] Step S3-2, obtaining the module type and the library type corresponding to each module type.

[0087] The module types of application modules include cross-platform shared modules, platform binding modules and executable modules. The cross-platform shared modules include a shared library, the platform binding modules include a shared API library and multiple platform implementation libraries, and the executable modules include project entries for multiple platforms.

[0088] Step S3-3, determining the module type to which each application module belongs, and determining the function library of each application module according to the module type.

[0089] Among the application modules of the project to be processed, the module type of A is an executable module, the module types of B and D are cross-platform shared modules, and the module types of 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 of the Android platform and the project entry of the PC platform;

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

[0092] The function 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: D's shared library;

[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, obtaining 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 reference module belonging to any module type depends on the shared library; when a platform-bound module depends on a platform-bound module, the application module belonging to 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 belonging to the cross-platform shared module depends on the shared API library but not on the platform implementation library; when an executable module depends on a platform-bound module, the application module belonging to the executable module depends on the implementation library of the current platform.

[0097] Step S3-5, determining the dependent library of each application module according to the dependency relationship and dependency rules.

[0098] According to the dependency relationship between application modules, A depends on B, and the module type of B is a cross-platform shared module. According to the above dependency rules, A's dependency library includes B's shared library. Since B depends on C and D, and C depends on E, it can be seen from the dependency inheritance relationship that A also depends on C, D, and E, and the module types of C and E are both platform-bound modules, and the module type of D is a cross-platform shared module. According to the above dependency rules, A's dependency library also includes C's platform implementation library and E's platform implementation library as well as D's shared library. Since B depends on D, and the module types of B and D are both cross-platform shared modules, according to the dependency inheritance relationship, there is no need to clearly state 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] According to the dependency relationship between application modules, B depends on C and D, and C depends on E. From the dependency inheritance relationship, we can see that B depends on C, D, and E, and the module type of B is a cross-platform shared module, the module types of C and E are both platform-bound modules, and the module type of D is a cross-platform shared module. According to the above dependency rules, B's dependent libraries include C's shared API library, E's shared API library, and D's shared library; and because C depends on E, and C and E have the same module type, according to the dependency inheritance relationship, there is no need to explicitly state that B depends on E. Therefore, the dependent libraries of application module B are: C's shared API library and D's shared library.

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

[0101] According to the dependency relationship between application modules, application module D and application module E do not depend on other application modules, so application module D and application module E have no dependent library.

[0102] Step S3-6, encoding each application module according to the function library and the dependent library, and encapsulating each function library and each dependent library of each encoded application module.

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

[0104] In an exemplary embodiment of the present disclosure, a processing device is provided. Figure 3 is a block diagram of a processing device according to an exemplary embodiment. Figure 3 As shown, the processing device includes:

[0105] The first determination module 301 is configured to determine multiple application modules of a project to be processed and dependencies between the multiple application modules, where 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;

[0106] The second determination 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 determination module 303 is configured to obtain dependency rules between module types and determine the dependency library of each application module according to the dependency relationship and the dependency rules;

[0108] The encapsulation module 304 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.

[0109] In an exemplary embodiment, the module types include 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 a project entry for a project to be processed.

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

[0111] If the function implementation of the application module does not depend on a specific platform, determining that the module type of the application module is a first module type;

[0112] If the function implementation of the application module depends on a specific platform, determining the module type of the application module to be a second module type;

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

[0114] In an exemplary embodiment, the library types corresponding to the module types include:

[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 entries, wherein the number of platform implementation libraries is consistent with the number of platforms of the projects to be processed, and the number of project entries is greater than or equal to the number of platforms of the projects to be processed.

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

[0117] If the application module belongs to the first module type, determining that the function library of the application module is a shared library of the application module;

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

[0119] If the application module belongs to the third module type, a function library of the application module is determined to be a plurality of project entries of the project to be processed.

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

[0121] If any module type depends on the first module type, determining that the dependent library of the application module belonging to any module type is a shared library;

[0122] If the second module type depends on the second module type, determining 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, determining that the dependent library of the application module belonging to the first module type is a shared API library;

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

[0125] In an exemplary embodiment, the packaging module 304 is further configured to:

[0126] Use the same packaging format to package each functional library and each dependent book of each encoded application module.

[0127] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0128] Figure 4 is a block diagram of 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: a processing component 402 , a memory 404 , a power component 406 , a multimedia component 408 , an audio component 410 , an input / output (I / O) interface 412 , a sensor component 414 , and a communication component 416 .

[0130] The processing component 402 generally controls the overall operation of the electronic device 400, such as operations associated with display, phone calls, data communications, camera operations, and recording operations. The processing component 402 may include one or more processors 420 to execute instructions to complete all or part of the steps of the above-mentioned method. In addition, the processing component 402 may include one or more modules to facilitate the interaction between the processing component 402 and other components. For example, the processing component 402 may include a multimedia module to facilitate the interaction between the multimedia component 408 and the processing component 402.

[0131] The memory 404 is configured to store various types of data to support operations on the electronic device 400. Examples of such data include instructions for any application or method operating on the electronic device 400, contact data, phone book data, messages, pictures, videos, etc. The 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 memory, flash memory, magnetic disk or optical disk.

[0132] The power supply component 406 provides power to the various components of the electronic device 400. The 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 the electronic device 400.

[0133] The 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 touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touch, slide, and gestures on the touch panel. The touch sensor may not only sense the boundaries of the touch or slide action, but also detect the duration and pressure associated with the touch or slide operation. In some embodiments, the multimedia component 408 includes a front camera and / or a rear camera. When the electronic device 400 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera may receive external multimedia data. Each front camera and the rear camera may be a fixed optical lens system or have a focal length and optical zoom capability.

[0134] The audio component 410 is configured to output and / or input audio signals. For example, the audio component 410 includes a microphone (MIC), and when the electronic device 400 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode, the microphone is configured to receive an external audio signal. The received audio signal can be further stored in the memory 404 or sent via the communication component 416. In some embodiments, the 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: a home button, a volume button, a start button, and a lock button.

[0136] The sensor assembly 414 includes one or more sensors for providing various aspects of status assessment for the electronic device 400. For example, the sensor assembly 414 can detect the open / closed state of the electronic device 400, the relative positioning of the components, such as the display and keypad of the electronic device 400, and the sensor assembly 414 can also detect the position change of the electronic device 400 or a component of the electronic device 400, the presence or absence of contact between the user and the electronic device 400, the orientation or acceleration / deceleration of the electronic device 400, and the temperature change of the electronic device 400. The sensor assembly 414 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor assembly 414 may also include an optical sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor assembly 414 may also include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0137] The communication component 416 is configured to facilitate wired or wireless communication between the electronic device 400 and other devices. The electronic device 400 can access a wireless network based on a communication standard, such as WiFi, 2G or 3G, or a combination thereof. In an exemplary embodiment, the communication component 416 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 416 also includes a near field communication (NFC) module to facilitate short-range communication. For example, the NFC module can 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 above methods.

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

[0140] A non-transitory computer-readable storage medium, when instructions in the storage medium are executed by a processor of an electronic device, enables the electronic device to execute a processing method, the method including any of the above methods.

[0141] Those skilled in the art will readily appreciate other embodiments of the present disclosure after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present disclosure that follow the general principles of the present disclosure and include common knowledge or customary techniques in the art that are not disclosed in the present disclosure. The specification and examples are intended to be exemplary only, and the true scope and spirit of the present disclosure are indicated by the following claims.

[0142] It should be understood that the present disclosure is not limited to the exact structures that have been described above and shown in the drawings, and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is limited only by the appended claims.

Claims

1. A processing method, characterized in that: The method comprises: Determine multiple application modules of a project to be processed and 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; Determine the module type to which each of the application modules belongs, and determine the function library of each of the application modules according to the library type corresponding to the module type; Obtaining dependency rules between the module types, and determining a dependency library of each of the application modules according to the dependency relationship and the dependency rules; Each of the application modules is encoded according to the function library and the dependency library, and each of the function library and each of the dependency libraries of each of the encoded application modules is encapsulated.

2. The processing method according to claim 1, characterized in that: The module types include 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 of the project to be processed.

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

4. The processing method according to claim 2, characterized in that: 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 entries, wherein the number of the platform implementation libraries is consistent with the number of platforms of the projects to be processed, and the number of the project entries is greater than or equal to the number of platforms of the projects to be processed.

5. The processing method according to claim 4, characterized in that: Determining the function library of each of the application modules according to the library type corresponding to the module type includes: If the application module belongs to the first module type, determining that the function library of the application module is a shared library of the application module; If the application module belongs to the second module type, determining that the function library of the application module is a shared API library of the application module and multiple platform implementation libraries of the application module; If the application module belongs to the third module type, it is determined that the function library of the application module is a plurality of project entries of the project to be processed.

6. The processing method according to claim 4, characterized in that: The dependency rules between the module types include: If any of the module types depends on the first module type, determining that a dependent library of an application module belonging to any of the module types is the shared library; If the second module type depends on the second module type, determining that the dependent library of the application module belonging to the second module type is the shared API library or the platform implementation library; If the first module type depends on the second module type, determining that the dependent library of the application module belonging to the first module type is the shared API library; If the third module type depends on the second module type, it is determined that the dependent library of the application module belonging to the third module type is the platform implementation library.

7. The processing method according to claim 1, characterized in that: The step of encapsulating each function library and each dependent library of each encoded application module comprises: Each of the function libraries and each of the dependency books of each of the encoded application modules are packaged using the same packaging format.

8. A processing device, characterized in that: The device comprises: A first determining module is configured to determine a plurality of application modules of a project to be processed and dependencies between the plurality of 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; A second determination module is configured to determine the module type to which each of the application modules belongs, and determine the function library of each of the application modules according to the library type corresponding to the module type; A third determination module is configured to obtain dependency rules between the module types, and determine a dependency library of each of the application modules according to the dependency relationship and the dependency rules; The encapsulation module is configured to encode each of the application modules according to the function library and the dependency library, and encapsulate each of the function library and each of the dependency libraries of each of the encoded application modules.

9. An electronic device, characterized in that: include: processor; a memory for storing processor-executable instructions; The processor is configured to execute the processing method according to any one of claims 1 to 7.

10. A non-transitory computer-readable storage medium, characterized in that: When the instructions in the storage medium are executed by a processor of an electronic device, the electronic device is enabled to execute the processing method as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Dynamic library dependency obtaining method and device

    CN113742002A

  • Multi-terminal reading method based on digital textbook

    CN114237575A

  • Plug-in running system, plug-in running method and electronic equipment

    CN114327437A

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

    CN114443123A

  • Cross-platform content muting

    US20200372061A1