Configuration file modification method, system and equipment for migration scene and storage medium
By pre-built the configuration reference file library and using file comparison tools, the problem of low configuration file modification efficiency in migration scenarios is solved, and configuration files are quickly acquired and modified, which improves migration efficiency.
Patent Information
- Application Number
- CN202411628202.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-14
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2044-11-14
AI Technical Summary
In the prior art, modifying configuration files in migration scenarios is inefficient, mainly because software configuration files are scattered across various warehouse platforms, making it difficult to quickly locate and obtain reference files.
By pre-built the configuration reference file library, centrally store the standard configuration files of multiple successfully migrated software, and use the file comparison tool to automatically compare and highlight the different content to quickly obtain and modify the configuration files.
It improves the efficiency of modifying configuration files in migration scenarios, saves time to download and extract configuration files online, and simplifies the operation process of engineers.
Smart Images

Figure CN119690497A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of data processing technology, and in particular to a configuration file modification method, system, device and storage medium for a migration scenario. Background Art
[0002] Software migration is the process of migrating software applications and their related resources from one environment to another. This process often involves changes in related dependencies and settings such as configuration files. At this time, a reference file is needed for modifying the configuration files.
[0003] Currently, to modify the configuration file in the migration scenario, it is often necessary to first open the webpage of different repositories or build platforms, then enter the software name of the software to be migrated, roughly locate several successfully migrated software for reference from the many search results, then click on each successfully migrated software one by one and download the software package, then extract the corresponding reference configuration file from the software package, and then modify the configuration file of the software to be migrated according to the reference file.
[0004] However, since the software configuration files are scattered across various warehouse platforms, it is difficult for engineers to quickly and accurately locate the reference software from numerous platforms. In addition, the software obtained through search needs to be downloaded and extracted. Even if the configuration files obtained through search and download are of reference value, engineers still need to manually compare them to determine which codes need to be modified. The efficiency of the entire process is extremely low. Summary of the invention
[0005] The present invention provides a configuration file modification method, system, device and storage medium for a migration scenario, which are used to solve the defect of low efficiency in determining reference files in the prior art, and achieve efficient and rapid determination of reference files, thereby improving the modification efficiency of configuration files in the migration scenario.
[0006] The present invention provides a configuration file modification method for a migration scenario, comprising: Based on the configuration file of the software to be migrated, a reference file for difference comparison with the configuration file is determined; the reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple standard configuration files of successfully migrated software; Displaying the configuration file and the reference file on a display page at the same time, and performing format unification processing on the display page; highlighting the differences between the configuration file and the reference file; receiving a modification input of the configuration file made by a user based on the difference content; The configuration file is modified based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0007] According to a configuration file modification method for a migration scenario provided by the present invention, the performing of the unified format processing of the display page includes: Determining a plurality of first keywords that match the configuration file and the reference file; For each first keyword, if the first code line where the first keyword is located has two or more parallel values defined, a new second code line is displayed on the display page to replace the first code line; The number of the second code lines is the number of the parallel values, the keywords of the second code lines are all the first keywords, and the keyword value of the second code line is one of the more than two parallel values.
[0008] According to a configuration file modification method for a migration scenario provided by the present invention, the performing of the unified format processing of the display page includes: Determine a second keyword that matches the configuration file and the reference file; If the same patch file name exists in the third code line where the second keyword is located and the order of the patch file names is different, then based on the third code line in the configuration file, the third code line of the reference file is modified on the display page to make the third code lines of the configuration file and the reference file the same.
[0009] According to a configuration file modification method for a migration scenario provided by the present invention, the performing of the unified format processing of the display page includes: Determine a starting keyword that matches the configuration file and the reference file; Starting from the fourth code line where the starting keyword is located, scanning line by line until a fifth code line where the keyword does not belong to the file code block keyword list is scanned; Determine the file code blocks of the configuration file and the reference file based on the fourth code line and the fifth code line; Determining whether the keyword sequence of the file code block in the configuration file is consistent with the keyword sequence of the file code block in the reference file; If they are inconsistent, based on the keyword order of the file code blocks in the configuration file, the order of the code lines where the keywords of the file code blocks in the reference file are located is adjusted on the display page so that the keyword order of the file code blocks in the configuration file is consistent with the keyword order of the file code blocks in the reference file.
[0010] According to a configuration file modification method for a migration scenario provided by the present invention, the performing of the unified format processing of the display page includes: Scanning the configuration file line by line, and if the first empty code line is scanned, continuing to scan line by line until the first non-empty code line is scanned; Matching a second non-empty code line having the same value as the first non-empty code line in the reference file, and determining a second empty code line between the second non-empty code line and the previous non-empty code line; If the first number of empty code lines is not equal to the second number of empty code lines, the second non-empty code lines are adjusted on the display page according to the first number of lines so that the second number of lines is equal to the first number of lines.
[0011] According to a configuration file modification method for a migration scenario provided by the present invention, the configuration file of the software to be migrated is used to determine a reference file for difference comparison with the configuration file, including: Receive the software name and software version number of the configuration file input by the user; Based on the software name and software version number of the configuration file, determining a number of candidate reference files from the configuration reference file library; Displaying the candidate reference documents on the display page in descending order of relevance scores; The method further comprises receiving and responding to a file selection input from the user, and determining the candidate reference file selected by the user as the reference file.
[0012] According to a configuration file modification method for a migration scenario provided by the present invention, the file name of the standard configuration file of the successfully migrated software includes the software name and software version number of the successfully migrated software.
[0013] The present invention also provides a configuration file modification system for a migration scenario, comprising: The data layer includes a configuration reference file library, middleware and a search engine; the configuration reference file library is connected to the search engine via the middleware; The service layer includes a reference file determination module, a format uniform processing module, and a configuration file modification module; an operation layer, including a difference highlighting module and a user input receiving module; The reference file determination module is used to determine, based on the configuration file of the software to be migrated, a reference file for performing a difference comparison with the configuration file; The format unification processing module is used to display the configuration file and the reference file on a display page at the same time, and perform format unification processing on the display page; The difference highlighting module is used to highlight the difference content between the configuration file and the reference file; The user input receiving module is used to receive a modification input made by a user to the configuration file based on the difference content; The configuration file receiving module modifies the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, a configuration file modification method for any of the above migration scenarios is implemented.
[0015] The present invention also provides a non-transitory computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the configuration file modification method of any of the above migration scenarios is implemented.
[0016] The configuration file modification method, system, device and storage medium for the migration scenario provided by the present invention can quickly obtain the reference file of the configuration file of the software to be migrated without accessing each online software repository by pre-centralizing the standard configuration files of multiple successfully migrated software in a configuration reference file library; and by directly obtaining the configuration reference file in the configuration reference file library, it can save the time of extracting the configuration file after downloading the software package online, thereby improving the speed and efficiency of batch software migration. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0018] Figure 1 It is a flow chart of a configuration file modification method for a migration scenario provided by the present invention.
[0019] Figure 2 It is a structural schematic diagram of a configuration file modification system for a migration scenario provided by the present invention.
[0020] Figure 3 This is a structural example diagram of the data layer provided by the present invention.
[0021] Figure 4 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION
[0022] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0023] It should be noted that, in the description of the present invention, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also includes other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. For those of ordinary skill in the art, the specific meanings of the above terms in the present invention can be understood according to specific circumstances.
[0024] The terms "first", "second", etc. in the present invention are used to distinguish similar objects, and are not used to describe a specific order or sequence. It should be understood that the terms used in this way can be interchangeable under appropriate circumstances, so that the embodiments of the present invention can be implemented in an order other than those illustrated or described herein, and the objects distinguished by "first", "second", etc. are generally of the same type, and the number of objects is not limited. For example, the first object can be one or more.
[0025] Combine the following Figure 1-Figure 4 The present invention describes a configuration file modification method, system, device and storage medium for a migration scenario.
[0026] It should be noted that all actions of acquiring signals, information or data in the present invention are performed in compliance with the corresponding data protection laws and policies of the country where the device is located and with the authorization given by the owner of the corresponding device.
[0027] An effective strategy to improve the ecological environment of instruction set architectures is to migrate software that has been stable in other instruction set architectures and operating systems to the instruction set architecture that needs to improve the ecological environment, that is, software migration. Software migration requires migrating software applications and their related resources from one environment to another, which can occur between different computing platforms, architectures, operating systems, hardware environments, or cloud environments. Taking the RISC-V instruction set architecture as an example, by migrating software that has been stable in other instruction set architectures and operating systems to the RISC-V architecture, the basic software ecosystem of the RISC-V architecture can be quickly built and improved.
[0028] During the software migration process, changes to related dependencies and settings such as configuration files are often involved. Modifying the configuration files of the software to be migrated by referring to the configuration files of the software that has been adapted to the instruction set architecture and has been successfully migrated can improve the efficiency and accuracy of software migration.
[0029] However, in the related art of modifying the configuration files of the software to be migrated, there is a problem of lack of effective reference means, which can be mainly divided into three aspects.
[0030] First, the configuration files of successfully migrated software are often scattered across various software repositories or build platforms, making it difficult to quickly find configuration files for reference.
[0031] For example, software packages of different versions and distribution systems may all migrate to the RISC-V architecture, and the contents of configuration files in different software packages may change significantly. It is difficult for engineers to accurately locate the reference version from the build platforms of many operating systems.
[0032] Secondly, it often requires a lot of screening work to retrieve successful migration software for reference from various software repositories or build platforms.
[0033] For example, for most software repositories or build platforms, if you enter the software name of the software to be migrated on the platform, the search results will show all versions and all distribution system packages, so you need to filter the search results again to roughly locate the software that can be referenced. Then, when you need to migrate the software multiple times, you need to repeat the search and filter steps multiple times, making the search for reference files a very repetitive and difficult task.
[0034] Finally, the source code and configuration files of the successfully migrated software are generally included in the complete source code package of the successfully migrated software. Any configuration file requires multiple steps such as retrieval, screening, downloading, and extraction from the platform to obtain.
[0035] For example, to obtain a configuration file of a software that has been successfully migrated and adapted to the RISC-V architecture, you first need to open the webpage of different warehouses or build platforms, then enter the software name of the software to be migrated, roughly locate several successfully migrated software for reference from the many searched results, then click on each successfully migrated software one by one and download the software package, then extract the corresponding reference configuration file from the software package, and then modify the configuration file of the software to be migrated according to the reference file. On the one hand, since the source code of the successfully migrated software is stored in the build platform or warehouse, the specific code of the file cannot be previewed in the process of obtaining the configuration file, and it must be downloaded and extracted to know whether it has reference value, whether a new patch file (patch file) and other information. On the other hand, even if the configuration file downloaded by the search has reference value, it still requires manual comparison by engineering personnel to clarify which codes need to be modified, and the efficiency of the entire process is extremely low.
[0036] In view of this, the present invention provides a configuration file modification method, system, device and storage medium for a migration scenario to solve at least one of the aforementioned technical problems.
[0037] Figure 1 is a flow chart of a configuration file modification method for a migration scenario provided by the present invention, such as Figure 1 As shown, the configuration file modification method of the migration scenario includes but is not limited to the following steps 101 to 105.
[0038] It should be noted that the executor of the configuration file modification method for the migration scenario provided by the present invention is the configuration file modification system for the corresponding migration scenario, and the modification system can specifically be a server, a computer device, such as a mobile phone, a tablet computer, a laptop computer, a PDA, a vehicle-mounted electronic device, a wearable device, an ultra-mobile personal computer (Ultra-Mobile Personal Computer, UMPC), a netbook or a personal digital assistant (Personal Digital Assistant, PDA), etc.
[0039] Step 101: Based on a configuration file of the software to be migrated, a reference file for performing a difference comparison with the configuration file is determined.
[0040] The reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple standard configuration files for successful software migration; the standard configuration file is a configuration file that enables the software to be successfully migrated during the migration process.
[0041] Specifically, multiple software packages of successfully migrated software are obtained from various warehouses or construction platforms in advance, and then standard configuration files are extracted from the software packages, and the configuration reference file library is constructed using the standard configuration files of the successfully migrated software.
[0042] When actually migrating the software, first determine from the pre-built configuration reference file library a standard configuration file that will be compared with the configuration file of the software to be migrated, based on the software name of the software to be migrated, the file name of the configuration file, the software version number or the code snippet of the configuration file, as a reference file.
[0043] Take the migration of software in RPM (Red Hat Package Manager) format to RISC-V architecture as an example.
[0044] RPM is a popular software format and a common package management tool in Linux systems. It is used by many Linux distribution systems such as CentOS, Fedora, and openEuler under different instruction set architectures.
[0045] When migrating software in RPM format, the software to be migrated is an RPM package with the suffix .rpm. An RPM package corresponds to an RPM source package (SRPM). The RPM source package can generate an RPM package after compilation. One RPM source package can compile one or more RPM packages.
[0046] The RPM Spec file is the configuration file for the software to be migrated. It is a core component of the RPM software management system and is also the file with the suffix .spec in the RPM source code package. Generally, there is only one Spec file in an RPM source code package. The Spec file is a description file for creating an RPM package. It contains a lot of information about the RPM package, such as the name, version, category, description summary, what instructions to execute when creating the RPM package, what operations to perform when installing, and a list of files to be included in the RPM package, etc.
[0047] Migrating an RPM package requires modifying the RPM source package. Only through the RPM Spec can the RPM source package be built into an RPM package. Therefore, an important step in migrating an RPM package to the RISC-V architecture is to modify the RPM Spec file of the RPM package to adapt to the modifications when migrating the RPM package to the RISC-V architecture.
[0048] When users want to migrate RPM packages to the RISC-V architecture, they can enter any one of the following contents, such as the software name of the software RPM package to be migrated, the file name of the configuration file (i.e., RPM Spec file), the software version number, or the code snippet of the configuration file in the search box provided by the configuration file modification system in the migration scenario, and click the search option. The search engine of the modification system then matches the specification configuration file of the successfully migrated software in the configuration reference file library as a reference file.
[0049] For another example, a user can upload a complete configuration file RPM Spec file in the configuration file upload system area provided by the configuration file modification system in the migration scenario, and then the search engine of the modification system analyzes the complete configuration file and obtains a list of matching files to determine the most relevant specification configuration file for successfully migrating the software in the configuration reference file library as a reference file.
[0050] Among them, the left side of the matching file list page lists all operating systems or build platforms involved in the matching results, so that users can easily filter the corresponding operating systems or build platforms through the list on the left side of the page.
[0051] The right side of the matching file list page displays multiple matching results, each of which displays the RPM package name, version number information, data source, dependency information and other related information. When the user clicks on any matching result on the right side, the detailed information display page will be displayed, which will display the configuration file code of this RPM package and the included Patch file code. The user can upload the file to be modified through this page.
[0052] It is understandable that the reference file is a standard configuration file that has a certain correlation or similarity with the configuration file of the software to be migrated, and a standard configuration file that has no correlation or a correlation below a reasonable threshold has no reference significance for modifying the configuration file of the software to be migrated.
[0053] It is understandable that the configuration reference file library can be composed of different successfully migrated software in at least one software migration scenario such as different computing platforms, architectures, operating systems, hardware environments or cloud environments, and is not limited to a fixed specific migration scenario.
[0054] Step 102: Display the configuration file and the reference file on a display page at the same time, and perform format unification processing on the display page.
[0055] Specifically, after determining the reference file for difference comparison with the configuration file of the software to be migrated, the user uploads the configuration file to be migrated, and the configuration file modification system of the migration scenario uses the file comparison tool to display the reference file and the configuration file together on the display page. For the reference file and configuration file displayed on the display page, the modification system automatically performs format unification processing on the display page to display the configuration file and reference file after the format is unified.
[0056] For example, the display page is mainly divided into three parts. The top is a toolbar for providing function options for file comparison. Below the toolbar is two columns, the left column is used to display the detailed code of the reference file, and the right column is used to display the detailed code of the configuration file of the software to be migrated.
[0057] Step 103: highlighting the difference between the configuration file and the reference file.
[0058] Specifically, for the configuration files and reference files displayed on the display page, the file comparison tool equipped in the configuration file modification system of the migration scenario will automatically display the differences between the configuration files and the reference files, and highlight the differences between the two to prompt the user to modify the configuration files based on the highlighted differences.
[0059] Optionally, the difference between the configuration file and the reference file is highlighted by code difference display (such as different colors), for example, using red code to display the code before modification in the reference file, and using green code to display the code after modification in the reference file.
[0060] Step 104: receiving a modification input made by a user to the configuration file based on the difference content.
[0061] Specifically, the display page highlights the difference content between the configuration file and the reference file, the user modifies the configuration file based on the highlighted difference content, and the configuration file modification system of the migration scenario receives the modification input made by the user.
[0062] Optionally, the modification attribute of the area displaying the configuration file in the display page is set to be modifiable, so that the user can directly modify the configuration file in real time in the display page; the modification attribute of the area displaying the reference file in the display page is set to be non-modifiable, so as to prevent the user from accidentally modifying the reference file.
[0063] Step 105: modifying the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0064] Specifically, after receiving the modification input made by the user to the configuration file based on the difference content, the user's modification is directly retained on the configuration file based on the modification input, or the configuration file is copied to obtain a configuration file copy, and the user's modification is retained on the configuration file copy to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0065] The configuration file modification method for the migration scenario provided by the present invention can quickly obtain the reference file of the configuration file of the software to be migrated by pre-centralizing the standard configuration files of multiple successfully migrated software in a configuration reference file library without accessing each online software repository; and by directly obtaining the configuration reference file in the configuration reference file library, it can save the time of extracting the configuration file after downloading the software package online, thereby improving the speed and efficiency of batch software migration.
[0066] In addition, the present invention also automatically compares the configuration file and the reference file by utilizing a file comparison tool, and highlights the difference contents between the configuration file and the reference file, so as to help the user modify the configuration file of the software to be migrated according to the highlighted difference contents; and, since the configuration files of different software often have format differences due to the different code writing styles of developers, when the configuration file and the reference file are displayed by utilizing a file comparison tool, format unification processing is also performed on the display page for the configuration file and the reference file, so as to avoid the same code content being erroneously displayed as difference contents due to different formats, thereby reducing the time for the user to identify the erroneously displayed difference contents, thereby improving the modification speed and modification efficiency of the configuration file.
[0067] In one embodiment, taking the migration of RPM software to RISC-V architecture as an example, the configuration reference file library is established based on the following steps: The specification configuration files in the configuration reference file library are determined based on RPM Spec files that are successfully built on the RISC-V architecture in six different repositories or platforms based on three Linux distributions.
[0068] The three Linux distributions include Fedora, openSUSE and openEuler. The standard configuration files of Fedora are obtained from the Fedora official repository, iscas-openkoji build platform and fedora-koji build platform. The standard configuration files of openSUSE are obtained from the OBS (Open Build System) build platform. The standard configuration files of openEuler are obtained from Gitee.
[0069] For the iscas-openkoji build platform and the fedora-koji build platform, since the successfully migrated software on these two platforms is stored in the form of SRPM, when obtaining the specification configuration file from the iscas-openkoji build platform and the fedora-koji build platform, first filter out all SRPM packages built on RISC-V, and then build the packages with the State of complete on the Builds page on the platform page. After downloading the SRPM package to the local computer, use the RPM tool to decompress and extract the RPM Spec file.
[0070] For the openEuler platform, unlike the iscas-openkoji build platform and the fedora-koji build platform, the openEuler platform stores the files in the software package directly on the Gitee open source code hosting platform, so you can directly use the file list link of the master branch of each RPM package on the Gitee platform to obtain the RPM Spec file and its related files. Specifically, it includes: scanning the warehouse page, obtaining the RPM package list, and downloading them one by one using git clone. Since there is a small amount of non-RPM software packages in the data stored on the Gitee platform, the data of non-RPM packages is deleted after downloading.
[0071] For the Fedora platform, the src-fedora data is stored in the git repository officially built by Fedora. The method of obtaining data is the same as that of openEuler. You can directly use the file list link of the master branch to obtain the RPM Spec file and its related files, that is, scan the repository page, obtain the RPM package list, and use git clone to download them one by one.
[0072] For OpenSUSE data, obtain it from the RISC-V build repository in the OBS build platform. You can use the osc command line tool to clone the entire repository.
[0073] Table 1 is a table of the number of specification configuration files from various sources in the configuration reference file library provided by the present invention. As shown in Table 1, the Git repository is the git repository corresponding to the constructed SRPM package, the SRPM package is the software package successfully built on RISC-V, Spec is the Spec file extracted from the successfully built SRPM package, Patch is the Patch file extracted from the successfully built SRPM package, and the build information is the key information of the successfully built SRPM package and the detailed information of the build system.
[0074] Table 1
[0075] When the number of standard configuration files in the configuration reference file library is closer to the number of configuration files stored in real time in the software warehouse, that is, the coverage rate is higher, the configuration file modification method representing the migration scenario provided by the present invention can cover more specific migration scenarios and has higher applicability.
[0076] Furthermore, the data update function of the configuration reference file library is triggered regularly according to a preset frequency (such as once a day), and the specific steps include: Data monitoring: monitor the newly generated successfully migrated software data on the software warehouse and maintain a list locally. The list contains the hash value of the commit corresponding to the software name of the successfully migrated software that has been obtained. The format of each data name is "SRPM package name + version value + release value". Check whether there is new data based on the hash value at regular intervals every day, and then decide whether to start the data acquisition program; Data extraction, extract RPM Spec file and Patch file from SRPM package; Data cleaning, deleting redundant files during SRPM package extraction, and deleting SRPM packages; Data storage, storing the acquired data in a locally maintained list and configuration reference file library.
[0077] Based on the above embodiment, as an optional embodiment, the performing of the unified format processing of the display page includes: Determining a plurality of first keywords that match the configuration file and the reference file; For each first keyword, if the first code line where the first keyword is located has two or more parallel values defined, a new second code line is displayed on the display page to replace the first code line; The number of the second code lines is the number of the parallel values, the keywords of the second code lines are all the first keywords, and the keyword value of the second code line is one of the more than two parallel values.
[0078] The first keyword is a keyword that appears in the configuration file and the reference file and matches the keyword in the first keyword list. When the first keyword appears in the configuration file and the reference file, it means that the code line where the first keyword is located in the configuration file and the reference file needs to be split and parallelized on the display page to obtain the value in a unified format.
[0079] It can be understood that, according to the characteristics of different keywords in the configuration file, a first keyword list consisting of a plurality of first keywords can be predetermined.
[0080] Specifically, when the file comparison tool is used to perform format unification processing on the configuration file and the reference file in the display page, regular matching is used for the configuration file and the reference file, and the matched keyword is the first keyword in the first keyword list.
[0081] When the configuration file and the reference file match several first keywords, for each first keyword, a determination is made as to whether parallel values are defined. If the first code line where the first keyword is located defines more than two parallel values, the parallel values are split and a new second code line is displayed on the display page to replace the first code line.
[0082] Among them, the keywords of the second code line and the first code line are both the matched first keywords, the number of rows is the number of parallel values defined by the first keyword in the first code line, and the keyword value of each second code line is one of the parallel values in the first code line.
[0083] It can be understood that the first code line is the code line on the display page that has not been processed by the unified format of splitting and parallel values, and the second code line is the code line on the display page that has been processed by the unified format of splitting and parallel values. The number of lines of the first code line is 1 line or more, and the number of lines of the second code line is 2 lines or more. The specific number of lines is also determined according to the number of parallel values of the first keyword.
[0084] Taking RPM Spec files as an example, RPM Spec files of different Linux distributions may have different formats due to the code writing style of the developer. When using the diff function for file comparison, the same code content may be incorrectly displayed as different parts due to different formats. For example, the code line (1) in the configuration file and the code line (2) (3) in the reference file express the same meaning, but the diff result will incorrectly display the two lines of code as different codes, thus displaying the two lines of code as different content, so that users need to spend extra time to identify the code lines that are incorrectly displayed as different content.
[0085] BuildRequires: make gcc; (1)
[0086] BuildRequires: make; (2)
[0087] BuildRequires: gcc; (3)
[0088] Therefore, it is necessary to unify the code format of the RPM Spec file, that is, to perform unified processing on the format of splitting and parallel value taking on the code line (1) where the first keyword BuildRequires in the configuration file is located on the display page, and split it into code lines as shown in code lines (2)(3) in the reference file, so that the code lines where the keyword BuildRequires is located in the configuration file and the reference file will not be highlighted as different content.
[0089] Optionally, the BuildRequires first keyword is in the first keyword list, and the complete first keyword list includes 10 first keywords: [BuildRequires, Conflicts, Provides, Requires, License, ExclusiveOS, ExcludeOS, ExclusiveArch, ExcludeArch, Conflicts].
[0090] The configuration file modification method for the migration scenario provided by the present invention can avoid that the code lines in the configuration file and the reference file with the same keywords and the same values but with parallel value definitions are highlighted as difference contents by splitting the matching first keywords in the configuration file and the reference file on the display page, and will not cause interference when the user modifies the code, and reduces the time for the user to identify the erroneously displayed difference contents, thereby improving the modification speed and modification efficiency of the configuration file.
[0091] Based on the above embodiment, as an optional embodiment, the performing of the unified format processing of the display page includes: Determine a second keyword that matches the configuration file and the reference file; If the same patch file name exists in the third code line where the second keyword is located and the order of the patch file names is different, then based on the third code line in the configuration file, the third code line of the reference file is modified on the display page to make the third code lines of the configuration file and the reference file the same.
[0092] A patch file, also known as a Patch file, is a text file that records the differences between two files or directory trees. Taking the RPM Spec file as an example, each Linux distribution generally uses the Patch file to modify the source code, and the RPM Spec file controls the application of the Patch file. During the software migration process, adapting and modifying the code in the RPM Spec file that controls the application of the Patch file is also the key to ensure the success of the software migration.
[0093] The second keyword is a patch file keyword that appears in the configuration file and the reference file. When the second keyword appears in the configuration file and the reference file, it means that the format of patch file name order adjustment needs to be performed on the display page for the code lines in the reference file where the second keyword is located and the same patch file name exists but the order of the patch file names is different.
[0094] The third code line is the code line in the configuration file and the reference file that defines the value of the second keyword.
[0095] Specifically, the configuration file and the reference file are scanned line by line, and the second keyword is matched regularly. If the third code line where the second keyword is located in the configuration file and the reference file has the same patch file name but a different order, then according to the order of the patch file names in the third code line in the configuration file, the order of the patch file names in the third code line in the reference file is modified on the display page, so that the third code lines of the configuration file and the reference file are the same and will not be highlighted as different content on the display page.
[0096] The configuration file modification method for a migration scenario provided by the present invention matches patch file keywords that appear in both the configuration file and the reference file, and when a situation occurs in which the patch file names are the same but in a different order in the code line where the patch file keywords are located, adjusts the order of the patch file names in the code line of the reference file on a display page, so that the code lines where the patch file keywords are located in the configuration file and the reference file are consistent, avoid being highlighted as difference content, do not cause interference when the user modifies the code, reduce the time for the user to identify the difference content that is displayed incorrectly, and thus improve the modification speed and modification efficiency of the configuration file.
[0097] Based on the above embodiment, as an optional embodiment, the performing of the unified format processing of the display page includes: Determine a starting keyword that matches the configuration file and the reference file; Starting from the fourth code line where the starting keyword is located, scanning line by line until a fifth code line where the keyword does not belong to the file code block keyword list is scanned; Determine the file code blocks of the configuration file and the reference file based on the fourth code line and the fifth code line; Determining whether the keyword sequence of the file code block in the configuration file is consistent with the keyword sequence of the file code block in the reference file; If they are inconsistent, based on the keyword order of the file code blocks in the configuration file, the order of the code lines where the keywords of the file code blocks in the reference file are located is adjusted on the display page so that the keyword order of the file code blocks in the configuration file is consistent with the keyword order of the file code blocks in the reference file.
[0098] The start keyword is the first keyword in a file's code block that is predetermined.
[0099] The file code block keyword list is a predetermined keyword for each code line in the file code block.
[0100] Optionally, the starting keyword is the %files keyword, and the %files keyword is the starting position of the file code block.
[0101] Optionally, the file code block keyword list includes but is not limited to 10 keywords [prep, package, build, post, preun, postun, config, clean, changelog, files].
[0102] Specifically, the user file and the reference file are scanned line by line, and the start keyword is matched regularly. After the start keyword is matched, the scanning starts from the code line where the start keyword is located, that is, the fourth code line, until the code line where the keyword does not belong to the file code block keyword list is scanned, that is, the fifth code line. The previous code line of the fifth code line is determined as the end position of the file code block, thereby determining the file code block of the configuration file and the reference file.
[0103] It is further determined whether the keyword sequence of the file code blocks in the configuration file is consistent with the keyword sequence of the file code blocks in the reference file. If not, the sequence of the code lines where the keywords of the file code blocks in the reference file are located is adjusted on the display page according to the keyword sequence of the file code blocks in the configuration file, and then the keyword sequence is adjusted to make the keyword sequence of the file code blocks in the configuration file and the reference file consistent.
[0104] The configuration file modification method for the migration scenario provided by the present invention takes the keyword sequence of the file code block in the configuration file as the standard, and adjusts the code line of the reference file code block on the display page, so that the keyword sequence of the file code block in the configuration file and the reference file is consistent, and the related code is not erroneously highlighted as difference content due to the same keyword values and different keyword sequences in the file code blocks, thereby avoiding interference when the user modifies the code, reducing the time for the user to identify the erroneously displayed difference content, and thus improving the modification speed and modification efficiency of the configuration file.
[0105] Based on the above embodiment, as an optional embodiment, the performing of the unified format processing of the display page includes: Scanning the configuration file line by line, and if the first empty code line is scanned, continuing to scan line by line until the first non-empty code line is scanned; Matching a second non-empty code line having the same value as the first non-empty code line in the reference file, and determining a second empty code line between the second non-empty code line and the previous non-empty code line; If the first number of empty code lines is not equal to the second number of empty code lines, the second non-empty code lines are adjusted on the display page according to the first number of lines so that the second number of lines is equal to the first number of lines.
[0106] Specifically, the format unification process of the display page also includes a blank line alignment process. Specifically, the configuration file is scanned line by line, if the first blank code line is scanned on the configuration file, the first non-blank code line is scanned continuously, and the value of the first non-blank code line and the first line number of the first blank code line are recorded.
[0107] A second non-empty code line with the same value as the first non-empty code line is matched in the reference file, and the empty lines before the second non-empty code line in the reference file, that is, the second empty code lines between the second non-empty code line and the previous non-empty code line, are counted to determine the second line number of the second empty code line.
[0108] Determine whether the first line number is equal to the second line number. If so, no processing is performed. If not, add or delete the number of the second empty code line on the display page based on the first line number of the first empty code line in the configuration file, so that the number of empty code lines in the configuration file and the reference file is the same.
[0109] The configuration file modification method for the migration scenario provided by the present invention scans the empty code lines in the configuration file and the reference file line by line, and adds or deletes the empty code lines of the reference file on the display page, so that the number of empty code lines in the configuration file and the reference file is the same, which can avoid the same code being erroneously highlighted as different content due to the different number of empty code lines in the configuration file and the reference file, and will not cause interference when the user modifies the code, reducing the time for the user to identify the erroneously displayed different content, thereby improving the modification speed and modification efficiency of the configuration file.
[0110] It can be understood that when performing format unification processing of the display page, it can be performed separately or in combination with at least one of the format unification processing of splitting and parallel value taking, patch file name order adjustment, file code block keyword order adjustment and blank line alignment mentioned in the above embodiments.
[0111] In one embodiment, the format unification processing of executing the display page includes: first executing the format unification processing of blank line alignment, and then executing the format processing steps of splitting and parallel value taking, patch file name order adjustment and file code block keyword order adjustment. The specific processing order of the three format processing steps of splitting and parallel value taking, patch file name order adjustment and file code block keyword order adjustment can be set according to needs.
[0112] Based on the above embodiment, as an optional embodiment, the step of determining a reference file for performing a difference comparison with the configuration file based on the configuration file of the software to be migrated includes: Receive the software name and software version number of the configuration file input by the user; Based on the software name and software version number of the configuration file, determining a number of candidate reference files from the configuration reference file library; Displaying the candidate reference documents on the display page in descending order of relevance scores; The method further comprises receiving and responding to a file selection input from the user, and determining the candidate reference file selected by the user as the reference file.
[0113] The software version number consists of one or more version numbers such as the release system version number, update version number, etc.
[0114] Specifically, taking the RPM Spec file as the configuration file of the software to be migrated as an example, the file name of the RPM Spec file generally includes the software name and software version number of the corresponding software to be migrated. When determining the reference file, the software name and software version number of the RPM Spec file input by the user in the search input receiving module of the operation layer of the configuration file modification system of the migration scenario are received.
[0115] The search engine of the data layer in the configuration file modification system of the migration scenario finds several candidate reference files in the configuration reference file library according to the software name and software version number of the RPM Spec file, and displays several candidate reference files on the display page in descending order of the relevance score of each candidate reference file according to the relevance analysis function of the search engine. If no relevant candidate reference file is found, a pop-up window will be displayed to prompt the user that the software name and software version number entered by the user are not included or are incorrectly entered.
[0116] After the user makes a file selection input for screening candidate reference files by clicking, box selection, etc., the configuration file modification system of the migration scenario receives and responds to the user's file selection input and determines the candidate reference file selected by the user as the RPM Spec reference file for difference comparison.
[0117] Optionally, when matching candidate reference files, either an exact matching method or a fuzzy matching method may be used.
[0118] Optionally, after receiving and responding to the user's file selection input, you can also enter the details page of the reference file, and the detailed code corresponding to the reference file, related patch files and patch files, etc. can be displayed on the details page.
[0119] The configuration file modification method for the migration scenario provided by the present invention matches a number of standard configuration files available for reference in the configuration reference file library as candidate reference files according to the software name and software version number of the configuration file input by the user, and displays the candidate reference files to the user in descending order according to the relevance scores. When the user determines the candidate reference files according to the relevance scores, the user can intuitively select the reference files with reference value without having to manually compare all relevant candidate reference files to find out the most appropriate reference files, which saves the time for screening reference files, thereby improving the speed and efficiency of software migration, especially batch software migration.
[0120] Based on the above embodiment, as an optional embodiment, the file name of the standard configuration file of the successfully migrated software includes the software name and software version number of the successfully migrated software.
[0121] Specifically, multiple software packages of successfully migrated software are obtained from different warehouses or construction platforms, and then standard configuration files are extracted from the software packages. When these standard configuration files of successfully migrated software are used to build a configuration reference file library, the file name of each standard configuration file of successfully migrated software is named the software name and software version number of the corresponding successfully migrated software.
[0122] The configuration file modification method for the migration scenario provided by the present invention takes into account that when migrating software, it is often necessary to modify the configuration file for different release systems and different update versions. Therefore, when building a configuration reference file library, the file name of the configuration file is set to the software name and software version number of the successfully migrated software, which can improve the speed and efficiency of matching candidate reference files with the same name and version, and speed up the efficiency of configuration file modification.
[0123] Generally speaking, the configuration file modification method for the migration scenario provided by the present invention is to understand the problems of low efficiency and high error rate of configuration file modification during software migration. It collects and organizes the standard configuration files, patch files, build information and other information of the successfully migrated software in advance, and provides visualization, retrieval and difference highlighting, file comparison, online code editing and other means, which optimizes the process of obtaining reference files for migrating software, shortens the migration preparation link of configuration file modification, and improves the efficiency of software migration.
[0124] Figure 2 is a schematic diagram of the structure of the configuration file modification system for the migration scenario provided by the present invention, such as Figure 2 As shown, the configuration file modification system of the migration scenario includes but is not limited to a data layer 210 , a service layer 220 and an operation layer 230 .
[0125] The data layer 210 includes but is not limited to a configuration reference file library 211 , a middleware 212 and a search engine 213 ; the configuration reference file library 211 and the search engine 213 are connected via the middleware 212 .
[0126] The service layer 220 includes, but is not limited to, a reference file determination module 221 , a format uniform processing module 222 , and a configuration file modification module 223 .
[0127] The operation layer 230 includes, but is not limited to, a difference highlighting module 231 and a user input receiving module 232 .
[0128] The reference file determination module 221 is used to determine, based on the configuration file of the software to be migrated, a reference file for performing a difference comparison with the configuration file.
[0129] A format unification processing module 222, used to display the configuration file and the reference file on a display page at the same time, and perform format unification processing on the display page; A difference highlighting module 231 is used to highlight the difference between the configuration file and the reference file; A user input receiving module 232, configured to receive a modification input made by a user to the configuration file based on the difference content; The configuration file receiving module 223 modifies the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0130] The configuration file modification system of the migration scenario is mainly composed of a data layer 210, a service layer 220 and an operation layer 230, and each layer cooperates with each other to achieve the goal together.
[0131] As the cornerstone of the configuration file modification system in the migration scenario, the data layer 210 is responsible for data storage, data synchronization, and index construction.
[0132] The service layer 220 is mainly implemented in the backend and plays a core role in processing the main business logic in the configuration file modification system of the migration scenario. In order to ensure the efficient operation and stability of the system, the service layer 220 can use Go language as the main language of the server, which is mainly responsible for implementing various functions.
[0133] The operation layer 230 is an interface for direct interaction with the user and can be implemented in the form of a web page. The web page is built with Vue3 and various components, and specifically implements visual operations such as data search and data screening, and can realize online comparison of code web pages, real-time modification, and code highlighting.
[0134] Optionally, the configuration reference file library is constructed based on a relational database management system such as MySQL, and can achieve persistent storage.
[0135] Optionally, the middleware is Canal middleware.
[0136] Optionally, the search engine is an ElasticSearch search data analysis engine, which can achieve fast search.
[0137] Figure 3 is a diagram showing an example structure of the data layer provided by the present invention, such as Figure 3 As shown, the MySQL-based configuration reference file library 301 and the ElasticSearch search data analysis engine 302 are connected through the Canal middleware 303. When the configuration reference file library performs operations such as addition, deletion, modification, and query, the Canal middleware 303 can capture the binlog generated by these operations in real time, and synchronize the binlog to the ElasticSearch search data analysis engine 302, so that the MySQL-based configuration reference file library 301 and the ElasticSearch search data analysis engine 302 can achieve data synchronization through the Canal middleware 303.
[0138] Optionally, the configuration file modification system for the migration scenario is further integrated with a file comparison tool.
[0139] Optionally, it also includes a search input receiving module for receiving the software name and software version number of the configuration file input by the user; and for accepting the file selection input of the user to determine the candidate reference file selected by the user as the reference file.
[0140] It should be noted that the configuration file modification system for migration scenarios provided by the present invention can execute the configuration file modification method for migration scenarios described in any of the above embodiments during specific operation, which will not be described in detail in this embodiment.
[0141] The configuration file modification system for the migration scenario provided by the present invention can quickly obtain the reference files of the configuration files of the software to be migrated without accessing each online software repository by pre-centralizing the standard configuration files of multiple successfully migrated software in a configuration reference file library; and by directly obtaining the configuration reference files in the configuration reference file library, it can save the time of extracting the configuration files after downloading the software package online, thereby improving the speed and efficiency of batch software migration.
[0142] Figure 4 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 4 As shown, the electronic device may include: a processor (Processor) 410, a communication interface (Communications Interface) 420, a memory (Memory) 430 and a communication bus 440, wherein the processor 410, the communication interface 420, and the memory 430 communicate with each other through the communication bus 440. The processor 410 may call the logic instructions in the memory 430 to execute the configuration file modification method for the migration scenario provided in any of the above embodiments, and the configuration file modification method for the migration scenario includes but is not limited to the following steps: based on the configuration file of the software to be migrated, determining a reference file for difference comparison with the configuration file; the reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple standard configuration files of successfully migrated software; displaying the configuration file and the reference file on a display page at the same time, and performing format unification processing on the display page; highlighting the difference content between the configuration file and the reference file; receiving a modification input made by a user to the configuration file based on the difference content; modifying the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0143] In addition, the logic instructions in the above-mentioned memory 430 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention can be essentially or partly embodied in the form of a software product that contributes to the prior art. 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 method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM), random access memory (RAM), disk or optical disk, etc., various media that can store program codes.
[0144] On the other hand, the present invention also provides a computer program product, which includes a computer program, which can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the configuration file modification method for the migration scenario provided in any of the above embodiments, and the configuration file modification method for the migration scenario includes but is not limited to the following steps: based on the configuration file of the software to be migrated, determining a reference file for difference comparison with the configuration file; the reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple standard configuration files of successfully migrated software; displaying the configuration file and the reference file on a display page at the same time, and performing format unification processing on the display page; highlighting the difference content between the configuration file and the reference file; receiving modification input made by the user to the configuration file based on the difference content; modifying the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0145] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the configuration file modification method for the migration scenario provided in any of the above-mentioned embodiments, the configuration file modification method for the migration scenario including but not limited to the following steps: based on the configuration file of the software to be migrated, determining a reference file for difference comparison with the configuration file; the reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple standard configuration files of successfully migrated software; displaying the configuration file and the reference file on a display page at the same time, and performing format unification processing on the display page; highlighting the difference content between the configuration file and the reference file; receiving modification input made by a user to the configuration file based on the difference content; modifying the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
[0146] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Those of ordinary skill in the art may understand and implement it without creative work.
[0147] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0148] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for modifying a configuration file in a migration scenario, characterized in that: include: Based on the configuration file of the software to be migrated, determining a reference file for performing difference comparison with the configuration file; The reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple specification configuration files of successfully migrated software; Displaying the configuration file and the reference file on a display page at the same time, and performing format unification processing on the display page; highlighting the differences between the configuration file and the reference file; receiving a modification input of the configuration file made by a user based on the difference content; The configuration file is modified based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
2. The method for modifying a configuration file of a migration scenario according to claim 1, characterized in that: The performing of the unified format processing of the display page includes: Determining a plurality of first keywords that match the configuration file and the reference file; For each first keyword, if the first code line where the first keyword is located has two or more parallel values defined, a new second code line is displayed on the display page to replace the first code line; The number of the second code lines is the number of the parallel values, the keywords of the second code lines are all the first keywords, and the keyword value of the second code line is one of the more than two parallel values.
3. The method for modifying a configuration file of a migration scenario according to claim 1, characterized in that: The performing of the unified format processing of the display page includes: Determine a second keyword that matches the configuration file and the reference file; If the same patch file name exists in the third code line where the second keyword is located and the order of the patch file names is different, then based on the third code line in the configuration file, the third code line of the reference file is modified on the display page to make the third code lines of the configuration file and the reference file the same.
4. The method for modifying a configuration file of a migration scenario according to claim 1, characterized in that: The performing of the unified format processing of the display page includes: Determine a starting keyword that matches the configuration file and the reference file; Starting from the fourth code line where the starting keyword is located, scanning line by line until a fifth code line where the keyword does not belong to the file code block keyword list is scanned; Determine the file code blocks of the configuration file and the reference file based on the fourth code line and the fifth code line; Determining whether the keyword sequence of the file code block in the configuration file is consistent with the keyword sequence of the file code block in the reference file; If they are inconsistent, based on the keyword order of the file code blocks in the configuration file, the order of the code lines where the keywords of the file code blocks in the reference file are located is adjusted on the display page so that the keyword order of the file code blocks in the configuration file is consistent with the keyword order of the file code blocks in the reference file.
5. The method for modifying a configuration file of a migration scenario according to claim 1, characterized in that: The performing of the unified format processing of the display page includes: Scanning the configuration file line by line, and if the first empty code line is scanned, continuing to scan line by line until the first non-empty code line is scanned; Matching a second non-empty code line having the same value as the first non-empty code line in the reference file, and determining a second empty code line between the second non-empty code line and the previous non-empty code line; If the first number of empty code lines is not equal to the second number of empty code lines, the second non-empty code lines are adjusted on the display page according to the first number of lines so that the second number of lines is equal to the first number of lines.
6. The method for modifying a configuration file of a migration scenario according to claim 1, characterized in that: The step of determining a reference file for performing a difference comparison with the configuration file of the software to be migrated based on the configuration file of the software to be migrated includes: Receive the software name and software version number of the configuration file input by the user; Based on the software name and software version number of the configuration file, determining a number of candidate reference files from the configuration reference file library; Displaying the candidate reference documents on the display page in descending order of relevance scores; The method further comprises receiving and responding to a file selection input from the user, and determining the candidate reference file selected by the user as the reference file.
7. The method for modifying a configuration file of a migration scenario according to claim 6, characterized in that: The file name of the standard configuration file of the successfully migrated software includes the software name and software version number of the successfully migrated software.
8. A configuration file modification system for a migration scenario, characterized in that: include: The data layer includes the configuration reference file library, middleware, and search engine; The configuration reference file library is connected to the search engine via the middleware; The service layer includes a reference file determination module, a format uniform processing module, and a configuration file modification module; an operation layer, including a difference highlighting module and a user input receiving module; The reference file determination module is used to determine, based on the configuration file of the software to be migrated, a reference file for performing a difference comparison with the configuration file; The reference file is extracted from a pre-built configuration reference file library; the configuration reference file library includes multiple specification configuration files of successfully migrated software; The format unification processing module is used to display the configuration file and the reference file on a display page at the same time, and perform format unification processing on the display page; The difference highlighting module is used to highlight the difference content between the configuration file and the reference file; The user input receiving module is used to receive a modification input made by a user to the configuration file based on the difference content; The configuration file receiving module modifies the configuration file based on the modification input to obtain a standard configuration file that can successfully migrate the software to be migrated.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the configuration file modification method for the migration scenario according to any one of claims 1 to 7 is implemented.
10. A non-transitory computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the configuration file modification method of the migration scenario according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Configuration file management method and device, computer device and storage medium
CN110196725A
Service configuration modification method, terminal and computer readable storage medium
CN113220271A
Configuration file updating method and device, equipment, storage medium and product
CN116760706A
System and method for migration of software
US20040068715A1
Method and apparatus of software migration
US20100031251A1