Module migration analysis processing method and apparatus, storage medium, and electronic device

By using a pre-set migration analysis tool to identify and replace modules, the problem of poor portability when migrating customized modules from Android systems to vendor partitions is solved, providing an efficient and reliable module migration assessment and adaptation solution.

CN119988180BActive Publication Date: 2026-05-12SHENZHEN TCL NEW-TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHENZHEN TCL NEW-TECH CO LTD
Filing Date
2025-01-08
Publication Date
2026-05-12

AI Technical Summary

Technical Problem

In the Android system, when a customized module is migrated to a vendor partition, the native module becomes unusable, resulting in poor portability and a lack of effective portability assessment solutions.

Method used

Using a pre-defined migration analysis tool, the native and alternative modules of candidate modules are identified, and a partition migration analysis report is output. By modifying the migration adaptation parameters of the module integration file, efficient and reliable module migration evaluation is achieved.

Benefits of technology

It enables efficient and reliable migration assessment of candidate modules from system partitions to vendor partitions, ensuring the success and reliability of module migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119988180B_ABST
    Figure CN119988180B_ABST
Patent Text Reader

Abstract

The application discloses a module migration analysis processing method and device, a storage medium and an electronic device, relates to the technical field of operating systems, and comprises the following steps: determining a candidate module to be migrated from a system partition to a vendor partition; using a preset migration analysis processing tool to perform module analysis processing on the candidate module, obtaining a native module used by the candidate module; performing replacement analysis processing on the native module, obtaining a replacement module of the native module; and outputting a partition migration analysis report of the candidate module, wherein the partition migration analysis report at least comprises module information of the candidate module, the native module and the replacement module. The application realizes efficient and reliable migratability evaluation of the candidate module which needs to be migrated to the vendor partition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of operating system technology, specifically to a module migration analysis processing method, apparatus, storage medium, and electronic device. Background Technology

[0002] There are many custom modules in the Android system. These modules are usually integrated in the system partition. In the early stages of development, these custom modules may use native modules, such as hidden APIs and private modules. These native modules are usually only provided for internal use by the system and are not exposed to external applications.

[0003] When these custom modules are migrated to the vendor partition, these native modules will become unavailable, resulting in poor portability of these custom modules. Currently, there is usually no effective solution for portability assessment when these custom modules need to be migrated. Summary of the Invention

[0004] This application provides a solution that enables efficient and reliable portability assessment of candidate modules that need to be migrated to a vendor partition.

[0005] The embodiments of this application provide the following technical solutions:

[0006] According to one embodiment of this application, a module migration analysis processing method includes: determining candidate modules to be migrated from a system partition to a vendor partition; using a preset migration analysis processing tool to perform module analysis processing on the candidate modules to obtain the native modules used by the candidate modules; performing replacement analysis processing on the native modules to obtain replacement modules for the native modules; and outputting a partition migration analysis report of the candidate modules, wherein the partition migration analysis report includes at least module information of the candidate modules, the native modules, and the replacement modules.

[0007] In some embodiments of this application, after outputting the partition migration analysis report of the candidate module, the method further includes: using the preset migration analysis processing tool to determine the partition migration adaptation parameters corresponding to the module integration file; using the partition migration adaptation parameters to modify the original system partition parameters in the module integration file to obtain the modified module integration file.

[0008] In some embodiments of this application, the step of performing module analysis processing on the candidate module to obtain the native module used by the candidate module includes: determining the dependency libraries that the candidate module directly and indirectly depends on; determining whether there is a dependency library of the type of private module among the dependency libraries that the candidate module depends on; if so, determining the dependency library of the type of private module as the native module used by the candidate module.

[0009] In some embodiments of this application, after determining whether the dependency library depended on by the candidate module has a dependency library of the category of private module, the method further includes: if not, scanning the import classes of the candidate module; determining whether there are import classes in the candidate module that are not located in the preset public class package; if so, determining the import classes that are not located in the preset public class package as hidden interfaces, and determining the hidden interfaces as the native modules used by the candidate module.

[0010] In some embodiments of this application, the step of performing substitution analysis on the native module to obtain a substitute module for the native module includes: determining the native development library that matches the vendor partition; performing similar module matching processing on the native module in the native development library that matches the vendor partition to obtain a module that matches the native module; and determining the module that matches the native module as a substitute module for the native module.

[0011] In some embodiments of this application, after determining whether there is an import class in the candidate module that is not located in the preset public class package, the method further includes: generating a stub class with the same name as the import class that is not located in the preset public class package, the stub class being used to insert into the source code of the candidate module; and listing the stub class with the same name as the import class that is not located in the preset public class package in the partition migration analysis report.

[0012] In some embodiments of this application, determining the dependency libraries that the candidate module directly and indirectly depends on includes: scanning the module integration file to obtain the candidate module defined therein and a first dependency library set of the candidate module; scanning and searching for the dependency libraries that the first dependency library set depends on in the operating system source code to obtain a second dependency library set; and determining the dependency libraries in the first dependency library set and the second dependency library set as the dependency libraries that the candidate module directly and indirectly depends on.

[0013] According to one embodiment of this application, a module migration analysis and processing apparatus includes: a determining unit, configured to: determine candidate modules to be migrated from a system partition to a vendor partition; and an analysis unit, configured to: perform module analysis processing on the candidate modules using a preset migration analysis processing tool to obtain the native modules used by the candidate modules; and perform substitution analysis processing on the native modules to obtain the substitute modules for the native modules; and output a partition migration analysis report of the candidate modules, wherein the partition migration analysis report includes at least module information of the candidate modules, the native modules, and the substitute modules.

[0014] In some embodiments of this application, after outputting the partition migration analysis report of the candidate module, the analysis unit is further configured to: use the preset migration analysis processing tool to determine the partition migration adaptation parameters corresponding to the module integration file; use the partition migration adaptation parameters to modify the original system partition parameters in the module integration file to obtain the modified module integration file.

[0015] In some embodiments of this application, the analysis unit is configured to: determine the dependency libraries that the candidate module directly and indirectly depends on; determine whether there is a dependency library of the type private module that the candidate module depends on; if so, determine the dependency library of the type private module as the native module used by the candidate module.

[0016] In some embodiments of this application, after determining whether the dependency library depended on by the candidate module has a dependency library of the category of private module, the analysis unit is configured to: if not, scan the import classes of the candidate module; determine whether there are import classes in the candidate module that are not located in the preset public class package; if yes, determine the import classes that are not located in the preset public class package as hidden interfaces, and determine the hidden interfaces as the native modules used by the candidate module.

[0017] In some embodiments of this application, the analysis unit is configured to: determine the native development library matched by the vendor partition; perform similar module matching processing on the native module in the native development library matched by the vendor partition to obtain the module matched by the native module; and determine the module matched by the native module as the replacement module of the native module.

[0018] In some embodiments of this application, after determining whether there is an import class in the candidate module that is not located in the preset public class package, the analysis unit is configured to: generate a stub class with the same name as the import class that is not located in the preset public class package, the stub class being used to insert into the source code of the candidate module; and include the stub class with the same name as the import class that is not located in the preset public class package in the partition migration analysis report.

[0019] In some embodiments of this application, the analysis unit is configured to: scan the module integration file to obtain the candidate module defined therein and the first dependency library set of the candidate module; scan the operating system source code to find the dependency libraries that the first dependency library set depends on, to obtain the second dependency library set; and determine the dependency libraries in the first dependency library set and the second dependency library set as the dependency libraries that the candidate module directly and indirectly depends on.

[0020] According to another embodiment of this application, a storage medium stores a computer program thereon, which, when executed by a device's processor, causes the device to perform the methods described in the embodiments of this application.

[0021] According to another embodiment of this application, an electronic device may include: a memory storing a computer program; and a processor reading the computer program stored in the memory to execute the methods described in the embodiments of this application.

[0022] According to another embodiment of this application, a computer program product or computer program includes computer instructions stored in a computer-readable storage medium. A processor of the device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the device to perform the methods provided in the various optional implementations described in the embodiments of this application.

[0023] In this embodiment, candidate modules to be migrated from the system partition to the vendor partition are determined; a preset migration analysis processing tool is used to perform module analysis processing on the candidate modules to obtain the native modules used by the candidate modules; and a replacement analysis processing is performed on the native modules to obtain the replacement modules of the native modules; and a partition migration analysis report of the candidate modules is output, wherein the partition migration analysis report includes at least the module information of the candidate modules, the native modules, and the replacement modules.

[0024] In the manner described in this application embodiment, for candidate modules that need to be migrated from the system partition to the vendor partition, a preset migration analysis processing tool is used. This tool can not only analyze the native modules used by the module, but also analyze the alternative modules that match these native modules. It also outputs a partition migration analysis report to present the migration-related information of the module, thereby achieving efficient and reliable migration assessment for candidate modules that need to be migrated to the vendor partition. Attached Figure Description

[0025] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0026] Figure 1 A flowchart of a module migration analysis processing method according to an embodiment of this application is shown.

[0027] Figure 2 A flowchart illustrating native module analysis according to an embodiment of this application is shown.

[0028] Figure 3 A flowchart illustrating native module analysis according to another embodiment of this application is shown.

[0029] Figure 4 A block diagram of a module migration analysis processing apparatus according to an embodiment of this application is shown.

[0030] Figure 5 A block diagram of an electronic device according to an embodiment of this application is shown. Detailed Implementation

[0031] The present disclosure will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the embodiments provided herein are merely illustrative of the present disclosure and are not intended to limit the present disclosure. Furthermore, the embodiments provided below are some embodiments for implementing the present disclosure, and not all embodiments for implementing the present disclosure. Unless otherwise specified, the technical solutions described in the embodiments of the present disclosure can be implemented in any combination.

[0032] It should be noted that, in the embodiments of this disclosure, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a method or apparatus that includes a list of elements includes not only the elements expressly described, but also other elements not expressly listed, or elements inherent to implementing the method or apparatus. Without further limitations, an element defined by the phrase "comprising a..." does not exclude the presence of other related elements (e.g., steps in the method or units in the apparatus, such as portions of circuitry, processors, programs, or software, etc.) in the method or apparatus that includes that element.

[0033] For example, the module migration analysis processing method provided in this disclosure includes a series of steps, but the module migration analysis processing method provided in this disclosure is not limited to the steps described. Similarly, the module migration analysis processing apparatus provided in this disclosure includes a series of units, but the apparatus provided in this disclosure is not limited to the units explicitly described, and may also include units that need to be set up for obtaining relevant information or processing based on information.

[0034] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this disclosure belongs. The terminology used herein is for the purpose of describing particular embodiments only and is not intended to be limiting of this disclosure.

[0035] It is understood that in the specific implementation of this application, relevant data is involved. When the embodiments in this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant countries and regions.

[0036] Figure 1 A flowchart illustrating a module migration analysis processing method according to an embodiment of this application is shown schematically. The execution subject of this module migration analysis processing method can be any device with processing capabilities, such as a computer, mobile phone, smartwatch, television, and other home appliances.

[0037] like Figure 1 As shown, the module migration analysis processing method may include steps S110 to S140.

[0038] Step S110: Determine candidate modules to be migrated from the system partition to the vendor partition;

[0039] Step S120: Using a preset migration analysis processing tool, perform module analysis processing on the candidate module to obtain the native module used by the candidate module; and,

[0040] Step S130: Perform substitution analysis on the original module to obtain a replacement module for the original module; and,

[0041] Step S140: Output the partition migration analysis report of the candidate module. The partition migration analysis report includes at least the module information of the candidate module, the original module, and the replacement module.

[0042] There are many custom modules in the Android system. These custom modules are usually integrated in the system partition. Custom modules in the system partition can be identified as candidate modules to be migrated from the system partition to the vendor partition. Specifically, the modules defined in the module integration files in the Android system can be parsed and used as candidate modules. The module integration files can specifically refer to BP files (Blueprint files) and / or MK files (Makefile files).

[0043] For these candidate modules, a pre-defined migration analysis tool can be used to perform module analysis to obtain the native modules used by these candidate modules; and to perform replacement analysis on the native modules to obtain the replacement modules for these native modules. Among them, native modules include hidden APIs and private modules, which are usually only provided for internal system use and are not exposed to external applications.

[0044] Furthermore, the preset migration analysis processing tool can output a partition migration analysis report for candidate modules. This partition migration analysis report includes at least the module information of the candidate module, the native module used by the candidate module, and the replacement module of the native module.

[0045] In this way, for candidate modules that need to be migrated from the system partition to the vendor partition, a preset migration analysis tool can be used to analyze not only the native modules they use, but also the alternative modules that these native modules match, and output a partition migration analysis report to present the migration-related information of the modules, so as to achieve efficient and reliable migration assessment of candidate modules that need to be migrated to the vendor partition.

[0046] The following description Figure 1 Further optional specific embodiments for each step performed during module migration analysis in the example implementation.

[0047] In one embodiment, see Figure 2 The step of performing module analysis on the candidate module to obtain the native module used by the candidate module may include: step S210, determining the dependency libraries that the candidate module directly and indirectly depends on; step S220, determining whether there is a dependency library of the type of private module among the dependency libraries that the candidate module depends on; step S230, if so, determining the dependency library of the type of private module as the native module used by the candidate module.

[0048] After determining the direct and indirect dependencies of the candidate module, if the candidate module is a "shared library module (SO module, usually existing in the form of .so file)," then it can be determined whether there is a private module among the dependent libraries that the candidate module depends on. If there is a private module, then it can be accurately determined that the private module is the native module used by the candidate module (shared library module).

[0049] Among them, dependency libraries categorized as private modules are those provided only to the Android system and not to the vendor. For example, if a dependency library is a vendor native development kit (VNDK) but has the private attribute set to true, then the dependency library is a private module.

[0050] In one embodiment, determining the dependency libraries that the candidate module directly and indirectly depends on may include: scanning the module integration file to obtain the candidate module defined therein and a first dependency library set of the candidate module; scanning the operating system source code to find the dependency libraries that the first dependency library set depends on to obtain a second dependency library set; and determining the dependency libraries in the first dependency library set and the second dependency library set as the dependency libraries that the candidate module directly and indirectly depends on.

[0051] Scanning module integration files (BP files and / or MK files) can yield the modules defined within them and the dependency libraries that the modules depend on. The defined modules can be used as candidate modules, and the set of dependency libraries that the defined modules depend on is the first dependency library set.

[0052] Then, the operating system source code can be further scanned to find the dependent libraries that the libraries in the first dependency library set further depend on. The set of these further dependent libraries constitutes the second dependency library set. Finally, the libraries in both the first and second dependency library sets represent the direct and indirect dependencies of the complete candidate module.

[0053] Furthermore, in one embodiment, see [reference] Figure 2 After determining whether the dependency library depended on by the candidate module has a dependency library of the category of private module, the method may further include: step S310, if not, scanning the import class of the candidate module; step S320, determining whether there is an import class in the import class of the candidate module that is not located in the preset public class package; step S330, if yes, determining the import class that is not located in the preset public class package as a hidden interface, and determining the hidden interface as the native module used by the candidate module.

[0054] If the candidate module is a "JAR module (Java archive file, used to package multiple Java class files)," then the imported classes of the candidate module can be scanned to determine whether there are any imported classes that are not located in the pre-defined public class package. If there are imported classes that are not located in the pre-defined public class package, then the imported classes that are not located in the pre-defined public class package are the hidden interfaces. These hidden interfaces are accurately identified as the native modules used by the candidate module (JAR module).

[0055] In one embodiment, after determining whether there is an import class in the candidate module's import class that is not located in the preset public class package, the method may further include: generating a stub class with the same name as the import class that is not located in the preset public class package, the stub class being used to insert into the source code of the candidate module; and listing the stub class with the same name as the import class that is not located in the preset public class package in the partition migration analysis report.

[0056] If the candidate module is a "JAR module (Java archive file, used to package multiple Java class files)", a stub class with the same name as the import class not located in the pre-built public class package can be generated. When this stub class is inserted into the source code of the candidate module, it can further ensure that the candidate module can be compiled successfully after being migrated to the vendor partition, thereby further improving the reliability of the module portability assessment.

[0057] In one embodiment, the substitution analysis process for the native module to obtain a substitute module for the native module includes: determining the native development library matched by the vendor partition; performing similar module matching processing on the native module in the native development library matched by the vendor partition to obtain a module matched by the native module; and determining the module matched by the native module as the substitute module for the native module.

[0058] After identifying the native development libraries for vendor partition matching, similar module matching is performed on the native modules within these libraries. Modules from these libraries that match the native modules are then used as replacement modules. These replacement modules effectively replace the native modules, allowing candidate modules to be migrated to the vendor partition. Vendor native development libraries for vendor partition matching include vendor native development kits (VNDK) and low-level native development kits (LLNDK).

[0059] Furthermore, in one embodiment, after outputting the partition migration analysis report of the candidate module, the method may further include: using the preset migration analysis processing tool to determine the partition migration adaptation parameters corresponding to the module integration file; using the partition migration adaptation parameters to modify the original system partition parameters in the module integration file to obtain the modified module integration file.

[0060] When migrating candidate modules to a vendor partition, the module integration files also need to be migrated. Pre-defined migration analysis tools can determine the partition migration adaptation parameters corresponding to the module integration files. These parameters are then used to modify the original system partition parameters in the module integration files, resulting in modified module integration files. These modified files can then be effectively used for partition migration of candidate modules, further improving the reliability of module portability assessment. For example, if a partition migration adaptation parameter is the `vendor: true` attribute, the `system_ext_specific: true` attribute in the module integration file can be modified to `vendor: true`.

[0061] To facilitate better implementation of the module migration analysis processing method provided in the embodiments of this application, the embodiments of this application also provide a module migration analysis processing apparatus based on the above-described module migration analysis processing method. The meanings of the terms used are the same as in the module migration analysis processing method described above, and specific implementation details can be found in the descriptions in the method embodiments. Figure 4 A block diagram of a module migration analysis processing apparatus according to an embodiment of this application is shown.

[0062] like Figure 4 As shown, the module migration analysis and processing apparatus 400 may include: a determining unit 410, which may be used to: determine candidate modules to be migrated from the system partition to the vendor partition; an analysis unit 420, which may be used to: perform module analysis processing on the candidate modules using a preset migration analysis processing tool to obtain the native modules used by the candidate modules; and perform substitution analysis processing on the native modules to obtain the substitute modules of the native modules; and output a partition migration analysis report of the candidate modules, wherein the partition migration analysis report includes at least module information of the candidate modules, the native modules, and the substitute modules.

[0063] In some embodiments of this application, after outputting the partition migration analysis report of the candidate module, the analysis unit is further configured to: use the preset migration analysis processing tool to determine the partition migration adaptation parameters corresponding to the module integration file; use the partition migration adaptation parameters to modify the original system partition parameters in the module integration file to obtain the modified module integration file.

[0064] In some embodiments of this application, the analysis unit is configured to: determine the dependency libraries that the candidate module directly and indirectly depends on; determine whether there is a dependency library of the type private module that the candidate module depends on; if so, determine the dependency library of the type private module as the native module used by the candidate module.

[0065] In some embodiments of this application, after determining whether the dependency library depended on by the candidate module has a dependency library of the category of private module, the analysis unit is configured to: if not, scan the import classes of the candidate module; determine whether there are import classes in the candidate module that are not located in the preset public class package; if yes, determine the import classes that are not located in the preset public class package as hidden interfaces, and determine the hidden interfaces as the native modules used by the candidate module.

[0066] In some embodiments of this application, the analysis unit is configured to: determine the native development library matched by the vendor partition; perform similar module matching processing on the native module in the native development library matched by the vendor partition to obtain the module matched by the native module; and determine the module matched by the native module as the replacement module of the native module.

[0067] In some embodiments of this application, after determining whether there is an import class in the candidate module that is not located in the preset public class package, the analysis unit is configured to: generate a stub class with the same name as the import class that is not located in the preset public class package, the stub class being used to insert into the source code of the candidate module; and include the stub class with the same name as the import class that is not located in the preset public class package in the partition migration analysis report.

[0068] In some embodiments of this application, the analysis unit is configured to: scan the module integration file to obtain the candidate module defined therein and the first dependency library set of the candidate module; scan the operating system source code to find the dependency libraries that the first dependency library set depends on, to obtain the second dependency library set; and determine the dependency libraries in the first dependency library set and the second dependency library set as the dependency libraries that the candidate module directly and indirectly depends on.

[0069] It should be noted that although several modules or units for the device used to perform actions have been mentioned in the detailed description above, this division is not mandatory. In fact, according to the embodiments of this application, the features and functions of two or more modules or units described above can be embodied in one module or unit. Conversely, the features and functions of one module or unit described above can be further divided and embodied by multiple modules or units.

[0070] Furthermore, embodiments of this application also provide an electronic device, such as... Figure 5As shown, Figure 5 A block diagram of an electronic device according to an embodiment of this application is shown, specifically:

[0071] The electronic device may include components such as a processor 501 with one or more processing cores, a memory 502 with one or more computer-readable storage media, a power supply 503, and an input unit 504. Those skilled in the art will understand that... Figure 5 The electronic device structure shown does not constitute a limitation on the electronic device and may include more or fewer components than shown, or combine certain components, or have different component arrangements.

[0072] in:

[0073] The processor 501 is the control center of the electronic device. It connects to various parts of the computer device via various interfaces and lines. By running or executing software programs and / or modules stored in the memory 502, and by calling data stored in the memory 502, it performs various functions of the computer device and processes data, thereby providing overall monitoring of the electronic device. Optionally, the processor 501 may include one or more processing cores; preferably, the processor 501 may integrate an application processor and a modem processor, wherein the application processor mainly handles the operating system, user page, and application programs, and the modem processor mainly handles wireless communication. It is understood that the modem processor may not be integrated into the processor 501.

[0074] The memory 502 can be used to store software programs and modules. The processor 501 executes various functional applications and data processing by running the software programs and modules stored in the memory 502. The memory 502 may mainly include a program storage area and a data storage area. The program storage area may store the operating system, application programs required for at least one function (such as sound playback function, image playback function, etc.), etc.; the data storage area may store data created according to the use of the computer device, etc. In addition, the memory 502 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 502 may also include a memory controller to provide the processor 501 with access to the memory 502.

[0075] The electronic device also includes a power supply 503 that supplies power to various components. Preferably, the power supply 503 can be logically connected to the processor 501 through a power management system, thereby enabling functions such as charging, discharging, and power consumption management through the power management system. The power supply 503 may also include one or more DC or AC power supplies, recharging systems, power fault detection circuits, power converters or inverters, power status indicators, and other arbitrary components.

[0076] The electronic device may also include an input unit 504, which can be used to receive input digital or character information and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control.

[0077] Although not shown, the electronic device may also include a display unit, etc., which will not be described in detail here. Specifically, in this embodiment, the processor 501 in the electronic device loads the executable files corresponding to the processes of one or more computer programs into the memory 502 according to the following instructions, and the processor 501 runs the computer programs stored in the memory 502, thereby realizing the various functions in the foregoing embodiments of this application. For example, the processor 501 can perform the following steps:

[0078] The process involves identifying candidate modules to be migrated from the system partition to the vendor partition; using a preset migration analysis tool, performing module analysis on the candidate modules to obtain the native modules used by the candidate modules; performing replacement analysis on the native modules to obtain the replacement modules of the native modules; and outputting a partition migration analysis report for the candidate modules, wherein the partition migration analysis report includes at least the module information of the candidate modules, the native modules, and the replacement modules.

[0079] In some embodiments of this application, after outputting the partition migration analysis report of the candidate module, the method further includes: using the preset migration analysis processing tool to determine the partition migration adaptation parameters corresponding to the module integration file; using the partition migration adaptation parameters to modify the original system partition parameters in the module integration file to obtain the modified module integration file.

[0080] In some embodiments of this application, the step of performing module analysis processing on the candidate module to obtain the native module used by the candidate module includes: determining the dependency libraries that the candidate module directly and indirectly depends on; determining whether there is a dependency library of the type of private module among the dependency libraries that the candidate module depends on; if so, determining the dependency library of the type of private module as the native module used by the candidate module.

[0081] In some embodiments of this application, after determining whether the dependency library depended on by the candidate module has a dependency library of the category of private module, the method further includes: if not, scanning the import classes of the candidate module; determining whether there are import classes in the candidate module that are not located in the preset public class package; if so, determining the import classes that are not located in the preset public class package as hidden interfaces, and determining the hidden interfaces as the native modules used by the candidate module.

[0082] In some embodiments of this application, the step of performing substitution analysis on the native module to obtain a substitute module for the native module includes: determining the native development library that matches the vendor partition; performing similar module matching processing on the native module in the native development library that matches the vendor partition to obtain a module that matches the native module; and determining the module that matches the native module as a substitute module for the native module.

[0083] In some embodiments of this application, after determining whether there is an import class in the candidate module that is not located in the preset public class package, the method further includes: generating a stub class with the same name as the import class that is not located in the preset public class package, the stub class being used to insert into the source code of the candidate module; and listing the stub class with the same name as the import class that is not located in the preset public class package in the partition migration analysis report.

[0084] In some embodiments of this application, determining the dependency libraries that the candidate module directly and indirectly depends on includes: scanning the module integration file to obtain the candidate module defined therein and a first dependency library set of the candidate module; scanning and searching for the dependency libraries that the first dependency library set depends on in the operating system source code to obtain a second dependency library set; and determining the dependency libraries in the first dependency library set and the second dependency library set as the dependency libraries that the candidate module directly and indirectly depends on.

[0085] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be performed by a computer program, or by a computer program controlling related hardware. The computer program can be stored in a computer-readable storage medium and loaded and executed by a processor.

[0086] Therefore, embodiments of this application also provide a storage medium storing a computer program that can be loaded by a processor to execute the steps in any of the methods provided in embodiments of this application.

[0087] The storage medium can be a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.

[0088] Since the computer program stored in the storage medium can execute the steps of any of the methods provided in the embodiments of this application, the beneficial effects that the methods provided in the embodiments of this application can achieve can be realized. For details, please refer to the previous embodiments, which will not be repeated here.

[0089] Other embodiments of this application will readily occur to those skilled in the art upon consideration of the specification and practice of the embodiments disclosed herein. This application is intended to cover any variations, uses, or adaptations of this application that follow the general principles of this application and include common knowledge or customary techniques in the art not disclosed herein.

[0090] It should be understood that this application is not limited to the embodiments described above and shown in the accompanying drawings, but various modifications and changes can be made without departing from its scope.

Claims

1. A module migration analysis processing method, characterized in that, include: Identify candidate modules to be migrated from the system partition to the vendor partition; A preset migration analysis processing tool is used to perform module analysis processing on the candidate module to obtain the original module used by the candidate module; as well as, The original module is subjected to substitution analysis to obtain a replacement module. as well as, Output a partition migration analysis report for the candidate module, wherein the partition migration analysis report includes at least module information of the candidate module, the original module, and the replacement module; The step of performing module analysis on the candidate modules to obtain the native modules used by the candidate modules includes: Identify the dependency libraries that the candidate modules directly and indirectly depend on; Determine whether the dependency library depended by the candidate module exists in the category of private module; If so, the dependency library classified as a private module is determined as the native module used by the candidate module; If not, then scan the import classes of the candidate modules; Determine whether there are any imported classes in the candidate modules that are not located in the preset public class package; If so, the import class that is not located in the pre-defined public class package is identified as a hidden interface, and the hidden interface is identified as the native module used by the candidate module.

2. The method according to claim 1, characterized in that, After outputting the partition migration analysis report of the candidate module, the method further includes: Using the aforementioned preset migration analysis and processing tool, determine the partition migration adaptation parameters corresponding to the module integration file; The original system partition parameters in the module integration file are modified using the partition migration adaptation parameters to obtain the modified module integration file.

3. The method according to claim 1, characterized in that, The substitution analysis process performed on the original module to obtain a replacement module includes: Determine the native development library for the supplier partition matching; In the native development library of the supplier partition matching, the native module is subjected to similar module matching processing to obtain the module that matches the native module; The module that matches the original module is determined as the replacement module for the original module.

4. The method according to claim 1, characterized in that, After determining whether there are any import classes in the candidate module's import classes that are not located in the preset public class package, the method further includes: Generate a stub class with the same name as the import class that is not located in the pre-defined public class package, and the stub class is used to insert into the source code of the candidate module; The stub class with the same name as the import class that is not located in the pre-defined public class package is included in the partition migration analysis report.

5. The method according to claim 1, characterized in that, The step of determining the dependency libraries that the candidate module directly and indirectly depends on includes: Scan the module integration file to obtain the candidate modules defined therein and the first set of dependency libraries of the candidate modules; The second dependency set is obtained by scanning the operating system source code to find the dependency libraries that the first dependency set depends on. The dependency libraries in the first dependency library set and the second dependency library set are identified as the dependency libraries that the candidate module directly and indirectly depends on.

6. A module migration analysis and processing device, characterized in that, include: The determining unit is used to: determine candidate modules to be migrated from the system partition to the vendor partition; The analysis unit is configured to: perform module analysis processing on the candidate module using a preset migration analysis processing tool to obtain the original module used by the candidate module; and perform substitution analysis processing on the original module to obtain the replacement module of the original module. And, output a partition migration analysis report of the candidate module, the partition migration analysis report including at least the module information of the candidate module, the native module, and the replacement module; the module analysis processing of the candidate module to obtain the native module used by the candidate module includes: determining the dependency libraries that the candidate module directly and indirectly depends on; determining whether there is a dependency library of the type of private module among the dependency libraries that the candidate module depends on; if so, then the dependency library of the type of private module is determined as the native module used by the candidate module; if not, then scan the import classes of the candidate module; determine whether there is an import class that is not located in the preset public class package among the import classes of the candidate module; if so, then the import class that is not located in the preset public class package is determined as a hidden interface, and the hidden interface is determined as the native module used by the candidate module.

7. A storage medium, characterized in that, It stores a computer program that, when executed by the computer's processor, causes the computer to perform the method described in any one of claims 1 to 5.

8. An electronic device, characterized in that, include: Memory, which stores computer programs; A processor reads a computer program stored in memory to perform the method described in any one of claims 1 to 5.