A control method and device based on a game running environment, electronic equipment and computer program product

By setting different probabilities of occurrence for predetermined events and reading historical NPC state parameters, control commands are generated to randomly trigger NPC behavioral events, thus solving the problem of insufficient performance caused by fixed NPC behaviors and improving the game's fun and player experience.

CN114669055BActive Publication Date: 2026-05-29MIHAYOU TECH (SHANGHAI) CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
MIHAYOU TECH (SHANGHAI) CO LTD
Filing Date
2022-03-29
Publication Date
2026-05-29

Smart Images

  • Figure CN114669055B_ABST
    Figure CN114669055B_ABST
Patent Text Reader

Abstract

The application discloses a control method and device based on a game running environment, electronic equipment and a computer program product, in a state where a predetermined event is triggered, a predetermined threshold value matched with the predetermined event is read; a historical state parameter of the predetermined event is read, a first control command is formed according to the historical parameter and the predetermined threshold value; the predetermined event is controlled to be triggered into a second state under the action of the first control command. The control method and device based on the game running environment, the medium and the electronic equipment can realize the occurrence of the NPC behavior event triggered by the random event, and increase the performance richness of the NPC self-loop behavior by setting different predetermined event occurrence probabilities, reading the historical state parameter of the predetermined event, and forming the first control command according to the historical parameter and the predetermined threshold value. The rich self-loop of the NPC can be embodied by increasing, modifying and updating the NPC behavior daily table.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of online game technology, specifically to a control method, device, electronic device, and computer program product based on a game operating environment. Background Technology

[0002] In the gaming industry, NPCs (non-player characters) are typically controlled by the server and are not controlled by the player. With the improvement of cultural and entertainment standards, people have higher expectations and demands for the virtual world. Games, as a form of expression in the virtual world, have become a channel for many to release stress. Current game applications offer various interactive methods, significantly enhancing the gameplay experience. In related technologies, when players control virtual characters, they control the movement of NPC characters based on audio prompts played in the virtual scene. However, in this process, the actions and plot of the NPC characters are relatively fixed, resulting in low richness of NPC character expression and insufficient player experience. Summary of the Invention

[0003] To address the shortcomings of existing technologies, this invention provides a control method, device, electronic device, and computer program product based on the game operating environment, which can improve the richness of NPC behavior based on player behavior.

[0004] To achieve the above objectives, the present invention provides the following technical solution:

[0005] In a first aspect, embodiments of the present invention provide a control method based on a game operating environment, including reading a predetermined threshold that matches the predetermined event when a predetermined event is triggered;

[0006] Read the historical status parameters of the predetermined event, and form a first control command based on the historical parameters and the predetermined threshold.

[0007] Under the action of the first control command, the predetermined event is triggered to enter the second state.

[0008] Preferably, before reading the historical state parameters of the predetermined event when the predetermined event is triggered, the method further includes:

[0009] After the first type of triggering event is set, set the first state of the first triggering event that matches the first type of triggering event and the second state of the first triggering event that matches the first type of triggering event, and the trigger probability of the second state of the first triggering event;

[0010] After the second type of triggering event is set, set the first state of the second triggering event that matches the second type of triggering event, and the second state of the second triggering event that matches the second type of triggering event, and the trigger probability of the second state of the second triggering event;

[0011] After the third type of triggering event is set, a first state of the third triggering event matching the third type of triggering event and a second state of the third triggering event matching the third type of triggering event, and the trigger probability of the second state of the third triggering event are set.

[0012] After the fourth type of triggering event is set, the first state of the fourth triggering event matching the fourth type of triggering event and the second state of the fourth triggering event matching the fourth type of triggering event and the trigger probability of the second state of the fourth triggering event are set;

[0013] After the fifth type of triggering event is set, the first state of the fifth triggering event matching the fifth type of triggering event and the second state of the fifth triggering event matching the fifth type of triggering event and the trigger probability of the second state of the fifth triggering event are set;

[0014] The predetermined event is formed based on the first type of triggering event, or the second type of triggering event, or the third type of triggering event, or the fourth type of triggering event, or the fifth type of triggering event;

[0015] The predetermined threshold is formed based on the trigger probability of the second state of the first triggering event, or the trigger probability of the second state of the second triggering event, or the trigger probability of the second state of the third triggering event, or the trigger probability of the second state of the fourth triggering event, or the trigger probability of the second state of the fifth triggering event.

[0016] Preferably, when a predetermined event is triggered, reading the predetermined threshold matching the predetermined event specifically includes:

[0017] If a predetermined event exists within the detection area, the type of the predetermined event is determined based on the detection result;

[0018] Read the predetermined threshold that matches the predetermined event based on the type of the predetermined event.

[0019] Preferably, generating the first control command based on the historical parameters and the predetermined threshold includes:

[0020] Calculate the state parameters of the second state that operates during the predetermined event based on the historical parameters;

[0021] A first state control command or a second state control command is randomly generated when the state parameter is not greater than a predetermined threshold; or a first state control command is generated when the state parameter is greater than a predetermined threshold.

[0022] When the first state control instruction is generated, the first control command is generated according to the second state control instruction, and the historical parameters are updated.

[0023] Secondly, embodiments of the present invention provide a control device based on a game operating environment, comprising,

[0024] The first reading module is used to read a predetermined threshold that matches the predetermined event when the predetermined event is triggered.

[0025] The second reading module is used to read the historical state parameters of the predetermined event and form a first control command based on the historical parameters and the predetermined threshold.

[0026] The event triggering module is used to control the predetermined event to be triggered and enter the second state under the action of the first control command.

[0027] Preferably, the event triggering module includes a first control command generation module, specifically including:

[0028] The calculation unit is used to calculate the state parameters of the second state that operates in the predetermined event based on the historical parameters;

[0029] The judgment unit is used to randomly generate a first state control command or a second state control command when the state parameter is not greater than a predetermined threshold; or to generate a first state control command when the state parameter is greater than a predetermined threshold.

[0030] The first control command forming unit is used to form the first control command according to the second state control command when the first state control command is formed, and to update the historical parameters.

[0031] Thirdly, embodiments of the present invention provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the control method based on the game operating environment as described above.

[0032] Fourthly, embodiments of the present invention provide an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, it implements the control method based on the game operating environment in the electronic device described above.

[0033] The present invention has the following beneficial effects:

[0034] By setting different probabilities of occurrence for predetermined events and reading historical state parameters of these events, a first control command can be generated based on these historical parameters and predetermined thresholds. This allows for the triggering of NPC behavioral events based on random events, increasing the richness of NPC self-looping behavior. The rich self-looping of NPCs can be reflected by adding, modifying, and updating the daily NPC behavior table. Attached Figure Description

[0035] Figure 1 This is a flowchart of a control method based on a game runtime environment provided in Embodiment 1 of the present invention;

[0036] Figure 2 This is a flowchart of a control method based on a game runtime environment provided in Embodiment 1 of the present invention;

[0037] Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 3 of the present invention. Detailed Implementation

[0038] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0039] Example 1

[0040] This embodiment provides a control method based on the game runtime environment. Figure 1-3 This is a flowchart of a control method based on the game runtime environment.

[0041] S110. When a predetermined event is triggered, read a predetermined threshold that matches the predetermined event;

[0042] Specifically, a predetermined event generally refers to a random event that an NPC may trigger in relation to their daily life. A predetermined threshold refers to the random probability trigger value of an NPC performing a specific action that matches a random event. Generally speaking, in a game system, the general behavior of an NPC is determined by a specific daily behavior table and the NPC's basic attribute data, forming a self-looping action. To increase the game's fun and the richness of character events, a random probability trigger value that matches the type of predetermined event can be set. For example, if an NPC crosses a log bridge every day, the randomness of the NPC slipping on the log bridge can be increased in the game's plot.

[0043] S120: Read the historical status parameters of the predetermined event, and form a first control command based on the historical parameters and the predetermined threshold;

[0044] Specifically, the historical parameters of the predetermined event include the basic data values ​​of the predetermined event behavior accumulated by the NPC in history, and the first control command refers to the specific action command triggered by the NPC that matches the random event.

[0045] Before step S120, which involves reading the historical status parameters of the predetermined event and forming a first control command based on the historical parameters and a predetermined threshold, the method further includes:

[0046] After the first type of triggering event is set, set the first state of the first triggering event that matches the first type of triggering event, the second state of the first triggering event that matches the first type of triggering event, and the trigger probability of the second state of the first triggering event;

[0047] Specifically, the first type of triggering event can be a behavioral event that triggers the NPC character to perform a B set of daily behavior table behavior. The first state of the first triggering event is the normal daily behavior state of the A set of daily behavior table that matches the normal NPC character. The second state of the first triggering event is the behavioral event state of the NPC character performing the B set of daily behavior table behavior. The trigger probability of the second state of the first triggering event is the random probability of the NPC character performing the B set of daily behavior table behavior.

[0048] Of course, there can be multiple sets of daily behavior charts, A and B, depending on the NPC character settings, with different random probabilities assigned to each, which can increase the variety of NPC behaviors and enhance the game's fun.

[0049] After the second type of triggering event is set, set the first state of the second triggering event that matches the second type of triggering event, the second state of the second triggering event that matches the second type of triggering event, and the trigger probability of the second state of the second triggering event;

[0050] Specifically, the second type of triggering event is a behavioral event that does not conform to the NPC's character settings due to the NPC's own attribute defects, such as personality defects, behavioral deviations, and occupational risk. The first state of the second triggering event is the normal behavioral state of the NPC's own character under normal circumstances. The second state of the second triggering event is a behavioral state that deviates from the NPC's own character under normal circumstances. The trigger probability of the second state of the second triggering event is the probability of the state that deviates from the NPC's own character under normal circumstances.

[0051] After the third type of triggering event is set, a first state of the third triggering event matching the third type of triggering event and a second state of the third triggering event matching the third type of triggering event, and the trigger probability of the second state of the third triggering event are set.

[0052] Specifically, the third type of triggering event can be an event that changes the natural environment. The first state of the third triggering event is when the natural environment is normal, such as when the sky is clear. The first state of the third triggering event is when the natural environment is harsh, such as when the sky is overcast. The probability of triggering the second state of the third triggering event is the same as the probability of triggering the natural environment when it is harsh, which can increase the fun of the game.

[0053] After the fourth type of triggering event is set, the first state of the fourth triggering event matching the fourth type of triggering event, the second state of the fourth triggering event matching the fourth type of triggering event, and the trigger probability of the second state of the fourth triggering event are set.

[0054] Specifically, the fourth type of triggering event can be understood as an event that changes the environment of a fixed location. For example, increasing the randomness of an NPC slipping when crossing a log bridge, increasing the randomness of slipping into the river when crossing a river, etc. The first state of the fourth triggering event is the state of the NPC crossing the log bridge normally and smoothly. The second state of the fourth triggering event is the state of the NPC slipping when crossing the log bridge. The trigger probability of the second state of the fourth triggering event is the random probability of slipping on the log bridge.

[0055] After the fifth type of triggering event is set, the first state of the fifth triggering event matching the fifth type of triggering event and the second state of the fifth triggering event matching the fifth type of triggering event and the trigger probability of the second state of the fifth triggering event are set.

[0056] Specifically, the fifth type of triggering event is a daily behavior event that does not conform to the rules on the NPC daily behavior table. The first state of the fifth triggering event is the normal state of daily behavior on the NPC daily behavior table. The second state of the fifth triggering event is an event state that changes from the daily behavior table on the NPC daily behavior table. The trigger probability of the second state of the fifth triggering event is the probability that the event on the daily behavior table will change.

[0057] The daily behavior schedule typically represents the fixed daily routine of NPCs. For example, if a fisherman gets up at 7 AM and goes to sea to fish at 9 AM, then the corresponding NPC will fish at sea from 9 AM onwards. During this process, for example, the fifth type of triggered event is the fisherman going out to sea to fish. The first state is the fisherman going out to sea to fish at 9 AM as shown in the daily behavior schedule, and the second state is the fisherman going out to sea to fish at 5 PM. The probability of the second state triggering is 10%, meaning that the fisherman's daily behavior mostly follows the 9 AM fishing schedule, with the occasional random event of fishing at 5 PM. After certain daily behavior events are triggered, when the schedule is changed, random data is set to further influence the schedule.

[0058] The predetermined event is formed based on the first type of triggering event, or the second type of triggering event, or the third type of triggering event, or the fourth type of triggering event, or the fifth type of triggering event;

[0059] The predetermined threshold is formed based on the trigger probability of the second state of the first triggering event, or the trigger probability of the second state of the second triggering event, or the trigger probability of the second state of the third triggering event, or the trigger probability of the second state of the fourth triggering event, or the trigger probability of the second state of the fifth triggering event.

[0060] Indicatively, reading a predetermined threshold matching a predetermined event when the predetermined event is triggered specifically includes:

[0061] In the state where a predetermined event exists within the detection area, the type of the predetermined event is determined based on the detection result. For example, the event may be a behavior event that triggers the B set of daily behavior table actions of an NPC character, a behavior event that does not conform to the NPC character settings due to the NPC's own attribute defects, such as personality defects, behavioral deviations, and occupational risk, a change event in the natural environment, a change event in the fixed-location environment, or a daily behavior event that does not conform to the daily behavior table specified by the NPC. A predetermined threshold that matches the predetermined event is read according to the type of the predetermined event.

[0062] In step S120, forming a first control command based on the historical parameters and a predetermined threshold includes the following process: Figure 2 Flowchart of the formation of the first control command;

[0063] S1201. Calculate the state parameters of the second state that operates during the predetermined event based on the historical parameters;

[0064] Specifically, the state parameters for the predetermined event in the second state are calculated based on the historical parameters; the predetermined random state parameters for the predetermined event in the second state are calculated based on the basic data value of the NPC's last predetermined event behavior. For example, if the random occurrence probability of the predetermined event is 5%, the predetermined random state parameters for the predetermined event when it occurs are calculated, for example, 3%.

[0065] S1202: Randomly generate a first state control command or a second state control command when the state parameter is not greater than a predetermined threshold; or generate a first state control command when the state parameter is greater than a predetermined threshold.

[0066] Specifically, a first state control instruction or a second state control instruction is randomly generated when the predetermined random state parameter is not greater than a predetermined threshold. The first state control instruction controls the NPC to be in the corresponding first state of the event, meaning the NPC can be in a normal event occurrence state. The second state control instruction controls the NPC to be in the corresponding second state of the event, meaning the NPC can trigger the predetermined event. For example, if the predetermined random state parameter for the predetermined event is 3%, which is less than the predetermined threshold of 5%, the NPC can trigger the predetermined event or remain in a normal event occurrence state. Alternatively, a first state control instruction is generated when the predetermined random state parameter is greater than the predetermined threshold. That is, when the predetermined random state parameter is greater than 5%, the NPC is directly under the first state control instruction and does not trigger the predetermined event until the predetermined random state parameter is less than 5%.

[0067] S1203. When the first state control instruction is formed, the first control command is formed according to the second state control instruction, and the historical parameters are updated.

[0068] Specifically, when the first state control instruction is formed, the first control command is formed according to the second state control instruction. The first control command is a behavior instruction for the NPC to trigger random events, such as an action command for the NPC to slip when crossing a log bridge, and the historical parameters of the NPC are updated.

[0069] S130. Under the action of the first control command, the predetermined event is triggered to enter the second state. The NPC triggers a random event according to the first control command, enters a state of randomly occurring events, and improves the richness and realism of the NPC's performance.

[0070] By setting different probabilities of occurrence for predetermined events and reading historical state parameters of these events, a first control command can be generated based on these historical parameters and predetermined thresholds. This allows for the triggering of NPC behavioral events based on random events, increasing the richness of NPC self-looping behavior. The rich self-looping of NPCs can be reflected by adding, modifying, and updating the daily NPC behavior table.

[0071] Example 2

[0072] This invention provides a control device based on a game runtime environment, the device specifically comprising:

[0073] The first reading module is used to read a predetermined threshold that matches the predetermined event when the predetermined event is triggered.

[0074] The second reading module is used to read the historical state parameters of the predetermined event and form a first control command based on the historical parameters and the predetermined threshold.

[0075] The event triggering module is used to control the predetermined event to be triggered and enter the second state under the action of the first control command.

[0076] The working principle of this embodiment is the same as that of Embodiment 1, so it will not be described in detail.

[0077] Example 3

[0078] This application provides an electronic device that can integrate a control device based on a game operating environment provided in this application. Figure 3 This is a schematic diagram of the structure of an electronic device provided in Embodiment 4 of this application. Figure 3 As shown, this embodiment provides an electronic device 400, which includes: one or more processors 420; and a storage device 410 for storing one or more programs, which, when executed by the one or more processors 420, cause the one or more processors 420 to perform:

[0079] When a predetermined event is triggered, read the predetermined threshold that matches the predetermined event;

[0080] Read the historical status parameters of the predetermined event, and form a first control command based on the historical parameters and the predetermined threshold.

[0081] Under the action of the first control command, the predetermined event is triggered to enter the second state. For example... Figure 3 As shown, the electronic device 400 includes a processor 420, a storage device 410, an input device 430, and an output device 440; the number of processors 420 in the electronic device can be one or more. Figure 3 Taking a processor 420 as an example; the processor 420, storage device 410, input device 430, and output device 440 in the electronic device can be connected via a bus or other means. Figure 3 For example, China and Israel are connected via bus 450.

[0082] Storage device 410, as a computer-readable storage medium, can be used to store software programs, computer-executable programs, and module units, such as the program instructions corresponding to the control method based on the game running environment in the embodiments of this application.

[0083] Storage device 410 may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function; the data storage area may store data created based on terminal usage. Furthermore, storage device 410 may include high-speed random access memory and non-volatile memory, such as at least one disk storage device, flash memory, or other non-volatile solid-state storage device. In some instances, storage device 410 may further include memory remotely located relative to processor 420, which can be connected via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0084] Input device 430 can be used to receive input digital, character, or voice information, and to generate key signal inputs related to user settings and function control of the electronic device. Output device 440 may include devices such as a display screen and a speaker.

[0085] Example 4

[0086] In some embodiments, the methods described above can be implemented as a computer program product. The computer program product may include a computer-readable storage medium having computer-readable program instructions loaded thereon for performing various aspects of this disclosure. Specifically:

[0087] The computer-executable instructions are used to perform the following when executed by a computer processor:

[0088] When a predetermined event is triggered, read the predetermined threshold that matches the predetermined event;

[0089] Read the historical status parameters of the predetermined event, and form a first control command based on the historical parameters and the predetermined threshold.

[0090] Under the action of the first control command, the predetermined event is triggered to enter the second state.

[0091] The aforementioned computer-readable storage medium can be a tangible device capable of holding and storing instructions for use by an instruction execution device. Computer-readable storage media can be, for example, but not limited to, electrical storage devices, magnetic storage devices, optical storage devices, electromagnetic storage devices, semiconductor storage devices, or any suitable combination thereof. More specific examples (a non-exhaustive list) of computer-readable storage media include: portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), static random access memory (SRAM), portable compact disc read-only memory (CD-ROM), digital multifunction disc (DVD), memory sticks, floppy disks, mechanical encoding devices, such as punch cards or recessed protrusions storing instructions thereon, and any suitable combination thereof. The computer-readable storage medium as used herein is not to be construed as a transient signal itself, such as radio waves or other freely propagating electromagnetic waves, electromagnetic waves propagating through waveguides or other transmission media (e.g., light pulses through fiber optic cables), or electrical signals transmitted through wires.

[0092] The computer-readable program instructions described herein can be downloaded from computer-readable storage media to various computing / processing devices, or downloaded via a network, such as the Internet, local area network, wide area network, and / or wireless network, to an external computer or external storage device. The network may include copper cables, fiber optic cables, wireless transmission, routers, firewalls, switches, gateway computers, and / or edge servers. A network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards them to computer-readable storage media within the respective computing / processing device.

[0093] Computer program instructions used to perform the operations of this disclosure may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, status setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages ​​and conventional procedural programming languages. The computer-readable program instructions may execute entirely on a user's computer, partially on a user's computer, as a standalone software package, partially on a user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving a remote computer, the remote computer may be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or may be connected to an external computer (e.g., via the Internet using an Internet service provider). In some embodiments, electronic circuitry, such as programmable logic circuitry, field-programmable gate arrays (FPGAs), or programmable logic arrays (PLAs), is personalized by utilizing the status information of the computer-readable program instructions to implement various aspects of this disclosure.

[0094] These computer-readable program instructions can be provided to a processing unit of a general-purpose computer, a special-purpose computer, or other programmable data processing apparatus to produce a machine such that, when executed by the processing unit of the computer or other programmable data processing apparatus, they create means for implementing the functions / actions specified in one or more blocks of the flowchart and / or block diagram. These computer-readable program instructions can also be stored in a computer-readable storage medium that causes a computer, programmable data processing apparatus, and / or other device to operate in a particular manner. Thus, the computer-readable medium storing the instructions comprises an article of manufacture that includes instructions for implementing aspects of the functions / actions specified in one or more blocks of the flowchart and / or block diagram.

[0095] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device to cause a series of operational steps to be performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to perform the functions / actions specified in one or more boxes of a flowchart and / or block diagram.

[0096] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of devices, methods, and computer program products according to various embodiments of the present disclosure. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of an instruction containing one or more executable instructions for implementing a specified logical function. In some alternative implementations, the functions marked in the blocks may occur in a different order than those shown in the drawings. For example, two consecutive blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, may be implemented using a dedicated hardware-based system that performs the specified function or action, or using a combination of dedicated hardware and computer instructions.

[0097] The various embodiments of this disclosure have been described above. These descriptions are exemplary and not exhaustive, nor are they limited to the disclosed embodiments. Many modifications and variations will be apparent to those skilled in the art without departing from the scope and spirit of the described embodiments. The terminology used herein is chosen to best explain the principles, practical application, or technical improvements to the technology in the market, or to enable others skilled in the art to understand the embodiments disclosed herein.

Claims

1. A control method based on a game runtime environment, characterized in that, include: When a predetermined event is triggered, read the predetermined threshold that matches the predetermined event; Read the historical parameters of the predetermined event, and form a first control command based on the historical parameters and the predetermined threshold; The process of generating a first control command based on the historical parameters and a predetermined threshold includes: calculating a state parameter for the second state during a predetermined event based on the historical parameters; randomly generating a first state control instruction or a second state control instruction when the state parameter is not greater than the predetermined threshold; or generating a first state control instruction when the state parameter is greater than the predetermined threshold; and generating the first control command based on the second state control instruction when the first state control instruction is generated, thereby updating the historical parameters; wherein, under the first state control instruction, the predetermined event is not triggered until the state parameter of the predetermined event is less than the predetermined threshold; and the first control command is a behavior instruction for an NPC to trigger a random event. Under the action of the first control command, the predetermined event is triggered to enter the second state.

2. The control method based on the game runtime environment according to claim 1, characterized in that, Before reading the historical parameters of the predetermined event when the predetermined event is triggered, the process also includes: After the first type of triggering event is set, set the first state of the first triggering event that matches the first type of triggering event, the second state of the first triggering event that matches the first type of triggering event, and the trigger probability of the second state of the first triggering event; After the second type of triggering event is set, set the first state of the second triggering event that matches the second type of triggering event, the second state of the second triggering event that matches the second type of triggering event, and the trigger probability of the second state of the second triggering event; After the third type of triggering event is set, a first state of the third triggering event matching the third type of triggering event and a second state of the third triggering event matching the third type of triggering event, and the trigger probability of the second state of the third triggering event are set. After the fourth type of triggering event is set, the first state of the fourth triggering event matching the fourth type of triggering event, the second state of the fourth triggering event matching the fourth type of triggering event, and the trigger probability of the second state of the fourth triggering event are set. After the fifth type of triggering event is set, the first state of the fifth triggering event matching the fifth type of triggering event and the second state of the fifth triggering event matching the fifth type of triggering event and the trigger probability of the second state of the fifth triggering event are set. The predetermined event is formed based on the first type of triggering event, or the second type of triggering event, or the third type of triggering event, or the fourth type of triggering event, or the fifth type of triggering event; The predetermined threshold is formed based on the trigger probability of the second state of the first triggering event, or the trigger probability of the second state of the second triggering event, or the trigger probability of the second state of the third triggering event, or the trigger probability of the second state of the fourth triggering event, or the trigger probability of the second state of the fifth triggering event.

3. The control method based on the game runtime environment according to claim 2, characterized in that, When a predetermined event is triggered, reading the predetermined threshold that matches the predetermined event specifically includes: If a predetermined event exists within the detection area, the type of the predetermined event is determined based on the detection result; Read the predetermined threshold that matches the predetermined event based on the type of the predetermined event.

4. The control method based on the game runtime environment according to claim 2, characterized in that: The first type of triggering event is a behavior event that triggers an NPC character to perform the B set of daily behavior table behavior; The second type of triggering event is: behavioral events that do not conform to the NPC character settings due to defects in the attributes set by the NPC itself; The third type of triggering event is: events involving changes in the natural environment; The fourth type of triggering event is: a change in the fixed-point deployment environment; The fifth type of triggering event is: daily behavior events that do not conform to the daily behavior table of NPCs.

5. The control method based on the game runtime environment according to claim 1, characterized in that: The historical parameters include: the basic data values ​​of the occurrence of predetermined event behaviors accumulated by NPCs throughout history.

6. The control method based on the game runtime environment according to claim 1, characterized in that, The first control command is: a behavior instruction to trigger random events for NPCs.

7. The control method based on the game runtime environment according to claim 1, characterized in that: The first state control command is to control the NPC to be in the corresponding first state of the event, that is, the NPC can be in the normal event occurrence state; The second state control command is to control the NPC to be in the second state of the corresponding event, that is, the state in which the NPC can trigger the predetermined event.

8. A control device based on a game operating environment, characterized in that, include, The first reading module is used to read a predetermined threshold that matches the predetermined event when the predetermined event is triggered. The second reading module is used to read the historical parameters of the predetermined event and form a first control command based on the historical parameters and the predetermined threshold. The second reading module includes a first control command forming module, specifically comprising: a calculation unit, used to calculate the state parameters of the second state operating under a predetermined event based on the historical parameters; a judgment unit, used to randomly form a first state control instruction or a second state control instruction when the state parameters are not greater than a predetermined threshold; or to form a first state control instruction when the state parameters are greater than the predetermined threshold; and a first control command forming unit, used to form the first control command based on the second state control instruction when the first state control instruction is formed, and to update the historical parameters; wherein, under the first state control instruction, the predetermined event is not triggered until the state parameters of the predetermined event are less than the predetermined threshold; the first control command is a behavior instruction of the NPC to trigger a random event; The event triggering module is used to control the predetermined event to be triggered and enter the second state under the action of the first control command.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the computer program, it implements any one of the control methods based on the game runtime environment as described in claims 1 to 7.

10. A computer program product, characterized in that, Includes computer-readable code, or a readable storage medium carrying computer-readable code, wherein when the computer-readable code is run in the processor of an electronic device, the processor in the electronic device executes a control method based on any one of claims 1 to 7 for implementing the game runtime environment.