DPU service-based project construction method and device, electronic equipment and medium
Through the project construction method based on DPU business, using predefined project templates and the automation tool ADK-Boot, the problems of low project construction efficiency and high threshold in existing technologies are solved, and fast and automated project generation and deployment are achieved, which improves the deliverability and maintainability of the project.
Patent Information
- Application Number
- CN202410861152.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-28
- Publication Date
- 2025-10-21
- Estimated Expiration
- 2044-06-28
AI Technical Summary
The existing DPU-based project construction method is inefficient and time-consuming, with high error rates, high knowledge thresholds, lack of standardization, and insufficient flexibility, which makes project development and maintenance difficult.
Provides a project construction method based on DPU business. Through predefined project templates and the automated tool ADK-Boot, users can select a loading mode to obtain project templates, automatically configure components and generate project structures, reduce manual configuration steps, and improve efficiency.
Through predefined project templates and automated tools, repetitive work is reduced, project construction efficiency is improved, project deliverability and maintainability are enhanced, the development threshold is lowered, and fast and efficient project generation and deployment are achieved.
Smart Images

Figure CN118819673B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of software development technology, and in particular to a project construction method, device, electronic device, and medium based on a DPU service. Background Art
[0002] KPU SWIFT is a low-latency network card product launched by Zhongke Yusu based on its proprietary DPU (Data Processing Unit) core technology. It achieves sub-microsecond ultra-low latency and nanosecond jitter, ensuring stable, reliable, and ultra-low latency data transmission. Currently, various application projects developed based on this series of self-developed DPU cards are gradually moving towards customer delivery and launch. During this stage, customers continue to raise non-functional requirements, mainly focusing on maintainability, testability, high reliability, operability, and deliverability. These requirements are essential for productization and business implementation.
[0003] In related technologies, project construction methods usually involve repetitive manual configuration, which is very time-consuming. Therefore, how to improve the efficiency of project construction to enhance the deliverability of the project is an issue that needs to be addressed urgently. Summary of the Invention
[0004] In order to solve the above technical problems or at least partially solve the above technical problems, the present disclosure provides a project construction method, device, electronic device, and medium based on DPU business, which can overcome the shortcomings of the existing technology and solve the installation, deployment and secondary business development of different upper-layer applications based on DPU for customers and internal R&D teams, avoiding problems such as low efficiency, high threshold, and duplication of work.
[0005] In order to achieve the above objectives, the embodiments of the present disclosure provide the following technical solutions:
[0006] In a first aspect, an embodiment of the present disclosure provides a project construction method based on a DPU service, the method comprising:
[0007] In response to a mode selection operation by the user, determining whether the user selects a first loading mode to obtain a predefined project template;
[0008] If the user selects the first loading mode to obtain predefined project templates, all project templates are loaded from the local preset path and a list of project templates is displayed;
[0009] In response to a template selection operation by the user in the project template list, reading a configuration file of a target project template and recommending a plurality of components corresponding to the target project template to the user;
[0010] In response to a user's component selection operation, loading a target component;
[0011] Outputting first prompt information; the first prompt information is used to prompt the user to set project parameters for the new project based on the target project template;
[0012] The project parameters input by the user are received, and the new project is generated based on the target project template.
[0013] As an optional implementation of the embodiment of the present disclosure, the determining, in response to the user's mode selection operation, whether the user selects the first loading mode to obtain the predefined project template further includes:
[0014] If the user selects the second loading mode to obtain predefined project templates, all project templates are loaded from the remote server and a list of project templates is displayed.
[0015] As an optional implementation of the embodiment of the present disclosure, before determining, in response to the user's mode selection operation, whether the user selects the first loading mode to obtain the predefined project template, the method further includes:
[0016] Check whether the relevant dependent software and libraries are installed in the target environment;
[0017] If the relevant dependent software and the relevant dependent library are not installed in the target environment, the relevant dependent software and the relevant dependent library are installed based on the target tool to ensure that the target environment meets the operation requirements.
[0018] As an optional implementation of the embodiment of the present disclosure, after determining whether the user selects the first loading mode to obtain the predefined project template, the method further includes:
[0019] If the user selects the first loading mode to obtain a predefined project template, the first loading mode is started to run the target tool based on the first preset start command;
[0020] If the user selects the second loading mode to obtain a predefined project template for the first time, the second loading mode is started to run the target tool based on the second preset start command.
[0021] As an optional implementation of the embodiment of the present disclosure, the receiving the project parameters input by the user and generating the new project based on the target project template includes:
[0022] receiving the project parameters input by the user;
[0023] Based on the project parameters, the project structure of the target project template is adjusted to generate the new project.
[0024] As an optional implementation of the embodiment of the present disclosure, after receiving the project parameters input by the user and generating the new project, the method further includes:
[0025] Initializing the newly created project;
[0026] Based on the user's mode selection operation, the newly created project is compiled and run.
[0027] As an optional implementation of the embodiment of the present disclosure, the compiling and running of the newly created project based on the user's mode selection operation includes:
[0028] If the user selects the first loading mode, a second prompt message is output; the second prompt message is used to prompt the user to compile and run the new project based on the user manual;
[0029] If the user selects the second loading mode, the compilation and running of the new project will be automatically completed.
[0030] In a second aspect, an embodiment of the present disclosure provides a project construction device based on a DPU service, including:
[0031] a judgment module, configured to determine, in response to a mode selection operation of a user, whether the user selects a first loading mode to obtain a predefined project template;
[0032] A display module, configured to load all project templates from a local preset path and display a list of project templates if the user selects the first loading mode to obtain predefined project templates;
[0033] a recommendation module, configured to read a configuration file of a target project template in response to a template selection operation by the user in the project template list, and recommend a plurality of components corresponding to the target project template to the user;
[0034] A loading module, configured to load a target component in response to a component selection operation by a user;
[0035] An output module, configured to output first prompt information; the first prompt information is used to prompt a user to set project parameters for a new project based on the target project template;
[0036] The generating module is configured to receive the project parameters input by the user and generate the new project based on the target project template.
[0037] As an optional implementation of the embodiment of the present disclosure, the judgment module is further specifically configured to:
[0038] If the user selects the second loading mode to obtain predefined project templates, all project templates are loaded from the remote server and a list of project templates is displayed.
[0039] As an optional implementation of the embodiment of the present disclosure, the device further includes a checking module, which is specifically configured to:
[0040] Check whether the relevant dependent software and libraries are installed in the target environment;
[0041] If the relevant dependent software and the relevant dependent library are not installed in the target environment, the relevant dependent software and the relevant dependent library are installed based on the target tool to ensure that the target environment meets the operation requirements.
[0042] As an optional implementation of the embodiment of the present disclosure, the device further includes:
[0043] A first starting module, configured to start the first loading mode to run a target tool based on a first preset starting command if the user selects the first loading mode to obtain a predefined project template;
[0044] The second starting module is used to start the second loading mode to run the target tool based on a second preset starting command if the user selects the second loading mode to obtain the predefined project template for the first time.
[0045] As an optional implementation of the embodiment of the present disclosure, the generating module is specifically configured to: receive the project parameters input by the user;
[0046] Based on the project parameters, the project structure of the target project template is adjusted to generate the new project.
[0047] As an optional implementation of the embodiment of the present disclosure, the device further includes:
[0048] An initialization module, used to initialize the newly created project;
[0049] The compiling module is used to compile and run the newly created project based on the user's mode selection operation.
[0050] As an optional implementation of the embodiment of the present disclosure, the compiling module is specifically configured to:
[0051] If the user selects the first loading mode, a second prompt message is output; the second prompt message is used to prompt the user to compile and run the new project based on the user manual;
[0052] If the user selects the second loading mode, the compilation and running of the new project will be automatically completed.
[0053] In a third aspect, an embodiment of the present disclosure provides an electronic device, comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, it implements the project construction method based on the DPU business described in the first aspect or any embodiment of the first aspect.
[0054] In a fourth aspect, an embodiment of the present disclosure provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, it implements the project construction method based on the DPU business described in the above-mentioned first aspect or any embodiment of the first aspect.
[0055] The project construction method based on the DPU business provided by the present disclosure, in response to the user's mode selection operation, determines whether the user selects the first loading mode to obtain a predefined project template. If the user selects the first loading mode to obtain a predefined project template, all project templates are loaded from the local preset path, and a project template list is displayed; in response to the user's template selection operation in the project template list, the configuration file of the target project template is read, and multiple components corresponding to the target project template are recommended to the user. In response to the user's component selection operation, the target component is loaded and a first prompt message is output, wherein the first prompt message is used to prompt the user to set the project parameters of the new project based on the target project template, receive the project parameters input by the user, and generate the new project based on the target project template. By pre-defining multiple project templates, the user selects the target project template from multiple predefined project templates to generate a new project, thereby avoiding the time-consuming problem caused by repeated manual configuration, improving the efficiency of project construction, and thus improving the deliverability of the project. BRIEF DESCRIPTION OF THE DRAWINGS
[0056] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and, together with the description, serve to explain the principles of the present disclosure.
[0057] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0058] Figure 1 This is a flowchart of a method for constructing a project based on a DPU service in one embodiment;
[0059] Figure 2 This is a second flow chart of a method for constructing a project based on a DPU service in one embodiment;
[0060] Figure 3A schematic diagram of the structure of a project construction device based on a DPU service in one embodiment;
[0061] Figure 4 This is a schematic structural diagram of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0062] In order to more clearly understand the above-mentioned objectives, features and advantages of the present disclosure, the scheme of the present disclosure will be further described below. It should be noted that the embodiments of the present disclosure and the features therein can be combined with each other in the absence of conflict.
[0063] In the following description, many specific details are set forth to facilitate a full understanding of the present disclosure, but the present disclosure may also be implemented in other ways different from those described herein; it is obvious that the embodiments in the specification are only part of the embodiments of the present disclosure, rather than all of the embodiments.
[0064] In the embodiments of the present disclosure, words such as "exemplary" or "for example" are used to indicate examples, illustrations, or descriptions. Any embodiment or design described as "exemplary" or "for example" in the embodiments of the present disclosure should not be interpreted as being more preferred or advantageous than other embodiments or designs. Specifically, the use of words such as "exemplary" or "for example" is intended to present the relevant concepts in a concrete manner. In addition, in the description of the embodiments of the present disclosure, unless otherwise specified, the meaning of "multiple" refers to two or more.
[0065] Glossary:
[0066] Non-functional requirements are those that do not directly affect product functionality but are crucial to product operation, maintenance, and user experience. These requirements typically involve aspects such as product performance, reliability, security, maintainability, and scalability.
[0067] Operability means that the product is easy to monitor and maintain. For example, it provides detailed log information and automated operation and maintenance scripts.
[0068] Testability means that the product should support comprehensive testing, including unit testing, integration testing and performance testing.
[0069] High reliability means that the product should have high fault tolerance and stability, for example, through redundancy and automatic recovery mechanisms to improve reliability.
[0070] Operability means that the product is easy to operate and manage, such as providing a friendly user interface and detailed usage documentation.
[0071] Deliverability means simplifying customer installation and deployment work and improving efficiency through deployment script specifications and templates. New projects don't require extensive secondary development. Hot updates and rolling updates are available, reducing downtime and downtime during version iterations.
[0072] Currently, various application projects developed based on this series of DPU cards are gradually moving towards customer delivery and launch. The existing project construction methods have the following problems:
[0073] Low time efficiency: If a customer or internal R&D team wants to conduct secondary development based on an existing DPU business application, developers must manually set up each project from scratch. This includes creating the file structure, configuring the build system, and writing the basic code framework. These steps are extremely time-consuming and can easily lead to project delays due to missing key steps.
[0074] High Error Rate: Manually configuring a project increases the likelihood of errors. Every step, from writing configuration files to managing library dependencies and setting environment variables, can introduce errors. These errors are sometimes difficult to detect and correct, potentially leading to significant technical roadblocks early in the project's development.
[0075] High knowledge threshold: For novices or non-professionals, configuring a complex project environment requires extensive preparatory knowledge, such as a deep understanding of the build system, library dependencies, and configuration management. This increases the difficulty of getting started with the project and limits team members' rapid investment and productivity.
[0076] Lack of standardization: Different DPU business applications may set up similar projects in different ways, resulting in a lack of standardization. In this case, when new members join the project or when a project is handed over, they need additional time to understand the specific project structure and configuration, increasing communication and maintenance costs.
[0077] Lack of flexibility: In an environment without automated tool support, customizing a project often requires manually modifying multiple configuration files and parameters. This is not only time-consuming, but also requires repeating the same configuration process every time project requirements change, resulting in a lack of flexibility.
[0078] Difficulty in maintenance and updating: As project requirements change and technology develops, manually configured projects find it difficult to adapt quickly to changes.
[0079] Duplication of effort: Without tool assistance, the setup work for similar projects or common project structures often needs to be repeated, resulting in wasted resources and inefficiency.
[0080] The DPU-based project construction method provided in the embodiments of this disclosure is primarily used for application development in industries such as finance, carriers, banks, and data centers. In these scenarios, clients and internal R&D teams need to quickly and efficiently generate C++ projects for secondary development and deployment of upper-layer applications. For example, this method can be applied to low-latency trading systems and risk control systems.
[0081] For example, a financial institution client needs a DPU-based low-latency trading system for secondary business development. Using the ADK-Boot tool, the client selects a low-latency trading application template and quickly generates a C++ project that includes multithreading, asynchronous processing, and other components. This allows the client to focus solely on business logic development, significantly shortening the development cycle.
[0082] Another application scenario involves an internal R&D team that needs to conduct secondary business development and performance optimization based on a DPU-based low-latency trading system. Using the ADK-Boot tool, the team selected the all-in-one template to generate a project that includes the DPU's low-latency trading components and several performance optimization components. The tool automatically configures the component modules and generates a detailed project structure and configuration files, enabling efficient secondary development and deployment.
[0083] In order to better support the development of DPU-based business applications, meet the needs of the client side and internal R&D teams, and provide convenience for application development, ADK (Application Development Kit, Windows Assessment and Deployment Kit) is proposed. This solution is a tool library provided to the client side for application development based on Xilinx FPGA, NDPP or K-Machine, including application management, device management, log monitoring, high availability, development and testing and other related capabilities. The ADK-Boot (Application Development Kit Bootstrapper) of the present invention is a sub-tool of the tool library, which is mainly an automated C++ project generation tool based on user selection and predefined templates. ADK-Boot can quickly deploy new requirements or technology stacks through simple templates or configuration updates, greatly improving the maintainability and future compatibility of the project. In addition, ADK-Boot can realize the reuse of conventional settings, reduce duplication of work, and improve development efficiency.
[0084] To solve the above problems, this paper proposes a project construction method based on DPU business, referring to Figure 1 As shown, Figure 1 The flowchart of the project construction method based on the DPU business is shown below. The method includes the following steps S11-S16:
[0085] S11 . In response to a mode selection operation by a user, determining whether the user selects a first loading mode to obtain a predefined project template.
[0086] The mode selection operation includes: a first loading mode selection operation and a second loading mode selection operation. The first loading mode selection operation is used to select a first loading mode (i.e., a local loading mode) to obtain multiple predefined project templates. The second loading mode selection operation is used to select a second loading mode (i.e., a network loading mode) to obtain multiple predefined project templates.
[0087] Predefined project templates include: basic application template, low-latency transaction application template, performance optimization application template, etc.
[0088] The basic application template is suitable for simple DPU application development and provides basic project structure and configuration. It includes: basic file structure (such as src, include, and build directories), basic Makefile or CMakeLists.txt, sample code files (such as main.cpp), and basic component modules such as log management and configuration management.
[0089] The low-latency trading application template is suitable for low-latency trading systems and includes performance-optimizing components and software-hardware interaction protocols. The low-latency trading application template includes the following: (1) Performance components: Performance components used to optimize latency, such as efficient network communication libraries, low-latency queue management, etc. (2) Software-hardware interaction protocols: Instruction definitions: device management instructions (start, stop, reset, initialization), device log and indicator reporting instructions, and specific business instructions. (3) Structure: Optimize transmission rate and serialization rate in terms of performance, taking into account business readability and message scalability. (4) Thread management: Standardize the use of thread models (core binding, poll and sleep, etc.), and flexibly configure according to system requirements such as real-time requirements, system power consumption, and device life.
[0090] The performance optimization application template is suitable for DPU applications with high performance requirements, providing performance optimization-related configuration and code structure. The performance optimization application template includes: performance optimization configuration (such as multithreading and asynchronous processing mechanisms), performance testing and analysis tool integration, efficient data processing modules, sample code files, and configuration files.
[0091] Specifically, create a standardized template library containing various commonly used settings and functional modules. Each template includes a predefined project structure, configuration files, and a basic code framework. These template libraries can be stored locally or on a remote server to facilitate developers to obtain and use. Design common functions (such as log management, thread management, performance optimization, etc.) into independent modules. These modules can be reused in different projects to avoid rewriting the same code each time development is performed. Each functional module is turned into an independent component. Developers can select and integrate the required components according to project requirements. In response to the user's mode selection operation, determine whether the user selects the first loading mode to obtain a predefined project template. If so, execute step S12. If not, execute step S17.
[0092] In some embodiments, before executing the above step S11 (determining whether the user selects the first loading mode to obtain a predefined project template in response to the user's mode selection operation), the following steps may also be executed:
[0093] Check whether the relevant dependent software and libraries are installed in the target environment.
[0094] If the relevant dependent software and the relevant dependent library are not installed in the target environment, the relevant dependent software and the relevant dependent library are installed based on the target tool to ensure that the target environment meets the operation requirements.
[0095] Among them, the target environment includes: Python environment, pip environment, etc.
[0096] The project construction method based on the DPU business provided by the embodiment of the present disclosure is a tool library provided to the client side for application development based on Xilinx FPGA, NDPP or K-Machine, including application management, device management, log monitoring, high availability, development testing and other related capabilities. The target tool can be understood as ADK-Boot, which is mainly an automated C++ project generation tool based on user selection and predefined templates. ADK-Boot can quickly deploy new requirements or technology stacks through simple templates or configuration updates, greatly improving the maintainability and future compatibility of the project. In addition, ADK-Boot can realize the reuse of conventional settings, reduce duplication of work, and improve development efficiency.
[0097] Specifically, ADK-Boot uses a shell script to automatically check whether all dependent software and libraries are installed on the target system. Specifically, it checks whether Git, Cookiecutter, ADK-Boot, and other dependent software and libraries are installed in the target environment. If not, it automatically installs them to ensure the environment meets the tool's requirements.
[0098] Before starting a project, ADK-Boot first checks whether the required basic configurations and dependencies (such as Git, Cookiecutter, ADK-Boot, etc.) exist in the target environment to ensure that all necessary tools and libraries are ready, thereby avoiding failures due to missing dependencies during the project configuration process.
[0099] S12. If the user selects the first loading mode to obtain predefined project templates, all project templates are loaded from the local preset path and a project template list is displayed.
[0100] Specifically, the user selects to use local mode or network mode to obtain predefined project templates through the command line interface. In local loading mode, the template is loaded from the local preset path and a list of all existing templates is provided to the user for selection.
[0101] The tool provides a user-friendly command-line interface that allows users to select a suitable project template from a pre-set set of templates. The system automatically obtains template information based on the user's selection and guides the user through a simple interactive dialogue to perform project-specific configuration, such as component selection and project parameter settings.
[0102] In some embodiments, reference Figure 2 As shown, the above step S11 (determining whether the user selects the first loading mode to obtain the predefined project template in response to the user's mode selection operation) can also be implemented by the following steps:
[0103] S17. If the user selects the second loading mode to obtain predefined project templates, all project templates are loaded from the remote server and a project template list is displayed.
[0104] Specifically, in network loading mode, templates are downloaded from a remote server. The tool displays a list of available templates. After the user selects a template, the tool automatically processes the template download or load and provides the user with a list of all available templates for selection.
[0105] Establish a DPU-based automated project generation system with the ability to switch between local and network modes, allowing users to flexibly choose template acquisition methods based on resource availability and needs, and implement a project generation framework suitable for different environments.
[0106] Furthermore, in some embodiments, after executing the above step S11 (determining, in response to the user's mode selection operation, whether the user selects the first loading mode to obtain a predefined project template), the following steps may also be executed:
[0107] 1) If the user selects the first loading mode to obtain a predefined project template, the first loading mode is started to run the target tool based on a first preset start command.
[0108] The first preset startup command is: adkboot -L.
[0109] Specifically, if the user selects the first loading mode to obtain a predefined project template, then based on the first preset startup command, the local loading mode is started to run the target tool. At this time, all predefined project templates are already local by default. If they are not local, the tool will report an error.
[0110] 2) If the user selects the second loading mode to obtain a predefined project template for the first time, the second loading mode is started to run the target tool based on the second preset start command.
[0111] The second preset startup command is: / bin / bash-c"$(curl-fsSL --header "PRIVATE-TOKEN:c44YHKYzZiSkoazqcDMF http: / / 192.168.2.114 / ystec h / ADP / ADK-Boot / raw / master / ADK-Boot.sh).
[0112] Specifically, if the user selects the network loading mode to obtain a predefined project template for the first time, the second loading mode is started based on the second preset startup command to run the target tool. If it is not the first time to obtain, ADK-Boot is directly run, and then only the corresponding project template is downloaded based on the user's selection.
[0113] With the ADK-Boot tool, developers can select predefined templates and functional modules to automatically generate project structures and configuration files. The tool can automatically instantiate templates and configurations based on user input, reducing manual operations and repetitive work.
[0114] S13. In response to the user's template selection operation in the project template list, read the configuration file of the target project template, and recommend multiple components corresponding to the target project template to the user.
[0115] Specifically, in response to a user selecting a template from the project template list, the target tool reads the target project template's configuration file and displays a list of available templates. After the user selects a template, the target tool automatically downloads or loads the template. After the template is loaded, the tool reads the template's configuration file, intelligently recommends suitable components for the template, and displays a list of components.
[0116] For example, after the user selects a template, the tool recommends components that the current template may need. If the user does not want recommended components, the user can select them on their own. The tool reads certain configuration files of the template, such as component_dependencies.json (which contains (component name, component dependency list, component dependent third-party libraries, and the folder path of the component configuration in the template); component_list.json (component name, folder path of the component source file); cookiecutter.json (user-defined configuration, such as the new project name, etc.), and file_config.json (files that do not meet the tool's format requirements, that is, files that need to be temporarily removed).
[0117] S14. In response to the user's component selection operation, target component loading is performed.
[0118] Specifically, after the user selects the target component, the target tool automatically processes the component's circular nested dependencies and the component's related project directories. A mechanism for automatic component dependency resolution and project configuration generation is established. This mechanism automatically handles complex component dependencies and automatically generates project configurations and file structures based on predefined templates and user input, improving the accuracy and efficiency of project configuration.
[0119] The C++ project automatic generation tool includes intelligent template management and user interactive configuration interface. The system supports dynamic updating, customization and intelligent component recommendation of templates, and guides users to complete template selection and project specific configuration through an interactive interface.
[0120] S15: Output the first prompt information.
[0121] The first prompt information is used to prompt the user to set project parameters for the new project based on the target project template. The project parameters include the name of the new project, the target directory for the new project, etc.
[0122] Specifically, after the template and component loading process is completed, the system provides an interactive configuration session, that is, outputs a first prompt information, and the user can set project-specific parameters according to the first prompt information, such as the new project name, the target directory for generating the new project, etc.
[0123] S16: Receive the project parameters input by the user, and generate the new project based on the target project template.
[0124] In some embodiments, the above step S16 (receiving the project parameters input by the user and generating the new project based on the target project template) can be implemented as follows:
[0125] receiving the project parameters input by the user;
[0126] Based on the project parameters, the project structure of the target project template is adjusted to generate the new project.
[0127] Specifically, the tool receives user input for parameters such as the new project name and the target directory for the new project. After the interaction is complete, the tool reads the file configuration and adjusts the template project structure. For example, if File A is recorded in the file configuration and affects the creation of the new project, then in this step, File A will be temporarily removed from the project template before the new project is created.
[0128] For example, a new project is generated at a user-specified location based on the configuration. This step can be accomplished by using the Cookiecutter tool to instantiate a template. Template instantiation is the process of generating a new project based on a selected target template.
[0129] Based on user input, ADK-Boot automatically instantiates the selected template, handles complex dependencies, and generates a project structure and configuration files that meet user needs. It then automatically compiles and runs the project according to user needs.
[0130] In some embodiments, after executing the above step S16 (receiving the project parameters input by the user and generating the new project based on the target project template), the following steps may also be executed:
[0131] A. Initialize the newly created project.
[0132] Among them, project initialization includes: Git repository initialization, whether to link to the remote repository step based on user selection, and automatically downloading and configuring third-party libraries according to project requirements.
[0133] Specifically, after a new project is generated, ADK-Boot automatically performs project initialization, such as Git repository initialization, determines whether to link to a remote repository based on user selection, and automatically downloads and configures third-party libraries based on project requirements.
[0134] B. Based on the user's mode selection operation, compile and run the newly created project.
[0135] In some embodiments, the above step B (compiling and running the newly created project based on the user's mode selection operation) can be implemented as follows:
[0136] (1) If the user selects the first loading mode, the second prompt information is output.
[0137] The second prompt information is used to prompt the user to compile and run the new project based on the user manual.
[0138] (2) If the user selects the second loading mode, the compilation and operation of the new project will be automatically completed.
[0139] Specifically, the subsequent project compilation and operation are carried out according to the mode selected by the user. For example, if the user selects the local loading mode at the beginning, the local loading mode prompts the user to configure the third-party library according to the user manual and then complete the project compilation and operation. That is, the local loading mode will provide subsequent build and test guidance to help the user complete the project compilation and operation test; if the user selects the network loading mode, the network loading mode automatically completes the project compilation and operation, that is, the tool interacts with the user and automatically compiles and runs the project.
[0140] After the project is generated, it automatically compiles and runs the project according to user needs, or provides a complete build and test operation guide, including how to compile the project and run test scripts, as well as generate code coverage reports to ensure project quality.
[0141] The embodiment of the present disclosure should be used. The project construction method based on the DPU business provided by the present disclosure determines whether the user selects the first loading mode to obtain a predefined project template in response to the user's mode selection operation. If the user selects the first loading mode to obtain a predefined project template, all project templates are loaded from the local preset path, and a project template list is displayed; in response to the user's template selection operation in the project template list, the configuration file of the target project template is read, and multiple components corresponding to the target project template are recommended to the user. In response to the user's component selection operation, the target component is loaded and a first prompt message is output, wherein the first prompt message is used to prompt the user to set the project parameters of the new project based on the target project template, receive the project parameters input by the user, and generate the new project based on the target project template. By pre-defining multiple project templates, the user selects the target project template from multiple predefined project templates to generate a new project, thereby avoiding the time-consuming problem caused by repeated manual configuration, improving the efficiency of project construction, and thus improving the deliverability of the project.
[0142] In one embodiment, Figure 3 As shown, a project construction device 300 based on a DPU service is provided, including:
[0143] A determination module 310 is configured to determine, in response to a mode selection operation by a user, whether the user selects a first loading mode to obtain a predefined project template;
[0144] The display module 320 is configured to load all project templates from a local preset path and display a list of project templates if the user selects the first loading mode to obtain predefined project templates;
[0145] A recommendation module 330 is configured to read a configuration file of a target project template in response to a user selecting a template in the project template list, and recommend a plurality of components corresponding to the target project template to the user;
[0146] The loading module 340 is used to load the target component in response to the user's component selection operation;
[0147] An output module 350 is configured to output a first prompt message, wherein the first prompt message is configured to prompt a user to set project parameters for a new project based on the target project template.
[0148] The generation module 360 is configured to receive the project parameters input by the user and generate the new project based on the target project template.
[0149] As an optional implementation of the embodiment of the present disclosure, the judgment module is further specifically configured to:
[0150] If the user selects the second loading mode to obtain predefined project templates, all project templates are loaded from the remote server and a list of project templates is displayed.
[0151] As an optional implementation of the embodiment of the present disclosure, the device further includes a checking module, which is specifically configured to:
[0152] Check whether the relevant dependent software and libraries are installed in the target environment;
[0153] If the relevant dependent software and the relevant dependent library are not installed in the target environment, the relevant dependent software and the relevant dependent library are installed based on the target tool to ensure that the target environment meets the operation requirements.
[0154] As an optional implementation of the embodiment of the present disclosure, the device further includes:
[0155] A first starting module, configured to start the first loading mode to run a target tool based on a first preset starting command if the user selects the first loading mode to obtain a predefined project template;
[0156] The second starting module is used to start the second loading mode to run the target tool based on a second preset starting command if the user selects the second loading mode to obtain the predefined project template for the first time.
[0157] As an optional implementation of the embodiment of the present disclosure, the generating module is specifically configured to: receive the project parameters input by the user;
[0158] Based on the project parameters, the project structure of the target project template is adjusted to generate the new project.
[0159] As an optional implementation of the embodiment of the present disclosure, the device further includes:
[0160] An initialization module, used to initialize the newly created project;
[0161] The compiling module is used to compile and run the newly created project based on the user's mode selection operation.
[0162] As an optional implementation of the embodiment of the present disclosure, the compiling module is specifically configured to:
[0163] If the user selects the first loading mode, a second prompt message is output; the second prompt message is used to prompt the user to compile and run the new project based on the user manual;
[0164] If the user selects the second loading mode, the compilation and running of the new project will be automatically completed.
[0165] Applying the embodiments of the present disclosure, the project construction device based on the DPU service provided by the present disclosure, in response to the user's mode selection operation, determines whether the user selects the first loading mode to obtain a predefined project template. If the user selects the first loading mode to obtain a predefined project template, all project templates are loaded from the local preset path, and a project template list is displayed; in response to the user's template selection operation in the project template list, the configuration file of the target project template is read, and multiple components corresponding to the target project template are recommended to the user. In response to the user's component selection operation, the target component is loaded and a first prompt message is output, wherein the first prompt message is used to prompt the user to set the project parameters of the new project based on the target project template, receive the project parameters input by the user, and generate the new project based on the target project template. By pre-defining multiple project templates, the user can select the target project template from multiple predefined project templates to generate a new project, thereby avoiding the time-consuming problem caused by repeated manual configuration, improving the efficiency of project construction, and thus improving the deliverability of the project.
[0166] For the specific definition of the project construction device based on the DPU business, please refer to the definition of the project construction method based on the DPU business above, which will not be repeated here. The various modules in the above-mentioned project construction device based on the DPU business can be implemented in whole or in part by software, hardware and their combination. The above-mentioned modules can be embedded in or independent of the processor of the electronic device in the form of hardware, or can be stored in the processor of the electronic device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0167] The present disclosure also provides an electronic device, Figure 4 This is a schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure. Figure 4 As shown, the electronic device provided in this embodiment includes: a memory 41 and a processor 42. The memory 41 is used to store a computer program; the processor 42 is used to execute the steps performed in any embodiment of the DPU service-based project construction method provided in the above-mentioned method embodiments when the computer program is called. The electronic device includes a processor, memory, a communication interface, a display screen, and an input device connected via a system bus. The processor of the electronic device is used to provide computing and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. When the computer program is executed by the processor, a DPU service-based project construction method is implemented. The display screen of the electronic device can be a liquid crystal display or an electronic ink display screen. The input device of the electronic device can be a touch layer covering the display screen, or keys, a trackball, or a touchpad provided on the computer device housing, or an external keyboard, touchpad, or mouse.
[0168] Those skilled in the art will understand that Figure 4 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific electronic device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.
[0169] In one embodiment, the project construction device based on the DPU service provided by the present disclosure can be implemented in the form of a computer, and the computer program can be used in Figure 4 The memory of the electronic device can store various program modules constituting the project construction device based on the DPU service of the electronic device.
[0170] An embodiment of the present disclosure further provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the project construction method based on the DPU service provided in the above method embodiment is implemented.
[0171] Those skilled in the art will appreciate that embodiments of the present disclosure may be provided as methods, systems, or computer program products. Thus, the present disclosure may take the form of an entirely hardware embodiment, an entirely software embodiment, or an embodiment combining software and hardware. Furthermore, the present disclosure may take the form of a computer program product implemented on one or more computer-usable storage media containing computer-usable program code.
[0172] The processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.
[0173] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.
[0174] Computer-readable media includes both permanent and non-permanent, removable and non-removable storage media. Storage media can implement any method or technology for storing information, which can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change RAM (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer-readable media does not include transitory computer-readable media, such as modulated data signals and carrier waves.
[0175] It should be noted that, in this document, the terms "comprises," "includes," or any other variations thereof are intended to encompass non-exclusive inclusion, such that a process, method, article, or apparatus comprising a series of elements includes not only those elements but also other elements not explicitly listed, or elements inherent to such process, method, article, or apparatus. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of other identical elements in the process, method, article, or apparatus comprising the element.
[0176] The foregoing description is intended only to provide specific embodiments of the present disclosure, intended to enable those skilled in the art to understand and implement the present disclosure. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the present disclosure. Therefore, the present disclosure is not intended to be limited to the embodiments described herein, but rather to be construed in the broadest manner consistent with the principles and novel features disclosed herein.
Claims
1. A project construction method based on DPU business, characterized in that: The method comprises: In response to a user's mode selection operation, determining whether the user selects a first loading mode to obtain a predefined project template; the predefined project templates are suitable for DPU application development and include: a basic application template, a low-latency transaction application template, and a performance optimization application template; each template includes a predefined project structure, a configuration file, and a basic code framework; If the user selects the first loading mode to obtain predefined project templates, all project templates are loaded from the local preset path and a list of project templates is displayed; In response to a template selection operation by the user in the project template list, reading a configuration file of a target project template and recommending a plurality of components corresponding to the target project template to the user; In response to a user's component selection operation, loading a target component; Outputting a first prompt message; the first prompt message is used to prompt the user to set project parameters for a new project based on the target project template; the project parameters include a new project name and a target directory for generating the new project; The project parameters input by the user are received, and the new project is generated based on the target project template.
2. The method according to claim 1, characterized in that The step of determining whether the user selects the first loading mode to obtain the predefined project template in response to the user's mode selection operation further includes: If the user selects the second loading mode to obtain predefined project templates, all project templates are loaded from the remote server and a list of project templates is displayed.
3. The method according to claim 1, characterized in that Before determining whether the user selects the first loading mode to obtain the predefined project template in response to the user's mode selection operation, the method further includes: Check whether the relevant dependent software and libraries are installed in the target environment; If the relevant dependent software and the relevant dependent library are not installed in the target environment, the relevant dependent software and the relevant dependent library are installed based on the target tool to ensure that the target environment meets the operation requirements.
4. The method according to claim 2, characterized in that After determining whether the user selects the first loading mode to obtain the predefined project template, the method further includes: If the user selects the first loading mode to obtain a predefined project template, the first loading mode is started to run the target tool based on the first preset start command; If the user selects the second loading mode to obtain a predefined project template for the first time, the second loading mode is started to run the target tool based on the second preset start command.
5. The method according to claim 1, wherein The receiving the project parameters input by the user and generating the new project based on the target project template includes: receiving the project parameters input by the user; Based on the project parameters, the project structure of the target project template is adjusted to generate the new project.
6. The method according to claim 2, characterized in that After receiving the project parameters input by the user and generating the new project, the method further includes: Initializing the newly created project; Based on the user's mode selection operation, the newly created project is compiled and run.
7. The method according to claim 6, characterized in that The compiling and running of the newly created project based on the user's mode selection operation includes: If the user selects the first loading mode, a second prompt message is output; the second prompt message is used to prompt the user to compile and run the new project based on the user manual; If the user selects the second loading mode, the compilation and running of the new project will be automatically completed.
8. A project construction device based on DPU service, characterized in that: include: a judgment module, configured to determine, in response to a mode selection operation of a user, whether the user selects a first loading mode to obtain a predefined project template; The predefined project templates are suitable for DPU application development and include: basic application template, low-latency transaction application template, and performance optimization application template; each template includes a predefined project structure, configuration files, and basic code framework; A display module, configured to load all project templates from a local preset path and display a list of project templates if the user selects the first loading mode to obtain predefined project templates; a recommendation module, configured to read a configuration file of a target project template in response to a template selection operation by the user in the project template list, and recommend a plurality of components corresponding to the target project template to the user; A loading module, configured to load a target component in response to a component selection operation by a user; An output module, configured to output first prompt information; the first prompt information is configured to prompt a user to set project parameters for a new project based on the target project template; the project parameters include a new project name and a target directory for the new project; The generating module is configured to receive the project parameters input by the user and generate the new project based on the target project template.
9. An electronic device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the project construction method based on the DPU service described in any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium, characterized in that A computer program is stored thereon, and when the computer program is executed by a processor, the project construction method based on the DPU service according to any one of claims 1 to 7 is implemented.
Citation Information
Patent Citations
Project generation method and device, electronic equipment and readable medium
CN114115845A
Construction method and device of front-end project, electronic equipment and storage medium
CN115629753A
Front-end project management method and device, computer equipment and storage medium
CN116051056A