Game interaction system, game interaction method and computer equipment

By introducing external interface components, core components and message broadcast components into the game interactive system, the external interface and core processing units are isolated, and the coupling degree is reduced, the problem of poor system scalability is solved, and efficient interactive information broadcasting and system maintenance is achieved.

CN120420673APending Publication Date: 2025-08-05XIAMEN LUHUO NETWORK TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510593535.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-09
Publication Date
2025-08-05

AI Technical Summary

Technical Problem

The combat mission processing system in the development of existing mobile game has a high degree of coupling, resulting in poor system scalability, increasing development costs and error risks, and the system coupling between combat elements increases through direct reference and call interaction.

Method used

The game interaction system is adopted, including external interface components, core components and message broadcast components, and the external interface components and core processing units are isolated through the isolation interface, reducing the coupling degree, and broadcasting interactive information through the message broadcast component, reducing direct interaction dependence.

Benefits of technology

It effectively reduces system coupling, enhances scalability and maintenance, simplifies the development process, and improves the system's response speed and consistency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120420673A_ABST
    Figure CN120420673A_ABST
Patent Text Reader

Abstract

The invention relates to a game interaction system, a game interaction method and computer equipment. The game interaction system comprises an external interface component, a core component and a message broadcasting component, the core component comprises an isolation interface and a core processing unit; the isolation interface is used for isolating the external interface component and the core processing unit, and the external interface component is used for determining corresponding target interaction data in response to a to-be-interacted request; the core processing unit is used for receiving the target interaction data sent by the isolation interface, executing interaction logic matched with a target interaction task according to the target interaction data, and updating the state of a target interaction element corresponding to the target interaction task; the message broadcasting component is used for broadcasting first interaction information generated when the state of the target interaction element is updated to a target subscription element subscribing the first interaction information, so that the target subscription element updates the own state according to the first interaction information; the expandability of the system is effectively enhanced, and the coupling of the system is reduced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of game interaction technology, and in particular to a game interaction system, a game interaction method, and a computer device. Background Art

[0002] In mobile game development, many combat mission processing systems employ highly coupled architectural designs, resulting in tight dependencies between system components. This high coupling limits system scalability. Every time a new feature is added or an existing one is modified, a comprehensive understanding and adjustment of multiple interrelated components is required, increasing development costs and the risk of errors. Furthermore, combat elements often interact with each other through direct references and calls, further increasing coupling.

[0003] Currently, no effective solution has been proposed to address the problems of high system coupling and poor scalability in related technologies. Summary of the Invention

[0004] Based on this, it is necessary to provide a game interaction system, a game interaction method and a computer device to address the above technical problems.

[0005] In a first aspect, the present application provides a game interaction system, the system comprising: an external interface component, a core component, and a message broadcast component; the core component comprises an isolation interface and a core processing unit; the isolation interface is used to isolate the external interface component and the core processing unit, wherein,

[0006] The external interface component is configured to respond to a pending interaction request generated by the terminal for a target interaction task, and determine target interaction data corresponding to the pending interaction request;

[0007] The core processing unit is configured to receive the target interaction data sent via the isolation interface, execute the interaction logic matching the target interaction task according to the target interaction data, and update the state of the target interaction element corresponding to the target interaction task;

[0008] The message broadcast component is used to receive the first interaction information generated when the target interaction element status is updated, and broadcast the first interaction information to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own status according to the first interaction information.

[0009] In one embodiment, the external interface component includes a data transmission unit and a data processing unit;

[0010] The data transmission unit is used to extract target key parameters from the request to be interacted with and transmit the target key parameters to the data processing unit;

[0011] The data processing unit is used to parse the target key parameters to obtain target interaction data.

[0012] In one embodiment, the core processing unit includes an initializer, a loop controller, and a data memory;

[0013] The initializer is configured to generate a target interaction element corresponding to the target interaction task according to the target interaction data;

[0014] The loop controller is used to manage the interaction logic corresponding to the target interaction task;

[0015] The data storage device is used to store global data corresponding to multiple interactive tasks.

[0016] In one embodiment, the system further includes an element management component;

[0017] The element management component is configured to generate a first interaction message corresponding to the target interaction element when the state of the target interaction element is updated, and send the first interaction message to the message broadcast component.

[0018] In one of the embodiments, the element management component is further used to receive a second interaction message broadcast by the message broadcast component when the target interaction element subscribes to the second interaction message, and update the state of the target interaction element according to the second interaction information.

[0019] In one embodiment, the system further includes a display component;

[0020] The display component is used to perform corresponding screen rendering according to the update status of the target interactive element or the target subscription element.

[0021] In a second aspect, the present application further provides a game interaction method, which is applied to the game interaction system described in any one of the embodiments of the first aspect above, and the method includes:

[0022] Responding to a pending interaction request generated by the terminal for a target interaction task, and determining target interaction data corresponding to the pending interaction request;

[0023] executing, according to the target interaction data, an interaction logic matching the target interaction task, and updating a state of a target interaction element corresponding to the target interaction task;

[0024] The first interaction information generated when the target interaction element state is updated is broadcasted to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own state according to the first interaction information.

[0025] In one embodiment, broadcasting the first interaction information generated when the target interaction element state is updated to the target subscription element that subscribes to the first interaction information includes:

[0026] According to a preset priority, the first interaction information generated when the state of the target interaction element is updated is added to the queue of messages to be broadcast;

[0027] determining, according to the first interaction information, a target subscription element for subscribing to the first interaction information;

[0028] According to the preset priority, the first interaction information is broadcast to the target subscription element.

[0029] In a third aspect, the present application further provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the steps of the method described in any one of the embodiments of the second aspect are implemented.

[0030] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the second aspect above.

[0031] In a fifth aspect, the present application further provides a computer program product, comprising a computer program, which, when executed by a processor, implements the steps of the method described in any one of the embodiments of the second aspect above.

[0032] The above-mentioned game interaction system, game interaction method and computer device, wherein the system includes: an external interface component, a core component and a message broadcast component; the core component includes an isolation interface and a core processing unit; the isolation interface is used to isolate the external interface component and the core processing unit; the external interface component is used to respond to the pending interaction request generated by the terminal for the target interaction task, and determine the target interaction data corresponding to the pending interaction request without directly interacting with the core processing unit, thereby greatly reducing the coupling degree of the system; the core processing unit is used to receive the target interaction data sent via the isolation interface, execute the interaction logic matching the target interaction task according to the target interaction data, and update the status of the target interaction element corresponding to the target interaction task; the message broadcast component is used to receive the first interaction information generated when the target interaction element status is updated, and broadcast the first interaction information to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own status according to the first interaction information. Based on this, by setting up isolation interfaces in the core components to isolate the external interface components and the core processing units, the direct dependence between external requests and the core processing units is effectively reduced, so that each component can be upgraded or modified separately without affecting other parts, effectively enhancing the scalability of the system and reducing the coupling of the system; in addition, by setting up message broadcast components, the coupling between interactive elements is effectively reduced, avoiding the problem of high system coupling caused by direct interaction between interactive elements. BRIEF DESCRIPTION OF THE DRAWINGS

[0033] In order to more clearly illustrate the technical solutions in the embodiments of the present application or related technologies, the following briefly introduces the drawings required for use in the embodiments of the present application or related technical descriptions. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying any creative work.

[0034] Figure 1 Schematic diagram of the overall structure of a game interaction system in one embodiment;

[0035] Figure 2 A schematic diagram of the overall structure of a game interaction system in another embodiment;

[0036] Figure 3 1 is a flowchart of a game interaction method in one embodiment;

[0037] Figure 4 1. A flowchart illustrating the steps of broadcasting first interaction information to a target subscription element that subscribes to the first interaction information in one embodiment;

[0038] Figure 5 FIG. 1 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0039] In order to make the purpose, technical solutions and advantages of this application more clear, the following further describes this application in detail with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain this application and are not intended to limit this application.

[0040] In the field of mobile game development, traditional combat systems face numerous challenges. For example, in terms of compatibility, significant differences in mobile device hardware performance (such as processor performance, memory size, and graphics processing capabilities) and operating system versions make it difficult for combat systems to run stably and smoothly across different devices. For example, some combat effects can experience lag, frame drops, or even fail to display on low-spec devices. Furthermore, as game content is updated and new combat elements (such as new characters and skills), modes (such as PVP and cooperative dungeons), or scenarios are added, traditional system architectures struggle to respond quickly, often requiring large-scale code modifications and refactoring, increasing development costs and risks. Furthermore, in terms of system coupling, traditional systems not only employ a highly coupled architectural design, but also interact with combat elements through direct references and calls. Changes to one element can easily affect other elements, increasing maintenance complexity. Therefore, this embodiment addresses the aforementioned issues inherent in traditional technologies by providing a game interaction system.

[0041] In one embodiment, Figure 1 As shown, Figure 1 The overall structure diagram of the game interaction system in one embodiment is as follows; the game interaction system includes: an external interface component, a core component, and a message broadcast component; the core component includes an isolation interface and a core processing unit; the isolation interface is used to isolate the external interface component and the core processing unit, wherein,

[0042] The external interface component is used to respond to the pending interaction request generated by the terminal for the target interaction task and determine the target interaction data corresponding to the pending interaction request;

[0043] The core processing unit is configured to receive target interaction data sent via the isolation interface, execute interaction logic matching the target interaction task according to the target interaction data, and update the state of the target interaction element corresponding to the target interaction task;

[0044] The message broadcast component is used to receive the first interaction information generated when the target interaction element status is updated, and broadcast the first interaction information to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own status according to the first interaction information.

[0045] Among them, the external interface component adopts the singleton mode; the external interface component is an adapter for connecting to different platforms and game interaction requirements.

[0046] It's important to note that the singleton pattern ensures that only one instance of an external interface component exists in the entire system. When integrating with different platforms and game interactions, if the external interface component involves managing shared resources (such as database connections and file handles), the singleton pattern can prevent multiple instances from occupying these resources simultaneously, reducing memory overhead. For example, when interacting with data across different platforms, it may be necessary to maintain a single database connection. Using the singleton pattern ensures that only one database connection instance exists, preventing resource waste.

[0047] Because there's only one instance of the external interface component, all operations on it are based on the same object. This helps ensure data consistency across different platforms and game interaction requirements. For example, during combat, the external interface component might maintain global combat status information, such as combat time and player scores. The singleton pattern ensures that all platforms and modules access and modify the same state data, avoiding data inconsistencies.

[0048] Furthermore, external interface components, as adapters for different platforms and combat requirements, may need to load some global configuration information. The singleton pattern ensures that this configuration information is consistent across the entire system, preventing configuration conflicts caused by the existence of multiple instances.

[0049] The core components include an isolation interface and a core processing unit. The isolation interface is used to isolate the external interface components from the core processing unit. The core processing unit is responsible for executing specific business logic and data processing tasks.

[0050] It can be understood that the isolation interface can separate the system's external interface component calls from the specific logical implementation, so that external modules only need to operate through the external interface components without having to worry about the specific internal implementation details.

[0051] Among them, the message broadcast component is used to collect or broadcast interactive messages to achieve decoupling between the interactive message sender and receiver.

[0052] Terminals include, but are not limited to, various personal computers, laptops, smartphones, and tablets. A target interaction task refers to a specific game interaction task to be executed, triggered by the player or the system, such as initiating a battle or using a specific skill. A pending interaction request carries key parameter information required to execute the target interaction task, such as the operation type and target object.

[0053] Target interaction data refers to specific data directly related to the target interaction task, extracted from the interaction request. Target interaction data may include, but is not limited to, operation details (such as skill ID, target character ID), and environment status (such as map location).

[0054] Among them, interaction logic refers to a series of rules and operation processes designed for the target interaction task; for example, interaction logic may include damage calculation, status effect application, etc.

[0055] Target interactive elements refer to in-game entities or objects that participate in the target interactive task, such as characters, enemies, skills, and items. The state of target interactive elements will change as the interactive logic executes.

[0056] The first interaction message refers to the message data generated when the state of the target interactive element is updated. The first interaction message may include, but is not limited to, specific details of the state change, such as the type of change (e.g., health points decreased), the amount of change (e.g., health points decreased by 10 points), and relevant contextual information.

[0057] The target subscription element refers to an interactive element that is interested in the first interactive information. It can be understood that the target subscription element is registered with the message broadcast component through the subscription mechanism so as to receive a notification when the first interactive information is generated.

[0058] Exemplarily, after the terminal generates a pending interaction request for the target interaction task, the pending interaction request is sent to the external interface component, which responds to the pending interaction request generated by the terminal for the target interaction task through the external interface component, and determines the target interaction data corresponding to the pending interaction request; further, the target interaction data is transmitted to the core processing unit through the isolation interface, and the core processing unit executes the interaction logic matching the target interaction task according to the target interaction data, and updates the status of the target interaction element corresponding to the target interaction task; at the same time, when the status of the target interaction element is updated, a first interaction information is generated and sent to the message broadcast component, and the first interaction information is broadcast to the target subscription element that subscribes to the first interaction information through the message broadcast component, so that the target subscription element updates its own status according to the first interaction information.

[0059] In this embodiment, by setting an isolation interface in the core component to isolate the external interface component and the core processing unit, the direct dependency between the external request and the core processing unit is effectively reduced, so that each component can be upgraded or modified separately without affecting other parts, thereby effectively enhancing the scalability of the system and reducing the coupling of the system; in addition, by setting a message broadcast component, the coupling between interactive elements is effectively reduced, avoiding the problem of high system coupling caused by direct interaction between interactive elements.

[0060] In one embodiment, the external interface component includes a data transmission unit and a data processing unit;

[0061] A data transmission unit is used to extract target key parameters from the request to be interacted with and transmit the target key parameters to the data processing unit;

[0062] The data processing unit is used to parse the target key parameters to obtain the target interaction data.

[0063] Among them, the target key parameters refer to a set of core data extracted from the interaction request, which contains all the necessary information required to trigger a specific interaction task; it should be noted that the specific content of the target key parameters depends on the requirements of the target interaction task and is not specifically limited here; for example, character information: such as character ID, character status (health value, magic value, etc.); skill information: such as skill ID, skill effect (damage value, duration, etc.); environmental information: such as the current scene, weather conditions, etc.; event context: such as the timestamp of the triggering event, event type, etc.

[0064] The data transfer unit is responsible for data encapsulation and transfer, adapting to the specific requirements of various combat types, thereby ensuring the versatility and flexibility of data transfer. In an exemplary embodiment, the data transfer unit is, for example, the BRequestArgs class. In programming, the BRequestArgs class is used to transfer data from one module, class, or method to another. The BRequestArgs class contains a series of properties that can be used to store different types of data and transfer them within the processing flow corresponding to different combat types.

[0065] For example, in a game battle system, different battle types (such as demonstration battles, test battles, and city battles) may require different data, such as player skill information, monster attributes, and battle scene parameters. The BRequestArgs class can encapsulate this data and pass it to the corresponding data processing unit (such as the BDemonstrateHelper class, the BTestDataHelper class, and the BCityDataHelper class) for processing.

[0066] Among them, the data processing unit corresponds to the data type passed by the data transmission unit; for example, in the demonstration battle scenario, the external interface component will use the BDemonstrateHelper class to process the demonstration data passed by the BRequestArgs class; in the test battle scenario, the external interface component will use the BTestDataHelper class to process the test data passed by the BRequestArgs class.

[0067] In this embodiment, by providing a data transmission unit and a data processing unit, data flow is simplified, coupling is reduced, the flexibility and maintainability of the system are improved, and rapid iteration and content update are supported.

[0068] In one embodiment, Figure 2 As shown, Figure 2 A schematic diagram of the overall structure of a game interaction system in another embodiment; the core processing unit includes an initializer, a loop controller, and a data storage;

[0069] An initializer, used to generate a target interaction element corresponding to a target interaction task according to target interaction data;

[0070] Loop controller, used to manage the interaction logic corresponding to the target interaction task;

[0071] Data storage device, used to store global data corresponding to multiple interactive tasks.

[0072] Among them, the initializer is responsible for initializing game interactions and generating target interaction elements corresponding to target interaction tasks. It can be understood that the main responsibility of the initializer is to complete the necessary initialization work when the system starts or a specific process starts, and prepare for subsequent operations; for example, initialize the character status and load skill effects before the battle begins.

[0073] The loop controller is responsible for providing the main loop of the game interaction, controlling the speed, and determining the end condition. It can be understood that the loop controller is responsible for managing and controlling the execution of the interaction logic in the system. It can determine the frequency (speed) of the interaction logic loop and determine whether to terminate the loop based on specific conditions. For example, it can control the order and duration of each round in turn-based combat, or adjust the frame rate and response time in real-time combat.

[0074] Among them, the data storage device is used to store global data corresponding to multiple interactive tasks. It serves as the data and element root node to ensure that this data can be shared and accessed between different interactive tasks, while supporting efficient data management and retrieval.

[0075] In this embodiment, the layered design of the core processing units effectively reduces the coupling between system components and improves system scalability and maintainability. This structure allows each component to focus on its own responsibilities, simplifying debugging and optimization during development and facilitating future feature additions and adjustments.

[0076] In one embodiment, the system further includes an element management component;

[0077] The element management component is used to generate a first interaction message corresponding to the target interaction element when the state of the target interaction element is updated, and send the first interaction message to the message broadcast component.

[0078] The element management component is further configured to receive the second interaction message broadcasted by the message broadcast component when the target interaction element subscribes to the second interaction message, and update the state of the target interaction element according to the second interaction information.

[0079] The element management component includes interactive elements, interactive units, and interactive logic. Interactive elements are the basic units in the game's interactive system, encompassing all combat objects, including but not limited to bullets, characters, and skills. Interactive units are concrete instances of interactive elements, carrying a large amount of attribute information and supporting custom configuration. These attributes include both externally transmitted initial attributes (such as a character's health and attack power) and system-provided dynamic attributes (such as current state and position). Interactive logic refers to the behavioral logic responsible for handling interactive units, such as damage processing and abnormal state handling.

[0080] It can be understood that the first interactive message is actively triggered by the target interactive element and is a response to its internal state change, while the second interactive message refers to the message data broadcasted to subscribers by the message broadcast component.

[0081] For example, in a multiplayer online battle scenario, when a player character unleashes a skill, the skill's effects are processed by the interaction logic. After the skill is unleashed, the element management component generates a first interaction message, "Skill Cast," and notifies all target subscribed elements of this first interaction through the message broadcast component. Upon receiving the first interaction message, the target subscribed elements invoke their own interaction logic to determine whether they are affected by the skill and update their own state based on the result (e.g., health reduction or stun).

[0082] In this embodiment, by introducing the element management component, the system can more efficiently handle complex state changes and message transmission in game interactions; it not only ensures loosely coupled communication between various interactive elements, but also improves the scalability and maintainability of the system.

[0083] In one embodiment, the system further comprises a display assembly;

[0084] The display component is used to render the corresponding screen according to the update status of the target interactive element or the target subscription element.

[0085] Among them, the display component is used to handle display-related behaviors, including resource processing, special effects generation, and cache pool management.

[0086] It should be noted that the display component needs to exchange data with the core processing unit through an isolation interface to ensure that the coupling between the various components of the system is further reduced.

[0087] In this embodiment, the system can achieve efficient global message transmission and screen update while maintaining a low degree of coupling, thereby improving the response speed and consistency of the system.

[0088] In a specific embodiment, the game interaction system described in any of the above embodiments can be simulated through a preset simulator. Among them, the preset simulator is used to quickly start a game interaction and better check and control the game interaction content, and is used to assist game development, test new skills, reproduce and debug problems reported by users and testers, etc. The preset simulator can be, but is not limited to, a Unity plug-in simulator. For example, add the "OpenScene, BattleTest" entry to the editor menu bar through MenuItem; click to load the specified test scene (such as BattleTest.unity) and run it.

[0089] During the simulation, you can also click the "Reset Battle" button to close the current battle and start a new one with the same data. At the same time, you can also drag the speed slider to change the speed of the battle. For example, the initial speed is 1.0, and the speed change range can be 0.0~3.0.

[0090] In one embodiment, Figure 3 As shown, Figure 3 1 is a flow chart of a game interaction method in one embodiment; the game interaction method, applied to the game interaction system described in any of the above embodiments, includes the following steps:

[0091] Step S301: responding to a pending interaction request generated by a terminal for a target interaction task, and determining target interaction data corresponding to the pending interaction request.

[0092] Terminals include, but are not limited to, various personal computers, laptops, smartphones, and tablets. A target interaction task refers to a specific game interaction task to be executed, triggered by the player or the system, such as initiating a battle or using a specific skill. A pending interaction request carries key parameter information required to execute the target interaction task, such as the operation type and target object.

[0093] Target interaction data refers to specific data directly related to the target interaction task, extracted from the interaction request. Target interaction data may include, but is not limited to, operation details (such as skill ID, target character ID), and environment status (such as map location).

[0094] Step S302: executing the interaction logic matching the target interaction task according to the target interaction data, and updating the state of the target interaction element corresponding to the target interaction task.

[0095] Among them, interaction logic refers to a series of rules and operation processes designed for the target interaction task; for example, interaction logic may include damage calculation, status effect application, etc.

[0096] Target interactive elements refer to in-game entities or objects that participate in the target interactive task, such as characters, enemies, skills, and items. The state of target interactive elements may change due to the execution of the interactive logic.

[0097] Step S303: broadcast the first interaction information generated when the target interaction element status is updated to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own status according to the first interaction information.

[0098] The first interaction message refers to the message data generated when the state of the target interactive element is updated. The first interaction message may include, but is not limited to, specific details of the state change, such as the type of change (e.g., health points decreased), the amount of change (e.g., health points decreased by 10 points), and relevant contextual information.

[0099] The target subscription element refers to an interactive element that is interested in the first interactive information. It can be understood that the target subscription element is registered with the message broadcast component through the subscription mechanism so as to receive a notification when the first interactive information is generated.

[0100] Exemplarily, after the terminal generates a pending interaction request for the target interaction task, the pending interaction request is sent to the external interface component, which responds to the pending interaction request generated by the terminal for the target interaction task through the external interface component, and determines the target interaction data corresponding to the pending interaction request; further, the target interaction data is transmitted to the core processing unit through the isolation interface, and the core processing unit executes the interaction logic matching the target interaction task according to the target interaction data, and updates the status of the target interaction element corresponding to the target interaction task; at the same time, when the status of the target interaction element is updated, a first interaction information is generated and sent to the message broadcast component, and the first interaction information is broadcast to the target subscription element that subscribes to the first interaction information through the message broadcast component, so that the target subscription element updates its own status according to the first interaction information.

[0101] In this embodiment, by setting an isolation interface in the core component to isolate the external interface component and the core processing unit, the direct dependency between the external request and the core processing unit is effectively reduced, so that each component can be upgraded or modified separately without affecting other parts, thereby effectively enhancing the scalability of the system and reducing the coupling of the system; in addition, by setting a message broadcast component, the coupling between interactive elements is effectively reduced, avoiding the problem of high system coupling caused by direct interaction between interactive elements.

[0102] In one embodiment, Figure 4 As shown, Figure 4 This is a flowchart illustrating steps for broadcasting first interaction information to a target subscription element that subscribes to the first interaction information in one embodiment. Broadcasting the first interaction information generated when the target interaction element status is updated to the target subscription element that subscribes to the first interaction information includes the following steps:

[0103] Step S401: adding the first interaction information generated when the target interaction element state is updated to a queue of messages to be broadcast according to a preset priority.

[0104] The preset priority refers to a standard for sorting subscribers' response priorities to messages of a specific type when the messages are queued. It is understood that the preset priority is related to the response priority corresponding to the target subscription element of the first interactive information.

[0105] The queue of messages to be broadcast is a data structure for storing messages to be processed; the queue of messages to be broadcast needs to sort the received messages according to preset priorities.

[0106] Step S402: Determine a target subscription element for subscribing to the first interaction information according to the first interaction information.

[0107] Step S403: broadcast the first interaction information to the target subscription element according to the preset priority.

[0108] Exemplarily, a target interactive element generates a first interaction message when performing a specific operation or updating its status. For example, when a combat unit inflicts damage, a Damage message is generated; when its health changes, an HPChange message is generated. Furthermore, the first interaction message is submitted to the message broadcast component. Upon receiving the first interaction message, the message broadcast component adds it to a queue of pending broadcast messages based on a preset priority (i.e., the response priority of the subscribing element). The first interaction message is then retrieved from the queue of pending broadcast messages in the order of the preset priority. Based on the first interaction message, a target subscription element is determined to subscribe to the first interaction message, and the first interaction message is broadcast to the target subscription element.

[0109] This embodiment manages the queue of pending broadcast messages by presetting priorities, efficiently distributing first interactive messages to target subscription elements. This ensures that critical logic is prioritized, improving system responsiveness and user experience. Furthermore, a more flexible priority setting mechanism allows for setting different response priorities for target subscription elements based on specific needs. This allows interactive messages to be sorted based on importance and urgency during message processing, ensuring that important messages are processed first.

[0110] In a specific embodiment, the game interaction system includes an external interface component BHandler, a core component and a message broadcast component BLogicMsg; the core component includes an isolation interface BCoreInforme and a core processing unit BCore.

[0111] BHandler, an adapter for different platforms and combat requirements, uses a singleton model. It can initiate operation requests to BCore based on the platform and combat requirements. BCore is the core unit for storing global combat data and serves as the root node for data and elements. BHandler interacts with BCore through the isolated interface BCoreInformer to obtain or modify global combat data. This avoids direct access to BCore internal data, reducing coupling.

[0112] Core components also include the initializer BCoreStarter and the loop controller BCoreUpdater. During the battle initialization phase, BCoreStarter generates various interactive elements (BObjects) and adds them to the battle environment managed by BCore. During the main interaction logic loop, BCoreUpdater updates the status of these BObjects, such as the position and health of interactive units. These BObject status changes are fed back to BCore, where they are used to update global data via BCoreInformer.

[0113] When an interactive element (BObject) changes its state or performs certain actions, it sends corresponding interactive messages to the message broadcast component (BLogicMsg). For example, when a combat unit deals damage, it sends a Damage message; when its health changes, it sends an HPChange message. Interactive elements (BObjects) can also subscribe to messages in BLogicMsg and perform corresponding actions based on the received messages. For example, a combat unit can subscribe to the Damage message and, upon receiving it, perform a health deduction operation.

[0114] Messages broadcast by BLogicMsg may affect global data in BCore. For example, an HPChange message may cause the health data of a combat unit in BCore to be updated.

[0115] The above-mentioned game interaction system isolates the external interface components and the core processing unit by setting up isolation interfaces in the core components, effectively reducing the direct dependency between external requests and the core processing unit, so that each component can be upgraded or modified separately without affecting other parts, effectively enhancing the scalability of the system and reducing the coupling of the system; in addition, by setting up message broadcast components, the coupling between interactive elements is effectively reduced, avoiding the problem of high system coupling caused by direct interaction between interactive elements. At the same time, by designing the core processing unit in layers, not only the coupling between the various components of the system is effectively reduced, but also the scalability and maintainability of the system are improved. This structure allows each component to focus on its own responsibilities, simplifies debugging and optimization work during the development process, and also facilitates the addition and adjustment of future functions.

[0116] It should be understood that, although the various steps in the flowcharts involved in the various embodiments described above are displayed in sequence according to the instructions of the arrows, these steps are not necessarily executed in sequence in the order indicated by the arrows. Unless otherwise specified herein, there is no strict order restriction on the execution of these steps, and these steps can be executed in other orders. Moreover, at least a portion of the steps in the flowcharts involved in the various embodiments described above can include multiple steps or multiple stages, and these steps or stages are not necessarily executed and completed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a portion of steps or stages in other steps.

[0117] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 5As shown. The computer device includes a processor, a memory, an input / output interface (I / O) and a communication interface. The processor, memory and input / output interface are connected via a system bus, and the communication interface is connected to the system bus via the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and computer program in the non-volatile storage medium. The database of the computer device is used to store game interaction-related data. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a game interaction method is implemented.

[0118] Those skilled in the art will understand that Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different component arrangement.

[0119] In one embodiment, a computer device is further provided, including a memory and a processor. The memory stores a computer program, and the processor implements the steps in the above method embodiments when executing the computer program.

[0120] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned method embodiments are implemented.

[0121] In one embodiment, a computer program product is provided, including a computer program, which implements the steps in the above method embodiments when executed by a processor.

[0122] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0123] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. In particular, any reference to memory, database, or other media used in the embodiments provided in this application can include at least one of non-volatile memory and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The databases involved in the various embodiments provided herein may include at least one of a relational database and a non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the various embodiments provided herein may be, but are not limited to, general-purpose processors, central processing units (CPUs), graphics processing units (GPUs), digital signal processors (DSPs), programmable logic devices (PLDs), quantum computing-based data processing logic devices, artificial intelligence (AI) processors, and the like.

[0124] The technical features of the above embodiments can be combined arbitrarily. In order to make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this application.

[0125] The above-described embodiments merely represent several implementation methods of the present application. While the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the present application. It should be noted that a person of ordinary skill in the art may make various modifications and improvements without departing from the spirit of the present application, and these modifications and improvements fall within the scope of protection of the present application. Therefore, the scope of protection of the present application shall be determined by the appended claims.

Claims

1. A game interaction system, characterized in that: The system includes: an external interface component, a core component and a message broadcast component; the core component includes an isolation interface and a core processing unit; the isolation interface is used to isolate the external interface component and the core processing unit, wherein, The external interface component is used to respond to the pending interaction request generated by the terminal for the target interaction task, and determine the target interaction data corresponding to the pending interaction request; The core processing unit is configured to receive the target interaction data sent via the isolation interface, execute the interaction logic matching the target interaction task according to the target interaction data, and update the state of the target interaction element corresponding to the target interaction task; The message broadcast component is used to receive the first interaction information generated when the target interaction element status is updated, and broadcast the first interaction information to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own status according to the first interaction information.

2. The system according to claim 1, wherein: The external interface component includes a data transmission unit and a data processing unit; The data transmission unit is used to extract target key parameters from the request to be interacted with and transmit the target key parameters to the data processing unit; The data processing unit is used to parse the target key parameters to obtain target interaction data.

3. The system according to claim 1, wherein: The core processing unit includes an initializer, a loop controller and a data memory; The initializer is configured to generate a target interaction element corresponding to the target interaction task according to the target interaction data; The loop controller is used to manage the interaction logic corresponding to the target interaction task; The data storage device is used to store global data corresponding to multiple interactive tasks.

4. The system according to claim 1, wherein: The system also includes an element management component; The element management component is configured to generate a first interaction message corresponding to the target interaction element when the state of the target interaction element is updated, and send the first interaction message to the message broadcast component.

5. The system according to claim 4, characterized in that The element management component is further configured to receive a second interaction message broadcast by the message broadcast component when the target interaction element subscribes to the second interaction message, and update the state of the target interaction element according to the second interaction information.

6. The system according to claim 1, wherein: The system also includes a display assembly; The display component is used to perform corresponding screen rendering according to the update status of the target interactive element or the target subscription element.

7. A game interaction method, characterized in that: Applied to the game interaction system according to any one of claims 1 to 5, the method comprises: Responding to a pending interaction request generated by the terminal for a target interaction task, and determining target interaction data corresponding to the pending interaction request; executing, according to the target interaction data, an interaction logic matching the target interaction task, and updating a state of a target interaction element corresponding to the target interaction task; The first interaction information generated when the target interaction element state is updated is broadcasted to the target subscription element that subscribes to the first interaction information, so that the target subscription element updates its own state according to the first interaction information.

8. The method according to claim 7, characterized in that The broadcasting of the first interaction information generated when the target interaction element state is updated to the target subscription element that subscribes to the first interaction information includes: According to a preset priority, the first interaction information generated when the state of the target interaction element is updated is added to the queue of messages to be broadcast; determining, according to the first interaction information, a target subscription element for subscribing to the first interaction information; According to the preset priority, the first interaction information is broadcast to the target subscription element.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 7 to 8 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 7 to 8 are implemented.