Automatic construction and publishing method based on UE5
By adopting intelligent prediction triggers, dynamic code analysis modules and other technologies in the UE5 engine environment, the entire process from development to release is realized, and the construction of triggering methods in the existing system is solved, and the lack of refined management and resources are lacking in code compilation processing in detail. The problem of insufficient packaging strategy improves construction efficiency and code quality, and ensures the efficiency and stability of multi-platform releases.
Patent Information
- Application Number
- CN202510004275.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-02
- Publication Date
- 2025-02-07
AI Technical Summary
The existing automated construction and release system has problems such as single construction triggering methods, lack of refined management of code compilation and processing, and insufficient resource packaging strategies in the UE5 engine environment, resulting in low construction efficiency, difficult to guarantee code quality, and low multi-platform release efficiency. .
Using an automated construction and release method based on UE5, we deeply integrate the core features of UE5 and optimize the construction process to achieve full process automation from development to release. Specific measures include intelligent prediction triggers, dynamic code analysis modules, multi-threaded parallel packaging technology, differential package generation, blockchain technology and containerized deployment technology.
It improves construction efficiency, reduces manual intervention, ensures the consistency and stability of multi-platform construction, and meets the needs of modern game development for efficient, stable and rapid release.
Smart Images

Figure CN119396368A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of software development, and in particular to an automatic construction and publishing method based on UE5. Background Art
[0002] With the increasing complexity of digital twin projects and the increasing market demand for rapid iteration, how to improve the efficiency of building and publishing during the development process has become a major challenge facing developers. The traditional manual building and publishing process is usually time-consuming, easily affected by human factors, and difficult to maintain efficient and stable output, especially in the case of multi-platform releases and frequent updates.
[0003] The automated build and release system is a technical means proposed to solve these problems. It can automate steps such as code compilation, resource packaging, error detection, version management, installation package generation, and multi-platform release, thereby significantly improving development efficiency and product quality. However, the automated build solutions currently on the market usually lack deep integration of UE5 engine features and cannot fully meet the specific needs of UE5 projects, such as complex resource management, mixed compilation of blueprints and C++ codes, multi-platform compatibility, and engine update adaptation.
[0004] In the current technical environment, although there has been some progress in the field of automated build and release based on UE5, the following problems still exist: Problem 1: Existing build triggering methods are relatively simple and rigid. Most of them only rely on simple scheduled tasks or basic version control system change detection to start the build process. They lack the ability to deeply perceive and intelligently analyze project development dynamics, and are unable to make comprehensive judgments based on multi-dimensional factors such as the historical rules of code submission, the work habits of developers, and the real-time status of system resources. As a result, it is difficult to trigger the build at the most appropriate time, which often leads to inefficient resource utilization. For example, during periods of frequent code submission, too many build tasks may cause resource congestion, while during idle resource periods, resources cannot be effectively utilized to build in advance, which prolongs the overall build cycle. Problem 2: During the code building process, there is a lack of refined management of the compilation of C++ and TypeScript codes. Usually, only basic compilation operations are performed, and the potential impact of code quality on the overall performance and stability of the project is not deeply analyzed. There is no complete code quality monitoring system, and key indicators such as code complexity, memory leakage risk, and code coupling cannot be monitored and effectively evaluated in real time. This makes the built code likely to hide a large number of potential problems. For example, highly coupled code may make subsequent modification and expansion difficult, and memory leakage problems may cause system crashes or sharp performance drops after the project has been running for a long time, which greatly increases the cost and difficulty of later project maintenance. Problem three: When building the client and server packages, the resource packaging strategy is not smart enough. Most of them use a fixed packaging mode, without fully considering the characteristics of different types of resources and the actual conditions of hardware resources. They cannot dynamically allocate packaging tasks and select appropriate compression algorithms based on the importance and dependencies of resources and the load of hardware resources. For example, for some key resources with high real-time requirements, they fail to give priority and adopt efficient compression methods to reduce loading time; for environments with rich hardware resources, they cannot fully utilize multi-threading or distributed computing resources for parallel packaging, resulting in a long packaging process and a large generated package size, which is not conducive to the rapid distribution and deployment of the project.
[0005] Therefore, an automated build and release method based on UE5 is needed to solve the above problems. Summary of the invention
[0006] Technical issues solved
[0007] In view of the deficiencies of the prior art, the present invention provides an automated construction and release method based on UE5, which solves the problems in the above background technology. Further, by deeply integrating the core features of UE5, the construction process is optimized, the whole process from development to release is automated, the development efficiency is improved, manual intervention is reduced, and the consistency and stability of multi-platform construction are guaranteed, thereby meeting the needs of modern game development for efficient, stable and rapid release.
[0008] Technical Solution
[0009] To achieve the above objectives, the present invention is implemented through the following technical solutions: an automated build and release method based on UE5, comprising a computer environment based on UE5, wherein the computer environment based on UE5 has a built-in building module and a release module, wherein the basic steps of the building module include triggering a build, executing a pre-build task, packaging a client and a server, logging, and automatic alarming, and the basic steps of the release module include differential package generation, version detection, and automatic release; The specific steps of executing the building module include: SpA1, Trigger build: Automatically start the build process by configuring build triggers. Triggers include VCS triggers. The triggering steps include: SpA11, check every minute whether there is code submission or change in the current version control system, automatically start the build task and record the relevant submission information; SpA12, trigger the build according to the set time. If there is a task that is already being built, add it to the queue and execute the current task after the previous task is completed. SpA13 also uses deep learning analysis of historical project development data through intelligent prediction triggers; SpA14: Predict the peak hours of code submission and the risk of code conflicts that may occur, automatically trigger builds during low-risk and resource-free periods, and further optimize build resource allocation and efficiency; SpA2, Execute pre-build tasks: Pre-build tasks are automatically executed in sequence according to predefined steps, including: SpA21, C++ code pre-build, compile the C++ code in the project to ensure that the core logic and engine functions have generated corresponding binary files; SpA22, TypeScript code pre-build, compile TypeScript code and generate declaration files to ensure that it works with C++ code; SpA23, pre-build verification, verify the dependent environment and record the verification results to ensure the correctness of the configuration of each platform; SpA24. Add a dynamic code analysis module based on the pre-build verification process to monitor code quality indicators in real time during the pre-build process. The monitored quality indicators include code complexity and memory leakage risks, and automatically optimize the code structure or provide optimization suggestions according to the preset limit values to ensure that the built code has higher performance and stability. SpA3, client and server package construction: After completing code compilation and pre-construction, complete the packaging of the client and server, archive and compress the generated package to ensure that the distribution file size is minimized, and use multi-threaded parallel packaging technology to reasonably allocate packaging threads according to resource types and hardware resource conditions; SpA4, Log Recording and Result Reporting: During each build process, the output logs of all executed Batch scripts and Shell scripts are automatically recorded to generate detailed build log files for subsequent problem analysis and build result reports. After the build is completed, the result report is generated. The post-processing steps are as follows: SpA41, record the build status, duration and build details, and record the version information after the build is successful; SpA42, if the build fails, the error cause is recorded in detail, and the build log is deeply mined using big data analysis technology to automatically generate a build trend report, providing the development team with long-term evaluation of project build efficiency and improvement directions; SpA5, automatic alarm mechanism: When an error is detected during the build process, the system will automatically send an alarm message to the DingTalk group through HTTP request to notify team members to handle it immediately. The alarm information includes error summary, build steps and timestamp. At the same time, an intelligent alarm classification system is introduced to automatically assign different alarm levels according to the error type and severity. The specific workflow of the publishing module is as follows: SpB1, differential package generation: adopt differential packaging strategy, and only update the code and resources that have changed since the last version each time, including: SpB11, differential file extraction, by comparing the latest version with the base version, extracting the newly added and modified files, and generating a patch package containing only these differences; SpB12, incremental update package creation, using difference files to generate incremental update packages, avoiding full updates, reducing user download time and server pressure; SpB13, upload the incremental update package to the cloud storage server for users to download, and use blockchain technology to encrypt and verify the differential package; SpB2, version detection: The server automatically monitors changes in version configuration files. Before releasing a new version, it automatically backs up the existing server logs, safely shuts down the running old version server, and downloads the new server package from the predefined network storage location to the specified directory to ensure that the new package runs correctly. SpB3, automatic release: start a new server version, release monitoring and report generation. After the release is completed, the system generates a release report to record the release results, time consumption and potential errors for subsequent analysis and review. At the same time, containerized deployment technology is used to encapsulate the server package in a lightweight container to achieve rapid deployment, isolated operation and efficient use of resources.
[0010] Preferably, the dynamic code analysis module adopts a code quality assessment algorithm, which comprehensively considers the cyclomatic complexity, maintainability index and multi-dimensional indicators of code coupling of the code, constructs a code dependency graph by statically analyzing C++ and TypeScript code, calculates the code coupling using a graph theory algorithm, calculates the comprehensive code quality score in combination with a preset weight coefficient, and automatically generates targeted optimization strategies.
[0011] Preferably, in the multi-threaded parallel packaging technology, a task scheduling algorithm based on a priority queue is used to determine the priority of resource packaging tasks according to the importance of resources, dependencies and estimated processing time factors, and high-priority tasks are preferentially assigned to idle threads for processing, wherein the importance of resources is determined according to the criticality of the resources in the game running process and the degree of impact on system performance, the dependencies are obtained by analyzing the reference and call relationships between resources, and the estimated processing time is estimated based on historical packaging data and resource characteristics using a regression analysis algorithm, thereby improving the orderliness and efficiency of resource packaging.
[0012] Preferably, when the blockchain technology is used for differential package management, a hash algorithm is used to perform a hash operation on each file in the differential package, and a unique hash value is generated and stored in the blockchain. During the version verification process, the file integrity is ensured by comparing the hash value of the downloaded differential package file with the hash value recorded in the blockchain. At the same time, the blockchain's smart contract algorithm is used to implement an authorized access mechanism for the differential package. Only users and nodes holding legal authorization keys and within the authorized time range can download and use the differential package.
[0013] Preferably, in the version rollback management of the containerized deployment technology, an algorithm based on log rollback point marking is adopted. During the operation of the server, key status information and operation logs in the container are regularly checked and marked. When a version rollback is required, the previous stable state is quickly located based on these marks, and the container is restored to the specified version according to a predetermined rollback process, thereby effectively reducing the time and complexity of version rollback and improving the fault tolerance of the system.
[0014] Preferably, the intelligent prediction trigger uses the decision tree algorithm in machine learning to analyze the project development history data, takes the code submission time, the submitter and the data of the code modules involved as features, builds a code submission risk prediction model, and uses the model to predict the probability of code submission causing build failure and conflict in different situations. The build trigger strategy is dynamically adjusted according to the prediction results, the build trigger frequency is reduced in low-risk periods to save resources, and pre-build inspection steps are added in high-risk periods or relevant personnel are notified in advance for manual intervention to ensure the stability and efficiency of the build process.
[0015] Preferably, in the differential package generation process, a differential algorithm based on content recognition is used. When comparing the latest version with the basic version, deep semantic analysis technology is used to parse the code and resource files. While comparing the differences at the file level, changes in the code logical structure and changes in resource semantic features are identified, thereby more accurately extracting new or modified files and generating more optimized, smaller and more compatible differential packages, effectively improving the success rate and efficiency of user updates.
[0016] Beneficial Effects
[0017] The present invention provides an automated construction and publishing method based on UE5. It has the following beneficial effects: 1. The present invention uses deep learning analysis of project development historical data through intelligent prediction triggers to accurately predict the peak time period of code submission and the risk of code conflict, and automatically triggers construction during low-risk and resource-idle periods, effectively avoiding the problem of low resource utilization efficiency caused by the lack of multi-dimensional comprehensive judgment in traditional build triggering methods. For example, in actual applications, based on data such as the code submission time distribution, the modules involved, and the active time periods of developers in the past few months, it is possible to accurately identify relatively idle and low-risk time periods, such as late at night or weekends when they are non-core development periods and when no major project milestones are approaching, and automatically start the build task. This not only enables resources to be reasonably allocated in the time dimension and reduces resource congestion during peak hours, but also completes the build in advance, shortens the overall build cycle, and provides strong support for rapid project iteration.
[0018] 2. The present invention plays a key role in the code construction link and the dynamic code analysis module integrated in the construction task execution process. By statically analyzing C++ and TypeScript codes, building a code dependency graph and calculating the code coupling degree using graph theory algorithms, the code quality is comprehensively evaluated in combination with preset weights. Real-time monitoring of key indicators such as code complexity and memory leakage risk, and automatic generation of targeted optimization strategies when the indicators exceed the limit value, for example, in a complex UE5 game project, if it is detected that the code coupling of a certain functional module is too high, it may automatically suggest splitting it into multiple independent modules to reduce the mutual dependence between modules and improve the maintainability and scalability of the code. This refined management effectively avoids the difficulties in project maintenance caused by code quality problems, such as the modification caused by high coupling degree, or the system crash caused by memory leakage affects the user experience, etc., which greatly improves the overall stability and performance of the project.
[0019] 3. The present invention shows excellent intelligence when constructing the client and server packages. The multi-threaded parallel packaging technology reasonably allocates packaging threads through intelligent algorithms based on resource types and hardware resource conditions. For example, for key resources with extremely high real-time requirements such as game opening animations, more computing resources are preferentially allocated and efficient compression algorithms are adopted to ensure that they can be loaded quickly and improve the smoothness of the user's first experience. At the same time, in a server environment with rich hardware resources, multi-core CPUs and high-speed disk arrays are fully utilized to process the packaging tasks of multiple resources in parallel, significantly shortening the packaging time. Compared with the traditional fixed packaging mode, the generated package body is smaller in size and loads faster, which is particularly important for multi-platform publishing and large-scale user distribution scenarios. It can effectively reduce network bandwidth pressure, increase user enthusiasm for downloading and updating, and promote the wide dissemination and application of projects. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] Figure 1is a flow chart of the overall method of the present invention; Figure 2 This is a workflow diagram of the dynamic code analysis module of the present invention. DETAILED DESCRIPTION
[0021] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention. Specific embodiment one:
[0023] like Figure 1-2 As shown, an automated build and release method based on UE5 includes a computer environment based on UE5, wherein the computer environment based on UE5 has a built-in build module and a release module, wherein the basic steps of the build module include triggering build, executing pre-build tasks, client and server packaging, logging and automatic alarming, and the basic steps of the release module include differential package generation, version detection and automatic release.
[0024] The specific steps to build a module are as follows: SpA1, Trigger build: Automatically start the build process by configuring build triggers. Triggers include VCS triggers. Every minute, check whether there is code submission or change in the current version control system. If there is, automatically start the build task and record the relevant submission information. The build is triggered regularly according to the set time. If there is a task that is already being built, it is added to the queue. The current task will be executed after the previous task is completed. At the same time, through the deep learning analysis of the historical data of project development through intelligent prediction triggers, the peak period of code submission and the risk of code conflict that may occur are predicted, and the build is automatically triggered during the low-risk and resource-free period, further optimizing the allocation and efficiency of build resources; SpA2, execute pre-build tasks: build tasks are automatically executed in sequence according to predefined steps, including C++ code building, compiling C++ code in the project, ensuring that the core logic and engine functions have generated corresponding binary files, TypeScript code building, compiling TypeScript code and generating declaration files to ensure collaboration with C++ code, pre-build verification, verifying dependent environments and recording verification results to ensure the correctness of configuration of each platform. On this basis, a dynamic code analysis module is added to monitor code quality indicators in real time during the build process. The monitored quality indicators include code complexity and memory leakage risks, and automatically optimize the code structure or provide optimization suggestions according to preset limit values to ensure that the built code has higher performance and stability; SpA3, client and server package construction: After completing code compilation and pre-construction, complete the packaging of the client and server, archive and compress the generated package to ensure that the distribution file size is minimized, and use multi-threaded parallel packaging technology to reasonably allocate packaging threads according to resource types and hardware resource conditions; SpA4, log recording and result report: log recording, during each build process, the output logs of all executed batch scripts and shell scripts are automatically recorded to generate detailed build log files for subsequent problem analysis. Build result report, after the build is completed, a result report is generated to record the build status, time consumption and build details. After the build is successful, the version information is recorded. If the build fails, the error cause is recorded in detail. At the same time, the build log is deeply mined using big data analysis technology to automatically generate a build trend report to provide the development team with long-term evaluation and improvement direction of project build efficiency; SpA5, automatic alarm mechanism: When an error is detected during the build process, the system will automatically send an alarm message to the DingTalk group through HTTP requests to notify team members to handle it immediately. The alarm information includes error summary, build steps and timestamp. At the same time, an intelligent alarm classification system is introduced to automatically assign different alarm levels according to the error type and severity, corresponding to different processing processes and response time requirements, to improve the pertinence and efficiency of alarm processing; The error detection analysis steps are as follows: First, detect C++ code related errors that may occur during the SpA2 pre-build process. For example, when the automatic alarm mechanism is triggered, if it is a C++ code build error, it may be that the compiler cannot find the header file, syntax error, link error, etc.
[0025] How to obtain the error summary: Extract key information from the error log output by the compiler, such as the file where the error is located, line number, error description, etc., and organize them into a summary. For example, "Undefined variable x appears in line 25 of the main.cpp file."
[0026] Error type and severity: Error types: syntax errors, link errors, missing dependencies, etc.
[0027] Severity: Syntax errors are usually of high severity because they cause the code to fail to compile; link errors are second and may affect some functions; missing dependencies are determined by their importance, and if they are critical dependencies, they are of high severity.
[0028] Then, we detect errors in the TypeScript code of SpA2 during the build process. These errors may affect the collaboration with the C++ code and cause the entire build to fail, such as TypeScript code compilation failure and type mismatch.
[0029] How to get the error summary: Extract key information from the error output of the TypeScript compiler and organize it into a concise description. For example, "In the script.ts file, the parameter type of the function addNumbers does not match the definition."
[0030] Error type and severity: Error types: compilation errors, type errors, module import errors, etc.
[0031] Severity: Compile errors are of high severity because they prevent the code from running; type errors are of medium to high severity depending on the specific situation, if they affect critical logic; module import errors are of a severity based on the importance of the imported module.
[0032] Detecting errors related to dependency environment configuration is the basis for ensuring the smooth progress of the entire build process. If the dependency environment is incorrect, it may cause subsequent build steps to fail. For example, a necessary library is missing, the environment variable is incorrectly configured, etc.
[0033] How to obtain the error summary: Extract relevant information from the output of the verification tool and clearly indicate which dependency environment has a problem. For example, "The openssl library is missing and security-related operations cannot be performed."
[0034] Error type and severity: Error type: missing dependency, environment variable error, configuration file error, etc.
[0035] Severity: If the missing dependency is a critical dependency, the severity is high. Environment variable errors are determined based on their impact on the build process. If they affect core functions, the severity is high. If they affect some functions, the severity is medium. Configuration file errors are determined based on the importance of the configuration.
[0036] The specific steps of the publishing module are as follows: SpB1, differential package generation: adopt differential packaging strategy, only update the code and resources that have changed since the last version each time, including differential file extraction, by comparing the latest version with the base version, extracting the new and modified files, generating a patch package containing only these differences, incremental update package creation, using differential files to generate incremental update packages, avoiding full updates, reducing user download time and server pressure, uploading incremental update packages to cloud storage servers for users to download, and combining blockchain technology to encrypt and verify the differential packages; SpB2, version detection: The server automatically monitors changes in version configuration files. Before releasing a new version, it automatically backs up the existing server logs, safely shuts down the running old version server, and downloads the new server package from the predefined network storage location to the specified directory to ensure that the new package runs correctly. SpB3, automatic release: start a new server version, release monitoring and report generation. After the release is completed, the system generates a release report to record the release results, time consumption and potential errors for subsequent analysis and review. At the same time, containerized deployment technology is used to encapsulate the server package in a lightweight container to achieve rapid deployment, isolated operation and efficient use of resources.
[0037] When implementing the differential package generation step in the release module, a differential packaging strategy is adopted. Only the code and resources that have changed since the last version are updated each time a release is made, including differential file extraction. By comparing the latest version with the base version, new and modified files are extracted, and a patch package containing only these differences is generated. Incremental update package creation uses differential files to generate incremental update packages, avoiding full updates and reducing user download time and server pressure. The incremental update packages are uploaded to the cloud storage server for users to download. At the same time, blockchain technology is used to encrypt and verify the version of the differential package to ensure the integrity and security of the differential package and prevent malicious tampering. At the same time, the distributed ledger characteristics of blockchain are used to achieve multi-node synchronous verification and rapid distribution, thereby improving the transmission efficiency and reliability of the update package.
[0038] When the version detection and automatic release steps in the release module are implemented, the server automatically monitors changes in the version configuration file. Before releasing the new version, it automatically backs up the existing server logs and safely shuts down the running old version server. It downloads the new server package from the predefined network storage location to the specified directory, starts the new server version, ensures that the new package runs correctly, and generates release monitoring and reports. After the release is completed, the system generates a release report to record the release results, time consumption and potential errors for subsequent analysis and review. At the same time, it uses containerized deployment technology to encapsulate the server package in a lightweight container to achieve rapid deployment, isolated operation and efficient use of resources. It also facilitates version rollback and multi-version coexistence management, improving the flexibility and stability of server releases.
[0039] The dynamic code analysis module adopts a code quality assessment algorithm, which comprehensively considers the code's cyclomatic complexity, maintainability index, and multi-dimensional indicators of code coupling. It performs static analysis on C++ and TypeScript code, builds a code dependency graph, calculates code coupling using a graph theory algorithm, and calculates the comprehensive code quality score based on the preset weight coefficient, automatically generating targeted optimization strategies.
[0040] In multi-threaded parallel packaging technology, a task scheduling algorithm based on a priority queue is used to determine the priority of resource packaging tasks based on the importance, dependencies, and estimated processing time of resources. High-priority tasks are assigned to idle threads for processing. The importance of resources is determined based on their criticality in the game running process and their impact on system performance. Dependencies are obtained by analyzing the reference and call relationships between resources. The estimated processing time is estimated based on historical packaging data and resource characteristics using a regression analysis algorithm, thereby improving the orderliness and efficiency of resource packaging.
[0041] When blockchain technology is used for differential package management, a hash algorithm is used to perform hash operations on each file in the differential package, generate a unique hash value and store it in the blockchain. During the version verification process, the file integrity is ensured by comparing the hash value of the downloaded differential package file with the hash value recorded in the blockchain. At the same time, the blockchain's smart contract algorithm is used to implement the differential package's authorized access mechanism. Only users and nodes who hold legal authorization keys and are within the authorized time range can download and use the differential package.
[0042] In the version rollback management of containerized deployment technology, an algorithm based on log rollback point marking is adopted. During the operation of the server, key status information and operation logs in the container are regularly checked and marked. When the version needs to be rolled back, the previous stable state can be quickly located based on these marks, and the container can be restored to the specified version according to the predetermined rollback process, which effectively reduces the time and complexity of version rollback and improves the fault tolerance of the system.
[0043] Intelligent prediction triggers use the decision tree algorithm in machine learning to analyze historical project development data, and use the code submission time, submitter, and data on the code modules involved as features to build a code submission risk prediction model. The model predicts the probability of build failure and conflict caused by code submission in different situations, and dynamically adjusts the build trigger strategy based on the prediction results. In low-risk periods, the build trigger frequency is reduced to save resources. In high-risk periods, pre-build inspection steps are added or relevant personnel are notified in advance for manual intervention to ensure the stability and efficiency of the build process.
[0044] During the differential package generation process, a differential algorithm based on content recognition is used. When comparing the latest version with the basic version, deep semantic analysis technology is used to parse the code and resource files. While comparing the differences at the file level, changes in the code logical structure and changes in resource semantic features are identified, thereby more accurately extracting new or modified files and generating more optimized, smaller and more compatible differential packages, effectively improving the success rate and efficiency of user updates.
[0045] In terms of resource management of building modules, an intelligent resource cache and preloading mechanism is introduced. After the first build is completed, the system will automatically analyze the frequency of resource use and dependencies, and cache high-frequency and relatively stable core resources to the local high-speed storage area. In the subsequent build process, resources are read from the cache first, which significantly reduces resource acquisition time and improves build efficiency. At the same time, for resources that are about to participate in the build, preloading planning is performed based on their dependency tree structure, and related resources are loaded into memory in advance to avoid resource waiting jams during the build process, further optimizing the smoothness and stability of the build process.
[0046] In terms of the connection between the release module and user feedback, a real-time user feedback collection and analysis system is established. After the user downloads and installs the update package, the system automatically collects the user's experience data during the update process, such as the time taken to update, whether there are compatibility issues, and the user's satisfaction evaluation of the update content. Through big data analysis technology, these feedback data are deeply mined to quickly locate possible problems in the release process, such as abnormal updates under certain specific devices or network environments. The development team can adjust the release strategy in a timely manner based on these analysis results, optimize the differential package generation algorithm, or improve the server deployment configuration to ensure that subsequent releases can better meet the needs of different user groups and achieve continuous iteration and improvement of the release effect.
[0047] In addition, in order to deal with code conflicts and version management complexity in large-scale team collaborative development, a team code integration pre-check link is added before the build is triggered. This link uses distributed code analysis technology to conduct a comprehensive scan and integration simulation of the code changes submitted by team members, discover potential code conflicts and logical incompatibilities in advance, and provide detailed conflict resolution suggestions. This helps to reduce the number of build failures caused by code conflicts, improve team development efficiency, and ensure the smooth progress of project development. At the same time, it is closely integrated with the version control system to achieve intelligent optimization of code branch management, automatically create, merge and manage code branches according to project functional modules and development stages, reduce the difficulty and error probability of version management, and enable the entire development team to work together efficiently in a complex project development environment.
[0048] The dynamic code analysis module adopts a code quality assessment algorithm, which comprehensively considers the code's cyclomatic complexity, maintainability index, and multi-dimensional indicators of code coupling. It performs static analysis on C++ and TypeScript code, builds a code dependency graph, calculates code coupling using a graph theory algorithm, and calculates the comprehensive code quality score based on the preset weight coefficient.
[0049] The setting of the limit value needs to be determined comprehensively based on the project type, scale, and past project experience. For example, for small independent game projects, considering the limited development resources and fast iteration speed, the comprehensive code quality score limit can be set to 60 points. This is based on the average code quality level of similar small projects in the past, and is summarized after multiple builds and subsequent maintenance feedback. When the score is lower than 60 points, it means that there may be many problems with the code in terms of maintainability and complexity, which will affect subsequent rapid iterations. For large-scale 3A game projects, due to the complexity of the system, long development cycle, and a large number of participants, higher requirements are placed on code quality. The limit value can be set to 75 points to ensure the robustness of the code base and adapt to long-term development and maintenance needs.
[0050] When the score is lower than the set limit, a targeted optimization strategy is automatically generated as follows: For code blocks with high cyclomatic complexity, code refactoring technology is used to split complex logic into multiple smaller functions or modules with single functions, making it easier to understand the code and improving maintainability. For example, if the cyclomatic complexity of a function exceeds 15 (adjusted according to industry general standards and actual project conditions), the system automatically marks it and recommends splitting it according to the principle of functional cohesion and reorganizing the code structure.
[0051] For parts with a low maintainability index, we use code comment analysis tools to identify areas where comments are missing or not standardized, and automatically generate detailed comment templates to prompt developers to add key information, such as function functions, meanings of input and output parameters, key algorithm logic, etc., to improve code readability.
[0052] If the code coupling is too high, locate the strongly coupled modules through the dependency graph, and it is recommended to use design patterns such as interface abstraction and dependency injection to decouple, reduce direct dependencies between modules, make the code structure clearer, and facilitate expansion and maintenance. For example, when the coupling between two modules exceeds 0.8 (set according to the characteristics of the project code), the system prompts to use appropriate design patterns for optimization.
[0053] When the score exceeds the set limit, it indicates that the code quality is good, but there is still room for improvement. Optimization strategies include: The code is further modularized and the scattered code fragments are aggregated according to the principle of similar functions to form a clearer module hierarchy, improve code reusability, and quickly locate and modify the code even in subsequent large-scale functional expansion.
[0054] Use static code analysis tools to find potential performance bottleneck code segments, such as frequent memory allocation and release operations, inefficient algorithm implementations, etc., recommend more efficient algorithms or data structure replacements, optimize performance in advance, and lay the foundation for running complex scenarios in the later stages of the project.
[0055] Based on the code dependency graph, check whether there are overly redundant dependency paths. If so, guide developers to streamline dependencies, reduce unnecessary resource overhead, and improve overall code operation efficiency. Specific embodiment 2: like Figure 1-2 As shown, the key algorithm mentioned in Example 1 is analyzed in detail below, including its core mathematical formula and explanation: 1. Code quality assessment algorithm (for dynamic code analysis module) Code coupling calculation (based on graph theory algorithm): Assume that the dependencies between code modules can be represented by a directed graph Indicates that is a collection of code modules (node set), is a set of directed edges of dependencies between modules. For any two modules and ,if Depends on , then there is a directed edge ; Code coupling The calculation formula is: , in is the total number of code modules, It is a module and The shortest dependency path length between them (if there is no direct or indirect dependency between them, then ) , this formula calculates the sum of the dependency path lengths between all module pairs and normalizes them to get the overall coupling degree of the code. The higher the coupling degree, the more complex the interdependence between code modules, and the more difficult it is to maintain and modify. Calculation of the comprehensive code quality score: Assume that the cyclomatic complexity of the code is , the maintainability index is , the code coupling degree is , the corresponding preset weights are , , , then the comprehensive quality score of the code The calculation formula is:
[0057] By assigning weights to different quality indicators, the quality of the code in multiple aspects can be comprehensively evaluated. When it is lower than the set limit, it indicates that the code needs to be optimized.
[0058] 2. Task scheduling algorithm based on priority queue (for multi-threaded parallel packaging technology) Resource Packaging Task Priority Calculation: Set resources The importance of , the dependency depth is , the estimated processing time is , and the corresponding weights are , , , then the priority The calculation formula is:
[0059] The importance of resources Resources can be quantified and scored based on their criticality in the game and their impact on system performance. For example, core game logic resources have a higher importance score; dependency depth Determined by analyzing the resource's hierarchy of references to other resources; estimated processing time The estimation is obtained based on the regression analysis algorithm based on the historical packaging data and resource characteristics. The priority of each resource packaging task is calculated through this formula. Tasks with high priority are assigned to idle threads for processing to improve the orderliness and efficiency of resource packaging.
[0060] 3. Hash algorithm (used for differential packet management of blockchain technology) For files in the differential package , let its content be , hash algorithm (such as the commonly used SHA-256) calculate the hash value of the file
[0061]
[0062] During the version verification process, the integrity of the file is ensured by comparing the hash value of the downloaded differential package file with the hash value recorded in the blockchain. , then the file has not been tampered with, is the hash value of the downloaded file, It is the hash value of the file stored in the blockchain. Specific embodiment three: like Figure 1-2 As shown, the following is a description of the specific application logic steps of each module and algorithm in an automated build and release method based on UE5: 1. Dynamic code analysis module-code quality assessment algorithm Application logic: During the build process, static analysis is performed on C++ and TypeScript code to comprehensively evaluate code quality, identify potential problems in advance, and provide optimization directions to ensure that the built code has high performance and stability.
[0064] Detailed steps: Calculate code coupling: Based on the dependency graph constructed above, use the formula
[0065] Calculating code coupling ,in is the total number of code elements, For elements and The shortest dependency path length between two classes. For example, for a code base with multiple classes and complex mutual calling relationships, this formula can be used to quantify the degree of coupling.
[0066] Determine the code cyclomatic complexity and maintainability index: Use specialized code analysis tools (such as Cppcheck for C++, TSLint for Typescript, etc.) to calculate the code cyclomatic complexity respectively and maintainability index ,The cyclomatic complexity reflects the number of independent paths in the code, and the ,maintainability index comprehensively considers multiple attributes of the code, such as the number of lines of ,code and the proportion of comments.
[0067] 2. Multi-threaded parallel packaging technology-task scheduling algorithm based on priority queue Application logic: According to the multiple characteristics of resources, the priority of packaging tasks is clarified, and high-priority tasks are assigned to idle threads for processing, so as to achieve efficient resource packaging results, reduce packaging time, and improve construction efficiency. First, evaluate the criticality of resources in game operation and their impact on system performance to determine their importance; then analyze the reference and call associations between resources to clarify the depth of dependency; at the same time, based on past packaging data and resource characteristics, use regression analysis algorithms to estimate the processing time of resources, combine the above factors and combine the corresponding weights to calculate the priority of resource packaging tasks, and then place priority tasks in the priority queue in sequence. When there is an idle thread, extract the highest priority task from the front of the queue and assign it to the thread to perform packaging operations, and the thread will select the appropriate packaging tool and compression algorithm according to the resource type to carry out packaging operations, such as using image compression algorithms for image resources and text compression algorithms for code files.
[0068] 3. Blockchain technology for differential package management - hash algorithm and smart contract algorithm Hash algorithm application logic and steps: When the differential package is generated, a hash algorithm (such as SHA-256) is used to calculate a unique hash value for each file. This hash value is stored in the blockchain together with the file metadata as the file's characteristic identifier. After the user downloads the differential package, the hash value of the downloaded file is calculated again and compared with the hash value stored in the blockchain. If the two are consistent, it strongly proves that the file has not been tampered with during the transmission process, effectively ensuring the integrity and reliability of the differential package, and laying a solid foundation for users to safely receive and use differential packages.
[0069] Smart contract algorithm application logic and steps: By writing smart contract code, the authorization access rules of the differential package are clearly defined. Specifically, only users or nodes holding specific authorization keys and within the authorized time interval are allowed to access the differential package. When a user or node initiates a request to download a differential package, the smart contract will strictly verify whether the authorization information submitted by it complies with the established rules. If it meets the requirements, the download link will be allowed to be generated and the download service will be provided; otherwise, if it does not meet the requirements, access will be decisively denied and relevant information will be recorded in detail. In addition, smart contracts can also properly handle the issuance, update and revocation of authorization operations, ensuring that the access rights of the differential package are always in a strictly controllable state, effectively preventing illegal access and malicious use, and maintaining the security and confidentiality of the differential package.
[0070] 4. Containerized deployment technology - algorithm based on log rollback point marking Application logic: During server operation, key status information and operation logs in the container are periodically marked so that when a version rollback is required, the previous stable state can be quickly and accurately located, and the container can be restored to the specified version according to the predetermined process, thereby enhancing the system's fault tolerance and the flexibility and convenience of version management.
[0071] 5. Intelligent prediction trigger-decision tree algorithm Application logic: Through in-depth analysis of project development history data, carefully construct a code submission risk prediction model, flexibly and dynamically adjust the build trigger strategy based on the prediction results, optimize the allocation and utilization efficiency of build resources, and effectively reduce the risk probability of build failure. First, widely collect various types of data in the project development process, such as code submission time, submission personnel, involved code modules, and corresponding build results, and perform meticulous cleaning and preprocessing on these data to convert them into a format suitable for algorithm input. Then use the decision tree algorithm to train the preprocessed data. During the training process, the decision tree accurately selects the optimal features based on key indicators such as information gain or Gini index to implement branch division, and gradually builds a complete decision tree model to determine the probability of code submission causing build failure or conflict under different feature combinations. In actual operation, when a new code submission occurs, its feature vector is immediately extracted and input into the fully trained decision tree model to obtain the probability value of the submission causing build failure or conflict. If the probability is higher than the set high-risk limit, which is set based on the actual system usage and is generally set at 60%, pre-build check steps can be added in a timely manner, such as performing more stringent code specification checks and dependency checks, or informing relevant personnel in advance for manual intervention and detailed code review. If the probability is lower than the set low-risk limit, which is generally set at 30%, the build trigger frequency can be appropriately reduced to save build resources, such as adjusting the original high-frequency real-time build trigger mode to a timed trigger mode, and the interval time can be flexibly and dynamically adjusted based on resource idleness. Specific embodiment four:
[0073] like Figure 1-2 As shown, the following is a detailed hardware composition and hardware description of each module in Example 1: Building Block Hardware Composition Build Server: CPU: Multi-core high-performance processors, such as Intel Xeon series. A large number of cores can handle multiple compilation tasks and various computationally intensive operations in the build process in parallel, such as syntax parsing and optimization during C++ code compilation and conversion of TypeScript code. The high-frequency clock speed ensures that each core can execute instructions quickly, reducing the processing time of a single task.
[0074] Memory: Large-capacity DDR4 or higher generation memory, usually 64GB and above. During the build process, a large amount of code data, intermediate compilation results, and temporary data at runtime need to be stored. Sufficient memory can avoid frequent data exchange to disk (virtual memory) due to insufficient memory, thereby significantly improving the build speed. Especially when dealing with large UE5 projects, the fast read and write capabilities of memory are crucial to the overall performance.
[0075] Hard disk: Use high-speed solid-state drives (SSDs) as system disks and main storage disks. SSDs have extremely fast read and write speeds and can quickly read project source code, dependent library files, and write compiled binary files, packaged resources, etc. For frequent file operations during the build process, SSDs can significantly shorten data access time and reduce build time compared to traditional mechanical hard disks. Some build servers may also be equipped with large-capacity mechanical hard disks for data backup and long-term storage.
[0076] GPU: For tasks involving baking and processing of graphics rendering related resources, mid-to-high-end GPUs are used, such as NVIDIA's GeForceRTX series or professional Quadro series. In UE5, the baking of art resources (such as lighting baking, texture compression, etc.) can be accelerated by using the large-scale parallel computing power of the GPU. The GPU can process computing tasks of multiple pixels or texture units at the same time, so that complex graphics resource processing can be completed in a shorter time, improving construction efficiency.
[0077] Release module hardware composition Version Server: CPU: A processor with high stability and multi-tasking capabilities, similar to the CPU requirements for building a server, but more focused on processing server-side logical operations, such as version monitoring, file transfer management, and control operations related to containerized deployment. The number of cores and frequency can meet the needs of processing multiple client connection requests and version update tasks at the same time.
[0078] Memory: Depending on the number and scale of projects managed by the server, 32GB or more of memory is generally configured. Memory is used to store version configuration information, running server process data, and data cache when processing client update requests. Sufficient memory ensures that the server can run stably in high-concurrency version update scenarios, avoiding performance degradation or service interruption due to insufficient memory.
[0079] Hard disk: Use highly reliable enterprise-level SSD or disk array (RAID). Enterprise-level SSD provides high-speed data read and write capabilities, and is used to quickly store and read version files, differential packages, and server logs. Disk arrays use data redundancy technology (such as RAID1, RAID5, etc.) to ensure data security and prevent version data loss due to hard disk failure. When releasing a new version, the hard disk needs to quickly provide the new server package file to the server process for deployment, and efficient storage and writing capabilities are also required in operations such as log backup.
[0080] Network Interface Card (NIC): Equipped with a high-speed network interface card that supports Gigabit Ethernet or higher bandwidth network connections. During the version release process, it is necessary to quickly upload the differential package to the cloud storage server and download the new server package to the local server for deployment. The high-speed network interface can fully utilize the network bandwidth and reduce the file transfer time. Especially when large-scale users are updating, fast network transmission can ensure that users can obtain the updated content in time, improve update efficiency and user experience.
[0081] It should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the statement "comprising a reference structure" do not exclude the existence of other identical elements in the process, method, article or device including the elements.
[0082] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. An automated construction and publishing method based on UE5, comprising a computer environment based on UE5, wherein the computer environment based on UE5 has a built-in construction module and a publishing module, and is characterized in that: The basic steps of the construction module include triggering construction, executing pre-construction tasks, client and server packaging, logging and automatic alarming, and the basic steps of the release module include differential package generation, version detection and automatic release; The specific steps of executing the building module include: SpA1, Trigger build: Automatically start the build process by configuring build triggers. Triggers include VCS triggers. The triggering steps include: SpA11, check every minute whether there is code submission or change in the current version control system, automatically start the build task and record the relevant submission information; SpA12, trigger the build according to the set time. If there is a task that is already being built, add it to the queue and execute the current task after the previous task is completed. SpA13, while also using intelligent prediction triggers to analyze project development history data through deep learning; SpA14: Predict the peak hours of code submission and the risk of code conflicts that may occur, automatically trigger builds during low-risk and resource-free periods, and further optimize build resource allocation and efficiency; SpA2, Execute pre-build tasks: Pre-build tasks are automatically executed in sequence according to predefined steps, including: SpA21, C++ code pre-build, compile the C++ code in the project to ensure that the core logic and engine functions have generated corresponding binary files; SpA22, TypeScript code pre-build, compile TypeScript code and generate declaration files to ensure that it works with C++ code; SpA23, pre-build verification, verify the dependent environment and record the verification results to ensure the correctness of the configuration of each platform; SpA24. Add a dynamic code analysis module based on the pre-build verification process to monitor code quality indicators in real time during the pre-build process. The monitored quality indicators include code complexity and memory leakage risks, and automatically optimize the code structure or provide optimization suggestions according to the preset limit values to ensure that the built code has higher performance and stability. SpA3, client and server package construction: After completing code compilation and pre-construction, complete the packaging of the client and server, archive and compress the generated package to ensure that the distribution file size is minimized, and use multi-threaded parallel packaging technology to reasonably allocate packaging threads according to resource types and hardware resource conditions; SpA4, Log Recording and Result Reporting: During each build process, the output logs of all executed Batch scripts and Shell scripts are automatically recorded to generate detailed build log files for subsequent problem analysis and build result reports. After the build is completed, the result report is generated. The post-processing steps are as follows: SpA41, record the build status, duration and build details, and record the version information after the build is successful; SpA42, if the build fails, the error cause is recorded in detail, and the build log is deeply mined using big data analysis technology to automatically generate a build trend report, providing the development team with long-term evaluation of project build efficiency and improvement directions; SpA5, automatic alarm mechanism: When an error is detected during the build process, the system will automatically send an alarm message to the DingTalk group through HTTP request to notify team members to handle it immediately. The alarm information includes error summary, build steps and timestamp. At the same time, an intelligent alarm classification system is introduced to automatically assign different alarm levels according to the error type and severity. The specific workflow of the publishing module is as follows: SpB1, differential package generation: adopt differential packaging strategy, and only update the code and resources that have changed since the last version each time, including: SpB11, differential file extraction, by comparing the latest version with the base version, extracting the newly added and modified files, and generating a patch package containing only these differences; SpB12, incremental update package creation, using difference files to generate incremental update packages, avoiding full updates, reducing user download time and server pressure; SpB13, upload the incremental update package to the cloud storage server for users to download, and use blockchain technology to encrypt and verify the differential package; SpB2, version detection: The server automatically monitors changes in version configuration files. Before releasing a new version, it automatically backs up the existing server logs, safely shuts down the running old version server, and downloads the new server package from the predefined network storage location to the specified directory to ensure that the new package runs correctly. SpB3, automatic release: start a new server version, release monitoring and report generation. After the release is completed, the system generates a release report to record the release results, time consumption and potential errors for subsequent analysis and review. At the same time, containerized deployment technology is used to encapsulate the server package in a lightweight container to achieve rapid deployment, isolated operation and efficient use of resources.
2. According to claim 1, an automated build and release method based on UE5 is characterized in that: The processing steps of the dynamic code analysis module are: Sp201, using code quality assessment algorithm; Sp202, the code quality assessment algorithm comprehensively considers the code's cyclomatic complexity, maintainability index, and multi-dimensional indicators of code coupling; Sp203, build code dependency graph by statically analyzing C++ and TypeScript code; Sp204, use graph theory algorithm to calculate code coupling degree, and calculate the comprehensive quality score of code by combining preset weight coefficient; Sp205, automatically generate targeted optimization strategies.
3. The method for automated construction and release based on UE5 according to claim 1, characterized in that: In the multi-threaded parallel packaging technology, a task scheduling algorithm based on a priority queue is used to determine the priority of resource packaging tasks according to the importance of resources, dependencies, and estimated processing time factors, and high-priority tasks are preferentially assigned to idle threads for processing. The importance of resources is determined according to the criticality of the resources in the game running process and the degree of impact on system performance. The dependency relationship is obtained by analyzing the reference and call relationship between resources, and the estimated processing time is estimated based on historical packaging data and resource characteristics using a regression analysis algorithm.
4. The method for automatic construction and release based on UE5 according to claim 1, characterized in that: When the blockchain technology is used for differential package management, the steps are as follows: Sp401, use the hash algorithm to perform hash operation on each file in the differential package, generate a unique hash value and store it in the blockchain; Sp402. During the version verification process, the file integrity is ensured by comparing the hash value of the downloaded differential package file with the hash value recorded in the blockchain; Sp403. At the same time, the smart contract algorithm of the blockchain is used to implement the authorized access mechanism of the differential package. Only users and nodes who hold a legal authorization key and are within the authorized time range can download and use the differential package.
5. The method for automatic construction and release based on UE5 according to claim 1, characterized in that: In the version rollback management of the containerized deployment technology, an algorithm based on log rollback point marking is adopted. During the operation of the server, key status information and operation logs in the container are regularly checked and marked. When a version rollback is required, the previous stable state is quickly located based on these marks, and the container is restored to the specified version according to the predetermined rollback process.
6. The method for automatic construction and release based on UE5 according to claim 1, characterized in that: The intelligent prediction trigger uses the decision tree algorithm in machine learning to analyze the historical data of project development, takes the code submission time, the submitter and the data of the code modules involved as features, and builds a code submission risk prediction model. The model predicts the probability of code submission causing build failure and conflict in different situations, and dynamically adjusts the build trigger strategy according to the prediction results, reducing the build trigger frequency during low-risk periods to save resources.
7. The method for automatic construction and release based on UE5 according to claim 1, characterized in that: During the differential package generation process, a differential algorithm based on content recognition is used. When comparing the latest version with the basic version, deep semantic analysis technology is used to parse the code and resource files. While comparing the differences at the file level, changes in the code logical structure and changes in resource semantic features are identified.
Citation Information
Patent Citations
Continuous delivery method, device and equipment based on Devps and storage medium
CN117667192A
Method and system for automatically deploying operation and maintenance of software
CN118092940A
Intelligent packaging system and method in automatic deployment process
CN118502808A
Automated, integrated and complete computer program / project management solutions standardizes and optimizes management processes and procedures utilizing customizable and flexible systems and methods
US20170053244A1
Cited By
Distributed file processing method and system
CN119645950A
Real estate surveying and mapping resource sharing system and method
CN121833712A
Game channel package parallel packaging and task scheduling method and system based on cloud computing
CN122044652A
Cloud-computing-based game channel package parallel packaging and task scheduling method and system
CN122044652B
Method and system for packaging local code to server, medium and electronic equipment
CN122363664A