Ship-sea multi-language APPs localization adaptation method of cross-bottom CPU hardware architecture

By analyzing the software and hardware operating environment of the ship's overall performance APPs and transforming the source code, the problem of low autonomous controllability on Intel X86 CPUs is solved, adapting to domestic CPUs and maintaining consistency in computing results, improving data security and autonomous controllability.

CN120276766APending Publication Date: 2025-07-08CHINA SHIP SCIENTIFIC RESEARCH CENTER
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510349370.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-07-08

AI Technical Summary

Technical Problem

The overall performance of existing ships is developed on the basic software and hardware system of Intel X86 CPU, with low independent control level, weak data security protection capabilities, and lack of domestic adaptation methods across the underlying CPU hardware architecture.

Method used

By analyzing the software and hardware operation environment of the original ship's overall performance APPs, a domestic CPU server adaptation environment is built, and the core solver and human-computer interactive interface source code is transformed and compiled until there is no error on the domestic CPU, a domestic version is formed, and the calculation results are compared and tested.

Benefits of technology

It realizes the adaptation of ship overall performance APPs on domestic CPU hardware platforms, improves the level of autonomous controllability and data security, and ensures the consistency and correctness of calculation results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120276766A_ABST
    Figure CN120276766A_ABST
Patent Text Reader

Abstract

The invention discloses a ship-sea multi-language APPs localization adaptation method of a cross-bottom-layer CPU hardware architecture, and relates to the field of hardware and software localization adaptation, and the method comprises the following steps: analyzing a software and hardware operation environment of original ship overall performance APPs to construct a domestic CPU server adaptation environment; the method comprises the following steps: sequentially transforming a core solver source code and a human-computer interaction interface source code of APPs on a domestic CPU (Central Processing Unit) server; and comparing and testing the successfully modified core solver source code of the localized version and the human-computer interaction interface source code with the original APPs, and finishing the localized adaptation of the APPs if the test is passed, otherwise, re-executing the modification step. The invention provides a technical method for adaptation of upper-layer application software on bottom-layer domestic CPU hardware, and has important significance for domestic autonomous controllable development of software and hardware.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of domestic adaptation of software and hardware, and in particular to a method for domestic adaptation of ship and ocean multilingual APPs across underlying CPU hardware architectures. Background Art

[0002] The overall performance APPs of ships are a new paradigm for the research of the overall performance of ships such as hydrodynamic performance, structural safety, and comprehensive stealth. Through the core idea of "knowledge encapsulation and attribute subdivision", various types of expert knowledge, algorithms, and models are encapsulated in a series of APPs, enabling the rapid and efficient design, prediction, evaluation, and optimization of the overall performance of ships.

[0003] There are numerous overall performance APPs of ships, involving multiple development languages, mainly developed based on the "Intel X86 CPU + Windows" basic software and hardware system, with low levels of self-control and weak data security protection capabilities. However, currently, for the multilingual APPs of ship overall performance, no domestic adaptation method across underlying CPU hardware architectures has been established. Summary of the Invention

[0004] In view of the above problems and technical requirements, the inventor of the present invention has proposed a method for domestic adaptation of ship and ocean multilingual APPs across underlying CPU hardware architectures. The present invention provides a technical method for the adaptation of upper-layer application software on underlying domestic CPU hardware, which is of great significance for the independent and controllable development of domestic software and hardware. The technical solution of the present invention is as follows:

[0005] A method for domestic adaptation of ship and ocean multilingual APPs across underlying CPU hardware architectures, comprising the following steps:

[0006] Analyze the software and hardware operating environment of the original overall performance APPs of ships to construct a domestic CPU server adaptation environment;

[0007] On the domestic CPU server, successively transform the source code of the core solver and the source code of the human-computer interaction interface of the APPs;

[0008] Compare and test the source code of the core solver and the source code of the human-computer interaction interface of the successfully transformed domestic version with the original APPs. If the test passes, the domestic adaptation of the APPs is completed; otherwise, re-execute the transformation steps.

[0009] A further technical solution thereof is that analyzing the software and hardware operating environment of the original overall performance APPs of ships to construct a domestic CPU server adaptation environment includes:

[0010] Analyze the software and hardware operating environment of the original APPs from aspects such as development language, development tool, third-party function library, CPU, and operating system;

[0011] Select alternative domestic development tools, third-party function libraries, CPUs, and operating systems to form a domestic software and hardware operating environment solution;

[0012] Build a domestic CPU server based on the domestic software and hardware operating environment solution, and deploy the APPs to the domestic CPU server.

[0013] Its further technical solution is that on the domestic CPU server, the source code of the core solver of the APPs is transformed, including:

[0014] Select a corresponding transformation plan according to the development language of the source code of the APPs core solver. The development languages are divided into cross-platform languages and non-cross-platform languages;

[0015] Among them, the cross-platform language refers to a language that can be compiled by both Intel X86 CPUs and domestic CPUs;

[0016] The non-cross-platform language refers to a language that can be compiled on Intel X86 CPUs but cannot be compiled when migrated to domestic CPUs.

[0017] Its further technical solution is that for cross-platform languages, the transformation plan includes:

[0018] On the domestic CPU server, compile the source code of the core solver. According to the error messages reported during compilation, transform the source code of the core solver. After the transformation is completed, recompile;

[0019] Iteratively execute the process of compilation - transformation - recompilation until the compilation passes without errors.

[0020] Its further technical solution is that for non-cross-platform languages, the transformation plan includes:

[0021] Analyze the characteristics and logic of the source code of the core solver, and rewrite the source code on the domestic CPU server;

[0022] Compile the rewritten code. According to the error messages reported during compilation, transform the rewritten code. After the transformation is completed, recompile;

[0023] Iteratively execute the process of compilation - transformation - recompilation until the compilation passes without errors.

[0024] Its further technical solution is that on the domestic CPU server, the source code of the human-computer interaction interface of the APPs is transformed, including, on the domestic CPU server:

[0025] Configure the Qt project file of the human-computer interaction interface;

[0026] Compile the source code of the human - machine interaction interface. According to the error messages during compilation, transform the source code of the human - machine interaction interface. After the transformation is completed, re - compile it.

[0027] Iteratively execute the process of compilation - transformation - re - compilation until the compilation passes without errors.

[0028] Its further technical solution is to compare and test the source code of the successfully transformed domestic version of the core solver with the source code of the human - machine interaction interface and the original APPs. Specifically, on domestic CPU servers:

[0029] Package the source code of the successfully transformed core solver and the source code of the human - machine interaction interface to form domestic - version APPs.

[0030] Use the human - machine interaction interface to call the core solver, input the same calculation parameters, and obtain the calculation results of the domestic - version APPs and the original APPs respectively.

[0031] Compare the calculation results of the two. If the calculation results are consistent, the test passes.

[0032] Its further technical solution is that the overall ship performance APPs are encapsulated by two parts: the core solver and the human - machine interaction interface. The core solver is called through the human - machine interaction interface to perform calculations.

[0033] The core solver is developed in different programming languages, including: C, C++, Fortran, Python, C#, VB.

[0034] The human - machine interaction interface is all developed in C++ language.

[0035] The beneficial technical effects of the present invention are:

[0036] The present invention proposes a method for domestic adaptation of ship - ocean multi - language APPs across the underlying CPU hardware architecture. This method provides an effective solution for the adaptation of overall ship performance APPs developed in multiple languages across the underlying CPU hardware platform. The domestic - version APPs are not likely to cause data leakage, which is of great significance for improving the level of self - control of software and hardware and data security. Description of the Drawings

[0037] Figure 1 is a flowchart of a method for domestic adaptation of ship - ocean multi - language APPs across the underlying CPU hardware architecture provided by this application.

[0038] Figure 2 is a detailed technical roadmap of a method for domestic adaptation of ship - ocean multi - language APPs across the underlying CPU hardware architecture provided by this application. Detailed implementation manners

[0039] The following further describes the detailed implementation manners of the present invention with reference to the accompanying drawings.

[0040] An embodiment of the present application provides a method for domestic adaptation of marine multi - language APPs across underlying CPU hardware architectures. Please refer to Figure 1 as shown, the method specifically includes the following contents:

[0041] S1. Analyze the software and hardware operating environment of the original ship general performance APPs developed in the Intel X86 CPU server to construct a domestic CPU server adaptation environment. Among them, the ship general performance APPs refer to a series of lightweight application software for ship general performance design, evaluation, and optimization, which are encapsulated by a core solver and a human - machine interaction interface. The core solver is called through the human - machine interaction interface to perform calculations. The core solver is developed in different programming languages such as C, C++, Fortran, Python, C#, VB, etc., and the human - machine interaction interface is all developed in C++ language. Combining Figure 2 as shown, it specifically includes:

[0042] S11. In this example, a total of 55 APPs' software and hardware operating environments were analyzed. Preferably, taking the APP for rapid prediction of hull vibration and noise as an example, its software and hardware operating environment is: the CPU is Intel(R) Xeo(R) Gold 5218; the operating system is Windows 7; the programming language and development tool for the core solver are Fortran and GNU Compiler Collection respectively; the programming language and development tool for the human - machine interaction interface are C++ and Visual Studio respectively; the dependent third - party function libraries include: BLAS, LAPACK, and LibX11, etc.

[0043] S12. Preferably, taking the APP for rapid prediction of hull vibration and noise as an example, the alternative solution for the domestic software and hardware operating environment is as follows: the domestic CPU is Kunpeng 920; the operating system is Galaxy Kylin V10; the development tool for the core solver is Bisheng Compiler; the development tool for the human - machine exchange interface is Qt Creator, and the dependent third - party function libraries include: BLAS, LAPACK, and LibX11, etc.

[0044] S13. Construct a domestic CPU server and deploy the APPs to the domestic CPU server. In this embodiment, a domestic Kunpeng 920 CPU server was constructed, and 55 APPs were deployed to the server.

[0045] S2. Modify the source code of the core solver of APPs on domestic CPU servers. In this embodiment, select the corresponding modification scheme according to the development language of the source code of the APPs core solver, and combine with Figure 2 as shown below, specifically including:

[0046] S21. Divide the development languages of the source code of the APPs core solver into cross-platform languages and non-cross-platform languages. In this embodiment, among the 55 APPs, 50 are cross-platform language APPs, and the development languages involve four categories: C, C++, Fortran, and Python. There are 5 non-cross-platform language APPs, and the development languages involve two categories: C# and VB, as Figure 2 shown below.

[0047] S22. For cross-platform languages, compile the source code of the core solver on domestic CPU servers. According to the error messages reported during compilation, modify the source code of the core solver. After the modification is completed, recompile. Loop and iterate the process of "compile - modify - recompile" until the compilation passes without errors.

[0048] Preferably, take the APP for rapid prediction of hull vibration noise as an example. Execute the compilation command: <gfortran - omainmaceplate.for (maceplate.for is the Fortran source code name of the core solver of this APP)>, generate an executable program and run it. The error message generated is <Cannot open file “laminated STIFFENED PLATE, 2007 / 5 / 22”: No such file or directory>.

[0049] Check the source code. The indentation before many lines is marked red. Use the dos2unix tool and execute the command: dos2unix maceplate.for to convert the format of the source Fortran code to a format suitable for domestic operating systems. Check the source code again, and the red marks disappear, indicating that the format conversion is successful.

[0050] Further analyze the error message, which shows that <laminated STIFFENED PLANTE, 2007 / 5 / 22> cannot be opened. Query this string of characters, which is the first line content of opening the file <LXJ_VandS2_ok_gongkuang2_4.txt> in the 294th line of code. Analyze the 294th line of code, whose function is to open the input file STR1 and assign the file unit number as the special character 5. Change the identifier of the input file in the 294th line of the source code to a non-special character 9, and at the same time change the file unit number in all READ functions from 5 to 9.

[0051] Recompile the modified source code to generate an executable program and run it to obtain the calculation results. Compare the calculation results after domestic adaptation with the original results. The data are consistent, meeting the correctness requirements, indicating that the transformation of the core solver is successful.

[0052] S23. For non-cross-platform languages, taking the ship resistance performance prediction APP as an example, the core solver of the original APP was developed using VB language, which is a non-cross-platform language and cannot be directly compiled on the domestic Kunpeng 920 CPU. First, analyze the characteristics and logic of the core solver source code, and rewrite the source code using C++ language on the domestic CPU server. Preferably, taking the definition method of the program entry point in the code as an example, VB language uses Module and Sub Main for definition, while the rewritten C++ language uses the int main() function for definition.

[0053] Then compile the rewritten code. According to the error messages during compilation, transform the rewritten code. After the transformation is completed, recompile it. Loop and iterate the process of "compile - transform - recompile" until the compilation passes without errors.

[0054] Preferably, taking the ship resistance performance prediction APP as an example, execute the compilation command: <g++ -o main FutiPE.cpp (FutiPE.cpp is the name of the C++ source code of the core solver of this APP)>, generate the executable program main and run it to obtain the calculation results. Compare the calculation results after domestic adaptation with the original results. The data are consistent, meeting the correctness requirements, indicating that the transformation of the core solver is successful.

[0055] S3. Transform the source code of the human-computer interaction interface of the APPs on the domestic CPU server. Combining Figure 2 As shown, it specifically includes:

[0056] S31. On the domestic CPU server, configure the Qt project file of the human-computer interaction interface;

[0057] Preferably, taking the hull vibration and noise rapid prediction APP as an example, use QtCreator on the domestic Kunpeng 920 CPU server to open the project file of the human-computer interaction interface program (including configuration information and compiler, etc.), and it prompts "Cannot find a valid settings file". According to the prompt, select the default compiler on the desktop, and select the Release mode for the compilation mode. The project can be normally built and compiled.

[0058] S32. On a domestic CPU server, compile the source code of the human-machine interaction interface. Based on the error messages during compilation, transform the source code. After the transformation is completed, recompile it. Iteratively execute the process of "compilation - transformation - recompilation" until the compilation passes without errors.

[0059] Preferably, taking the APP for rapid prediction of hull vibration noise as an example, the specific instance of S32 is as follows: After completing the configuration of the engineering files, compile the source code of the human-machine interaction interface. An error message <qDebug:No such file or directory> appears, indicating that the qDebug file cannot be found. After analyzing the source code, #include in the source code <qdebug>Marked in red, combined with the error message prompt, lock the error line code.

[0060] Further analyze the cause of this error. Programs developed in the original Windows are not case-sensitive to code, while domestic operating systems have strict control requirements for code case. Therefore, change #include <qdebug>Change to #include <qdebug>, recompiling solved the problem.

[0061] After completing the above code transformation issue, recompiling passed, generating an executable program. Opening the program, the human-machine interaction interface automatically popped up and all functions were normal, indicating that the human-machine interaction interface adaptation was successful.

[0062] S4. Compare and test the source code of the successfully transformed domestic version of the core solver and the human-machine interaction interface source code with the original APPs. If the test passes, the domestic adaptation of the APPs is completed; otherwise, repeat steps S2 - S3 until it passes. As shown in Figure 2 shown, it specifically includes:

[0063] S41. On a domestic CPU server, package the source code of the APPs' core solver and the human-machine interaction interface that passed compilation. Preferably, taking the APP for rapid prediction of hull vibration noise as an example, use APP integrated development and design software to package the core solver and the human-machine interaction interface of this APP to form a domestic version of the APP.

[0064] S42. On a domestic CPU server, use the human-machine interaction interface to call the core solver, input the same calculation parameters, and obtain the calculation results of the domestic version of the APPs and the original APPs respectively. Compare the calculation results of the two. If the calculation results are the same, the test passes; otherwise, repeat steps S2 - S3 until it passes.

[0065] Preferably, taking the APP for rapid prediction of hull vibration noise as an example, use the transformed human-machine interaction interface program to execute the call operation of the core solver and input relevant calculation parameters. It can perform calculations normally, and the calculation results are consistent with those on the original Intel X86 CPU, indicating that the adaptation of this application software is successful.

[0066] The above are only the preferred embodiments of the present application, and the present invention is not limited to the above embodiments. It can be understood that other improvements and changes directly derived or associated by those skilled in the art without departing from the spirit and concept of the present invention should be considered to be included within the protection scope of the present invention.< / qdebug> < / qdebug> < / qdebug>

Claims

1. A method for nationalizing the adaptation of marine multi-language APPs across underlying CPU hardware architectures, characterized in that, The method includes: Analyze the software and hardware operating environment of the original ship overall performance APPs to build a domestic CPU server adaptation environment; On the domestic CPU server, sequentially transform the source code of the core solver and the source code of the human-computer interaction interface of the APPs; Compare and test the source code of the successfully transformed domestic version of the core solver and the human-computer interaction interface source code with the original APPs. If the test passes, the domestic adaptation of the APPs is completed; otherwise, re-execute the transformation steps.

2. The method for domestic adaptation of ship and ocean multilingual APPs across the underlying CPU hardware architecture according to claim 1, wherein The analysis of the software and hardware operating environment of the original ship overall performance APPs to build a domestic CPU server adaptation environment includes: Analyze the software and hardware operating environment of the original APPs from aspects such as development language, development tools, third-party function libraries, CPU, and operating system; Select replaceable domestic development tools, third-party function libraries, CPU, and operating system to form a domestic software and hardware operating environment solution; Build a domestic CPU server based on the domestic software and hardware operating environment solution, and deploy the APPs to the domestic CPU server.

3. The method for domestic adaptation of marine multi-language APPs across the underlying CPU hardware architecture according to claim 1, characterized in that On the domestic CPU server, the transformation of the source code of the core solver of the APPs includes: Select a corresponding transformation plan according to the development language of the source code of the APPs core solver. The development language is divided into cross-platform languages and non-cross-platform languages; Among them, the cross-platform language refers to a language that can be compiled on both Intel X86 CPUs and domestic CPUs; The non-cross-platform language refers to a language that can be compiled on Intel X86 CPUs but cannot be compiled when migrated to domestic CPUs.

4. The method for nationalization adaptation of marine multi-language APPs across the underlying CPU hardware architecture according to claim 3, characterized in that For cross-platform languages, the transformation plan includes: On the domestic CPU server, compile the source code of the core solver. According to the error messages reported during compilation, transform the source code of the core solver. After the transformation is completed, recompile; Loop and iterate the process of compilation-transformation-recompilation until the compilation passes without errors.

5. The method for domestic adaptation of marine multi-language APPs across the underlying CPU hardware architecture according to claim 3, characterized in that, For non-cross-platform languages, the transformation plan includes: Analyze the characteristics and logic of the source code of the core solver, and rewrite the source code on the domestic CPU server; Compile the rewritten code. According to the error messages reported during compilation, transform the rewritten code. After the transformation is completed, recompile; Loop and iterate the process of compilation-transformation-recompilation until the compilation passes without errors.

6. The method for domestic adaptation of ship and ocean multilingual APPs across the underlying CPU hardware architecture according to claim 1, characterized in that On the domestic CPU server, transform the source code of the human-computer interaction interface of the APPs including, on the domestic CPU server: Configure the Qt project file of the human-computer interaction interface; Compile the source code of the human-computer interaction interface. According to the error messages reported during compilation, transform the source code of the human-computer interaction interface. After the transformation is completed, recompile; Loop and iterate the process of compilation-transformation-recompilation until the compilation passes without errors.

7. The method for domestic adaptation of ship and ocean multilingual APPs across the underlying CPU hardware architecture according to claim 1, characterized in that The comparison and testing of the successfully transformed domestic version of the core solver source code and the human-computer interaction interface source code with the original APPs includes, on the domestic CPU server: Package the source code of the successfully reformed core solver and the source code of the human-machine interaction interface to form a domesticated version of APPs; Use the human-machine interaction interface to call the core solver, input the same calculation parameters, and obtain the calculation results of the domesticated version of APPs and the original APPs respectively; Compare the calculation results of the two. If the calculation results are the same, the test passes.

8. The localization adaptation method of marine multi-language APPs across the underlying CPU hardware architecture according to any one of claims 1-7, characterized in that, The overall ship performance APPs are packaged by two parts: the core solver and the human-machine interaction interface. The core solver is called through the human-machine interaction interface to perform calculations; The core solver is developed in different programming languages, including: C, C++, Fortran, Python, C#, VB; The human-machine interaction interface is all developed in C++ language.