An application migration method
By comparing and analyzing the feature files and source code information of the application to be migrated, it is judged that it can be migrated to the target platform, and migration tips and alternatives are provided, which solves the problems of migration complexity and high labor cost in the existing technology, and achieves high efficiency. Application migration and target platform adaptation.
Patent Information
- Application Number
- CN202211337050.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-28
- Publication Date
- 2024-10-15
- Estimated Expiration
- 2042-10-28
AI Technical Summary
In the information and communication industry, existing technologies cannot effectively solve the problems of illegal data collection and information leakage, especially because security software based on foreign operating systems cannot fundamentally solve security problems, resulting in localized migration applications to the target platform. The process is complex and lacks automated analysis tools.
By obtaining the characteristic files and source code information of the application to be migrated, we conduct comparison and analysis with the knowledge base to determine whether the application can be migrated to the target platform, build the corresponding relationship between the processor and the operating system, provide migration tips and alternatives, and achieve automation. Migration assessment and adaptation.
It effectively reduces the investment in manual analysis, improves the accuracy and efficiency of migration, solves the difficulty of checking code compatibility and the pain points of compilation and debugging, reduces enterprise labor costs, and speeds up the target platform adaptation process.
Smart Images

Figure CN115756601B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to an application migration method. Background Art
[0002] In recent years, with the deepening of economic globalization and the rapid development of information and communication technology, security incidents such as illegal data collection and information leakage have frequently occurred, posing a serious threat to my country's network information security; and various security software based on foreign operating systems are "rootless trees" and cannot fundamentally solve security problems.
[0003] In order to solve the core technology problems, the localization of key technologies has become an issue that cannot be ignored for the security of the information and communication industry, the security of economic and social development, and even national security. It can be confirmed that in the near future, administrative office and e-government will all be replaced by localization. In the context of information innovation, more and more applications will be migrated to the target platform (such as localized CPU and operating system). How to migrate applications to the target platform has become an urgent problem to be solved. Summary of the invention
[0004] In order to solve or partially solve the above problems, the present application provides an application migration method.
[0005] The present application proposes an application migration method, which includes: obtaining an application to be migrated on an initial platform, wherein the application to be migrated includes software to be migrated and source code to be migrated; extracting feature files of the software to be migrated and feature information of the source code to be migrated respectively; and judging whether the application to be migrated can be migrated to a target platform based on the feature files of the software to be migrated and the feature information of the source code to be migrated.
[0006] In some examples, judging whether the application to be migrated can be migrated to the target platform based on the characteristic information of the characteristic files of the software to be migrated and the source code to be migrated includes: comparing and analyzing the characteristic information of the characteristic files of the software to be migrated and the source code to be migrated with the information of the knowledge base to judge whether the application to be migrated can be migrated to the target platform.
[0007] In some examples, the feature file and the feature information are compared and analyzed with the information in the knowledge base, including: matching the feature file of the software to be migrated with the feature file in the knowledge base to determine an alternative to the feature file of the software to be migrated; matching the feature information of the software to be migrated with the feature information in the knowledge base to determine an alternative to the feature information of the software to be migrated.
[0008] In some examples, before comparing and analyzing the feature file and the feature information with the information in the knowledge base, the method further includes: collecting feature information of the image and compiler of the target platform, and establishing the knowledge base corresponding to the target platform through an extractor of the feature file and feature information.
[0009] In some examples, the target platform includes: a target processor and a target operating system; after establishing the knowledge base, the method further includes: constructing a correspondence between the processor and the operating system, wherein the correspondence is associated with the knowledge base.
[0010] In some examples, after determining whether the application to be migrated can be migrated to the target platform based on the feature files of the software to be migrated and the feature information of the source code to be migrated, the method further includes: when it is determined that the application to be migrated can be migrated to the target platform, issuing a migration prompt, and the migration prompt includes a migration method.
[0011] Compared with the prior art, this application has the following beneficial effects:
[0012] In the technical solution provided by the present application, an application migration method is provided, and the application migration method includes: obtaining the application to be migrated on the initial platform, the application to be migrated includes the software to be migrated and the source code to be migrated; extracting the feature files of the software to be migrated and the feature information of the source code to be migrated respectively; judging whether the application to be migrated can be migrated to the target platform based on the feature files of the software to be migrated and the feature information of the source code to be migrated, and the feasibility of migrating the software to be migrated to the target platform can be automatically analyzed by the above method, which effectively reduces the manual analysis input of users in the process of software migration evaluation and analysis, improves the accuracy and overall efficiency, and also solves the pain points such as the difficulty of manual troubleshooting of user code compatibility, lack of migration experience, and repeated reliance on compilation and debugging positioning. By using the present invention, it is of great significance to reduce the labor cost of enterprises, improve migration efficiency, and accelerate the process of target platform adaptation. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] Figure 1 It is a basic flow diagram of an application migration method shown in an embodiment of the present application;
[0014] Figure 2 This is a basic flow chart of feature file comparison and analysis shown in an embodiment of the present application;
[0015] Figure 3 It is a basic flow chart of feature information comparison and analysis shown in an embodiment of the present application. DETAILED DESCRIPTION
[0016] Here, exemplary embodiments will be described in detail, examples of which are shown in the accompanying drawings. When the following description refers to the drawings, unless otherwise indicated, the same numbers in different drawings represent the same or similar elements. The implementations described in the following exemplary embodiments do not represent all implementations consistent with the present application. Instead, they are only examples of devices and methods consistent with some aspects of the present application as detailed in the attached claims.
[0017] The block diagrams shown in the accompanying drawings are merely functional entities and do not necessarily correspond to physically independent entities. That is, these functional entities may be implemented in software form, or in one or more hardware modules or integrated circuits, or in different networks and / or processor devices and / or microcontroller devices.
[0018] The flowcharts shown in the accompanying drawings are only exemplary and do not necessarily include all the contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps can be decomposed, and some operations / steps can be combined or partially combined, so the actual execution order may change according to actual conditions.
[0019] It should also be noted that the "multiple" mentioned in this application refers to two or more than two. "And / or" describes the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the previous and next associated objects are in an "or" relationship.
[0020] Embodiment 1
[0021] See also Figure 1 , Figure 1 An application migration method is shown according to an exemplary embodiment, and the application migration method includes:
[0022] S101, obtaining applications to be migrated on an initial platform, wherein the applications to be migrated include software to be migrated and source code to be migrated;
[0023] S102, extracting the characteristic files of the software to be migrated and the characteristic information of the source code to be migrated respectively;
[0024] S103: Determine whether the application to be migrated can be migrated to the target platform based on the feature file of the software to be migrated and the feature information of the source code to be migrated.
[0025] In some examples, judging whether the application to be migrated can be migrated to the target platform based on the characteristic information of the characteristic files of the software to be migrated and the source code to be migrated includes: comparing and analyzing the characteristic information of the characteristic files of the software to be migrated and the source code to be migrated with the information of the knowledge base to judge whether the application to be migrated can be migrated to the target platform.
[0026] In some examples, the feature file and the feature information are compared and analyzed with the information in the knowledge base, including: matching the feature file of the software to be migrated with the feature file in the knowledge base to determine an alternative to the feature file of the software to be migrated; matching the feature information of the software to be migrated with the feature information in the knowledge base to determine an alternative to the feature information of the software to be migrated.
[0027] In some examples, before comparing and analyzing the feature file and the feature information with the information in the knowledge base, the method further includes: collecting feature information of the image and compiler of the target platform, and establishing the knowledge base corresponding to the target platform through an extractor of the feature file and feature information.
[0028] In some examples, the target platform includes: a target processor and a target operating system; after establishing the knowledge base, the method further includes: constructing a correspondence between the processor and the operating system, wherein the correspondence is associated with the knowledge base.
[0029] In some examples, after determining whether the application to be migrated can be migrated to the target platform based on the feature files of the software to be migrated and the feature information of the source code to be migrated, the method further includes: when it is determined that the application to be migrated can be migrated to the target platform, issuing a migration prompt, and the migration prompt includes a migration method.
[0030] Specifically, in order to better understand the present invention, this example provides a more specific application migration method, which includes the following steps:
[0031] 1. Establish a feature knowledge base of feature files included in the software installation package and source code:
[0032] This link mainly relies on the collected and organized feature information of operating system images and compilers, and establishes a feature file and feature information knowledge base through feature file and feature information extractors to support the migration adaptation evaluation of software and source code.
[0033] 2. Establish a knowledge base of platform correspondence, including: CPU and operating system:
[0034] This step mainly involves building the correspondence between mainstream CPUs and operating systems. Through these correspondences, reference is made to the knowledge base established in step one to provide accurate replacement solutions for software and source code migration.
[0035] 3. Extract feature files and feature information:
[0036] This step mainly uses feature file and feature information extractors to extract feature files and feature information in the software installation package and source code of the application to be migrated.
[0037] 4. Portability assessment:
[0038] This step mainly compares and analyzes the extracted key information with the feature files and feature information in the knowledge base, and evaluates the portability of the software installation package and source code. The steps for comparing and analyzing the feature files of the migrated application are as follows: Figure 2 As shown in the figure, the steps for comparing and analyzing the characteristic information of the migrated application are as follows Figure 3 shown.
[0039] 5. Give a migration report:
[0040] This step mainly involves comprehensively determining whether the software installation package and source code can be migrated to the specified domestic CPU and operating system, and providing a migration report and corresponding modification suggestions.
[0041] In the context of information innovation, more and more applications will be migrated to the target platform. Compared with the traditional purely manual analysis method, this method effectively reduces the user's manual analysis input in the software migration evaluation and analysis process, improves the accuracy and overall efficiency, and also solves the pain points such as the difficulty of manual troubleshooting of user code compatibility, lack of migration experience, and repeated reliance on compilation and debugging. The use of the present invention is of great significance for reducing enterprise labor costs, improving migration efficiency, and accelerating the target platform adaptation process.
[0042] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and units can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.
[0043] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of units is only a logical function division, and there may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.
[0044] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the embodiments of the present invention.
[0045] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0046] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods of each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk and other media that can store program codes.
[0047] The technical solutions provided by the embodiments of the present invention are introduced in detail above. Specific examples are used in this patent to illustrate the principles and implementation methods of the embodiments of the present invention. The description of the above embodiments is only applicable to help understand the principles of the embodiments of the present invention. The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. An application migration method, characterized in that: The application migration method comprises: Acquire the application to be migrated on the initial platform, wherein the application to be migrated includes software to be migrated and source code to be migrated; Respectively extracting the feature files of the software to be migrated and the feature information of the source code to be migrated; Determining whether the application to be migrated can be migrated to the target platform based on the feature file of the software to be migrated and the feature information of the source code to be migrated, specifically comprising: comparing and analyzing the feature file of the software to be migrated and the feature information of the source code to be migrated with information in a knowledge base to determine whether the application to be migrated can be migrated to the target platform; The step of comparing and analyzing the feature file and the feature information with the information in the knowledge base includes: Matching the feature file of the software to be migrated with the feature file in the knowledge base to determine an alternative solution for the feature file of the software to be migrated; specifically comprising: When the characteristic file does not exist, the software is determined to be migrateable, wherein the characteristic file includes: a dynamic link, a static link, and an executable file; When a signature file exists, it is compared with the signature file in the knowledge base, and a replacement suggestion is determined based on the comparison result and the software is determined to be migrateable, otherwise the user is prompted to verify by himself; Matching the feature information of the source code to be migrated with the feature information in the knowledge base to determine an alternative solution for the feature information of the source code to be migrated, specifically comprising: When there is no characteristic information, the source code is determined to be portable, wherein the characteristic information includes: dynamic link, compilation parameters, and assembly instructions; When feature information exists, it is compared with the feature information in the knowledge base, and a replacement suggestion is determined based on the comparison result and the source code is determined to be migratable, otherwise the user is prompted to verify it by himself.
2. The method according to claim 1, characterized in that: Before comparing and analyzing the feature file and the feature information with the information in the knowledge base, the method further includes: The feature information of the image and compiler of the target platform is collected, and the knowledge base corresponding to the target platform is established through the feature file and the feature information extractor.
3. The method according to claim 2, characterized in that The target platform includes: a target processor and a target operating system; after establishing the knowledge base, the method further includes: A correspondence between a processor and an operating system is constructed, wherein the correspondence is associated with the knowledge base.
4. The method according to any one of claims 1 to 3, characterized in that: After determining whether the application to be migrated can be migrated to the target platform based on the feature file of the software to be migrated and the feature information of the source code to be migrated, the method further includes: When it is determined that the application to be migrated can be migrated to the target platform, a migration prompt is issued, and the migration prompt includes a migration method.
