Macro instruction processing method and device, electronic equipment and medium
Patent Information
- Application Number
- CN202610965409.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-06-30
- Publication Date
- 2026-10-30
AI Technical Summary
[0002]在格斗类等竞技游戏中,相关技术的宏指令基于固定的按键序列执行,无法感知游戏角色的实时朝向变化
[0015]本申请实施例提供的一种宏指令处理方法,通过响应于用户针对目标角色触发的宏指令,获取宏指令中的至少一个方向操作信息;根据目标角色的实时角色朝向,将至少一个方向操作信息转换为与实时角色朝向相适配的至少一个实际方向操作信息,以根据至少一个实际方向操作信息控制目标角色执行游戏动作。确保同一宏指令在不同角色朝向下均能输出符合用户预期的正确操作,实现了宏指令对游戏动态环境的智能适应,无需用户手动干预,显著提升了操作准确性与游戏体验,同时增强了宏指令的鲁棒性和通用性。
Smart Images

Figure CN122998735A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of interactive technology, specifically to a macro instruction processing method, apparatus, electronic device, and medium. Background Technology
[0002] In competitive games such as fighting games, macro commands based on this technology are executed based on fixed key sequences and cannot perceive real-time changes in the character's orientation. When the character's position or orientation changes, the result of the same macro command deviates significantly from the user's expectations (for example, a forward dash attack becomes a backward movement). This results in poor adaptability and low automation of macro commands in dynamic combat environments. Users need to manually switch or record multiple sets of macro commands, which is cumbersome and cannot meet the real-time requirements of fast-paced combat. Summary of the Invention
[0003] This application provides a macro instruction processing method, apparatus, electronic device, and medium.
[0004] In a first aspect, embodiments of this application provide a method for macro instruction processing, the method comprising: in response to a macro instruction triggered by a user for a target character, acquiring at least one directional operation information in the macro instruction; and converting the at least one directional operation information into at least one actual directional operation information adapted to the real-time character orientation according to the real-time character orientation of the target character, so as to control the target character to perform game actions according to the at least one actual directional operation information.
[0005] In some embodiments, before obtaining at least one directional operation information in a macro instruction triggered by a user for a target role, the method includes:
[0006] Capture game images during gameplay; In the case where the game image is the game opening image, identify at least one character and the starting character orientation of each character in the game image, wherein the at least one character includes the target character; Based on the updated game images during gameplay, the starting character orientation is updated to obtain the real-time character orientation of at least one character.
[0007] In some embodiments, when the game image is a game start image, before identifying at least one character and the starting character orientation of each of the at least one character from the game image, the method includes: Obtain image features from game images and / or audio features associated with game images; Determine the similarity between image features and / or audio features and pre-stored opening standard features; If the similarity is greater than or equal to a preset matching threshold, the game image is determined as the game's starting image.
[0008] In some embodiments, identifying at least one character and the starting character orientation of each of the at least one character from the game image includes: Based on object detection algorithms, determine the bounding boxes of characters in game images; Identify at least one character based on the distribution of the character bounding box and / or the character's visual features; Determine the starting character orientation of each character based on the facial and / or torso regions of at least one character.
[0009] In some embodiments, converting at least one directional operation information into at least one actual directional operation information adapted to the real-time character orientation based on the target character's real-time character orientation includes: Based on the real-time character orientation and the target character's initial character orientation, a direction mapping relationship is determined. This direction mapping relationship is used to map the direction operation information in macro commands to the absolute direction operation information in the game image. According to the direction mapping relationship, perform direction replacement on each direction operation information in at least one direction operation information to generate at least one actual direction operation information.
[0010] In some embodiments, determining the direction mapping relationship based on the real-time character orientation and the target character's initial character orientation includes: When the real-time character orientation is inconsistent with the initial character orientation, the orientation mapping relationship is determined based on the orientation difference between the real-time character orientation and the initial character orientation.
[0011] Secondly, embodiments of this application provide a macro instruction processing apparatus, the apparatus comprising: The acquisition unit is used to acquire at least one directional operation information in the macro instruction triggered by the user for the target role. The conversion unit is used to convert at least one directional operation information into at least one actual directional operation information that is adapted to the real-time character orientation of the target character, so as to control the target character to perform game actions according to at least one actual directional operation information.
[0012] Thirdly, embodiments of this application provide an electronic device, including: a processor and a memory for storing a computer program capable of running on the processor, wherein, when the processor runs the computer program, it performs the method described in any embodiment of the first aspect.
[0013] Fourthly, embodiments of this application provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to perform the methods described in any embodiment of the first aspect.
[0014] Fifthly, embodiments of this application provide a computer program product including a computer program that, when executed by a processor, performs the method described in any embodiment of the first aspect.
[0015] This application provides a macro instruction processing method that, in response to a user-triggered macro instruction for a target character, acquires at least one directional operation information from the macro instruction; based on the target character's real-time orientation, converts the at least one directional operation information into at least one actual directional operation information adapted to the real-time character orientation, thereby controlling the target character to perform game actions based on the at least one actual directional operation information. This ensures that the same macro instruction outputs the correct operation as expected by the user under different character orientations, achieving intelligent adaptation of macro instructions to the dynamic game environment without manual user intervention, significantly improving operation accuracy and game experience, while also enhancing the robustness and versatility of macro instructions.
[0016] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and do not limit this application. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are merely embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort, and this application can be applied to other similar scenarios based on the provided drawings.
[0018] Figure 1 A flowchart illustrating a macro instruction processing method provided in an embodiment of this application; Figure 2 A flowchart illustrating the second macro instruction processing method provided in this application embodiment; Figure 3 A schematic diagram of a game opening image provided in an embodiment of this application; Figure 4 A flowchart illustrating the third macro instruction processing method provided in this application embodiment; Figure 5 A schematic diagram of a preset comparison table provided for an embodiment of this application; Figure 6 A schematic diagram illustrating a target character performing game actions according to the same macro instruction from different orientations, as provided in an embodiment of this application; Figure 7 A schematic diagram illustrating a processed target character performing the correct game action according to macro instructions, provided as an embodiment of this application; Figure 8A schematic diagram of the structure of a macro instruction processing device 800 provided in an embodiment of this application; Figure 9 This is a schematic diagram of the structure of an electronic device provided in an embodiment of this application. Detailed Implementation
[0019] The present application will now be described in further detail with reference to the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are merely illustrative of the invention and not intended to limit it. The described embodiments are only a part of the embodiments of this application, and not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of this application without inventive effort are within the scope of protection of this application.
[0020] It should be noted that the terms "system," "device," "unit," and / or "module" used in this application are methods of distinguishing different components, elements, parts, sections, or assemblies at different levels. However, if other terms can achieve the same purpose, they can be replaced by other expressions.
[0021] Hereinafter, the terms "first," "second," and "third" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of technical features indicated. Thus, a feature defined as "first," "second," or "third" may explicitly or implicitly include one or more of that feature.
[0022] In current competitive video games such as fighting games, players often use macro commands to simplify complex operations into single triggers, improving efficiency and consistency. However, the dynamic changes in character position and orientation during gameplay can cause macro commands based on fixed key sequences to produce completely incorrect results after the character turns, severely impacting the gaming experience and fairness.
[0023] To address the issue of directional adaptability in macro commands, relevant technologies primarily rely on players manually recording multiple directional macro commands and switching between them, or using macro script engines with basic conditional judgments. Additionally, some advanced peripherals allow for simple logical judgments through hardware programming, but these are complex to configure and lack versatility.
[0024] However, macro command processing technology in related technologies suffers from limitations. If the character's orientation changes, the execution of the macro command deviates from the expected direction. This disconnect between macro commands and the game's visual context results in low automation, poor adaptability, and difficulty in timely manual adjustments during fast-paced battles, failing to meet the core requirement of accuracy in dynamic combat environments. For example, a user-defined macro command might be set to have the character dash forward and launch an attack. This command is based on the character being on the left and facing right, and in the game, it will manifest as the character dashing and attacking. If the character's facing direction changes, the macro command will still execute, but in the game, it will appear as the character retreating and attacking.
[0025] To address the aforementioned issues, this application utilizes computer vision technology to identify characters and their orientation in real-time within the game screen, and then intelligently maps key values to macro commands triggered by the user. Specifically, this application employs object detection algorithms to determine the start of the game and continuously tracks the character's position. When a macro command is triggered, it automatically adjusts the direction keys based on the character's current orientation, ensuring that the same set of macro commands outputs the correct, expected operation regardless of the user's position.
[0026] The following is a detailed description of a macro instruction processing method provided in this application, with reference to the accompanying drawings.
[0027] Figure 1 A flowchart of a macro instruction processing method provided in an embodiment of this application is shown. Figure 1 As shown, the macro instruction processing method includes steps 101-102.
[0028] Step 101: In response to a macro command triggered by the user for a target role, obtain at least one directional operation information from the macro command.
[0029] In embodiments of this application, a user presses a pre-set macro command (e.g., the key combination "Macro 1") via an input device such as a game controller, keyboard, or touchscreen. Upon detecting the macro command's activation, the system determines the target character (e.g., the character controlled by player 1P) corresponding to the macro command and reads the pre-recorded key sequence from the macro command, extracting all direction-related operation information. This direction operation information is typically stored in the form of absolute direction key values.
[0030] Macro instructions are a set of keystroke sequences pre-recorded or set by the user, which can be executed sequentially upon a single trigger. The macro instructions in this application contain at least one directional operation information, and may also include other operations such as attack or defense.
[0031] Directional operation information refers to the specific instructions in macro commands used to indicate the direction of movement or attack, such as forward, backward, jump upward, diagonally forward and downward, etc.
[0032] The target character is the game character controlled by the user who triggered the macro command. In multiplayer battles, each player has their own character, and the system needs to distinguish between different characters for separate processing.
[0033] Step 102: Based on the real-time orientation of the target character, at least one directional operation information is converted into at least one actual directional operation information that is adapted to the real-time orientation of the character, so as to control the target character to perform game actions based on at least one actual directional operation information.
[0034] In the embodiments of this application, before executing macro instructions, the system first obtains the target character's current orientation (e.g., "facing right" or "facing left"). Then, according to a preset direction mapping rule, each absolute direction operation information in the macro instruction is converted into actual direction operation information that matches the current character's orientation. For example: If the direction operation information in the macro command is to move to the right side of the screen, but the character is currently facing the left, the system will change it to move to the left side of the screen, so that the character still moves forward. If the macro command includes "right forward up" and the character is facing the left, it will be changed to "left forward up" to ensure that the character always performs diagonal attacks in the direction it is facing.
[0035] After the conversion is complete, the system will combine the replaced actual directional operation information with the non-directional part of the macro instruction (such as the attack key) and output it to the game engine for execution, so that the character's actions are consistent with the logical actions expected by the user (such as "dash attack" always facing the enemy).
[0036] Real-time character orientation refers to the direction the target character is facing in the current game screen. It is usually represented by "left," "right," "up," "down," or an angle. It is obtained through visual recognition (such as facial orientation or shoulder line direction) or game data interfaces.
[0037] The actual directional input information is the directional key commands sent to the game engine after dynamic remapping. It is an absolute directional key value that the game engine can directly recognize, but relative to the character's current orientation, it has been converted into a logical direction (such as forward) that conforms to the user's expectations.
[0038] This application establishes a logical mapping between the character's orientation and macro command directions. The direction in macro commands is no longer interpreted as absolute right or left, but rather as logical actions such as forward, backward, left lateral movement, and right lateral movement relative to the character. The system dynamically generates corresponding absolute key presses based on the real-time orientation. This is equivalent to embedding a direction conversion layer into the macro command execution engine, achieving orientation insensitivity for macro commands. Users only need one set of macros, and the commands will execute correctly regardless of the character's orientation.
[0039] In summary, the macro command processing method proposed in this application acquires the current orientation of the game character in real time and dynamically converts the directional operation information within the macro command into actual directional operation information adapted to the current orientation when the user triggers the macro command. This ensures that the same set of macro commands can still output the correct actions as expected by the user after the character turns. This method breaks the limitation of traditional macro commands relying on absolute directional key values, deeply integrating visual perception and command control, significantly improving the adaptability and operational accuracy of macro commands in dynamic combat environments. It eliminates the need for users to manually switch or record multiple macros, greatly improving the gaming experience.
[0040] As one possible implementation method, Figure 2 A flowchart of a second macro instruction processing method is shown. Based on the above embodiments, before obtaining at least one directional operation information from the macro instruction triggered by the user for a target role, the method includes the following steps: Step 201: Obtain game images during the game process.
[0041] In embodiments of this application, each frame of the game is continuously captured as a game image at a fixed frame rate (e.g., 30 frames per second) through screen capture, video stream capture, or cloud gaming rendering output interfaces. These images can be RGB color images or pre-processed grayscale images for subsequent visual analysis.
[0042] Game graphics are the digital images of each frame during game execution. They can be in the form of a pixel matrix and include visual information such as characters, backgrounds, and UI.
[0043] This application can continuously obtain game images to extract contextual information such as character position and orientation, and the specific method of obtaining game images is not limited in this application.
[0044] Step 202: If the game image is the game start image, identify at least one character and the starting character orientation of each character in the game image, wherein the at least one character includes the target character.
[0045] In embodiments of this application, the application may acquire image features (such as character entrance positions, fixed background patterns, countdown number areas) and / or audio features associated with the game image (such as opening music spectrum, narration voice features). The similarity between the image features and / or audio features and pre-stored opening standard features is determined (e.g., calculated via feature vector distance). If the similarity is greater than or equal to a preset matching threshold, the game image is determined to be the game's opening image.
[0046] After determining that the game image is the starting image of the game, this application can determine the bounding boxes of characters in the game image based on object detection algorithms (such as YOLO). Based on the distribution of the character bounding boxes (e.g., left side is 1P, right side is 2P) and / or the character's visual features (e.g., clothing color, character shape), at least one character is identified, and different individual characters are distinguished. Based on the facial and / or torso regions of each character (e.g., through facial landmark detection or pose estimation models), the starting character orientation of each character (e.g., facing left, facing right, or a specific angle) is determined.
[0047] The game's opening screen is the preparation screen before the official start of the game or the screen at the very beginning. It usually has a fixed layout (such as characters facing each other on the left and right, and a countdown of 3-2-1). This screen feature is stable and easy for the system to track during initialization.
[0048] The character bounding box is a rectangular region output by the object detection algorithm, which frames each character object in the image and includes its position coordinates and width and height information.
[0049] The starting character orientation refers to the direction the character's face or body is facing in the opening screen (relative to the game screen coordinate system). This serves as a reference for subsequent updates.
[0050] Object detection algorithms are deep learning algorithms used in computer vision to locate and identify specific objects (such as people) in images.
[0051] This application determines a starting point by judging the opening screen; at that point, it identifies the characters and their initial orientations, establishing a baseline for subsequent continuous tracking and direction mapping. Using image / audio feature matching to determine the opening avoids manual triggering and improves automation. Employing a target detection algorithm for character localization and orientation recognition allows for adaptation to different character appearances and demonstrates versatility.
[0052] Step 203: Based on the updated game image during the game, update the starting character orientation to obtain the real-time character orientation of at least one character.
[0053] In the embodiments of this application, after the game starts, this application can continue to acquire each subsequent frame of game images. For each identified character, its position and orientation are updated in real time using visual tracking techniques (such as Kalman filtering, optical flow, or continuous frame detection). Specifically, this can be achieved by: continuously running the object detection model, re-detecting the bounding box and face / torso region of each character, calculating the new orientation angle, and replacing the original orientation information; or by using a lightweight tracker to maintain the character's identity during detection intervals, performing a re-detection every few frames to correct drift. The updated orientation is stored as the "real-time character orientation".
[0054] Updating the game image means continuously acquiring each new frame of the game after the initial image.
[0055] Real-time character orientation is the character's orientation obtained through visual analysis at the current moment, and can be a discrete direction (left / right) or a continuous angle value. This value changes dynamically as the character turns.
[0056] This application addresses the issue of dynamic changes in character orientation. During gameplay, characters frequently turn, and only by continuously updating orientation data can the system accurately reflect the current orientation when macro commands are triggered. Through continuous visual tracking, the system can seamlessly follow changes in character posture, providing reliable input for subsequent real-time mapping.
[0057] In other words, this application can utilize object detection algorithms to perform real-time analysis of game video streams, completing game opening image detection, player character recognition and differentiation, and continuously tracking visual features such as character position and facial orientation, transforming image information into structured game context data. This application does not simply apply image recognition to game scenarios; rather, by accurately identifying game opening images and continuously tracking characters and their orientations, it transforms visual pixel information into structured semantic understanding (such as the orientation of the 1P character), providing a crucial context-aware foundation for subsequent intelligent decision-making.
[0058] Specifically, this application can collect screenshots or videos of game characters and annotate them. It can collect screenshots or videos of the opening screens of different characters and annotate them. If it is a human character, its facing direction can be annotated (or facial recognition can be used to identify the facing direction). The algorithm is trained using an object detection algorithm (or other classification algorithm).
[0059] After cloud gaming is enabled, an object detection algorithm is run to identify the current video frame, specifically the opening screen (i.e., the game's starting image). For example... Figure 3 The game's opening image shown has relatively fixed characteristics, which can be identified through either audio or visual features. (Refer to...) Figure 3 In the opening scene, the character on the left is Player 1; the character on the right is Player 2. When Player 1 and Player 2 are the same, they can be distinguished by recognizing the different colors of their clothing. (This example only uses Player 1 and Player 2; in reality, Player 3 and Player 4 can be supported).
[0060] Subsequently, this application can use character recognition and tracking algorithms to identify and track the characters 1P and 2P respectively (identification is for the purpose of re-tracking if the tracking fails during the process), to obtain the game characters corresponding to 1P and 2P and the face orientation of the game characters.
[0061] It should be noted that, to ensure the accuracy and reliability of character identification and tracking in each game, this application requires that whenever the game's opening screen (i.e., the start of each game) is detected, all player characters participating in that game (e.g., ...) must be re-identified. Figure 3 Identify and track 1P and 2P in the process.
[0062] In summary, this application acquires game images and automatically identifies the characters entering the game and their initial orientation upon detecting the opening screen. It then continuously updates the real-time orientation of each character using subsequent images. This achieves a complete visual perception and tracking chain, enabling the system to know in real-time who is facing which direction. Combined with a dynamic mapping mechanism, it automatically adapts the directional operations in user-triggered macro commands to the actual operations that match the character's current orientation. This completely eliminates the inherent flaw of traditional macro commands relying on absolute direction key values, achieving intelligent adaptation of macro commands to the dynamic game environment without manual user intervention, significantly improving operational accuracy and the gaming experience.
[0063] As one possible implementation method, Figure 4 A flowchart of the third macro instruction processing method is shown. Based on the above embodiments, according to the real-time orientation of the target character, at least one directional operation information is converted into at least one actual directional operation information adapted to the real-time character orientation, including the following steps: Step 301: Determine the direction mapping relationship based on the real-time character orientation and the target character's starting character orientation. The direction mapping relationship is used to map the direction operation information in the macro command to the absolute direction operation information in the game image.
[0064] In embodiments of this application, the application can obtain the target character's real-time character orientation (e.g., currently facing left) and the character's initial character orientation (e.g., facing right at the start of the game). The two are compared: if an inconsistency is found (e.g., changing from facing right to facing left), a direction mapping relationship is determined based on the orientation difference (e.g., a 180-degree flip or left-right mirroring); if the real-time orientation is consistent with the initial orientation, the mapping relationship is an identity mapping (i.e., no transformation is performed).
[0065] The direction mapping relationship in this application can be represented by a function or lookup table to define the correspondence between the logical direction operation information in macro instructions and the actual absolute direction operation information finally output to the game engine under specific orientation differences. Logical direction operation information refers to abstract directions with the character itself as a reference, such as "forward," "backward," and "forward diagonally upward." Absolute direction operation information is a fixed direction key value directly recognized by the game engine, based on the screen coordinate system (e.g., "→" represents moving right, "←" represents moving left), and is independent of the character's own orientation. Orientation difference refers to the change in the real-time character orientation relative to the initial character orientation, which can be represented as an angle difference (e.g., 180°) or a mirror relationship (left and right interchanged).
[0066] In this application, the direction mapping relationship can be determined by a preset lookup table. Specifically, the preset lookup table is as follows: Figure 5 As shown, this table defines the correspondence between abstract directions (such as "forward", "backward", "forward diagonal up", "backward diagonal down") in macro commands and their actual absolute direction keys under different character orientations. The system can quickly obtain the corresponding direction mapping relationship by querying this table based on the target character's real-time orientation, thereby completing the dynamic conversion of direction operation information.
[0067] Specifically, refer to Figure 3 This application can monitor the macro command key values of 1P and 2P separately. When 1P triggers a macro command, the system detects the 1P game character's facial orientation; similarly, when 2P triggers a macro command, the system detects the 2P game character's facial orientation. Macro command processing mainly focuses on the directional keys: the key is to establish a lookup table based on the character's orientation as the key value conversion rule. The system needs to maintain a direction mapping table, whose entries define the correspondence between the abstract direction in the macro command (such as "forward" and "backward") and the actual key (such as "→" and "←") when the character is facing left or right. When a change in character orientation is detected, the system does not simply swap the left and right keys, but instead queries the mapping table based on the current orientation and performs logical remapping for each directional key in the macro command sequence. For example, when the character faces right, "forward" is mapped to "→"; when the character turns left, "forward" in the same macro command is automatically mapped to "←". The above process needs to be completed in a very short time to ensure seamless and real-time operation.
[0068] Step 302: According to the direction mapping relationship, perform direction replacement on each direction operation information in at least one direction operation information to generate at least one actual direction operation information.
[0069] In the embodiments of this application, each direction operation information (e.g., "→", "↗", "←") extracted from the macro instruction is traversed. For each direction operation information, it is mapped to a new absolute direction operation information according to the direction mapping relationship determined in step 301. For example: if the original macro instruction direction sequence is [→, →, ↗], and the direction mapping relationship stipulates that → (original forward) is mapped to ←, and ↗ (original forward diagonal upward) is mapped to ↖, then the actual direction operation information sequence generated after replacement is [←, ←, ↖].
[0070] After the replacement is complete, this actual directional operation information is combined with the non-directional parts of the macro instructions (such as the attack key A) to form a complete sequence of operation instructions that can be directly executed by the game engine. The entire process is completed within milliseconds, without the user's awareness.
[0071] Direction replacement refers to modifying the original directional operation information in a macro command according to a mapping relationship, while keeping other key presses unchanged. The actual directional operation information is the final absolute directional key command output after mapping, enabling the character to perform the actions intended by the user when recording the macro, based on their current orientation. Figure 1 The action of making a gesture.
[0072] Since macro commands may contain multiple directional operations (such as →↘↓↙← in a combo), they need to be processed one by one to ensure that each direction in the entire sequence is correctly mapped. This application uses traversal replacement to preserve the timing and rhythm of the original macro commands while adapting each direction to the current character's orientation, thus achieving the expected action as a whole.
[0073] Specifically, macros simply execute according to a predetermined key sequence; the same command will produce drastically different feedback depending on the character's facing direction in the game. For example... Figure 6 The diagram shown illustrates the target character performing a game action. (Refer to...) Figure 6 When 1P is on the left, the macro instruction executes correctly, but when it's on the right, it behaves completely differently than expected. For example... Figure 7 As shown, this is the correct action performed by the target character based on at least one actual directional operation information that conforms to the character's orientation after being processed by the macro instructions of this application.
[0074] In summary, this application dynamically determines the direction mapping relationship based on the difference between the target character's real-time orientation and initial orientation. Then, according to this mapping relationship, each direction operation information in the macro instruction is replaced one by one to generate an actually executable direction operation instruction. This transforms the direction in the macro instruction from an absolute key value into a logical action relative to the character's orientation, automatically adapting after the character turns, ensuring that the same macro instruction can output the correct operation sequence that meets the user's expectations under any orientation, significantly improving the intelligence and practicality of macro instructions in fighting games.
[0075] To implement the above embodiments, this application also provides a macro instruction processing device. Figure 8 This is a schematic diagram of the structure of a macro instruction processing device 800 provided in an embodiment of this application. Figure 8 As shown, the device includes: The acquisition unit 810 is used to acquire at least one directional operation information in the macro instruction triggered by the user for the target role. The conversion unit 820 is used to convert at least one directional operation information into at least one actual directional operation information that is adapted to the real-time character orientation of the target character, so as to control the target character to perform game actions according to the at least one actual directional operation information.
[0076] In some embodiments of this application, the acquisition unit 810 is configured to: acquire a game image during the game process before acquiring at least one directional operation information in a macro instruction triggered by a user for a target character; if the game image is a game opening image, identify at least one character and the opening character orientation of each of the at least one character from the game image, wherein the at least one character includes the target character; update the opening character orientation based on the updated game image during the game process to obtain the real-time character orientation of at least one character.
[0077] In some embodiments, the acquisition unit 810 is configured to: acquire image features and / or audio features associated with the game image before identifying at least one character and the starting character orientation of each character in the game image, when the game image is a game start image; determine the similarity between the image features and / or audio features and pre-stored start standard features; and determine the game image as a game start image if the similarity is greater than or equal to a preset matching threshold.
[0078] In some embodiments, the acquisition unit 810 is configured to: determine the bounding boxes of characters in the game image based on an object detection algorithm; determine at least one character based on the distribution location of the bounding boxes and / or the visual features of the characters; and determine the starting character orientation of each character based on the facial region and / or torso region of each character in the at least one character.
[0079] In some embodiments, the conversion unit 820 is configured to: determine a direction mapping relationship based on the real-time character orientation and the starting character orientation of the target character, wherein the direction mapping relationship is used to map the direction operation information in the macro instruction to the absolute direction operation information in the game image; and perform direction replacement on each direction operation information in at least one direction operation information according to the direction mapping relationship to generate at least one actual direction operation information.
[0080] In some embodiments, the conversion unit 820 is configured to: determine a direction mapping relationship based on the direction difference between the real-time character orientation and the starting character orientation when the real-time character orientation is inconsistent with the starting character orientation.
[0081] The methods and apparatus provided in the embodiments of this application have been described above. To implement the functions of the methods provided in the embodiments of this application, the electronic device may include a hardware structure and software modules, and may implement the above functions in the form of a hardware structure, software modules, or a hardware structure plus software modules. One of the above functions may be executed in the form of a hardware structure, software modules, or a hardware structure plus software modules.
[0082] Figure 9 This is a block diagram illustrating an electronic device 900 for implementing the macro instruction processing method described above, according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, computer, messaging device, game console, tablet device, medical device, fitness equipment, personal digital assistant, etc.
[0083] Reference Figure 9 The electronic device 900 may include a communication interface 901, capable of interacting with other devices; a processor 902, connected to the communication interface 901 to enable interaction with other devices, used to execute the methods provided by one or more of the above-described technical solutions when running a computer program; and a memory 903, on which the computer program is stored. Specifically, the specific processing procedure of the processor 902 can refer to the macro instruction processing method described in the above embodiments of this disclosure.
[0084] Of course, in practical applications, the various components in electronic device 900 are coupled together through bus system 904. It can be understood that bus system 904 is used to realize the connection and communication between these components. In addition to a data bus, bus system 904 also includes a power bus, a control bus, and a status signal bus. However, for the sake of clarity, in... Figure 9 The general designated all buses as Bus System 904.
[0085] The memory 903 in this embodiment is used to store various types of data to support the operation of the electronic device 900. Examples of such data include any computer program used to operate on the electronic device 900.
[0086] The methods disclosed in the embodiments of this application can be applied to processor 902, or implemented by processor 902. Processor 902 may be an integrated circuit chip with signal processing capabilities. In the implementation process, each step of the above method can be completed by the integrated logic circuit of the hardware in processor 902 or by instructions in the form of software. The processor 902 may be a general-purpose processor, a digital signal processor (DSP), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Processor 902 can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of the methods disclosed in the embodiments of this application can be directly manifested as being executed by a hardware decoding processor, or being executed by a combination of hardware and software modules in the decoding processor. The software modules may be located in a storage medium, which is located in memory 903. Processor 902 reads the information in memory 903 and combines its hardware to complete the steps of the aforementioned method.
[0087] In an exemplary embodiment, the electronic device 900 may be implemented by one or more application-specific integrated circuits (ASICs), DSPs, programmable logic devices (PLDs), complex programmable logic devices (CPLDs), field-programmable gate arrays (FPGAs), general-purpose processors, controllers, microcontrollers (MCUs), microprocessors, or other electronic components to perform the aforementioned method.
[0088] Embodiments of this disclosure also provide a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the macro instruction processing method described in the above embodiments of this disclosure.
[0089] Embodiments of this disclosure also provide a computer program product, including a computer program that is executed by a processor using the macro instruction processing method described in the above embodiments of this disclosure.
[0090] Embodiments of this disclosure also propose a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processor, cause the electronic device to perform the macro instruction processing method described in the above embodiments of this disclosure.
[0091] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0092] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0093] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0094] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other system that can fetch and execute instructions from, an instruction execution system, apparatus, or device). For the purposes of this specification, "computer-readable medium" can be any means that can contain, store, communicate, propagate, or transmit programs for use by, or in conjunction with, an instruction execution system, apparatus, or device. More specific examples (a non-exhaustive list) of computer-readable media include: an electrical connection having one or more wires (control method), a portable computer disk drive (magnetic device), random access memory (RAM), read-only memory (ROM), erasable and editable read-only memory (EPROM or flash memory), fiber optic devices, and portable optical disc read-only memory (CDROM). Furthermore, computer-readable media can even be paper or other suitable media on which programs can be printed, because programs can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpreting, or otherwise processing as necessary, and then stored in computer memory.
[0095] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0096] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0097] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0098] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. A macro instruction processing method, characterized in that, include: In response to a macro command triggered by a user for a target character, at least one directional operation information from the macro command is obtained; Based on the real-time orientation of the target character, the at least one directional operation information is converted into at least one actual directional operation information that is adapted to the real-time orientation of the character, so as to control the target character to perform game actions according to the at least one actual directional operation information.
2. The method according to claim 1, characterized in that, Before obtaining at least one directional operation information from the macro command triggered by the user for a target character, the method includes: Capture game images during gameplay; In the case that the game image is the game start image, at least one character and the starting character orientation of each of the at least one character are identified from the game image, wherein the at least one character includes the target character; Based on the updated game image during the game process, the starting character orientation is updated to obtain the real-time character orientation of at least one character.
3. The method according to claim 2, characterized in that, Before identifying at least one character and the starting character orientation of each of the at least one character from the game image when the game image is a game opening image, the method includes: Obtain image features from the game image and / or audio features associated with the game image; Determine the similarity between the image features and / or the audio features and pre-stored opening standard features; If the similarity is greater than or equal to a preset matching threshold, the game image is determined to be the game's starting image.
4. The method according to claim 2, characterized in that, The step of identifying at least one character from the game image and the starting character orientation of each of the at least one character includes: Based on the object detection algorithm, the bounding boxes of the characters in the game image are determined; The at least one character is determined based on the distribution of the character bounding box and / or the character's visual features; Based on the facial and / or torso regions of each of the at least one character, determine the starting character orientation of each character.
5. The method according to claim 1, characterized in that, The step of converting the at least one directional operation information into at least one actual directional operation information adapted to the real-time character orientation based on the target character's real-time character orientation includes: Based on the real-time character orientation and the target character's starting character orientation, a direction mapping relationship is determined. This direction mapping relationship is used to map the direction operation information in the macro instruction to the absolute direction operation information in the game image. According to the stated direction mapping relationship, direction replacement is performed on each direction operation information in the at least one direction operation information to generate the at least one actual direction operation information.
6. The method according to claim 4, characterized in that, The step of determining the direction mapping relationship based on the real-time character orientation and the target character's initial character orientation includes: If the real-time character orientation is inconsistent with the starting character orientation, the orientation mapping relationship is determined based on the orientation difference between the real-time character orientation and the starting character orientation.
7. A macro instruction processing device, characterized in that, The device includes: The acquisition unit is used to acquire at least one directional operation information from the macro command triggered by the user for the target character. The conversion unit is used to convert the at least one directional operation information into at least one actual directional operation information adapted to the real-time character orientation of the target character, so as to control the target character to perform game actions according to the at least one actual directional operation information.
8. An electronic device, characterized in that, include: The processor and the memory used to store computer programs that can run on the processor. When the processor is used to run the computer program, it performs the method according to any one of claims 1 to 6.
9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the method according to any one of claims 1 to 6.
10. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the method according to any one of claims 1 to 6.
