Process running method and device, equipment, storage medium and program product
By copying the loaded first process in a multiplayer battle game to create a second process and loading only the sub-data combination corresponding to the service request, the problem of waste of resources and CPU overhead caused by pre-allocating DS processes in the prior art is solved, and the process operation efficiency is improved.
Patent Information
- Application Number
- CN202311170924.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-11
- Publication Date
- 2025-03-11
AI Technical Summary
The prior art causes a large amount of idle resources to be wasted by pre-allocating DS processes in multiplayer combat games, and the pre-pull DS processes is inflexible, resulting in large CPU overhead and low process operation efficiency.
By running the first process, the full data resource is loaded, and the first process is copied when receiving the service request, the second process is obtained. The second process only loads the subdata combination corresponding to the service request, avoiding reloading the full data resource.
It improves the process pulling speed, reduces CPU glitches and server cluster resource consumption, and improves process operation efficiency.
Smart Images

Figure CN119587989A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a process running method, device, equipment, storage medium and program product. Background Art
[0002] For multiplayer combat games and other games that require creating a virtual room for multiple people, a dedicated server (DS) is usually required to provide services for hosting multiplayer games. When creating a room, the corresponding DS process needs to load a large amount of data resources required for the virtual room.
[0003] In the related technology, DS buffer pool technology is used to pre-start a batch of DS processes as the management of the DS pool to be allocated. When a request for DS allocation is made, the corresponding DS process is directly taken out of the DS pool to provide services. The DS cluster management program dynamically adjusts the DS pool size according to the overall operation of the cluster, allocation rate and configuration.
[0004] However, the above method causes a large number of idle DSs to run idle due to pre-allocation, wasting system resources of the entire cluster. In addition, pre-pulling DS itself is inflexible, the DS pulling process lasts for a long time, and a large amount of data resources need to be loaded, which will cause a large central processing unit (CPU) overhead and low process operation efficiency. Summary of the invention
[0005] The embodiments of the present application provide a process operation method, device, equipment, storage medium and program product, which can improve the process operation efficiency. The technical solution is as follows.
[0006] In one aspect, a process running method is provided, the method comprising:
[0007] Running a first process, the first process is used to load a full amount of data resources, the full amount of data resources includes data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute service data, the first process also includes a plurality of pre-set sub-data combinations, the sub-data combinations include the matching of at least two sub-data;
[0008] In response to receiving a service request, copying the first process to obtain a second process, the service request being used to request to obtain first service data, the service request including request information corresponding to the first service data, the first service data being a sub-data set in the full data resource composed of sub-data in at least one data resource group, and the second process being loaded with a first sub-data combination corresponding to the request information among the multiple sub-data combinations;
[0009] Based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain a service process, where the service process is used to provide the first service data.
[0010] In another aspect, a process running device is provided, the device comprising:
[0011] A running module, used to run a first process, the first process is used to load a full amount of data resources, the full amount of data resources includes data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute service data, the first process also includes a plurality of pre-set sub-data combinations, the sub-data combinations include the matching of at least two sub-data;
[0012] a replication module, configured to replicate the first process to obtain a second process in response to receiving a service request, wherein the service request is used to request to obtain first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set in the full data resource composed of sub-data in at least one data resource group, and the second process is loaded with a first sub-data combination corresponding to the request information among the multiple sub-data combinations;
[0013] A configuration module is used to configure and adjust the first sub-data combination loaded in the second process based on the request information corresponding to the service request to obtain a service process, wherein the service process is used to provide the first service data.
[0014] On the other hand, a computer device is provided, comprising a processor and a memory, wherein the memory stores at least one instruction, at least one program, a code set or an instruction set, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by the processor to implement a process running method as described in any of the above-mentioned embodiments of the present application.
[0015] On the other hand, a computer-readable storage medium is provided, wherein at least one instruction, at least one program, a code set or an instruction set is stored in the storage medium, and the at least one instruction, the at least one program, the code set or the instruction set is loaded and executed by a processor to implement a process running method as described in any of the above-mentioned embodiments of the present application.
[0016] On the other hand, a computer program product or a computer program is provided, the computer program product or the computer program includes computer instructions, the computer instructions are stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes any of the process running methods described in the above embodiments.
[0017] The beneficial effects brought by the technical solution provided by the embodiment of the present application include at least:
[0018] By running the first process, the first process is used to load the full data resources, the full data resources include data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute the service data, the first process also includes multiple pre-set sub-data combinations, the sub-data combination includes the matching of at least two sub-data; in response to receiving a service request, the first process is copied to obtain the second process, the service request is used to request to obtain the first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set composed of sub-data in at least one data resource group in the full data resources, and the second process is loaded with the first sub-data combination corresponding to the request information in multiple sub-data combinations; based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain the service process, the service process is used to provide the first service data, and by copying the first process, the process of reloading the full data resources for each service process is avoided, the process startup speed is improved, the CPU burrs are reduced, the resource consumption in the server cluster is reduced, and the process operation efficiency is improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0020] Figure 1 It is a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application;
[0021] Figure 2 is a flowchart of a process running method provided by an exemplary embodiment of the present application;
[0022] Figure 3 is a flow chart of a process replication method provided by an exemplary embodiment of the present application;
[0023] Figure 4 is a flow chart of a process configuration method provided by an exemplary embodiment of the present application;
[0024] Figure 5 is a flow chart of a process detection method provided by an exemplary embodiment of the present application;
[0025] Figure 6 It is a process operation schematic diagram provided by an exemplary embodiment of the present application;
[0026] Figure 7 is a schematic diagram of process memory allocation provided by an exemplary embodiment of the present application;
[0027] Figure 8 is a process operation performance diagram provided by an exemplary embodiment of the present application;
[0028] Fig. 9 is a structural block diagram of a process running device provided by an exemplary embodiment of the present application;
[0029] Fig.10 is a structural block diagram of a process running device module provided by an exemplary embodiment of the present application;
[0030] Fig.11 It is a structural block diagram of a terminal provided by an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0031] In order to make the objectives, technical solutions and advantages of the present application clearer, the implementation methods of the present application will be further described in detail below with reference to the accompanying drawings.
[0032] It should be understood that although the terms first, second, etc. may be used in the present disclosure to describe various information, such information should not be limited to these terms. These terms are only used to distinguish the same type of information from each other. For example, without departing from the scope of the present disclosure, the first parameter may also be referred to as the second parameter, and similarly, the second parameter may also be referred to as the first parameter. Depending on the context, the word "if" as used herein may be interpreted as "at the time of" or "when" or "in response to determining".
[0033] For multiplayer combat games and other games that require the creation of a virtual room for multiple people, DS is usually required to provide services for hosting multiplayer games. When creating a room, the corresponding DS process needs to load a large amount of data resources required for the virtual room. In the related art, DS buffer pool technology is used to pre-start a batch of DS processes as a DS pool to be allocated. When a request is made to allocate DS, the corresponding DS process is directly taken out from the DS pool to provide services. The DS cluster management program dynamically adjusts the DS pool size according to the overall operation of the cluster, the allocation rate and the configuration. However, the above method causes a large number of idle DSs to run in vain due to pre-allocation, which wastes the system resources of the entire cluster. In addition, the pre-start of DS itself is not flexible, the duration of starting the DS process is relatively long, and a large amount of data resources need to be loaded, which will cause a large CPU overhead and low process operation efficiency.
[0034] The process running method provided in the embodiment of the present application runs a first process, the first process is used to load the full data resources, the full data resources include data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute the service data, the first process also includes multiple pre-set sub-data combinations, the sub-data combinations include the matching of at least two sub-data; in response to receiving a service request, the first process is copied to obtain a second process, the service request is used to request to obtain the first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set composed of sub-data in at least one data resource group in the full data resources, and the second process is loaded with the first sub-data combination corresponding to the request information in multiple sub-data combinations; based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain a service process, the service process is used to provide the first service data, and by copying the first process, the process of reloading the full data resources for each service process is avoided, the process startup speed is improved, the CPU burr is reduced, the resource consumption in the server cluster is reduced, and the process operation efficiency is improved.
[0035] First, let's introduce the implementation environment of this application. Figure 1 , which shows a schematic diagram of an implementation environment provided by an exemplary embodiment of the present application, and the implementation environment includes: a server 110.
[0036] In some embodiments, the server 110 is implemented as a dedicated server (DS) for providing services for hosting multiplayer games.
[0037] In some embodiments, the server 110 provides multi-player gaming services to the terminals by running a DS process.
[0038] In some embodiments, the server 110 runs a first process, which is used to load a full amount of data resources. The full amount of data resources include data resource groups corresponding to multiple types, and the data resource groups include at least one sub-data. The data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute the service data. The first process also includes multiple pre-set sub-data combinations, and the sub-data combinations include the matching of at least two sub-data; in response to receiving a service request, the first process is copied to obtain a second process, and the service request is used to request to obtain the first service data. The service request includes request information corresponding to the first service data. The first service data is a sub-data set composed of sub-data in at least one data resource group in the full amount of data resources. The second process is loaded with the first sub-data combination corresponding to the request information in multiple sub-data combinations; based on the request information corresponding to the service request, resources are configured for the first sub-data combination loaded in the second process to obtain a service process, and the service process is used to provide the first service data.
[0039] Optionally, the implementation environment further includes a terminal 120 and a communication network 130. The server 110 and the terminal 120 perform data transmission via the communication network 130.
[0040] In some embodiments, the terminal 120 is one of multiple terminals participating in a multiplayer game. The server 110 receives a service request based on a room creation request of the terminal 120, obtains a second process by copying a first process, and performs resource configuration on the full amount of data resources loaded in the second process based on the request information corresponding to the service request. After obtaining the service process, the server 110 provides the first service data to the terminal 120 through the service process.
[0041] It is worth noting that the above-mentioned servers can be independent physical servers, or they can be server clusters or distributed systems composed of multiple physical servers. They can also be cloud servers that provide basic cloud computing services such as cloud services, cloud security, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), as well as big data and artificial intelligence platforms.
[0042] The above-mentioned terminal is optional. The terminal can be a desktop computer, a laptop computer, a mobile phone, a tablet computer, an e-book reader, a Moving Picture Experts Group Audio Layer III (MP3) player, a Moving Picture Experts Group Audio Layer IV (MP4) player, a smart TV, a smart car, and other forms of terminal devices, which are not limited to the embodiments of the present application.
[0043] Among them, 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.
[0044] In some embodiments, the above server can also be implemented as a node in a blockchain system.
[0045] It should be noted that the information (including but not limited to user device information, user personal information, etc.), data (including but not limited to data used for analysis, stored data, displayed data, etc.) and signals involved in this application are all authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with the relevant laws, regulations and standards of the relevant regions. For example, the operation data and account information involved in this application are all obtained with full authorization.
[0046] To further explain, before collecting relevant user data (for example, account information and room port information involved in this application, etc.) and during the process of collecting relevant user data, this application can display a prompt interface, pop-up window or output voice prompt information. The prompt interface, pop-up window or voice prompt information is used to prompt the user that its relevant data is currently being collected, so that this application only starts to execute the relevant steps of obtaining user-related data after obtaining the user's confirmation operation on the prompt interface or pop-up window, otherwise (that is, when the user's confirmation operation on the prompt interface or pop-up window is not obtained), the relevant steps of obtaining user-related data are terminated, that is, the user's relevant data is not obtained. In other words, all user data collected by this application are collected with the user's consent and authorization, and the collection, use and processing of relevant user data need to comply with relevant laws, regulations and standards in the relevant regions.
[0047] For illustration, please refer to Figure 2, which shows a flowchart of a process running method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a server as an example for explanation. Figure 2 As shown, the method comprises the following steps:
[0048] Step 210, running the first process.
[0049] Among them, the first process is used to load the full data resources, the full data resources include data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to multiple types are used to respectively determine the sub-data constituting service data, the first process also includes multiple pre-set sub-data combinations, the sub-data combinations include the matching of at least two sub-data.
[0050] In some embodiments, the first process is implemented as a seed process in the DS process, where the seed process refers to a process that is pre-launched and used to pre-load a full amount of data resources.
[0051] In some embodiments, the first process is pre-started by a DS agent (DSA), which is used to start the DS process and detect the DS process during its life cycle.
[0052] In some embodiments, the full amount of data resources is a preset data resource, and the full amount of data resources includes all data resources available to the DS process.
[0053] Taking the first process implemented as a DS process as an example, the full amount of data resources includes data resource groups corresponding to multiple types in the virtual combat game, wherein the multiple types are used to indicate the data types corresponding to the data resource groups.
[0054] Optionally, the multiple types include but are not limited to at least one of a virtual map, virtual props, and virtual characters in a virtual game.
[0055] Taking the data resource group corresponding to the virtual map type as an example, the data resource group includes at least one virtual map sub-data. The data resource group corresponding to the virtual map type in the full data resource includes the sub-data of the full virtual map preset in the virtual battle game.
[0056] Illustratively, the data resource group 1 corresponding to the virtual map type includes data resources corresponding to various virtual maps such as virtual map A, virtual map B, and virtual map C.
[0057] Taking the data resource group corresponding to the virtual prop type as an example, the data resource group includes at least one virtual prop sub-data. The data resource group corresponding to the virtual prop type in the full data resource includes the sub-data of the full virtual props preset in the virtual battle game.
[0058] Illustratively, the data resource group 2 corresponding to the virtual prop type includes data resources corresponding to various virtual props such as virtual prop A, virtual prop B, virtual prop C, etc.
[0059] Taking the data resource group corresponding to the virtual character type as an example, the data resource group includes at least one virtual character sub-data. The data resource group corresponding to the virtual character type in the full data resource includes the sub-data of the full virtual character preset in the virtual combat game.
[0060] Optionally, the virtual character type includes a player character type and a non-player character (NPC) type.
[0061] Illustratively, data resource group 3 corresponding to the player character type in the virtual character type includes data resources corresponding to various different player characters such as player character A, player character B, player character C, etc., and data resource group 4 corresponding to the NPC type includes data resources corresponding to various different NPCs such as NPC1, NPC2, NPC3, etc.
[0062] It is worth noting that the various types corresponding to the above-mentioned data resource groups are only illustrative examples and are not limited in this application.
[0063] In some embodiments, the data resource groups corresponding to the multiple types are used to respectively determine the sub-data constituting the service data, that is, the service data loaded in a single DS process is composed of at least one sub-data in the data resource groups corresponding to the multiple types.
[0064] Illustratively, assume that a DS process is used to provide a virtual battle game service for 50 players in a virtual map A, where the 50 players correspond to 50 different virtual player characters, and there are 100 virtual props and 10 non-player characters preset in the game. The service data loaded in the DS process includes sub-data corresponding to the virtual map A in data resource group 1 corresponding to the virtual map type, sub-data corresponding to the 100 preset virtual props in data resource group 2 corresponding to the virtual prop type, sub-data corresponding to the 50 preset player characters in data resource group 3 corresponding to the player character type, and sub-data corresponding to the 10 preset non-player characters in data resource group 4 corresponding to the non-player character type.
[0065] In some embodiments, after DS is released within the cluster, the first process starts to run, where the release of DS within the cluster means that the preset full data resources are updated. For example, a virtual combat game has its latest version launched, and the gameplay of a new virtual map D is added to this version. When this version is launched, the first process starts to run. The first process is used to load the full data resources including the sub-data of the newly added virtual map D.
[0066] In some embodiments, the full amount of data resources loaded by the first process corresponds to a plurality of preset first resource feature representations, and the plurality of first resource feature representations are used to indicate different sub-data combinations, each of which includes at least one sub-data in each data resource group.
[0067] In some embodiments, the plurality of first resource characteristic representations are determined by grouping sub-data in data resource groups corresponding to a plurality of types in the full amount of data resources based on different preset virtual combat game situations.
[0068] Schematically, there are n different virtual battle game situations preset, corresponding to n first resource feature representations, the n first resource feature representations are used to indicate n preset sub-data combinations, the sub-data combinations including the matching of at least two sub-data, such as the combination of different virtual maps, virtual props and virtual characters. For example, the first first resource feature representation corresponding to the first virtual battle game situation is used to indicate the first sub-data combination 1, the first sub-data combination 1 includes the sub-data corresponding to the virtual map A, 10 virtual props, and 50 virtual characters respectively; the second first resource feature representation corresponding to the second virtual battle game situation is used to indicate the first sub-data combination 2, the first sub-data combination 2 includes the sub-data corresponding to the virtual map A, 5 virtual props, and 30 virtual characters respectively; the third first resource feature representation corresponding to the third virtual battle game situation is used to indicate the first sub-data combination 3, the first sub-data combination 3 includes the sub-data corresponding to the virtual map B, 5 virtual props, and 20 virtual characters respectively.
[0069] In some embodiments, the first resource feature representation is implemented as a first feature vector, which is stored in the data memory space corresponding to the first process in the form of a feature vector together with the full data resource. By implementing multiple first resource feature representations in the form of feature vectors to indicate the service data that can be constituted by the sub-data in the full data resource, it is possible to quickly obtain a second process loaded with a certain type of service data by copying the first process in the intermediate state, where the intermediate state refers to the service data indicated by a first resource feature representation. For example, the first resource feature representation is used to indicate sub-data combination 1, then the first process in the intermediate state corresponding to sub-data combination 1 is copied to obtain the second process, and sub-data combination 1 is loaded in the second process.
[0070] Step 220: In response to receiving the service request, the first process is copied to obtain a second process.
[0071] Among them, the service request is used to request to obtain the first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set composed of sub-data in at least one data resource group in the full data resource, the second process is loaded with the first sub-data combination copied from the first process, the first sub-data combination is a sub-data set copied from at least one sub-data in at least one data resource group in the full data resource, and the second process is loaded with the first sub-data combination corresponding to the request information among multiple sub-data combinations.
[0072] In some embodiments, the service request is a request sent by the DSA to the DS based on the room creation request of the terminal, and the service request is used to request to provide the first service data to the terminal.
[0073] Illustratively, DSA receives a room creation request, requesting to create a virtual battle game room that can accommodate 50 players and uses virtual map A with a medium difficulty level. DSA sends a service request to DS, where the service request is used to request to obtain the first service data corresponding to the room. The service request includes request information corresponding to the first service data, for example, the room size is 50 people, the map used is virtual map A, and the difficulty level is medium, wherein the room size is used to indicate that the first service data includes 50 sub-data in the data resource group corresponding to the virtual character type, the map use information is used to indicate that the first service data includes sub-data corresponding to virtual map A in the data resource group corresponding to the virtual map type, and the medium difficulty level is used to indicate that the first service data includes sub-data corresponding to 10 virtual props in the data resource group corresponding to the virtual prop type.
[0074] Optionally, the service request may also be a request sent to the first process by a script such as a preset script for sending operation instructions based on an external request.
[0075] In some embodiments, the second process is implemented as a DS process, and the second process is implemented as a child process of the first process.
[0076] In some embodiments, before step 220, a process of determining a first resource characteristic representation is also included, and the process is implemented by grouping sub-data in data resource groups corresponding to multiple types in the full data resources, and determining multiple first resource characteristic representations, wherein the multiple first resource characteristic representations are used to indicate different sub-data combinations, and each sub-data combination includes at least two sub-data in at least one data resource group.
[0077] Illustratively, based on features such as virtual room size, virtual map type, and game match difficulty, sub-data in the full data resources are grouped, and the corresponding first resource feature representation is determined. For example, based on the features that the virtual room size is 50 people, the virtual map type is virtual map A, and the game match difficulty is medium, the sub-data corresponding to 50 virtual characters in the data resource group corresponding to the virtual character type, the sub-data corresponding to virtual map A in the data resource group corresponding to the virtual map type, and the sub-data corresponding to 10 virtual props in the data resource group corresponding to the virtual prop type are determined as a sub-data combination 1. The sub-data combination 1 corresponds to the first resource feature representation a, and the first resource feature representation a is used to indicate the multiple sub-data included in the sub-data combination 1.
[0078] Optionally, each sub-data combination may include at least two sub-data in a single data resource group, or may include at least two sub-data in multiple data resource groups.
[0079] In some embodiments, the number of sub-data included in different sub-data combinations may be the same or different, and at least one data resource group corresponding to the sub-data in different sub-data combinations may be the same or different.
[0080] In some embodiments, based on the service request and the plurality of first resource characteristic representations, the first process is copied to obtain the second process. Specifically, the above step 220 may include the following three steps:
[0081] In the first step, a second resource feature representation is determined based on service information corresponding to the service request.
[0082] The second resource characteristic representation is used to indicate the sub-data included in the first service data.
[0083] Illustratively, taking the service information used to indicate that the virtual room size is 50 people, the virtual map type is virtual map A, and the game difficulty is medium as an example, a second resource feature representation is determined based on the service information. The second resource feature representation is used to indicate that the first service data includes sub-data corresponding to 50 virtual characters in the data resource group corresponding to the virtual character type, sub-data corresponding to virtual map A in the data resource group corresponding to the virtual map type, and sub-data corresponding to 10 virtual props in the data resource group corresponding to the virtual prop type.
[0084] In the second step, a target resource feature representation that has a similarity relationship with the second resource feature representation is determined from the multiple first resource feature representations.
[0085] The target resource characteristic representation is used to indicate the first sub-data combination.
[0086] In some embodiments, the first resource feature representation is implemented as a first feature vector, the second resource feature representation is implemented as a second feature vector, and the vector similarity between the first feature vector and the second feature vector is determined based on a preset similarity algorithm.
[0087] Optionally, the similarity relationship includes at least one of the following: the vector similarity reaches a preset threshold, the first resource feature representation is the same as the second resource feature representation, the vector similarity is implemented as the first vector similarity among multiple vector similarities sorted in descending order by numerical value, etc.
[0088] Taking the similarity relationship including the vector similarity reaching a preset threshold as an example, the second step is implemented by determining, based on the vector similarity, from multiple first resource feature representations a target resource feature representation whose vector similarity corresponding to the second resource feature representation reaches a preset threshold.
[0089] Illustratively, assume that there is a first resource feature representation 1 for indicating a sub-data combination in which the virtual room size is 100 people, the virtual map type is virtual map B, and the game match difficulty is medium; a first resource feature representation 2 is used to indicate a sub-data combination in which the virtual room size is 50 people, the virtual map type is virtual map A, and the game match difficulty is high; and a second resource feature representation is used to indicate a sub-data combination in which the virtual room size is 100 people, the virtual map type is virtual map C, and the game sub-game difficulty is medium. Among them, the similarity between the first resource feature representation 1 and the second resource feature representation is the highest, and the first resource feature representation 1 is determined as the target resource feature representation.
[0090] In the third step, the first process is copied based on the target resource characteristic representation to obtain the second process.
[0091] The first sub-data combination is loaded in the second process.
[0092] In some embodiments, a first sub-data combination in the full data resource is determined based on the target resource characteristic representation, and a first process containing the first sub-data combination is determined as the first process of the target state, and the first process of the target state is copied to obtain a second process.
[0093] In some embodiments, the first process is copied based on the target resource feature representation using the operating system's Copy-On-Write to obtain the second process. The second process has the same virtual address space as the first process and is mapped to the same physical memory page as the first process, and thus naturally has the same runtime state and the first sub-data combination loaded into the memory as the first process.
[0094] Step 230: Based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain a service process.
[0095] The service process is used to provide first service data.
[0096] In some embodiments, the resource configuration process is used to configure sub-data in the first sub-data combination that is different from the first service data to be sub-data that is the same as the first service data.
[0097] In some embodiments, the first sub-data combination loaded in the second process is configured and adjusted using the write-time copy of the operating system to obtain a service process, and the write copy of the memory page is triggered only when the memory data is modified during the operation of the second process.
[0098] Schematically, taking the sub-data combination 1 for indicating that the virtual room size is 100 people, the virtual map type is virtual map B, and the game match difficulty is medium, and the sub-data combination 2 for indicating that the virtual room size is 100 people, the virtual map type is virtual map C, and the game sub-game difficulty is medium as an example, the second resource feature represents the sub-data combination 1, and the first service data requested by the service request needs to include the sub-data combination 2. Based on the difference between the sub-data combination 1 and the sub-data combination 2, the sub-data corresponding to the virtual map B in the data resource group corresponding to the virtual map type in the second resource data is modified, and the sub-data is replaced with the sub-data corresponding to the virtual map C in the data resource group corresponding to the virtual map type, so as to obtain the first service data including the sub-data combination 2, thereby obtaining the service process.
[0099] In some embodiments, step 230 includes the following two steps:
[0100] The first step is to reset the process data corresponding to the second process.
[0101] The process data is used to identify the second process.
[0102] In some embodiments, the process data includes process data uniquely corresponding to the second process, such as a process identifier (ID), and the process data is used to distinguish the first process from the second process.
[0103] In some embodiments, resetting the process data corresponding to the second process refers to isolating system resources and restoring the status, wherein isolating system resources includes reopening the resource file handle corresponding to the second process, redirecting the log file corresponding to the second process, etc., and restoring the status includes setting a new random seed for the second process, etc., wherein isolating system resources is used to distinguish the first process from the second process from a system perspective, and the recovery status is used to distinguish the first process from the second process from a data resource perspective.
[0104] In the second step, the first sub-data combination in the second process is configured based on the request information to obtain a service process including the first service data.
[0105] In some embodiments, configuring the first sub-data combination in the second process based on the request information refers to specializing the second process to configure the first sub-data combination as the first service data.
[0106] In some embodiments, the request information includes target port information and virtual room information, wherein the target port information is used to indicate the terminal that needs to obtain the first service data, and the virtual room information includes information such as the virtual room size, virtual map type, and game difficulty.
[0107] In some embodiments, the configuration process is implemented by determining the port information and virtual room information in the first sub-data combination, configuring the port information as the target port information, and configuring the virtual room information as the target virtual room information, to obtain a service process containing the first service data.
[0108] Illustratively, the target port information is used to indicate that the first service data is provided to terminal A, the virtual room information is used to indicate that the virtual room size is 100 people, the virtual map type is virtual map C, and the game sub-game difficulty is medium, the port information in the first sub-data combination is used to indicate that the first service data is provided to terminal B, the virtual room information is used to indicate that the virtual room size is 100 people, the virtual map type is virtual map B, and the game game difficulty is medium, the port information in the first sub-data combination is configured as the target port information, and the virtual room information is configured as the target virtual room information, to obtain the first service data provided to terminal A.
[0109] In summary, the method provided by the embodiment of the present application runs a first process, the first process is used to load the full data resources, the full data resources include data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute the service data, and the first process also includes multiple pre-set sub-data combinations, and the sub-data combination includes the matching of at least two sub-data; in response to receiving a service request, the first process is copied to obtain a second process, the service request is used to request to obtain the first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set composed of sub-data in at least one data resource group in the full data resources, and the second process is loaded with the first sub-data combination corresponding to the request information in multiple sub-data combinations; based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain a service process, the service process is used to provide the first service data, and by copying the first process, the process of reloading the full data resources for each service process is avoided, the process startup speed is improved, the CPU burr is reduced, the resource consumption in the server cluster is reduced, and the process operation efficiency is improved.
[0110] In some embodiments, copying the first process to obtain the second process is implemented by selectively copying the full amount of data resources in the first process to obtain the second process loaded with the first sub-data combination. Please refer to Figure 3 , Figure 3 : is a flowchart of a process replication method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a server as an example for explanation. Figure 3 As shown, the above step 220 may include the following steps:
[0111] Step 221: Receive a service request and obtain request information corresponding to the service request.
[0112] The service request is a request sent by the DSA to the DS based on the room creation request of the terminal. The service request is used to request to provide the first service data to the terminal. The request information corresponding to the service request is used to indicate the second sub-data combination included in the first service data.
[0113] Illustratively, DSA receives a room creation request, requesting to create a virtual battle game room that can accommodate 50 players and uses virtual map A with a medium difficulty level. DSA sends a service request to DS, where the service request is used to request to obtain the first service data corresponding to the room. The service request includes request information corresponding to the first service data, for example, the room size is 50 people, the map used is virtual map A, and the difficulty level is medium, wherein the room size is used to indicate that the first service data includes 50 sub-data in the data resource group corresponding to the virtual character type, the map use information is used to indicate that the first service data includes sub-data corresponding to virtual map A in the data resource group corresponding to the virtual map type, and the medium difficulty level is used to indicate that the first service data includes sub-data corresponding to 10 virtual props in the data resource group corresponding to the virtual prop type.
[0114] Optionally, the service request may also be a request sent to the first process by a script such as a preset script for sending operation instructions based on an external request.
[0115] Step 222: Determine a first sub-data combination matching the request information from the multiple sub-data combinations.
[0116] In some embodiments, a second sub-data combination in the first service data is determined based on the request information, and a first sub-data combination with the highest similarity to the second sub-data combination is determined from multiple sub-data combinations by comparing at least two sub-data in the sub-data combination, for example, the selected virtual map, the size of the virtual room, the difficulty of the game match, etc.
[0117] Illustratively, assuming that the first sub-data combination 1 includes sub-data corresponding to the virtual map A, virtual character a, virtual character b, and virtual prop c, respectively, the first sub-data combination 2 includes sub-data corresponding to the virtual map A, virtual character a, virtual character b, virtual character c, and virtual prop d, respectively, the first sub-data combination 3 includes sub-data corresponding to the virtual map B, virtual character a, and virtual prop b, respectively, and the second sub-data combination includes sub-data corresponding to the virtual map C, virtual character a, and virtual prop b, respectively, by comparing multiple sub-data in the second sub-data combination with multiple sub-data in the first sub-data combination 1, the first sub-data combination 2, and the first sub-data combination 3, the first sub-data combination 3 having the highest similarity to the second sub-data combination is determined.
[0118] Step 223, selectively copy the first sub-data combination loaded in the first process to obtain a second process.
[0119] In some embodiments, the full amount of data resources loaded in the first process are selectively copied based on the first sub-data combination to obtain a second process, and the second process is loaded with the first sub-data combination.
[0120] In some embodiments, before step 220, a process of determining a first resource characteristic representation is also included, and the process is implemented by grouping sub-data in data resource groups corresponding to multiple types in the full data resources, and determining multiple first resource characteristic representations, wherein the multiple first resource characteristic representations are used to indicate different sub-data combinations, and each sub-data combination includes at least one sub-data in at least one data resource group.
[0121] Illustratively, based on features such as virtual room size, virtual map type, and game match difficulty, sub-data in the full data resources are grouped, and the corresponding first resource feature representation is determined. For example, based on the features that the virtual room size is 50 people, the virtual map type is virtual map A, and the game match difficulty is medium, the sub-data corresponding to 50 virtual characters in the data resource group corresponding to the virtual character type, the sub-data corresponding to virtual map A in the data resource group corresponding to the virtual map type, and the sub-data corresponding to 10 virtual props in the data resource group corresponding to the virtual prop type are determined as a sub-data combination 1. The sub-data combination 1 corresponds to the first resource feature representation a, and the first resource feature representation a is used to indicate the multiple sub-data included in the sub-data combination 1.
[0122] Optionally, each sub-data combination may include at least one sub-data in a single data resource group, or may include at least one sub-data in multiple data resource groups.
[0123] In some embodiments, the number of sub-data included in different sub-data combinations may be the same or different, and at least one data resource group corresponding to the sub-data in different sub-data combinations may be the same or different.
[0124] In some embodiments, the first process is copied based on the service request and the plurality of first resource feature representations to obtain the second process. Specifically, the above step 222 can be implemented as the following two steps:
[0125] In the first step, a second resource feature representation is determined based on service information corresponding to the service request.
[0126] The second resource characteristic representation is used to indicate the sub-data included in the first service data, that is, the second sub-data combination.
[0127] Illustratively, taking the service information used to indicate that the virtual room size is 50 people, the virtual map type is virtual map A, and the game difficulty is medium as an example, a second resource feature representation is determined based on the service information. The second resource feature representation is used to indicate that the second sub-data combination in the first service data includes sub-data corresponding to 50 virtual characters in the data resource group corresponding to the virtual character type, sub-data corresponding to virtual map A in the data resource group corresponding to the virtual map type, and sub-data corresponding to 10 virtual props in the data resource group corresponding to the virtual prop type.
[0128] In the second step, a target resource feature representation that has a similarity relationship with the second resource feature representation is determined from the multiple first resource feature representations.
[0129] The target resource characteristic representation is used to indicate the first sub-data combination.
[0130] In some embodiments, the first resource feature representation is implemented as a first feature vector, the second resource feature representation is implemented as a second feature vector, and the vector similarity between the first feature vector and the second feature vector is determined based on a preset similarity algorithm.
[0131] Optionally, the similarity relationship includes at least one of the following: the vector similarity reaches a preset threshold, the first resource feature representation is the same as the second resource feature representation, the vector similarity is implemented as the first vector similarity among multiple vector similarities sorted in descending order by numerical value, etc.
[0132] Taking the similarity relationship including the vector similarity reaching a preset threshold as an example, the second step is implemented by determining, based on the vector similarity, from multiple first resource feature representations a target resource feature representation whose vector similarity corresponding to the second resource feature representation reaches a preset threshold.
[0133] Illustratively, assume that there is a first resource feature representation 1 for indicating a first sub-data combination in which the virtual room size is 100 people, the virtual map type is virtual map B, and the game difficulty is medium; a first resource feature representation 2 is used to indicate a first sub-data combination in which the virtual room size is 50 people, the virtual map type is virtual map A, and the game difficulty is high; and a second resource feature representation is used to indicate a second sub-data combination in which the virtual room size is 100 people, the virtual map type is virtual map C, and the game sub-game difficulty is medium. Among them, the similarity between the first resource feature representation 1 and the second resource feature representation is the highest, and the first resource feature representation 1 is determined as the target resource feature representation.
[0134] In some embodiments, the above step 223 is implemented by copying the first sub-data combination loaded by the first process to obtain the second process based on the target resource feature representation.
[0135] In some embodiments, a first sub-data combination in the full data resource is determined based on the target resource characteristic representation, and a first process containing the first sub-data combination is determined as the first process of the target state, and the first process of the target state is copied to obtain a second process.
[0136] In some embodiments, the first process is copied based on the target resource feature representation using the operating system's Copy-On-Write to obtain the second process. The second process has the same virtual address space as the first process and is mapped to the same physical memory page as the first process, and thus naturally has the same runtime state and the first sub-data combination loaded into the memory as the first process.
[0137] In summary, the method provided in the embodiment of the present application determines multiple first resource feature representations by grouping sub-data in data resource groups corresponding to multiple types in the full data resources. The multiple first resource feature representations are used to indicate different sub-data combinations. Each sub-data combination includes at least one sub-data in at least one data resource group. The combination of various data resources is indicated by the first resource feature representation. The first resource feature representation is used as a combination seed. During the copying process of the first process, the intermediate state of the first process can be quickly determined according to the first resource feature representation, and the corresponding first sub-data combination can be copied, thereby improving the process copying efficiency and thus improving the process running efficiency.
[0138] The method provided by the embodiment of the present application determines a second resource feature representation based on service information corresponding to a service request, the second resource feature representation is used to indicate sub-data included in the first service data, determines a target resource feature representation that has a similarity relationship with the second resource feature representation from multiple first resource feature representations, the target resource feature representation is used to indicate a first sub-data combination, and based on the target resource feature representation, a first process is copied to obtain a second process, the second process is loaded with the first sub-data combination, and the first sub-data combination with the smallest difference from the first service data is quickly copied through the target resource feature representation that has a similarity relationship with the second resource feature representation, thereby reducing the CPU resources required in the process of performing resource configuration on the first sub-data combination to obtain the first service data, thereby improving the operating efficiency of the service process and reducing CPU glitches.
[0139] In some embodiments, before configuring the first sub-data combination, the process data corresponding to the second process needs to be reset so that the DSA can distinguish between the first process and the second process. Figure 4 , Figure 4 : is a flow chart of a process configuration method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a server as an example for explanation. Figure 4 As shown, the above step 230 includes the following steps:
[0140] Step 231, resetting the process data corresponding to the second process.
[0141] The process data is used to identify the second process.
[0142] In some embodiments, the process data includes process data uniquely corresponding to the second process, such as a process ID, and the process data is used to distinguish the first process from the second process.
[0143] In some embodiments, resetting the process data corresponding to the second process refers to isolating system resources and restoring the status, wherein isolating system resources includes reopening the resource file handle corresponding to the second process, redirecting the log file corresponding to the second process, etc., and restoring the status includes setting a new random seed for the second process, etc., wherein isolating system resources is used to distinguish the first process from the second process from a system perspective, and the recovery status is used to distinguish the first process from the second process from a data resource perspective.
[0144] Step 232: Adjust the configuration of the first sub-data combination in the reset second process based on the request information to obtain a service process including the first service data.
[0145] In some embodiments, configuring the first sub-data combination in the second process based on the request information refers to specializing the second process to configure the first sub-data combination as the first service data.
[0146] In some embodiments, the request information is used to request the creation of a virtual room, and the request information includes target port information and target virtual room information, wherein the target port information is used to indicate a terminal that needs to obtain the first service data, and the target virtual room information is used to indicate the configuration of the virtual room, and the target virtual room information includes information such as the size of the virtual room, the type of virtual map, and the difficulty of the game.
[0147] In some embodiments, the above configuration process includes the following two steps:
[0148] The first step is to determine the port information and virtual room information in the first sub-data combination.
[0149] Illustratively, it is determined that the port information in the first sub-data combination is used to indicate that the first service data is provided to terminal B, and the virtual room information is used to indicate that the virtual room size is 100 people, the virtual map type is virtual map B, and the game difficulty is medium.
[0150] In the second step, the port information configuration is adjusted to the target port information, and the virtual room information configuration is adjusted to the target virtual room information, so as to obtain a service process including the first service data.
[0151] Illustratively, the target port information is used to indicate that the first service data is provided to terminal A, the virtual room information is used to indicate that the virtual room size is 100 people, the virtual map type is virtual map C, and the game sub-game difficulty is medium, the port information in the first sub-data combination is used to indicate that the first service data is provided to terminal B, the virtual room information is used to indicate that the virtual room size is 100 people, the virtual map type is virtual map B, and the game game difficulty is medium, the port information in the first sub-data combination is configured as the target port information, and the virtual room information is configured as the target virtual room information, to obtain the first service data provided to terminal A.
[0152] In some embodiments, after step 230, a service providing process is further included, and the process is implemented by providing the first service data to the terminal indicated by the target port information through a service process.
[0153] Illustratively, the first service data required for a virtual room with a size of 100 persons, a virtual map type of virtual map C, and a medium game secondary game difficulty is provided to terminal A indicated by the target port information through the service process.
[0154] To summarize, the method provided in the embodiment of the present application, by resetting the process data corresponding to the second process, configures the first sub-data combination in the second process based on the request information, obtains a service process containing the first service data, and realizes the replication of the first process, so that the service process can quickly obtain a large amount of data resources without reloading the complete data resources, thereby improving the operation efficiency of the service process.
[0155] The method provided in the embodiment of the present application determines the port information and virtual room information in the first sub-data combination, configures the port information as the target port information, and configures the virtual room information as the target virtual room information, thereby obtaining a service process including the first service data, and obtaining the service process through a small amount of data modification, thereby reducing the memory occupied by the process and reducing CPU glitches.
[0156] The method provided in the embodiment of the present application provides first service data to the terminal indicated by the target port information through a service process, thereby realizing the function of providing service to the terminal based on the first service data.
[0157] In some embodiments, the server corresponds to a server agent program, and the server agent program is used to detect the survival of the process. The process running method provided in the embodiment of the present application also includes a process detection process. Please refer to Figure 5 , Figure 5 : is a flow chart of a process detection method provided by an exemplary embodiment of the present application. The method can be executed by a terminal, or by a server, or by both a terminal and a server. The present application embodiment takes the method executed by a server as an example for explanation. Figure 5 As shown, the process running method provided in the embodiment of the present application also includes the following steps:
[0158] Step 510: Send a first heartbeat signal to the server agent program through the first process.
[0159] The server agent program is used to detect the survival status of the process, and the first heartbeat signal is used to indicate the survival status of the first process.
[0160] In some embodiments, the server agent is implemented as a DSA.
[0161] In some embodiments, the first process sends a first heartbeat signal to the server agent program according to a preset time period, and the server agent program receives the first heartbeat signal according to the preset time period. When the server agent program receives the first heartbeat signal within the preset time period, the server agent program determines that the first process is alive; when the server agent program does not receive the signal within the preset time period, the server agent program determines that the first process is abnormal.
[0162] Step 520: Receive a first instruction sent by the server agent program through a first process.
[0163] The first instruction includes a service request.
[0164] In some embodiments, a service request sent by a server agent is received by a first process, and in response to receiving the service request, the first process is copied to obtain a second process.
[0165] In some embodiments, after obtaining the service process, a service process detection process is also included. The process is implemented as follows: after the above step 230, service process information corresponding to the service process is sent to the server agent program through the first process. The service process information includes a service process identifier. There is a corresponding relationship between the service process identifier and the service request. The server agent program is used to detect the survival status of the service process based on the service process information.
[0166] In some embodiments, after receiving the service process information returned by the first process, the DSA can identify the mapping relationship between the new service process identifier and the service request according to the first process identifier, thereby further detecting the survival status of the service process based on the service process identifier.
[0167] To summarize, the method provided in the embodiment of the present application sends a first heartbeat signal to a server agent program through a first process, the server agent program is used to detect the survival status of the process, the first heartbeat signal is used to indicate the survival status of the first process, and the first instruction sent by the server agent program is received through the first process, the first instruction includes a service request, and the server agent program is introduced to detect the survival status of the process in real time, thereby ensuring that the first process as a seed process does not have any abnormalities during operation, thereby improving the process operation efficiency.
[0168] The method provided in the embodiment of the present application sends service process information corresponding to the service process to the server agent program through the first process, the service process information includes a service process identifier, and there is a corresponding relationship between the service process identifier and the service request. The server agent program is used to detect the survival status of the service process based on the service process information. After the service process starts running, the first process feeds back the service process information to the server agent program, so that the server agent program can detect the existence of the service process in time and detect the survival status of the service process in real time, thereby ensuring that no abnormalities occur in the service process during operation and improving the operation efficiency of the service process.
[0169] In some embodiments, after DS is released in the cluster, DSA first starts the seed process of DS, that is, runs the first process. After being started, the first process first loads the full amount of data resources, and hovers after loading, that is, maintains the current running state; during the hovering period, the first process periodically sends a first heartbeat signal to DSA, so that DSA can continuously detect the survival of the first process, while detecting the instructions of DSA; when an external request is made to allocate DS, that is, a service request is received, DSA finds the state seed with the closest characteristics according to the service information corresponding to the service request (such as by comparing the selected map, difficulty, number of people and other game parameters), that is, determines the second resource feature representation according to the service information, and determines the target resource feature representation from multiple first resource feature representations according to the second resource feature representation, and copies the first process based on the target resource feature representation to obtain the second process; after copying the second process, the first process returns the process information of the second process (such as: process ID, original request ID) to DSA, and then replies to hovering, and continues to wait for subsequent commands from DSA; using the operator The write-time copy of the system is performed. The second process just copied not only has the same virtual address space as the first process, but is also mapped to the same physical memory page as the first process, so that it naturally has the same game runtime state and resources loaded into the memory as the first process. The write copy of the memory page will be triggered only when the memory data is modified during the operation of the second process. After the second process is started, the system resources and the recovery state are first isolated, that is, the process data of the second process is reset (such as reopening the resource file handle, redirecting the log file, setting a new random seed, etc.), and then the second process is specialized, that is, the resource configuration of the first sub-data combination loaded in the second process is performed (such as starting the DS detection port, setting the room information, etc.), and a service process is obtained. The service process includes the first service data, and the service process provides the first service data to the outside; after the DSA receives the service process information returned by the first process, it can identify the mapping relationship between the service process and the service request according to the original request ID, and use the service process ID to further detect the survival of the service process.
[0170] For illustration, please refer to Figure 6 , Figure 6 is a schematic diagram of a process operation provided by an exemplary embodiment of the present application, such as Figure 6As shown, the process running process includes step 610, starting the seed process; step 620, initializing the loading of various resources; step 630, determining the state snapshot of the seed process; step 640, the seed process suspends and waits for instructions, and creates a child process by copying the seed process; step 650, isolates system resources for the child process and restores the state; step 660, successfully starts the child process. Among them, starting the seed process refers to running the first process; initializing the loading of various resources refers to loading the full amount of data resources through the first process; determining the state snapshot refers to determining multiple first resource feature representations; the seed process suspends and waits for instructions, and creating a child process by copying the seed process refers to copying the first process to obtain the second process in response to receiving the service request; isolating system resources for the child process and restoring the state refers to configuring resources for the first sub-data combination loaded in the second process based on the request information corresponding to the service request to obtain the service process; successfully starting the child process refers to successfully obtaining the service process, and being able to obtain the first service data through the service process.
[0171] For illustration, please refer to Figure 7 , Figure 7 is a schematic diagram of process memory allocation provided by an exemplary embodiment of the present application, such as Figure 7 As shown, when the process is run in the traditional DS pool mode, each DS sub-process needs to occupy the complete memory resources in the resource structure 710 allocated for the game engine, while according to the process running method provided in the embodiment of the present application, each service process only needs to occupy part of the memory resources in the resource structure 720, wherein the state process refers to the service process, and the memory required by each service process is only needed to store the part of the first service data that is different from the first sub-data combination.
[0172] For illustration, please refer to Figure 8 , Figure 8 is a schematic diagram of process operation performance provided by an exemplary embodiment of the present application, such as Figure 8As shown, sub-figure a shows the CPU occupancy when the process is run in the traditional DS pool mode, and sub-figure b shows the CPU occupancy when the process running method provided by the embodiment of the present application is adopted. When the service processes corresponding to 300 preset virtual maps are concurrently started, the CPU occupancy shown in sub-figure a surges in the initialization time period, and even the CPU cores are fully utilized. The CPU occupancy shown in sub-figure b is obtained by copying the first process and then obtaining the service process. During the entire DS startup process, the overall CPU is smooth without obvious glitches. Moreover, through the experimental comparison shown in sub-figure a and sub-figure b, since part of the DS memory does not change after the first process is copied and the copy is not actually triggered, the overall memory occupancy of the DS will also decrease. The specific degree of memory occupancy reduction varies depending on the specific business logic of the DS. Therefore, the process running method provided by the embodiment of the present application can increase the process startup speed, reduce CPU glitches, reduce resource consumption in the server cluster, and improve process running efficiency.
[0173] Fig. 9 is a structural block diagram of a process running device provided by an exemplary embodiment of the present application, such as Fig. 9 As shown, the device includes the following parts:
[0174] The running module 910 is used for running the module, and is used for running the first process. The first process is used for loading the full amount of data resources, and the full amount of data resources includes data resource groups corresponding to multiple types, and the data resource groups include at least one sub-data. The data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute the service data. The first process also includes a plurality of pre-set sub-data combinations, and the sub-data combination includes the matching of at least two sub-data.
[0175] a copy module 920, configured to copy the first process to obtain a second process in response to receiving a service request, wherein the service request is used to request to obtain first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set in the full data resource composed of sub-data in at least one data resource group, and the second process is loaded with a first sub-data combination corresponding to the request information among the multiple sub-data combinations;
[0176] The configuration module 930 is used to adjust the configuration of the first sub-data combination loaded in the second process based on the request information corresponding to the service request to obtain a service process, and the service process is used to provide the first service data.
[0177] Please refer to Fig.10 , Fig.10 is a structural block diagram of a process running device module provided by an exemplary embodiment of the present application, such as Fig.10 As shown, in some embodiments, the copy module 920 includes:
[0178] The receiving unit 921 is used to receive the service request and obtain the request information corresponding to the service request;
[0179] A determining unit 922, configured to determine the first sub-data combination matching the request information from the multiple sub-data combinations;
[0180] The copying unit 923 is used to selectively copy the first sub-data combination loaded in the first process to obtain the second process.
[0181] In some embodiments, the device also includes a determination module 940, which is used to group the sub-data in the data resource groups corresponding to the multiple types in the full data resource, and determine multiple first resource feature representations, wherein the multiple first resource feature representations are used to indicate different sub-data combinations.
[0182] In some embodiments, the determining unit 922 is used to:
[0183] determining a second resource characteristic representation based on the service information corresponding to the service request, where the second resource characteristic representation is used to indicate a second sub-data combination included in the first service data;
[0184] Determine, from the plurality of first resource feature representations, a target resource feature representation that has a similarity relationship with the second resource feature representation, the target resource feature representation being used to indicate the first sub-data combination;
[0185] The copying unit 923 is used to copy the first process based on the target resource characteristic representation to obtain the second process, in which the first sub-data combination is loaded.
[0186] In some embodiments, the configuration module 930 includes:
[0187] A resetting unit 931, configured to reset process data corresponding to the second process, where the process data is used to identify the second process;
[0188] The configuration unit 932 is used to adjust the configuration of the first sub-data combination in the reset second process based on the request information to obtain the service process including the first service data.
[0189] In some embodiments, the request information is used to request the creation of a virtual room, and the request information includes target port information and target virtual room information, the target port information is used to indicate a terminal requesting the first service data, and the virtual room information is used to indicate a configuration of the virtual room;
[0190] The configuration unit 932 is used for:
[0191] Determining the port information and the virtual room information in the first sub-data combination;
[0192] The port information configuration is adjusted to the target port information, and the virtual room information configuration is adjusted to the target virtual room information, to obtain the service process including the first service data.
[0193] In some embodiments, the apparatus further includes a service module 950, configured to provide the first service data to the terminal indicated by the target port information through the service process.
[0194] In some embodiments, the apparatus further comprises a detection module 960 for:
[0195] Sending a first heartbeat signal to a server agent program through the first process, the server agent program is used to detect the survival status of the process, and the first heartbeat signal is used to indicate the survival status of the first process;
[0196] A first instruction sent by the server agent program is received through the first process, where the first instruction includes the service request.
[0197] In some embodiments, the device also includes a sending module 970, which is used to send service process information corresponding to the service process to the server agent program through the first process, the service process information includes a service process identifier, and there is a corresponding relationship between the service process identifier and the service request. The server agent program is used to detect the survival status of the service process based on the service process information.
[0198] In summary, the device provided by the embodiment of the present application runs a first process, the first process is used to load the full data resources, the full data resources include data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute the service data, and the first process also includes multiple pre-set sub-data combinations, and the sub-data combination includes the matching of at least two sub-data; in response to receiving a service request, the first process is copied to obtain a second process, the service request is used to request to obtain the first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set composed of sub-data in at least one data resource group in the full data resources, and the second process is loaded with the first sub-data combination corresponding to the request information in multiple sub-data combinations; based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain a service process, the service process is used to provide the first service data, and by copying the first process, the process of reloading the full data resources for each service process is avoided, the process startup speed is improved, the CPU burr is reduced, the resource consumption in the server cluster is reduced, and the process operation efficiency is improved.
[0199] It should be noted that the process running device provided in the above embodiment is only illustrated by the division of the above functional modules. In actual applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the device can be divided into different functional modules to complete all or part of the functions described above.
[0200] Fig.11 The structure block diagram of a terminal 1100 provided by an exemplary embodiment of the present application is shown. The terminal 1100 may be: a smart phone, a tablet computer, an MP3 player, an MP4 player, a notebook computer or a desktop computer. The terminal 1100 may also be called a user equipment, a portable terminal, a laptop terminal, a desktop terminal or other names.
[0201] Typically, the terminal 1100 includes a processor 1101 and a memory 1102 .
[0202] The processor 1101 may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor 1101 may be implemented in at least one hardware form of digital signal processing (DSP), field-programmable gate array (FPGA), and programmable logic array (PLA). The processor 1101 may also include a main processor and a coprocessor. The main processor is a processor for processing data in the awake state, also known as a central processing unit (CPU); the coprocessor is a low-power processor for processing data in the standby state. In some embodiments, the processor 1101 may be integrated with a graphics processing unit (GPU), which is responsible for rendering and drawing the content to be displayed on the display screen. In some embodiments, the processor 1101 may also include an artificial intelligence (AI) processor, which is used to process computing operations related to machine learning.
[0203] The memory 1102 may include one or more computer-readable storage media, which may be non-transitory. The memory 1102 may also include a high-speed random access memory, and a non-volatile memory, such as one or more disk storage devices, flash memory storage devices. In some embodiments, the non-transitory computer-readable storage medium in the memory 1102 is used to store at least one instruction, which is used to be executed by the processor 1101 to implement the process running method provided in the method embodiment of the present application.
[0204] In some embodiments, the terminal 1100 further includes other components, which can be understood by those skilled in the art. Fig.11 The structure shown in the figure does not constitute a limitation on the terminal 1100, and the terminal 1100 may include more or fewer components than those shown in the figure, or combine certain components, or adopt a different component arrangement.
[0205] The embodiment of the present application also provides a computer device, which can be implemented as follows: Figure 1 The computer device includes a processor and a memory, wherein at least one instruction, at least one program, code set or instruction set is stored in the memory, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by the processor to implement the process running method provided by the above-mentioned method embodiments.
[0206] An embodiment of the present application also provides a computer-readable storage medium, on which is stored at least one instruction, at least one program, code set or instruction set, and the at least one instruction, at least one program, code set or instruction set is loaded and executed by a processor to implement the process running method provided by the above-mentioned method embodiments.
[0207] The embodiments of the present application also provide a computer program product or a computer program, which includes a computer instruction 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 process running method provided by the above-mentioned method embodiments.
[0208] Optionally, the computer readable storage medium may include: Read Only Memory (ROM), Random Access Memory (RAM), Solid State Drives (SSD) or optical disks, etc. Among them, the random access memory may include resistance random access memory (ReRAM) and dynamic random access memory (DRAM). The serial numbers of the above embodiments of the present application are only for description and do not represent the advantages and disadvantages of the embodiments.
[0209] A person skilled in the art will understand that all or part of the steps to implement the above embodiments may be accomplished by hardware or by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.
[0210] The above description is only an optional embodiment of the present application and is not intended to limit the present application. Any modifications, equivalent substitutions, improvements, etc. made within the spirit and principles of the present application shall be included in the protection scope of the present application.
Claims
1. A process running method, characterized in that: The method comprises: Running a first process, the first process is used to load a full amount of data resources, the full amount of data resources includes data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute service data, the first process also includes a plurality of pre-set sub-data combinations, the sub-data combinations include the matching of at least two sub-data; In response to receiving a service request, copying the first process to obtain a second process, the service request being used to request to obtain first service data, the service request including request information corresponding to the first service data, the first service data being a sub-data set in the full data resource composed of sub-data in at least one data resource group, and the second process being loaded with a first sub-data combination corresponding to the request information among the multiple sub-data combinations; Based on the request information corresponding to the service request, the first sub-data combination loaded in the second process is configured and adjusted to obtain a service process, where the service process is used to provide the first service data.
2. The method according to claim 1, characterized in that In response to receiving the service request, copying the first process to obtain a second process includes: receiving the service request, and obtaining the request information corresponding to the service request; Determine the first sub-data combination matching the request information from the multiple sub-data combinations; The first sub-data combination loaded in the first process is selectively copied to obtain the second process.
3. The method according to claim 2, characterized in that Before receiving the service request, the method further includes: Based on the multiple sub-data combinations, multiple first resource characteristic representations are determined, where the multiple first resource characteristic representations are used to indicate different sub-data combinations.
4. The method according to claim 3, characterized in that The determining the first sub-data combination matching the request information from the multiple sub-data combinations includes: determining a second resource characteristic representation based on the service information corresponding to the service request, where the second resource characteristic representation is used to indicate a second sub-data combination included in the first service data; Determine, from the plurality of first resource feature representations, a target resource feature representation that has a similarity relationship with the second resource feature representation, the target resource feature representation being used to indicate the first sub-data combination; The selectively copying the first sub-data combination loaded in the first process to obtain the second process includes: The first sub-data combination loaded by the first process is copied based on the target resource characteristic representation to obtain the second process.
5. The method according to any one of claims 1 to 4, characterized in that: The configuring and adjusting the first sub-data combination loaded in the second process based on the request information corresponding to the service request to obtain the service process includes: Resetting process data corresponding to the second process, where the process data is used to identify the second process; The first sub-data combination in the reset second process is configured and adjusted based on the request information to obtain the service process including the first service data.
6. The method according to claim 5, characterized in that The request information is used to request the creation of a virtual room, and the request information includes target port information and target virtual room information, the target port information is used to indicate the terminal requesting the first service data, and the virtual room information is used to indicate the configuration of the virtual room; The configuring and adjusting the first sub-data combination in the reset second process based on the request information to obtain the service process including the first service data includes: Determining the port information and the virtual room information in the first sub-data combination; The port information configuration is adjusted to the target port information, and the virtual room information configuration is adjusted to the target virtual room information, to obtain the service process including the first service data.
7. The method according to claim 6, characterized in that The method further comprises: The first service data is provided to the terminal indicated by the target port information through the service process.
8. The method according to any one of claims 1 to 4, characterized in that: The method further comprises: Sending a first heartbeat signal to a server agent program through the first process, the server agent program is used to detect the survival status of the process, and the first heartbeat signal is used to indicate the survival status of the first process; A first instruction sent by the server agent program is received through the first process, where the first instruction includes the service request.
9. The method according to claim 8, characterized in that After performing resource configuration on the first sub-data combination loaded in the second process based on the request information corresponding to the service request to obtain the service process, the method further includes: The service process information corresponding to the service process is sent to the server agent program through the first process, the service process information includes a service process identifier, and there is a corresponding relationship between the service process identifier and the service request. The server agent program is used to detect the survival status of the service process based on the service process information.
10. A process running device, characterized in that: The device comprises: A running module, used to run a first process, the first process is used to load a full amount of data resources, the full amount of data resources includes data resource groups corresponding to multiple types, the data resource groups include at least one sub-data, the data resource groups corresponding to the multiple types are used to respectively determine that the sub-data constitute service data, the first process also includes a plurality of pre-set sub-data combinations, the sub-data combinations include the matching of at least two sub-data; a replication module, configured to replicate the first process to obtain a second process in response to receiving a service request, wherein the service request is used to request to obtain first service data, the service request includes request information corresponding to the first service data, the first service data is a sub-data set in the full data resource composed of sub-data in at least one data resource group, and the second process is loaded with a first sub-data combination corresponding to the request information among the multiple sub-data combinations; A configuration module is used to configure and adjust the first sub-data combination loaded in the second process based on the request information corresponding to the service request to obtain a service process, wherein the service process is used to provide the first service data.
11. A computer device, characterized in that: The computer device includes a processor and a memory, wherein the memory stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the process running method as described in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that: The storage medium stores at least one computer program, and the at least one computer program is loaded and executed by the processor to implement the process running method as described in any one of claims 1 to 9.
13. A computer program product, characterized in that It comprises a computer program, which, when executed by a processor, implements the process running method as claimed in any one of claims 1 to 9.