Application compatibility detection method and system for domestic software and hardware environment migration

Through the application compatibility detection method for the migration of domestic software and hardware environments, the functional stability and compatibility issues in the migration of domestic software and hardware environments are solved, automated detection and efficient migration are achieved, and the quality and consistency of applications after migration are ensured.

CN115934164BActive Publication Date: 2025-09-26GUANGDONG POWER GRID CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202211519049.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-11-30
Publication Date
2025-09-26
Estimated Expiration
2042-11-30

AI Technical Summary

Technical Problem

During the migration of domestic software and hardware environments, it is difficult to ensure the functional stability and performance of the business system after migration, and the overall integration of compatibility and adaptation between different domestic products is not high, which makes it difficult to ensure information security and application consistency during the migration process.

Method used

This paper provides an application compatibility testing method for migrating domestic software and hardware environments, including performance benchmark testing, application migration analysis, cross-browser compatibility testing, and data compatibility testing. The test toolkit and detection module are installed through the Docker virtual container to perform multi-dimensional automated testing and generate a detection report.

Benefits of technology

It realizes automated compatibility testing during the migration process of domestic environments, ensures the quality and consistency of applications after migration, reduces manpower and material resources, improves migration efficiency, and meets the flexible testing requirements of complex business needs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115934164B_ABST
    Figure CN115934164B_ABST
Patent Text Reader

Abstract

The present invention relates to an application compatibility detection method and system for migrating domestic software and hardware environments. The method comprises: after migrating a non-domestic software and hardware environment to a domestic software and hardware environment, installing the software toolkit, dependency library, and auxiliary tool software required for testing in a Docker virtual container according to the test requirements and the relevant configuration of the domestic software and hardware environment, completing the deployment of an application compatibility detection module in the domestic software and hardware environment, and automatically implementing performance benchmark testing, application migration analysis testing, application cross-browser compatibility testing, and data compatibility testing of the migrated domestic software and hardware environment, and generating corresponding test reports. The method provided by the present invention meets the multi-faceted compatibility detection requirements of the business system during the domestic migration process, ensures the quality of the migrated application, and improves the migration efficiency.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to an application compatibility detection method and system for migrating domestic software and hardware environments. Background Art

[0002] In recent years, information security incidents have occurred frequently, and my country's information security is facing unprecedented challenges. Consequently, the country has increasingly emphasized the importance of information security and the independent and controllable IT environment. Domestication is key to building independent and controllable information security systems. In the information technology sector, replacing commercially available foreign products with domestically produced products has become a national strategic security imperative. With the continuous development of domestically produced basic software and hardware, significant breakthroughs have been achieved in key domestically produced and controllable software and hardware technologies. The availability of these basic software and hardware products has greatly improved, providing a solid foundation for application integration based on domestic software and hardware platforms. However, due to a lack of application-driven and top-level design for these basic software and hardware products, different products initially developed independently. This lack of demand-driven and top-level planning in technology selection and product design decisions has resulted in low levels of overall compatibility and integration between domestically produced software and hardware products. In typical application scenarios such as transportation and e-government, the complexity of actual business systems makes it difficult to ensure that the functional stability and performance of the migrated business systems meet business requirements. Therefore, during application migration to domestic environments, how to assist in the selection of domestically produced software and hardware and ensure functional consistency before and after migration has become a pressing issue. Summary of the Invention

[0003] In order to solve the above technical problems, the present invention provides an application compatibility detection method and system for migrating domestic software and hardware environments.

[0004] The technical solution of the present invention is: an application compatibility detection method for migrating domestic software and hardware environments, comprising:

[0005] Step S1: After migrating the non-domestic software and hardware environment to the domestic software and hardware environment, according to the test requirements and the relevant configuration of the domestic software and hardware environment, the software toolkit, dependency library and auxiliary tool software required for the test are installed in the Docker virtual container, and the application compatibility detection module is deployed; wherein the application compatibility detection module includes: a performance benchmark detection module, an application migration analysis detection module, an application cross-browser compatibility detection module and a data compatibility detection module;

[0006] Step S2: Using the performance benchmark detection module, perform multi-dimensional testing on the basic software and hardware performance in the domestic software and hardware environment after migration according to performance indicators; wherein the performance indicators are inspection items for the performance of the domestic software and hardware environment; the performance tests include: memory stability test, disk performance test, network performance test, stress test, benchmark performance test, and processor performance test;

[0007] Step S3: Using the application migration analysis and detection module, according to the configuration indicators and the customized code scanning rule base, analyze and detect the migrated application, find potential code problems and propose strategies and suggestions for solving the problems;

[0008] Step S4: Apply the cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing and analysis testing manner:

[0009] Step S5: a data compatibility detection module performs a test to verify whether the query conditions and corresponding query results of the database before and after migration are consistent;

[0010] Step S6: Generate a corresponding test report based on the test results of the performance benchmark test module, the application migration analysis test module, the application cross-browser compatibility test module and the data compatibility test module according to a predefined report template.

[0011] Compared with the prior art, the present invention has the following advantages:

[0012] 1. The present invention discloses an application compatibility detection method for migrating domestic software and hardware environments. The method is suitable for application migration from non-domestic environments to domestic environments, actively responds to the national strategic security needs of replacing foreign commercial products with independent domestic products, ensures the security of information during application migration, meets the multi-faceted compatibility detection needs of business systems during the domestic migration process, and ensures the quality of applications after migration. At the same time, the system's automated compatibility detection reduces manpower and material resources and greatly improves migration efficiency.

[0013] 2. The multi-dimensional tests of memory test, disk performance test, network performance test, stress test, benchmark performance test and processor performance test in the benchmark test module of the present invention are all automated tests, and users can flexibly choose according to actual test needs. According to the predefined weights and formulas, the system automatically extracts the key information of the results of each module and calculates the score according to the weights. After the test is completed, the test results will be recorded and output as a report with pictures and texts according to the predefined template. The multi-dimensional and self-selectable test items of this module are suitable for complex, flexible and changeable actual business needs. At the same time, automated testing greatly reduces testing time.

[0014] 3. The cross-browser compatibility test module of the present invention uses a customized image difference algorithm to round adjacent differences in the image to zero. At the same time, the algorithm can clearly identify the changed elements when the elements are translated, making the displayed results clearer and more specific, which is convenient for users to observe the results.

[0015] 4. This invention can assist in selecting software and hardware for applications before migration, conduct application migration analysis, and provide recommendations to ensure that the software and hardware meet the standards after migration, as well as the consistency of application functionality and data accuracy. After each module is tested, a report with both graphics and text is generated according to the template. The report can dynamically add charts based on actual business needs, meeting flexible and complex scenarios and presenting test results more clearly, facilitating subsequent optimization work. BRIEF DESCRIPTION OF THE DRAWINGS

[0016] Figure 1 This is a flow chart of an application compatibility detection method for migrating domestic software and hardware environments according to an embodiment of the present invention;

[0017] Figure 2 This is a structural block diagram of an application compatibility detection system for migrating domestic software and hardware environments in an embodiment of the present invention. DETAILED DESCRIPTION

[0018] The present invention provides an application compatibility detection method for the migration of domestic software and hardware environments, which meets the multi-faceted compatibility detection needs of business systems during the domestic migration process, ensures the quality of applications after migration and improves migration efficiency.

[0019] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention is further described in detail below through specific implementation and in conjunction with the accompanying drawings.

[0020] Example 1

[0021] like Figure 1 As shown, an embodiment of the present invention provides an application compatibility detection method for migrating domestic software and hardware environments, including the following steps:

[0022] Step S1: After migrating the non-domestic software and hardware environment to the domestic software and hardware environment, install the software toolkits, dependency libraries, and auxiliary tool software required for testing in the Docker virtual container according to the test requirements and the relevant configuration of the domestic software and hardware environment, and complete the deployment of the application compatibility detection module in the domestic software and hardware environment. The application compatibility detection module includes: performance benchmark detection module, application migration analysis detection module, application cross-browser compatibility detection module, and data compatibility detection module;

[0023] Step S2: Using a performance benchmark detection module, perform multi-dimensional testing on the basic software and hardware performance in the domestic software and hardware environment after migration according to performance indicators. Performance indicators are inspection items for the performance of the domestic software and hardware environment. Performance tests include: memory stability test, disk performance test, network performance test, stress test, benchmark performance test, and processor performance test.

[0024] Step S3: Use the application migration analysis and detection module to analyze and detect the migrated application according to the configuration indicators and the customized code scanning rule base, identify potential code issues, and propose strategies and suggestions for resolving them;

[0025] Step S4: Apply the cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing and analysis testing manner:

[0026] Step S5: a data compatibility detection module performs a test to verify whether the query conditions and corresponding query results of the database before and after migration are consistent;

[0027] Step S6: Generate a corresponding test report based on the test results of the performance benchmark test module, the application migration analysis test module, the application cross-browser compatibility test module and the data compatibility test module according to a predefined report template.

[0028] In one embodiment, the above step S1: after migrating the non-domestic software and hardware environment to the domestic software and hardware environment, according to the test requirements and the relevant configuration of the domestic software and hardware environment, the software toolkit, dependency library and auxiliary tool software required for the test are installed in the Docker virtual container, and the application compatibility detection module is deployed in the domestic software and hardware environment, wherein the application compatibility detection module includes: a performance benchmark detection module, an application migration analysis detection module, an application cross-browser compatibility detection module and a data compatibility detection module;

[0029] After migrating the non-domestic software and hardware environment to the domestic software and hardware environment, the environment is configured and the corresponding software is installed based on the performance test scenario information of the domestic software and hardware environment. This includes installing the software toolkits, dependency libraries, and related auxiliary tool software required for testing in the corresponding Docker virtual containers, and deploying various application compatibility detection modules. During the detection process, the application compatibility detection of the migrated domestic software and hardware environment is achieved by calling the test software or tools in Docker and the four different detection modules of the application compatibility detection module of the present invention in the domestic software and hardware environment.

[0030] In one embodiment, the above step S2: using a performance benchmark detection module, performs multi-dimensional testing on the basic software and hardware performance in the domestic software and hardware environment after migration according to performance indicators; wherein the performance indicators are inspection items for the performance of the domestic software and hardware environment; the performance tests include: memory stability test, disk performance test, network performance test, stress test, benchmark performance test, processor performance test, including:

[0031] Step S21: Memory stability test: Use the memory stability test tool memtester to test the memory size and number of times to capture memory errors and bad bits that are always very high or very low. The main test items include random values, XOR comparison, subtraction, multiplication, division, and AND / OR operations.

[0032] Step S22: Disk performance test: Utilizing the specific application modes of the disk testing tools fio and dd, in conjunction with multithreading, simulates I / O loads in scenarios such as random reads, random writes, sequential reads, and sequential writes to perform disk read and write tests. Based on parameters such as the disk testing tool's input, output, bytes read or written at a time, read / write block size, and conversion buffer size, disk performance tests are performed through methods such as high-speed replication between local disks and cross-network data replication. Specifically, the following are performed:

[0033] Step S221: Configuring execution parameters of a disk testing tool in the system according to the performance indicators of the software and hardware environment, performing disk read / write tests and disk performance tests on the non-domestic software and hardware environment before migration; and creating benchmark data for the disk read / write and disk performance tests based on the obtained test results.

[0034] Step S222: performing disk read / write and disk performance tests on the migrated domestic software and hardware environment;

[0035] Step S223: Compare the obtained test results with the established benchmark data to extract key data information from the disk read / write and disk performance results. Key disk read / write information includes disk bandwidth (Bw) and throughput (Iops); key disk performance information includes I / O bytes, I / O time, and rate.

[0036] Step S224: Define disk read / write and disk performance evaluation formulas according to actual needs. The disk read / write evaluation formula is:

[0037] (newIops*0.7+newBw*0.3) / (bmIops*0.7+bmBw*0.3)

[0038] Among them, newIops and newBw represent the throughput and bandwidth of the current execution result respectively, bmIops and bmBw represent the benchmark throughput and bandwidth respectively;

[0039] The disk performance evaluation formula is:

[0040] (ddNewWrite*0.2+ddNewRead*0.2+ddNewSave*0.2+ddNewBuffer*0.2+ddNewCpu*0.2) / (ddBwWrite*0.2+ddBwRead*0.2+ddBwSave*0.2+ddBwBuffer*0.2+ddBwCpu*0.2

[0041] Among them, ddNewWrite, ddNewRead, ddNewSave, ddNewBuffer, and ddNewCpu represent the basic disk write performance, basic disk read performance, storage read performance, memory buffer read performance, and CPU performance of the current execution result, respectively; ddBwWrite, ddBwRead, ddBwSave, ddBwBuffer, and ddBwCpu are the baseline values ​​of basic disk write performance, basic disk read performance, storage read performance, memory buffer read performance, and CPU performance;

[0042] Step S225: Score the overall disk performance based on the disk read / write and disk performance scores, where the score is composed of the sum of 50% of the disk read / write and disk performance scores.

[0043] Through the above steps, we can determine whether the disk performance of the domestic software and hardware environment after migration meets expectations, which will facilitate subsequent rectification and optimization.

[0044] Step S23: Network performance test: Using the network performance test tools iperf and speedtest-cli, including parameters such as mode, port, test method, time interval, bandwidth used, and number of threads, network TCP and UDP tests are performed by testing the performance of TCP or UDP connections between network nodes, including bandwidth, jitter, and packet loss rate. Jitter and packet loss rate are applicable to UDP tests, while bandwidth tests are applicable to TCP and UDP. Based on the Python script corresponding to the network performance test tool in a given system, Internet bandwidth testing is performed by calling speedtest.net to test the upstream and downstream interfaces, specifically including:

[0045] Step S231: Based on the performance indicators of the software and hardware environment, configure the execution parameters of the network performance testing tool in the system to perform a network performance test on the non-domestic software and hardware environment before migration; and create benchmark data for network TCP, network UDP, and Internet bandwidth based on the obtained test results.

[0046] Step S232: Perform network TCP, network UDP and Internet bandwidth tests in the migrated domestic software and hardware environment;

[0047] Step 233: Compare the obtained test results with the established benchmark data, and extract key data information from the network TCP, network UDP, and Internet bandwidth test results. The key information for network TCP includes: interval, amount of transferred data, transmission rate, and network jitter. The key information for network UDP includes the four key information items for network TCP as well as the number of lost packets (lost / total) and the number of datagrams. The key information for Internet bandwidth includes: upload speed and download speed.

[0048] Step 234: Define network TCP, network UDP, and Internet bandwidth evaluation formulas based on actual needs, where the network TCP and network UDP evaluation formulas are:

[0049] (newTcp*0.5+newUdp*0.5) / (bmTcp*0.5+bmUdp*0.5)

[0050] Among them, newTcp and newUdp represent the TCP and Udp of the current execution result respectively, and bmTcp and bmUdp are the benchmark values ​​of TCP and Udp respectively;

[0051] The Internet bandwidth evaluation formula is:

[0052] (newDownload*0.5+newUpload*0.5) / (bwDownload*0.5+bwUpload*0.5)

[0053] Among them, newDownload and newUpload represent the download and upload rates of the current execution result, and bwDownload and bwUpload represent the baseline values ​​of the download and upload rates of the current execution result.

[0054] Step 235: Based on the scores obtained in the above steps, the overall network performance is scored, where the score is composed of the sum of the 50% scores of the network TCP and network UDP and the 50% score of the Internet bandwidth;

[0055] Through the above steps, we can judge the quality of the network performance of the domestic environment after migration, which will facilitate the subsequent optimization work;

[0056] Step S24: Stress test: Based on the parameters of stress test tools ab and LTP, such as the number of concurrent users, total number of requests, test duration, and test address, create access threads to simulate multiple visitors accessing a certain address at the same time, and perform stress testing, specifically including:

[0057] Step S241: According to the performance indicators of the software and hardware environment, configure the execution parameters of the stress test tool in the system to perform a stress test on the non-domestic software and hardware environment before migration; and create stress test benchmark data based on the test results.

[0058] Step S242: performing stress testing on the migrated domestic software and hardware environment;

[0059] Step S243: Compare the obtained test results with the benchmark data and extract key data information from the stress test results, where the key information includes: throughput (Requests per second), average user request waiting time (Time per request), average server request waiting time (Time per request (across all concurrent requests)), total number of test items, number of test skipped items, and number of test failed items;

[0060] Step S244: Define the pressure assessment formula according to actual needs:

[0061] (newReq1+newReq2+newReq3)*0.5+(newTime1+newTime2+newTime3)*0.5 / (bmReq1+bmReq2+bmReq3)*0.5+(bmTime1+bmTime2+bmTime3)*0.5

[0062] Among them, newReq and newTime represent the number of requests per second and the request time per second of the current execution result, respectively. bmReq and bmTime are the benchmark values ​​of the number of requests per second and the request time per second, respectively.

[0063] Through the above steps, we can determine whether the performance of the stress test in the domestic environment after migration meets the requirements, which will facilitate targeted rectification and improvement in the future.

[0064] Step S25: Benchmark performance test: Based on the number of parallel tasks and execution times of the benchmark performance test tool Unixbench, benchmark performance is tested through system calls, reading and writing, processes, graphical tests, 2D, 3D, pipelines, operations, C library, etc., specifically including:

[0065] Step S251: configuring execution parameters of a benchmark performance test tool in the system according to the performance indicators of the software and hardware environment, performing a benchmark performance test on the non-domestic software and hardware environment before migration; and creating benchmark data for the benchmark performance test based on the test results.

[0066] Step S252: Performing benchmark performance testing in the migrated domestic software and hardware environment;

[0067] Step S253: Compare the obtained test results with the established benchmark data to extract key data information from the benchmark performance test results, including: the score of executing a single parallel task and the score of executing a set number of parallel tasks;

[0068] Step S254: Define the benchmark performance evaluation formula according to actual needs:

[0069] (newSingleScore*0.5+newMultScore*0.5) / (bmSingleScore*0.5+bmMultScore*0.5)

[0070] Among them, newSingleScore and newMultScore represent the single-core and multi-core scores of the current execution result respectively, and bmSingleScore and bmMultScore are the baseline values ​​of the single-core and multi-core scores respectively;

[0071] Through the above steps, we can judge whether the benchmark performance of the domestic software environment after migration is qualified, which is convenient for later optimization;

[0072] Step S26: Processor performance test: Based on parameters such as the number of cores, data set size, target file, and number of runs using the processor performance test tools GLmark2 and SPECCPU2006, the CPU test is performed by testing the system's processor, memory subsystem, and compiler used; and the GPU test is performed by testing the graphics unit performance, specifically including:

[0073] Step S261: configuring execution parameters of a processor performance test tool in the system according to the performance indicators of the software and hardware environment, and performing a processor performance test on the non-domestic software and hardware environment before migration; and creating benchmark data for the processor performance test based on the test results.

[0074] Step S262: Perform CPU and GPU testing in the migrated domestic software and hardware environment;

[0075] Step S263: Compare the obtained test results with the established benchmark data, and extract the key data information from the two test results. The key information of the CPU includes: fluid dynamics (bwaves), quantum chemistry (gamess), quantum mechanics (milc), physical computational fluid dynamics (zeusmp), biochemistry / molecular mechanics (gromacs), and physical general relativity (cactusADM). The key information of the GPU includes: frames per second (FPS) and frame rendering time (FrameTime).

[0076] Step S264: Define evaluation formulas for both CPU and GPU based on actual needs, assign corresponding weights to each key information, and then calculate scores for both. Finally, based on the scores, score the overall processor performance, which is composed of the sum of 50% of the CPU and GPU scores.

[0077] Through the above steps, we can determine whether the processor performance of the domestic environment after migration is qualified, which is convenient for later optimization.

[0078] The multi-dimensional tests of memory test, disk performance test, network performance test, stress test, benchmark performance test and processor performance test in the benchmark test module of the present invention are all automated tests, and users can flexibly choose according to actual test needs. According to predefined weights and formulas, the system automatically extracts the key information of the results of each module and calculates the score according to the weights. After the test is completed, the test results will be recorded and output as a report with pictures and texts according to the predefined template. The multi-dimensional and self-selectable test items of this module are suitable for complex, flexible and changeable actual business needs. At the same time, automated testing greatly reduces testing time.

[0079] In one embodiment, step S3 above: using the application migration analysis and detection module to analyze and detect the migrated application according to the configuration indicators and the customized code scanning rule base, to identify potential code issues and propose strategies and suggestions for resolving the issues, specifically includes:

[0080] Step S31: Perform application migration analysis on the domestic software and hardware environment according to configuration indicators, where the configuration indicators include: software stack information, front-end PC configuration, problem description, error information, cause analysis and solution measures;

[0081] Step S32: Customize the corresponding code scanning rule library according to requirements;

[0082] Step S33: performing application migration analysis on the software package provided to be tested;

[0083] Step S34: After the detection is completed, a result is generated, including: the detected relevant code problems and the corresponding strategies and suggestions for solving the problems.

[0084] In one embodiment, the above step S4: applying the cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing and analysis testing manner, specifically includes:

[0085] Step S41: executing the test script in different browsers according to the domestic software and hardware environment, and determining the benchmark image based on the generated result image;

[0086] Step S42: Use other browsers to test in a domestic software and hardware environment to obtain a test image;

[0087] Step S43: Using a difference algorithm, the reference image and the test image are subjected to Gaussian smoothing and gradient calculation. Image segmentation and similarity calculation are then performed to generate a list of region pairs for comparison. Finally, the cross-browser compatibility of the application is determined based on the comparison results. The difference algorithm specifically includes:

[0088] Step S431: Use the Canny algorithm to detect image edges and perform image segmentation; use the Gaussian smoothing filter to perform a convolution operation on the image to achieve image noise reduction;

[0089] Use formula (1) to perform Gaussian smoothing on the image:

[0090]

[0091] Step S432: After the image is smoothed, the gradient magnitude and direction D(x,y) are calculated for each pixel (x,y). Non-maximum suppression is used in the gradient calculation to determine whether the gradient magnitude of each pixel is the maximum value of the pixels with the same gradient direction nearby. If so, it is retained; otherwise, it is discarded, thereby eliminating the adverse effects of edge detection.

[0092] Use formulas (2) and (3) to calculate the gradient of the image

[0093]

[0094]

[0095] Among them, I(x,y) represents the pixel point, P(x,y) represents Gaussian filtering, σ represents the standard deviation of Gaussian distribution, G(x,y) represents the amplitude of the gradient, D(x,y) represents the direction of the gradient, P x (x, y) represents the horizontal gradient amplitude of pixel I, P y (x,y) represents the vertical gradient amplitude of pixel I;

[0096] Step S433: Use the double threshold method to customize the high threshold SH and low threshold S L , compare it with the pixel gradient value retained in the non-maximum suppression step, if it is higher than S H , indicating that the pixel is a strong edge, if it is lower than S L Indicate that the pixel is not an edge, thereby ensuring the real and potential edges;

[0097] Step S434: After the image segmentation is completed, similarity calculation is performed for each adjacent coordinate of the reference image segmentation area and the target detection image segmentation area;

[0098] Before calculation, a similarity threshold S must be defined. If S is too small, many mismatched region pairs may be created. If S is too large, regions that should be paired may not be paired, resulting in many (c, null) and (null, t) region pairs. In this embodiment, S is set to 0.5. The two regions with the highest similarity are calculated as a region pair p = (c, t), where C represents the reference image, T represents the target detection image, c represents the reference image segmentation region, t represents the target detection image segmentation region, and p represents the region pair.

[0099] Step S435: Generate a region pair list after performing multiple calculations in sequence;

[0100] Step S436: assigning a difference type to each region pair in the region pair list. The difference types are divided into five types: add, delete, translate, modify, and scale.

[0101] The difference type is assigned as follows: in the region pair p = (c, t), if c is null, the annotation type is addition; if t is null, the annotation type is deletion; the coordinates of the upper left corner starting point of c and t are determined. If they are different, the horizontal and vertical coordinates of the offset are calculated, and the annotation type is translation; the threshold of similarity is determined. If it is less than a predefined threshold, the difference between c and t in pixel units is found, and the annotation type is modification; the size of c and t is determined. If they are different, the length and width scaling ratio is calculated, and the annotation type is scaling;

[0102] Step S437: Mark the differences between the result image and the reference image. The cross-browser compatibility of the application can be determined based on the image markings.

[0103] The cross-browser compatibility test module of the present invention uses a customized image difference algorithm to round adjacent differences in the image to zero. At the same time, the algorithm can clearly identify the changed elements when the elements are translated, making the displayed results clearer and more specific, which is convenient for users to observe the results.

[0104] In one embodiment, the data compatibility detection module in step S5 performs a test to verify whether the query conditions and corresponding query results of the database before and after migration are consistent, specifically including:

[0105] Step S51: Install the corresponding software according to the data compatibility detection requirements of the domestic software and hardware environment;

[0106] Step S52: querying a database based on the data compatibility detection index in the non-domestic environment and a predetermined conditional statement, and creating benchmark data based on the results of the database query;

[0107] Step S53: testing in a domestic software and hardware environment based on the data compatibility detection indicators and conditional statements in a non-domestic software and hardware environment to obtain a test result;

[0108] Step S54: Compare the obtained test result with the reference data to check whether the two are consistent.

[0109] In one embodiment, the above step S6: generating a corresponding test report based on the test results of the performance benchmark test module, the application migration analysis test module, the application cross-browser compatibility test module, and the data compatibility test module according to a predefined report template, specifically includes:

[0110] Step S61: converting the test results of the performance benchmark test module, the application migration analysis test module, the application cross-browser compatibility test module, and the data compatibility test module into an XML format file according to a predefined template, and then converting them into an FTL format file;

[0111] Step S62: Based on the actual business data, Freemarker is used to dynamically generate multiple line charts and export the test report;

[0112] First in <relationships>In the label <relationship>In the chart generation location and chart configuration through the Id and Target attributes associated; then in the location of the chart <c:chart>The r:id attribute in the tag is <relationship>Bind the Id attribute of the label; then configure the chart <pkg:part>The pkg:name attribute in the tag is the same as <relationship>Bind the Target property of the tag; configure the colors and style properties of the chart, and then bind them to the <relationship>Bind the Target property in the report; finally export the report.

[0113] This invention assists in pre-migration application software and hardware selection, performs application migration analysis, and provides recommendations to ensure post-migration software and hardware compliance, functional consistency, and data accuracy. After each module is tested, a report with both graphics and text is generated based on the template. The report can dynamically add charts based on actual business needs, meeting flexible and complex scenarios and presenting test results more clearly, facilitating subsequent optimization work.

[0114] The present invention discloses an application compatibility detection method for migrating domestic software and hardware environments. The method is suitable for application migration from a non-domestic environment to a domestic environment, actively responds to the national strategic security needs of replacing foreign commercial products with independent domestic products, ensures the security of information during application migration, meets the multi-faceted compatibility detection needs of business systems during the domestic migration process, and ensures the quality of applications after migration. At the same time, the system's automated compatibility detection reduces manpower and material resources and greatly improves migration efficiency.

[0115] Example 2

[0116] like Figure 2 As shown, the embodiment of the present invention provides an application compatibility detection system for migrating domestic software and hardware environments, including the following modules:

[0117] Preprocessing module 1 is used to migrate the non-domestic software and hardware environment to the domestic software and hardware environment, and then install the software toolkits, dependency libraries, and auxiliary tool software required for testing in the Docker virtual container according to the test requirements and the relevant configuration of the domestic software and hardware environment, and deploy the application compatibility detection module; the application compatibility detection module includes: performance benchmark detection module, application migration analysis detection module, application cross-browser compatibility detection module, and data compatibility detection module;

[0118] Performance benchmark detection module 2 is used to use the performance benchmark detection module to conduct multi-dimensional testing of the basic software and hardware performance in the domestic software and hardware environment after migration according to performance indicators. Among them, performance indicators are inspection items for the performance of the domestic software and hardware environment. Performance tests include: memory stability test, disk performance test, network performance test, stress test, benchmark performance test, and processor performance test;

[0119] Application migration analysis and detection module 3 is used to use the application migration analysis and detection module to analyze and detect the migrated application according to the configuration indicators and the customized code scanning rule base, identify potential code problems and propose strategies and suggestions for solving the problems;

[0120] Applying a cross-browser compatibility detection module 4, used for applying a cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing analysis test manner;

[0121] Data compatibility detection module 5, used for data compatibility detection module, to test whether the query conditions and corresponding query results of the database before and after migration are consistent;

[0122] The detection report generating module 6 is used to generate a corresponding detection report based on the detection results of the performance benchmark detection module, the application migration analysis detection module, the application cross-browser compatibility detection module and the data compatibility detection module according to a predefined report template.

[0123] The above embodiments are provided for the purpose of describing the present invention only and are not intended to limit the scope of the present invention. The scope of the present invention is defined by the appended claims. Various equivalent substitutions and modifications made without departing from the spirit and principles of the present invention are intended to be within the scope of the present invention.< / relationship> < / relationship> < / pkg:part> < / relationship> < / c:chart> < / relationship> < / relationships>

Claims

1. A method for detecting application compatibility for migration of domestic software and hardware environments, characterized in that: include: Step S1: After migrating the non-domestic software and hardware environment to the domestic software and hardware environment, according to the test requirements and the relevant configuration of the domestic software and hardware environment, the software toolkit, dependency library and auxiliary tool software required for the test are installed in the Docker virtual container, and the application compatibility detection module is deployed; wherein the application compatibility detection module includes: a performance benchmark detection module, an application migration analysis detection module, an application cross-browser compatibility detection module and a data compatibility detection module; Step S2: Using the performance benchmark detection module, perform multi-dimensional testing on the basic software and hardware performance in the domestic software and hardware environment after migration according to performance indicators; wherein the performance indicators are inspection items for the performance of the domestic software and hardware environment; the performance tests include: memory stability test, disk performance test, network performance test, stress test, benchmark performance test, and processor performance test; Step S3: Using the application migration analysis and detection module, according to the configuration indicators and the customized code scanning rule base, analyze and detect the migrated application, find potential code problems and propose strategies and suggestions for solving the problems; Step S4: Apply the cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing and analysis testing manner: Step S5: a data compatibility detection module performs a test to verify whether the query conditions and corresponding query results of the database before and after migration are consistent; Step S6: Generate a corresponding test report based on the test results of the performance benchmark test module, the application migration analysis test module, the application cross-browser compatibility test module and the data compatibility test module according to a predefined report template.

2. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The memory stability test in step S2 specifically includes: The memory stability testing tool memtester is used to test the memory size and number of times to capture memory errors and bad bits that are always very high or very low. The main test items include random values, XOR comparison, subtraction, multiplication, division, and AND / OR operations.

3. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The disk performance test in step S2 specifically includes: Disk read and write test: Using the specific application mode of the disk testing tools fio and dd, combined with multi-threading, we simulate random read, random write, sequential read, and sequential write I / O loads to perform disk read and write tests. The disk read and write evaluation formula is: (newIops*0.7+newBw*0.3) / (bmIops*0.7+bmBw*0.3), Among them, newIops and newBw represent the throughput and bandwidth of the current execution result respectively, bmIops and bmBw represent the benchmark throughput and bandwidth respectively; Disk performance test: Based on the parameters of the disk test tool, including input, output, bytes read or written at a time, read / write block size, and conversion buffer size, disk performance is tested through high-speed replication between local disks and cross-network data replication. The disk performance evaluation formula is: (ddNewWrite*0.2+ddNewRead*0.2+ddNewSave*0.2+ddNewBuffer*0.2+ddNewCpu*0.2) / (ddBwWrite*0.2+ddBwRead*0.2+ddBwSave*0.2+ddBwBuffer*0.2+ddBwCpu*0.2 Among them, ddNewWrite, ddNewRead, ddNewSave, ddNewBuffer, and ddNewCpu respectively represent the basic disk write performance, basic disk read performance, storage read performance, memory buffer read performance, and CPU performance of the current execution result; ddBwWrite, ddBwRead, ddBwSave, ddBwBuffer, and ddBwCpu are the benchmark values ​​of basic disk write performance, basic disk read performance, storage read performance, memory buffer read performance, and CPU performance.

4. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The network performance test in step S2 specifically includes: Based on the mode, port, test method, time interval, bandwidth, and thread number parameters of the network performance testing tools iperf and speedtest-cli, the performance of TCP or UDP connections between network nodes is tested, including UDP jitter, packet loss rate, and bandwidth testing, and TCP bandwidth testing. The network TCP and network UDP evaluation formulas are as follows: (newTcp*0.5+newUdp*0.5) / (bmTcp*0.5+bmUdp*0.5) Among them, newTcp and newUdp represent the TCP and Udp of the current execution result respectively, and bmTcp and bmUdp are the benchmark values ​​of TCP and Udp respectively; The Internet bandwidth evaluation formula is: (newDownload*0.5+newUpload*0.5) / (bwDownload*0.5+bwUpload*0.5) where newDownload and newUpload represent the download and upload rates of the current execution result, and bwDownload and bwUpload represent the baseline values ​​of the download and upload rates of the current execution result.

5. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The stress test in step S2 specifically includes: Based on the number of concurrent users, total number of requests, test duration, and test address of the stress testing tools ab and LTP, a stress test is performed by creating access threads to simulate multiple visitors accessing a certain address at the same time. The evaluation formula is: (newReq1+newReq2+newReq3)*0.5+(newTime1+newTime2+newTime3)*0.5 / (bmReq1+bmReq2+bmReq3)*0.5+(bmTime1+bmTime2+bmTime3)*0.5 Among them, newReq and newTime represent the number of requests per second and the request time per second of the current execution result, respectively. bmReq and bmTime are the benchmark values ​​of the number of requests per second and the request time per second, respectively.

6. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The benchmark performance test in step S2 specifically includes: Based on the number and execution times of parallel tasks executed by the benchmark performance testing tool Unixbench, benchmark performance is tested in terms of system calls, reading and writing, processes, graphics testing, 2D, 3D, pipelines, operations, and C libraries. The evaluation formula is: newSingleScore*0.5+newMultScore*0.5) / (bmSingleScore*0.5+bmMultScore*0.5) Among them, newSingleScore and newMultScore represent the single-core and multi-core scores of the current execution result, respectively, and bmSingleScore and bmMultScore are the baseline values ​​of the single-core and multi-core scores, respectively.

7. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The processor performance test in step S2 specifically includes: Based on the parameters of the processor performance testing tools Glmark2 and SPEC CPU2006, such as the number of cores, data set size, target file, and number of runs, the CPU test is performed by testing the processor, memory subsystem, and compiler used in the system under test; the GPU test is performed by testing the performance of the graphics unit.

8. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: Step S4: applying a cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing and analysis testing manner, specifically includes: Step S41: executing the test script in different browsers according to the domestic software and hardware environment, and determining the benchmark image based on the generated result image; Step S42: testing using other browsers in the domestic software and hardware environment to obtain a test image; Step S43: Using a difference algorithm, the reference image and the test image are subjected to Gaussian smoothing and gradient calculation, and then image segmentation and similarity calculation are performed to generate a region pair list for comparison. Finally, the cross-browser compatibility of the application is determined based on the comparison results.

9. The application compatibility detection method for migrating domestic software and hardware environments according to claim 1 is characterized in that: The report template predefined in step S6 specifically includes: First, the preset report template is converted into a file in xml format, and then converted into a file in ftl format. Freemarker is used to dynamically generate multiple line charts according to the business requirements of each detection module, so as to obtain the corresponding report of the detection module.

10. An application compatibility detection system for domestic software and hardware environment migration, characterized by: Includes the following modules: A pre-processing module is used to migrate the non-domestic software and hardware environment to the domestic software and hardware environment, and then install the software toolkits, dependency libraries, and auxiliary tool software required for testing in the Docker virtual container according to the test requirements and the relevant configuration of the domestic software and hardware environment, and deploy the application compatibility detection module; wherein the application compatibility detection module includes: a performance benchmark detection module, an application migration analysis detection module, an application cross-browser compatibility detection module, and a data compatibility detection module; A performance benchmark detection module is configured to use the performance benchmark detection module to perform multi-dimensional testing of the basic software and hardware performance in the domestic software and hardware environment after migration according to performance indicators; wherein the performance indicators are inspection items for the performance of the domestic software and hardware environment; the performance tests include: memory stability test, disk performance test, network performance test, stress test, benchmark performance test, and processor performance test; An application migration analysis and detection module is used to analyze and detect migrated applications using the application migration analysis and detection module according to configuration indicators and a custom code scanning rule base, identify potential code issues, and propose strategies and suggestions for resolving the issues; Applying a cross-browser compatibility detection module, used for applying the cross-browser compatibility detection module to implement cross-browser compatibility testing in an image processing analysis test manner; The data compatibility detection module is used to test whether the query conditions and corresponding query results of the database before and after migration are consistent; The detection report generation module is used to generate a corresponding detection report based on the detection results of the performance benchmark detection module, the application migration analysis detection module, the application cross-browser compatibility detection module and the data compatibility detection module according to a predefined report template.

Citation Information

Patent Citations

  • Migration adaptation method and device based on domestic information creation software and hardware platform, and equipment

    CN112463417A

  • Railway electronic payment platform test method and system, equipment and storage medium

    CN114817022A