Unreal engine server starting method and device, equipment, program and storage medium
By using the quick pull-up server component in the Unreal Engine server to create a seed process and reuse its pause position, the problem of process allocation delay in the Unreal Engine server under a high number of online people is solved, fast startup and resource optimization are achieved, and the user experience is improved. and cost-effectiveness.
Patent Information
- Application Number
- CN202310365533.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-03
- Publication Date
- 2024-10-15
AI Technical Summary
The existing Unreal Engine server startup solution is difficult to quickly allocate processes when the number of people online is high, resulting in an affected user experience, waste of resources, and difficulty in cost control.
By quickly pulling up the server component to create a seed process, and creating a dedicated server process based on the pause position of the seed process, the Unreal Engine server can be started quickly, avoiding the establishment of too many dedicated server processes at one time, and optimizing resource utilization.
It achieves fast startup and efficient resource utilization of the Unreal Engine server, solves the problems of process allocation delay and resource waste, and improves user experience and cost-effectiveness.
Smart Images

Figure CN118767422A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to a virtual engine server startup technology for computer hardware devices, and in particular to a virtual engine server startup method, device, electronic device, software program and storage medium. Background Art
[0002] In the related art, when quickly starting the Unreal Engine server solution, the number of processes N in the process pool will be pre-set. After that, the solution will start N processes at one time and make these processes sleep after executing to a fixed position. When a process is needed, the process pool will wake up an available process in the process pool and inform the process demander of its network address and port number, so as to complete the process allocation. However, in actual applications, the number of online users of the game server is affected by many factors. When there are too many online users and the number of processes N is too small, the process cannot be quickly allocated, affecting the user experience. Summary of the invention
[0003] In view of this, an embodiment of the present invention provides an Unreal Engine server startup method, device, electronic device, software program and storage medium, which can not only quickly start the server component provided, create a dedicated server process, and use the dedicated server to quickly start the Unreal Engine server, but also avoid establishing too many dedicated server processes at one time, thereby achieving efficient use of server resources.
[0004] The technical solution of the embodiment of the present invention is achieved as follows:
[0005] An embodiment of the present invention provides a method for starting an Unreal Engine server, comprising:
[0006] Create a seed process by quickly pulling up the server component of the Unreal Engine server;
[0007] Obtaining the pause position of the seed process;
[0008] In response to the received process creation instruction, creating a dedicated server process by the fast pull-up server component according to the pause position of the seed process;
[0009] When the dedicated server process is created, a process trigger instruction is received through the fast server startup component;
[0010] In response to the process triggering instruction, the Unreal Engine server is started by the dedicated server process.
[0011] The embodiment of the present invention also provides a device for starting an Unreal Engine server, comprising:
[0012] The information transmission module is used to quickly pull up the server component through the Unreal Engine server and create a seed process;
[0013] An information processing module, used for obtaining the pause position of the seed process;
[0014] The information processing module is used to create a dedicated server process through the fast pull-up server component according to the pause position of the seed process in response to the received process creation instruction;
[0015] The information processing module is used to receive a process trigger instruction through the fast server startup component after the dedicated server process is created;
[0016] The information processing module is used to start the Unreal Engine server through the dedicated server process in response to the process triggering instruction.
[0017] In the above scheme,
[0018] The information processing module is used to determine the configuration status of the client plug-in in the quick pull-up server component, wherein the quick pull-up server component includes: a quick pull-up plug-in and a client plug-in, the quick pull-up plug-in is installed in the Unreal Engine server, and the client plug-in is installed in the client program corresponding to the Unreal Engine server;
[0019] The information processing module is used to create the seed process through the client plug-in when the configuration state of the client plug-in is configuration completed;
[0020] The information processing module is used to execute resource loading of the Unreal Engine server through the seed process.
[0021] In the above scheme,
[0022] The information processing module is used to determine the pause position of the seed process after the seed process completes loading the resources of the Unreal Engine server; or
[0023] The information processing module is used to adjust the configuration file parameters of the seed process according to the operation requirements of the Unreal Engine server and determine the pause position of the seed process.
[0024] In the above scheme,
[0025] The information processing module is used to obtain the pause position of the seed process;
[0026] The information processing module is used to call the replication function in response to the received process creation instruction;
[0027] The information processing module is used to execute the forging function through the fast pull-up plug-in in the fast pull-up server component to obtain the dedicated server process;
[0028] The information processing module is used to send the identification information of the dedicated server process to the client plug-in in the fast pull-up server component.
[0029] In the above scheme,
[0030] The information processing module is used to detect the blocking and multi-threading properties of the seed process before calling the replication function;
[0031] The information processing module is used to cancel the locking information when there is locking information in the seed process;
[0032] The information processing module is used to close the multi-threading of the seed process and restart the seed process when the seed process is a multi-threaded process.
[0033] In the above scheme,
[0034] The information processing module is used to close the original file descriptor of the dedicated server process after obtaining the dedicated server process;
[0035] The information processing module is used to create a target file descriptor of the dedicated server process and associate the target file descriptor with the Unreal Engine server.
[0036] In the above scheme,
[0037] The information processing module is used to adjust the corresponding port information of the dedicated server after obtaining the dedicated server process to obtain the target port information of the dedicated server, wherein the target port information of the dedicated server is different from the port information of the seed process.
[0038] In the above scheme,
[0039] The information processing module is used to configure a parameter validity time for the Unreal Engine server when the security index of the usage scenario of the Unreal Engine server is less than or equal to a security threshold;
[0040] The information processing module is used to configure a parameter update cycle for the Unreal Engine server when the security index of the Unreal Engine server usage scenario is greater than a security threshold.
[0041] An embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0042] A memory for storing executable instructions;
[0043] The processor is used to implement the previous Unreal Engine server startup method when running the executable instructions stored in the memory.
[0044] The embodiment of the present invention further provides a computer-readable storage medium storing executable instructions, which, when executed by a processor, implement the aforementioned Unreal Engine server startup method.
[0045] The embodiments of the present invention have the following beneficial effects:
[0046] 1) The embodiment of the present invention creates a seed process through the quick start server component of the Unreal Engine server; obtains the pause position of the seed process; in response to the received process creation instruction, creates a dedicated server process through the quick start server component according to the pause position of the seed process; after the creation of the dedicated server process is completed, receives a process trigger instruction through the quick start server component; in response to the process trigger instruction, starts the Unreal Engine server through the dedicated server process. Thus, a dedicated server process is created through the provided quick start server component, and the Unreal Engine server is quickly started using the dedicated server.
[0047] 2) During the creation of a dedicated server process, since a dedicated server process is created by quickly pulling up the server component based on the pause position of the seed process, these dedicated server processes reuse the same pause position. Therefore, limited hardware resources can be utilized, and multiple dedicated server processes can share memory data resources, thereby solving the defect of being unable to create multiple dedicated server processes. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the use environment of the Unreal Engine server startup method provided by an embodiment of the present invention;
[0049] Figure 2 A schematic diagram of the composition structure of the Unreal Engine server startup device provided by an embodiment of the present invention;
[0050] Figure 3 An optional flow chart of the Unreal Engine server startup method provided by an embodiment of the present invention;
[0051] Figure 4 A schematic diagram of a process for creating a seed process in an embodiment of the present invention;
[0052] Figure 5 A schematic diagram of determining the pause position of the seed process in an embodiment of the present invention;
[0053] Figure 6 A schematic diagram of determining the pause position of the seed process in an embodiment of the present invention;
[0054] Figure 7 Schematic diagram of the interface of the client plug-in in an embodiment of the present invention;
[0055] Figure 8 A schematic diagram of the process of creating a dedicated server process for the replica function mechanism in an embodiment of the present invention;
[0056] Fig. 9 This is the intention of the Unreal Engine server startup process in an embodiment of the present invention;
[0057] Fig.10 This is a schematic diagram of the game interface when the Unreal Engine server in the present invention is used as a game server. DETAILED DESCRIPTION
[0058] In order to make the purpose, technical solutions and advantages of the present invention clearer, the present invention will be further described in detail below in conjunction with the accompanying drawings. The described embodiments should not be regarded as limiting the present invention. All other embodiments obtained by ordinary technicians in the field without making creative work are within the scope of protection of the present invention.
[0059] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0060] Before further describing the embodiments of the present invention in detail, the nouns and terms involved in the embodiments of the present invention are described. The nouns and terms involved in the embodiments of the present invention are subject to the following interpretations.
[0061] 1) In response, it is used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order in which the multiple operations executed are executed.
[0062] 2) Based on, used to indicate the conditions or states on which the executed operations depend. When the dependent conditions or states are met, one or more operations executed may be in real time or have a set delay. Unless otherwise specified, there is no restriction on the order of execution of the multiple operations executed.
[0063] 3) Cloud technology refers to a hosting technology that unifies hardware, software, network and other resources within a wide area network or local area network to achieve data computing, storage, processing and sharing. It is a general term for network technology, information technology, integration technology, management platform technology, application technology, etc. based on the cloud computing business model application, which can form a resource pool and be used on demand, flexible and convenient. Cloud computing technology will become an important support. The background services of technical network systems require a large amount of computing and storage resources, such as video websites, picture websites and more portal websites. With the rapid development and application of the Internet industry, in the future, each item may have its own identification mark, and all need to be transmitted to the background system for logical processing. Data of different levels will be processed separately. All kinds of industry data require strong system backing support, which can only be achieved through cloud computing.
[0064] 4) Cloud Security is the general term for security software, hardware, users, organizations, and security cloud platforms based on cloud computing business models. Cloud security integrates emerging technologies and concepts such as parallel processing, grid computing, and unknown virus behavior judgment. It uses a large number of clients in a network to monitor abnormal software behavior in the network, obtain the latest information on Trojans and malicious programs on the Internet, and send it to the Unreal Engine server for automatic analysis and processing, and then distribute virus and Trojan solutions to each client.
[0065] 5)UE: Unreal Engine, DS: Dedicated Server, QP: Quickboot Plugin, CP: Client Plugin.
[0066] Figure 1 A schematic diagram of a usage scenario of the Unreal Engine server startup method provided by an embodiment of the present invention, in the introduction Figure 1 Before describing the usage scenarios, the defects of Unreal Engine server startup in the related art are first explained. In the related art, the implementation principle of the quick startup Unreal Engine server solution based on process pool is as follows: first, the number of processes N in the process pool is set, and then N processes are started at one time, and these processes are executed to a fixed position and then hibernated. When a process is needed, the process pool will wake up an available process in the process pool, and inform the process demander of its network address and port number, so as to complete the process allocation; generally, when the number of available processes in the process pool is less than N / 2, the process pool will create a new process to make the number of available processes in the process pool reach N.
[0067] The defects of the above scheme are: 1) It is necessary to pre-set the number of processes in the process pool, which is not suitable in the scenarios of many game programs; the number of online game players is affected by many factors. When there are too many online game players and the number of processes N is too small, the processes cannot be quickly allocated, affecting the user experience; when there are few online game players and the number of processes N is large, a large number of idle processes will occupy the machine's memory and even CPU and network resources, which will cause resource waste and be unfavorable to cost control.
[0068] 2) When there are not enough available processes, the process needs to be recreated, but the time to create the process is uncontrollable. Some game servers have more resources and start slowly. In this case, the process pool solution cannot start the process quickly.
[0069] 3) When starting a server process requires more memory resources, it is usually because the server needs to load a large amount of resources, which will cause the physical machine to occupy too much memory and it is likely that N available processes cannot be created.
[0070] 4) The solution based on the process pool can only be executed to a specific location without giving the user the right to choose, which reduces the flexibility and applicability of the solution.
[0071] To solve the above defects, see Figure 1 The embodiment of the present invention provides a data processing system including an Unreal Engine server and a client, which is used to start the Unreal Engine server after connecting, wherein the hardware implementation or software implementation example of the Unreal Engine server startup device is the same as Figure 2The same will be described in detail later. The Unreal Engine server can be deployed in the server 200. The terminal (including the terminal 10-1 and the terminal 10-2) is provided with a corresponding client capable of executing different functions. Among them, the client is the terminal (including the terminal 10-1 and the terminal 10-2) to obtain different corresponding information from the corresponding server 200 through the network 300 for browsing. The terminal is connected to the server 200 through the network 300. The network 300 can be a wide area network or a local area network, or a combination of the two. A wireless link is used to realize data transmission. In the process of information interaction between the terminal and the network, the server 200 can configure a corresponding service engine according to different business needs of different terminals, and provide a certain capability / function to the outside by exposing the TCP or HTTP protocol. By accepting the specified input parameters, the corresponding output parameters are generated for use by different product lines. In some embodiments, technologies and / or formats including Hyper Text Markup Language (HTML), Extensible Markup Language (XML), etc. are used to represent data exchanged through the network. In addition, conventional encryption technologies such as Secure Socket Layer (SSL), Transport Layer Security (TLS), Virtual Private Network (VPN), Internet Protocol Security (IPsec) etc. may be used to encrypt all or some links. In other embodiments, customized and / or dedicated data communication technologies may be used to replace or supplement the above data communication technologies.
[0072] In some embodiments of the present invention, the service process generated in the server 200 may be written in a software code environment of different programming languages, and the code object may be a code entity of different types. For example, in a software code of the C language, a code object may be a function. In a software code of the JAVA language, a code object may be a class, and in an iOS OC language, a code object may be a target code. In a software code of the C++ language, a code object may be a class or a function to execute request instructions from different terminals.
[0073] The structure of the virtual engine server startup device of the embodiment of the present invention is described in detail below. The virtual engine server startup device can be implemented in various forms, such as terminals such as smart phones, tablet computers and desktop computers with network management functions, or it can be a server with network management functions. Figure 2The schematic diagram of the composition structure of the Unreal Engine server startup device provided by the embodiment of the present invention can be understood as follows: Figure 2 Only an exemplary structure of the Unreal Engine server startup device is shown, not all structures, and can be implemented as needed. Figure 2 Partial or complete structure shown.
[0074] The Unreal Engine Server Startup Device provided by the embodiment of the present invention includes: at least one processor 201, a memory 202, a user interface 203 and at least one network interface 204. The various components in the Unreal Engine Server Startup Device 2020 are coupled together through a bus system 205. It can be understood that the bus system 205 is used to realize the connection and communication between these components. In addition to the data bus, the bus system 205 also includes a power bus, a control bus and a status signal bus. However, for the sake of clarity, in Figure 2 Various buses are labeled as bus system 205 .
[0075] The user interface 203 may include a display, a keyboard, a mouse, a trackball, a click wheel, keys, buttons, a touch pad or a touch screen.
[0076] It is understood that the memory 202 can be a volatile memory or a non-volatile memory, and can also include both volatile and non-volatile memories. The memory 202 in the embodiment of the present invention can store data to support the operation of the terminal (such as terminal 10-1). Examples of these data include: any computer program for operating on a terminal (such as terminal 10-1), such as an operating system and an application. Among them, the operating system includes various system programs, such as a framework layer, a core library layer, a driver layer, etc., which are used to implement various basic services and process hardware-based tasks. The application can include various applications.
[0077] In some embodiments, the virtual engine server startup device provided by the embodiment of the present invention can be implemented in hardware. As an example, the virtual engine server startup device provided by the embodiment of the present invention can be a processor in the form of a hardware decoding processor, which is programmed to execute the virtual engine server startup method provided by the embodiment of the present invention. For example, the processor in the form of a hardware decoding processor can be one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field programmable gate arrays (FPGAs), or other electronic components.
[0078] The Unreal Engine server startup device provided as an embodiment of the present invention is implemented in software. The Unreal Engine server startup device provided in the embodiment of the present invention can be directly embodied as a combination of software modules executed by the processor 201. The software module can be located in a storage medium, and the storage medium is located in the memory 202. The processor 201 reads the executable instructions included in the software module in the memory 202, and combines with necessary hardware (for example, including the processor 201 and other components connected to the bus 205) to complete the Unreal Engine server startup method provided in the embodiment of the present invention.
[0079] For example, Figure 2 The virtual engine server startup device 2020 stored in the memory 202 is shown, which can be software in the form of a program and a plug-in, and includes the following software modules: an information transmission module 2081, an authentication module 2082. When the software modules in the virtual engine server startup device 2020 are read into the RAM by the processor 201 and executed, the virtual engine server startup method provided by the embodiment of the present invention will be implemented. Figure 2 The Unreal Engine server launcher 2020 shown illustrates the functions of the various software modules.
[0080] The information transmission module 2081 is used to quickly pull up the server component of the Unreal Engine server and create a seed process;
[0081] The information processing module 2082 is used to obtain the pause position of the seed process;
[0082] The information processing module 2082 is used to create a dedicated server process through the fast pull-up server component according to the pause position of the seed process in response to the received process creation instruction;
[0083] The information processing module 2082 is used to receive a process trigger instruction through the fast start server component after the dedicated server process is created;
[0084] The information processing module 2082 is used to start the Unreal Engine server through the dedicated server process in response to the process triggering instruction.
[0085] In the above scheme,
[0086] The information processing module 2082 is used to determine the configuration status of the client plug-in in the quick pull-up server component, wherein the quick pull-up server component includes: a quick pull-up plug-in and a client plug-in, the quick pull-up plug-in is installed in the Unreal Engine server, and the client plug-in is installed in the client program corresponding to the Unreal Engine server;
[0087] The information processing module 2082 is used to create the seed process through the client plug-in when the configuration status of the client plug-in is configuration completed;
[0088] The information processing module 2082 is used to execute resource loading of the Unreal Engine server through the seed process.
[0089] In the above scheme,
[0090] The information processing module 2082 is used to determine the pause position of the seed process after the seed process completes loading the resources of the Unreal Engine server; or
[0091] The information processing module 2082 is used to adjust the configuration file parameters of the seed process according to the operation requirements of the Unreal Engine server and determine the pause position of the seed process.
[0092] In the above scheme,
[0093] The information processing module 2082 is used to obtain the pause position of the seed process;
[0094] The information processing module 2082 is used to call the replication function in response to the received process creation instruction;
[0095] The information processing module 2082 is used to execute the forging function through the fast pull-up plug-in in the fast pull-up server component to obtain the dedicated server process;
[0096] The information processing module 2082 is used to send the identification information of the dedicated server process to the client plug-in in the fast pull-up server component.
[0097] In the above scheme,
[0098] The information processing module 2082 is used to detect the blocking and multi-threading properties of the seed process before calling the replication function;
[0099] The information processing module 2082 is used to cancel the locking information when there is locking information in the seed process;
[0100] The information processing module 2082 is used to close the multi-threading of the seed process and restart the seed process when the seed process is a multi-threaded process.
[0101] In the above scheme,
[0102] The information processing module 2082 is used to close the original file descriptor of the dedicated server process after obtaining the dedicated server process;
[0103] The information processing module 2082 is used to create a target file descriptor of the dedicated server process and associate the target file descriptor with the Unreal Engine server.
[0104] In the above scheme,
[0105] The information processing module 2082 is used to adjust the corresponding port information of the dedicated server after obtaining the dedicated server process, and obtain the target port information of the dedicated server, wherein the target port information of the dedicated server is different from the port information of the seed process.
[0106] In the above scheme,
[0107] The information processing module 2082 is used to configure a parameter validity time for the Unreal Engine server when the security index of the usage scenario of the Unreal Engine server is less than or equal to a security threshold;
[0108] The information processing module 2082 is used to configure a parameter update cycle for the Unreal Engine server when the security index of the Unreal Engine server usage scenario is greater than a security threshold.
[0109] according to Figure 2The Unreal Engine server startup device shown, in one aspect of the present application, the present application also provides a computer program product or a computer program, the computer program product or the computer program includes a computer instruction, and the computer instruction is stored in a computer-readable storage medium. The processor of the computer device reads the computer instruction from the computer-readable storage medium, and the processor executes the computer instruction, so that the computer device executes the different embodiments and combinations of embodiments provided in various optional implementations of the Unreal Engine server startup method described above.
[0110] In some embodiments, the computer-readable storage medium may be a memory such as FRAM, ROM, PROM, EPROM, EEPROM, flash memory, magnetic surface storage, optical disk, or CD-ROM; or it may be various devices including one or any combination of the above memories.
[0111] In conjunction with the exemplary application and implementation of the Unreal Engine server startup device provided in the embodiment of the present invention, the Unreal Engine server startup method provided in the embodiment of the present invention is explained. According to the above, it can be understood that the Unreal Engine server startup method provided in the embodiment of the present invention can be used by various types of devices with Unreal Engine server startup functions, such as information management servers or server clusters.
[0112] Continue to combine Figure 1 The usage environment and Figure 2 The Unreal Engine Server Startup Device 2020 shown in the figure illustrates the Unreal Engine Server Startup Method provided by the embodiment of the present invention, see Figure 3 , Figure 3 An optional flow chart of the Unreal Engine server startup method provided by the embodiment of the present invention. It can be understood that: Figure 3 The steps shown can be executed by various electronic devices running the Unreal Engine server startup device, for example, a game server or game server cluster with an Unreal Engine server startup function, or a cloud server of the target game program. Figure 3 The steps shown are explained.
[0113] Step 301: The Unreal Engine server startup device quickly starts the server component of the Unreal Engine server to create a seed process.
[0114] The fast pull-up server component provided by the present application includes: a fast pull-up plug-in and a client plug-in, wherein the fast pull-up plug-in is installed in the Unreal Engine server, and the client plug-in is installed in the client program corresponding to the Unreal Engine server. The working process of the fast pull-up plug-in and the client plug-in are described below in conjunction with the processing process of step 302-step 305.
[0115] refer to Figure 4 , Figure 4 The schematic diagram of the creation process of the seed process in the embodiment of the present invention, before explaining the creation process of the seed process, the Linux system operating environment of the seed process is briefly described first, the seed process in the present application can be an Android environment seed process, and a lightweight Android operating environment is first created on the Linux system when it is created. When the Linux service needs to start the Android service, the Linux service initiates a creation request to the seed process of the Android environment through the IPC interface, and after the seed process of the Android environment receives the creation request, it runs the Android service process by means of a fork function (fork function). Since the Android operating environment of the Android environment seed process has been configured, the Android operating environment can be completely inherited by means of a fork function. The virtual engine server startup method provided in the present application is based on the copy inheritance mechanism of the parent-child process operating environment of the Linux system, and the Android service process required for the operation is replicated by the environment seed process. Compared with the method of building the Android operating environment with the help of the kernel virtualization container tool (Linux Container) in the related art, running the Android service process by forking the function can further save resources and save the time consuming of starting the virtual engine server by a dedicated server process.
[0116] The creation of the seed process through the quick start server component of the Unreal Engine server can be achieved in the following manner: determining the configuration state of the client plug-in in the quick start server component; when the configuration state of the client plug-in is completed, creating the seed process through the client plug-in; and executing resource loading of the Unreal Engine server through the seed process. Figure 4As shown, the seed process can also start the Unreal Engine server, so the seed process is also a dedicated server process. The role of the seed process is to create at least two dedicated server processes. The seed process will execute the most time-consuming part of the program startup in advance, and put the seed process in a pause position by opening the interface, and then create a dedicated server process through the seed process. The newly created dedicated server process no longer needs to perform time-consuming operations, so it can be quickly started and used by users. Take the game program running on the Unreal Engine server as an example. In the above process, the dedicated server process is started after the seed process is started, and then the initialization processing of the Unreal Engine server is performed, the game resources in the game Unreal Engine server are loaded, the game image is rendered, the game terrain is calculated, etc. After the calculation, the game program runs to the pause position of the seed process, and then it will stop at the pause position to detect the waiting instructions sent by the pipeline in the system. When the instruction to create the process is received from the pipeline, the seed process resumes operation, creates a new dedicated server process, and then waits for the dedicated server process to reply the message of successful creation. The seed process then returns the message of successful creation to the client plug-in, and then the seed process continues to return to the parked position and loops to detect the pipeline.
[0117] Step 302: The Unreal Engine server startup device obtains the pause position of the seed process.
[0118] In some embodiments of the present invention, the Unreal Engine server startup device may obtain the pause position of the seed process in two ways:
[0119] 1) After the seed process completes loading the resources of the Unreal Engine server, determine the pause position of the seed process. Figure 5 FIG. 1 is a schematic diagram of determining the pause position of the seed process in an embodiment of the present invention, as shown in FIG. Figure 5 As shown, by calling the interface "pModule->GetVirtualizer().VirtualizePoint()" of the pause position at a suitable position of the Unreal Engine server, the starting position when creating a dedicated server process can be determined.
[0120] 2) According to the operation requirements of the Unreal Engine server, the configuration file parameters of the seed process are adjusted to determine the pause position of the seed process, wherein: Figure 6 This is a schematic diagram of determining the pause position of the seed process in an embodiment of the present invention. It is not necessary to perform dot-marking in the Unreal Engine server code to determine the pause position. It is only necessary to fill in the configuration file as follows: Figure 6The "[ / Script / EngineVirtualization.VirtualModeSettings]VirtualMode=1" parameter shown in the figure can complete the determination of the pause position, such as Figure 6 As shown, the position after the Unreal Engine server is initialized is used as a fixed starting point, and the fixed starting point is the starting point for creating a dedicated server process.
[0121] At this time, for the client plug-in installed in the client program corresponding to the Unreal Engine server, refer to Figure 7 , Figure 7 The interface diagram of the client plug-in in the embodiment of the present invention, wherein the client plug-in in the embodiment of the present invention provides the following interfaces: 1) InitDsVirtualizerLib interface, used to initialize the CP plug-in, which can be used to set parameters such as logs and dedicated server process timeouts; 2) SetSeedTimeoutMs interface, used to set the seed process timeout, and StartSeed is used to start the seed process; 3) StartDsInstAsync interface, used to actually create a dedicated server process, that is, to provide users with an available dedicated server process. Figure 7 Among the interfaces shown, except for the StartDsInstAsync interface, the other interfaces are called when the client program starts, and then when a dedicated server process is needed, the client program actively calls StartDsInstAsync to create a new dedicated server process.
[0122] Step 303: The Unreal Engine server startup device responds to the received process creation instruction and creates a dedicated server process through the fast server component according to the pause position of the seed process.
[0123] Before describing the process of creating a dedicated server process by quickly pulling up the server component, the processing process of the replica function used in this application is first described. Figure 8 , Figure 8The schematic diagram of the process of creating a dedicated server process by the replica function mechanism in the embodiment of the present invention, wherein the server component can be quickly pulled up to create a seed process that executes the replica function mechanism. The replica function mechanism is based on the fork function in UNIX or UNIX-like when it is executed. The replica function copies the target process in the running state into two identical processes. Each process starts a thread that starts executing from the same position in the code. The threads in these two processes continue to execute. The process obtained by executing the replica function mechanism can be called a child process, and the target process in the running state can be called a parent process. The two processes will execute the next instruction after the replica function call. In this process, the child process and the parent process use the same program counter and the same CPU registers, and can use the same open files. When through Figure 8 After the fork function mechanism shown creates a dedicated server process, the fork function can return an integer value, including the following cases:
[0124] 1) Negative value: Failed to create the child process.
[0125] 2)0: Return to the newly created child process.
[0126] 3) Positive value: Returns the parent process, which contains the process ID of the newly created child process.
[0127] At the same time, the server component can be quickly pulled up and a dedicated server process can be created according to the pause position of the child process. When the seed process uses the replication function mechanism, it creates a dedicated server process by "copying the current state of the seed process and the memory of the seed process", and the creation speed is relatively fast; in this child process creation method, the copy-on-write (COW) technology is used to copy the memory image of the seed process to the dedicated server process. The dedicated server process will inherit the state and memory data of the seed process. Figure 8As shown, the process created by the Linux replica function has the feature of Copy On Write, that is, for the newly created dedicated server process, the dedicated server process initially shares the same memory area with the seed process. Only when the dedicated server process or the seed process modifies the memory area, the dedicated server process will create a new memory space and use it. For the UE, the processes created by this method usually have underlying levels, assets, subsystems (such as memory subsystem, task subsystem), etc. that are read-only but not write-only, so that the created dedicated server process has a considerable amount of shared memory resources, which allows a single machine to create more dedicated server processes. For the related technology of creating a process using the process pool method, the process can only be created from the starting position of the program, which may take a lot of time to load resources, while the use of the replica function can copy a new process after the process has loaded the resources. This new process has already loaded the resources. In contrast, the method of using the replica function can effectively reduce the time of creating a process.
[0128] according to Figure 8 The schematic diagram of the process of creating a dedicated server process by the replica function mechanism shown in the figure shows that before creating a dedicated server process by quickly pulling up the server component, the locking and multi-threading of the seed process need to be detected. When there is locking information in the seed process, the locking information is cancelled; when the seed process is a multi-threaded process, the multi-threading of the seed process is closed and the seed process is restarted. If the seed process includes multiple threads, after one of the threads executes the replica function to create a dedicated server process, the dedicated server process can only inherit the state of the thread and the memory data of the seed process; if before the dedicated server process is created, other threads of the seed process obtain the lock object, because the dedicated server process will not inherit the state of other threads, and the lock object can only be released by the owner, the lock object will not be released, which will cause the dedicated server process to deadlock.
[0129] For example, the seed process has three threads, 0, 1, and 2; thread 0 executes the replica function to create a dedicated server process, and the dedicated server process inherits the state of thread 0 and the memory images corresponding to thread 0, 1, and 2. If thread 1 acquires a lock object before the dedicated server process is created, after the dedicated server process is created, since it only inherits the state of thread 0, thread 1 does not exist for the dedicated server process. However, the lock object can only be released by thread 1, so the child thread cannot release the lock object acquired by thread 1, which leads to a deadlock in the child thread.
[0130] Creating a dedicated server process by quickly launching the server component can be achieved in the following ways:
[0131] The pause position of the seed process is obtained; in response to the received process creation instruction, a fork function is called; the fork function is executed by the quick pull-up plug-in in the quick pull-up server component to obtain the dedicated server process; the identification information of the dedicated server process is sent to the client plug-in in the quick pull-up server component. Thus, the client plug-in can use the client to promptly notify the user of the creation of the dedicated server process, so that the user can quickly use the created dedicated server process to start the Unreal Engine server to execute the corresponding program processing.
[0132] In some embodiments of the present invention, after obtaining the dedicated server process, the file descriptor and port information need to be adjusted respectively, specifically including:
[0133] 1) Close the original file descriptor of the dedicated server process; create a target file descriptor of the dedicated server process, and associate the target file descriptor with the Unreal Engine server. Since the file descriptor is an index created by the kernel to efficiently manage opened files and is used to point to opened files, all system calls for I / O operations will pass through the file descriptor. The created dedicated server process and the seed process share many file descriptors, which usually represent log files. The file descriptor in the dedicated server process can be closed and then re-created, usually by calling the system call close to close the file descriptor, and then using open to open a new file descriptor, and then binding the file descriptor object to the relevant UE object. This ensures that the dedicated server process and the seed process will not share a file descriptor, and can also prevent the two processes from using the same log file.
[0134] 2) Adjust the corresponding port information of the dedicated server to obtain the target port information of the dedicated server, wherein the target port information of the dedicated server is different from the port information of the seed process. For example: in the Unreal Engine server of the game program, port number 8080 / 3128 / 8081 / 9080 (edge service data processing server); port number 1080 (SOCKS proxy protocol server); port number 21 (file transfer server); port number 6379 (redis database). Users use the game server (Unreal Engine server) by accessing the port number, so it is also necessary to reset a non-conflicting port number in the dedicated server process. This new port number is usually specified when creating the dedicated server process to save the user's adjustment time and ensure the accuracy of the port number.
[0135] In some embodiments of the present invention, before creating a dedicated server process, the seed process may close resources that cannot be inherited by the dedicated server process. The seed process may determine which resources cannot be inherited by the dedicated server process. In specific implementation, in some examples, it may be pre-set which resources cannot be inherited by the dedicated server process, and the seed process is required to close or release these resources before creating the dedicated server process. In another example, the seed process of the dedicated server process may determine which resources cannot be inherited by the dedicated server process according to pre-set rules. For example, when the seed process detects a network port, the seed process does not want the dedicated server process to detect the port as well, because two processes detecting the same port at the same time usually result in errors. In this case, the seed process needs to close the port after the seed process calls the fork function and before running the dedicated server process, so as to ensure that the dedicated server process is created through the seed process, and the occupation of hardware resources is terminated as soon as possible, thereby reducing the consumption of hardware resources for creating the dedicated server process.
[0136] Step 304: After the dedicated server process is created, the Unreal Engine server startup device receives a process trigger instruction through the fast server startup component.
[0137] Step 305: The Unreal Engine server startup device starts the Unreal Engine server through the dedicated server process in response to the process triggering instruction.
[0138] After creating a dedicated server process through steps 302 to 305, the Unreal Engine server can be quickly started through the dedicated server process.
[0139] At the same time, in order to ensure that the process of quickly starting the Unreal Engine server through a dedicated server process is safe and controllable, the Unreal Engine server can be configured with safe parameter validity time and parameter update cycle according to different usage scenarios of the Unreal Engine server.
[0140] In some embodiments of the present invention, reference Fig. 9 , Fig. 9 This is the intention of the Unreal Engine server startup process in an embodiment of the present invention, wherein terminal 1 runs game program 1 by connecting to the Unreal Engine server, and terminal 2 runs game program 2 by connecting to the Unreal Engine server, specifically including the following steps:
[0141] Step 901: When there is no time difference between the client and the Unreal Engine server, obtain the security thresholds of the Unreal Engine server and the client.
[0142] Among them, due to the lack of NTP server (Network Time Protocol) configuration when the Unreal Engine server and the client are broadcasting information, a time difference may occur, that is, the client time is earlier than the Unreal Engine server time, or the Unreal Engine server time is earlier than the client time. When the broadcast information is transmitted during the startup of the Unreal Engine server, the time difference will cause the private key calculation during the transmission of the broadcast information to appear when the Unreal Engine server is decrypting, and the time sequence just changes, resulting in the failure of the dedicated server process to be created. For this reason, it is necessary to select different security configurations by confirming whether there is a time difference between the client and the Unreal Engine server to improve the security of the dedicated server process, reduce the failure of the dedicated server process to be created due to the inconsistency between the client time and the Unreal Engine server time, thereby improving the success rate of the dedicated server process creation, and use different security configurations to provide users of the Unreal Engine server with diversified configuration solutions.
[0143] Step 902: When there is a time difference between the client and the Unreal Engine server, the content of the Unreal Engine server configuration parameters is configured according to the usage scenarios of the Unreal Engine server and the client.
[0144] The Unreal Engine server configuration parameters include: Unreal Engine server key information, version information, and validity period information.
[0145] Step 903: Based on the usage scenarios of the Unreal Engine server and the client, the update period of the Unreal Engine server configuration parameters is adjusted.
[0146] In some embodiments of the present invention, the content of the Unreal Engine server configuration parameters is configured according to the usage scenarios of the Unreal Engine server and the client, wherein the Unreal Engine server configuration parameters include: Unreal Engine server key information, version information, and validity period information; based on the usage scenarios of the Unreal Engine server and the client, the update period of the Unreal Engine server configuration parameters is adjusted.
[0147] In some embodiments of the present invention, the parameter composition of the Unreal Engine server configuration information SCFG may refer to Table 1:
[0148] Table 1
[0149]
[0150] In the parameter composition of SCFG shown in Table 1, PREFIX: is fixed to "SCFG"; KEXS: indicates the key exchange algorithm used, such as C255 and P256; AEAD: indicates the authentication encryption algorithm, such as AESG and S20P; PLAIN: indicates the plaintext algorithm type, which is an internal business custom type; EXPY: indicates the SCFG expiration time; Versions: indicates the set of QUIC versions supported by the current Server; GTM: indicates the timestamp used to generate this SCFG; SNI: indicates the service Server domain name corresponding to this SCFG, which can be NULL.
[0151] In some embodiments of the present invention, based on the usage scenarios of the Unreal Engine server and the client, adjusting the update period of the Unreal Engine server configuration parameters includes:
[0152] When the Unreal Engine server and client are used in a single Unreal Engine server of a game program, the update period of the Unreal Engine server configuration parameters is configured to be 24 hours, wherein the start time of the update period of the Unreal Engine server configuration parameters is 0:00 on each natural day. When the Unreal Engine server and client are used in an Unreal Engine server provided by a cloud server cluster, the update period of the Unreal Engine server configuration parameters can be configured to be 48 hours, thereby further reducing the adjustment cost of parameter configuration.
[0153] Specifically, when the security index of the use scenario of the virtual engine server and the client is less than or equal to the security threshold, the virtual engine server configuration parameter valid time can be configured for the virtual engine server configuration parameter; when the security index of the use scenario of the virtual engine server and the client is greater than the security threshold, the virtual engine server configuration parameter update cycle can be configured for the virtual engine server configuration parameter. Therefore, when storing different types of data, the update cycle of the virtual engine server configuration parameter can be adjusted according to the use scenario of storing different data types. For different virtual engine servers of the same user, the security threshold can be 0.5. When the security index is less than or equal to 0.5, multimedia information data can be stored. When the security index is greater than 0.5, financial transaction data can be stored. The higher the security index of the virtual engine server, the higher the corresponding rental price. Therefore, the two methods of configuring the parameter valid time and the parameter update cycle can enable users to timely know the health status of the virtual engine server. At the same time, according to different security requirements, differentiated broadcast information processing methods can be provided to users, so that users can flexibly select suitable configuration methods of the virtual engine server configuration parameters according to security requirements.
[0154] In order to provide a more flexible configuration method for Unreal Engine server configuration parameters, when the security index is less than or equal to the security threshold, it means that the usage scenario of the Unreal Engine server and the client is in a low security requirement. Therefore, a long SCFG validity period (for example, 3*24 hours) or a long SCFG update cycle (for example, 3*24 hours) can be configured at the same time; when the security index is greater than the security threshold, it means that the usage scenario of the Unreal Engine server and the client is in a high security requirement. Therefore, a short SCFG validity period (for example, 1*24 hours) and a short SCFG update cycle (for example, 1*24 hours) can be configured at the same time. The security threshold used can be fixed according to the usage scenario, or it can be polled and updated in the private cloud system security threshold list at a fixed time interval. This is not specifically limited in the embodiments of the present application.
[0155] Step 904: Obtain the pause position of the seed process of the game server, and create a dedicated server process by quickly launching a plug-in according to the pause position of the seed process.
[0156] in, Fig.10 FIG. 1 is a schematic diagram of a game interface when the Unreal Engine server in the present invention is used as a game server. Fig.10 The Unreal Engine server shown can be used to open a room game. Each time a game is opened, a server process needs to be started. For example Fig. 9 As shown in the figure, each round of this type of game lasts for a short time, and usually multiple rounds are played in a short period of time, so the server needs to be able to start quickly. Fig.10 When using the room-opening game program shown, the Unreal Engine server provided by this application can set parameters based on the service-engine service component to meet the usage requirements of different room-opening game programs. Among them, the functions of different components in the service-engine service component layered architecture refer to Table 2.
[0157] Table 2
[0158]
[0159]
[0160] Therefore, the service engine in the Unreal Engine server can form different types of room opening game programs by loading the obtained service protocol and sequentially passing through different components in the service-engine service component layered architecture shown in Table 2.
[0161] In some embodiments of the present invention, before starting the game application, the running scenario can be preset, and then the identifier of the Unreal Engine server required to run in the running scenario can be determined based on the running scenario set by the running operation, and the preferred data transmission link when the Unreal Engine server is running can be determined based on the determined Unreal Engine server identifier, and data can be transmitted through the preferred data transmission link. Fig. 9 The game 1 and game 2 shown in the figure can be run through the Unreal Engine servers 1 and 2 respectively. At this time, the preferred data transmission links a and b in the running environment are screened. After the Unreal Engine server is started through the dedicated server process in response to the process trigger instruction, the Unreal Engine server 1 receives the game data through the data transmission link a, and the Unreal Engine server 2 receives the game data through the data transmission link b, thereby further reducing the waiting time of the game users and enabling the game users to obtain a better user experience. Step 905: In response to the process trigger instruction, the game server is started through the dedicated server process.
[0162] Through the processing of steps 904 and 905, the game user can quickly re-enter Fig.10 The game interface shown starts a new game process, reducing the waiting time of game users.
[0163] Beneficial technical effects:
[0164] 1) The embodiment of the present invention creates a seed process through the quick start server component of the Unreal Engine server; obtains the pause position of the seed process; in response to the received process creation instruction, creates a dedicated server process through the quick start server component according to the pause position of the seed process; after the creation of the dedicated server process is completed, receives a process trigger instruction through the quick start server component; in response to the process trigger instruction, starts the Unreal Engine server through the dedicated server process. Thus, a dedicated server process is created through the provided quick start server component, and the Unreal Engine server is quickly started using the dedicated server.
[0165] 2) During the creation of a dedicated server process, since a dedicated server process is created by quickly pulling up the server component based on the pause position of the seed process, these dedicated server processes reuse the same pause position. Therefore, limited hardware resources can be utilized, and multiple dedicated server processes can share memory data resources, thereby solving the defect of being unable to create multiple dedicated server processes.
[0166] 3) When creating a dedicated server process by quickly pulling up the server component, the pause position of the seed process can be adjusted according to the operating requirements of the Unreal Engine server by adjusting the configuration file parameters of the seed process, so that the user can independently decide the starting point for creating the seed process and the server process, making the creation of the server process more flexible and adapting to the needs of different Unreal Engine server usage scenarios.
[0167] The above descriptions are merely embodiments of the present invention and are not intended to limit the protection scope of the present invention. Any modifications, equivalent substitutions and improvements made within the spirit and principles of the present invention should be included in the protection scope of the present invention.
Claims
1. A method for starting an Unreal Engine server, characterized in that: The method comprises: Create a seed process by quickly pulling up the server component of the Unreal Engine server; Obtaining the pause position of the seed process; In response to the received process creation instruction, creating a dedicated server process by the fast pull-up server component according to the pause position of the seed process; When the dedicated server process is created, a process trigger instruction is received through the fast server startup component; In response to the process triggering instruction, the Unreal Engine server is started by the dedicated server process.
2. The method according to claim 1, characterized in that The process of quickly starting the server component of the Unreal Engine server and creating a seed process includes: Determine the configuration state of the client plug-in in the quick pull-up server component, wherein the quick pull-up server component includes: a quick pull-up plug-in and a client plug-in, the quick pull-up plug-in is installed in the Unreal Engine server, and the client plug-in is installed in a client program corresponding to the Unreal Engine server; When the configuration state of the client plug-in is configuration completed, creating the seed process through the client plug-in; The resource loading of the Unreal Engine server is performed through the seed process.
3. The method according to claim 1, characterized in that: The obtaining the pause position of the seed process includes: When the seed process completes loading the resources of the Unreal Engine server, determining the pause position of the seed process; or According to the operation requirements of the Unreal Engine server, the configuration file parameters of the seed process are adjusted to determine the pause position of the seed process.
4. The method according to claim 1, characterized in that: The step of creating a dedicated server process by the fast-starting server component in response to the received process creation instruction according to the pause position of the seed process includes: Obtaining the pause position of the seed process; In response to the received process creation instruction, calling the fork function; Executing the forged function through the fast pull-up plug-in in the fast pull-up server component to obtain the dedicated server process; The identification information of the dedicated server process is sent to the client plug-in in the fast pull-up server component.
5. The method according to claim 4, characterized in that The method further comprises: Before calling the replication function, the blocking and multi-threading properties of the seed process are detected; When there is locking information in the seed process, canceling the locking information; When the seed process is a multi-threaded process, the multi-threading of the seed process is closed, and the seed process is restarted.
6. The method according to claim 4, characterized in that The method further comprises: After obtaining the dedicated server process, closing the original file descriptor of the dedicated server process; A target file descriptor of the dedicated server process is created, and the target file descriptor is associated with the Unreal Engine server.
7. The method according to claim 4, characterized in that The method further comprises: After obtaining the dedicated server process, the corresponding port information of the dedicated server is adjusted to obtain the target port information of the dedicated server, wherein the target port information of the dedicated server is different from the port information of the seed process.
8. The method according to claim 1, characterized in that The method comprises: When the security index of the usage scenario of the Unreal Engine server is less than or equal to a security threshold, configuring a parameter validity period for the Unreal Engine server; When the security index of the Unreal Engine server usage scenario is greater than a security threshold, a parameter update cycle is configured for the Unreal Engine server.
9. An Unreal Engine server startup device, characterized in that: The device comprises: The information transmission module is used to quickly pull up the server component through the Unreal Engine server and create a seed process; An information processing module, used for obtaining the pause position of the seed process; The information processing module is used to create a dedicated server process through the fast pull-up server component according to the pause position of the seed process in response to the received process creation instruction; The information processing module is used to receive a process trigger instruction through the fast server startup component after the dedicated server process is created; The information processing module is used to start the Unreal Engine server through the dedicated server process in response to the process triggering instruction.
10. A computer program product comprising a computer program or instructions, characterized in that When the computer program or instruction is executed by a processor, the Unreal Engine server startup method described in any one of claims 1 to 8 is implemented.
11. An electronic device, characterized in that: The electronic device comprises: A memory for storing executable instructions; The processor is used to implement the Unreal Engine server startup method described in any one of claims 1 to 8 when running the executable instructions stored in the memory.
12. A computer-readable storage medium storing executable instructions, characterized in that: When the executable instructions are executed by the processor, the Unreal Engine server startup method described in any one of claims 1 to 8 is implemented.
Citation Information
Patent Citations
Application service request method and device, computer equipment and storage medium
CN113157452A
Data communication method for unreal engine and external program
CN113296979A
Multi-user application system environment engine
US10430921B1
