Game resource interaction method and device, equipment and medium
By responding to interactive request events in the game to capture and convert the screen into encoded graphic materials, the problems of wasted computing resources and interrupted experience in game resource sharing are solved, and efficient resource management and seamless social interaction are achieved.
Patent Information
- Application Number
- CN202511926921.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-19
- Publication Date
- 2026-02-10
AI Technical Summary
Existing technologies require external programs to continuously record during resource sharing and interaction in games, leading to unnecessary consumption of computing resources and storage space. Furthermore, the generated video files are separated from the game application's data system, resulting in game experience interruptions and low resource management efficiency.
By responding to interactive request events during gameplay, event-driven screen capture is initiated according to preset recording rules, generating scene recording videos, which are then converted into coded graphic materials and attached to the instant messaging resource library. This achieves seamless integration into the game's social data ecosystem, enabling direct resource sharing within the game.
It reduces unnecessary computing resource consumption, avoids storage space waste, optimizes system resource management, realizes seamless resource sharing and efficient social interaction within the game, and enhances the continuity of the game experience and social functionality.
Smart Images

Figure CN121490403A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of game interaction technology, and in particular to a game resource interaction method, apparatus, device, and medium thereof. Background Technology
[0002] In current video games, especially massively multiplayer online role-playing games (MMORPGs), players not only experience the game world but also have social needs. Since players often want to save and share exciting moments from their gameplay, such as difficult maneuvers or unique landscapes encountered, a common approach is to utilize general-purpose computing platform functions outside the game application. For example, players might launch standalone screen recording software or call underlying operating system services to capture the game window. Technically, this requires the recording program to run continuously and process all video stream data, regardless of whether the content pertains to a specific event the player intends to save. This results in prolonged and unnecessary occupation of computing resources and storage space. Furthermore, the generated video files, as independent general-purpose media data, are stored in a public directory of the device's file system, separate from the game program's internal logic and data management system. When players want to share beautiful scenery or exciting gameplay moments, they need to pause or exit the game, locate the target file in the file system, and then send it through another standalone instant messaging or social application. This involves multiple switching between different application processes and data transfer, disrupting the continuity of the gaming experience.
[0003] Therefore, existing technical solutions still have certain technical limitations in realizing resource sharing and interaction within games. Summary of the Invention
[0004] The purpose of this application is to solve the above-mentioned problems by providing a game resource interaction method and corresponding apparatus, devices, non-volatile readable storage media, and computer program products.
[0005] According to one aspect of this application, a game resource interaction method is provided, comprising: In response to an interactive request event, the game scene is recorded according to the preset recording rules associated with the event, resulting in a recorded video of the scene. The recorded video of the scene is converted into encoded graphic material and attached to the current player's instant messaging resource library; In response to a resource reference command triggered by the current player's interactive interface in the current game scene, the coded graphic material in the instant messaging resource library is displayed in the interactive interface for the current player to reference.
[0006] According to another aspect of this application, a game resource interaction device is provided, comprising: The event response module is configured to respond to interactive request events, and start recording the game scene according to the preset recording rules associated with the event to obtain the scene recording video; The material conversion module is configured to convert the recorded video of the scene into encoded graphic materials and attach them to the current player's instant messaging resource library; The resource interaction module is configured to respond to resource reference commands triggered by the current player's interactive interface in the current game scene, and to display the coded graphic materials in the instant messaging resource library for the current player to reference in the interactive interface.
[0007] According to another aspect of this application, a game resource interaction device is provided, including a central processing unit and a memory, wherein the central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method described in this application.
[0008] According to another aspect of this application, a non-volatile readable storage medium is provided, which stores a computer program implemented according to the game resource interaction method in the form of computer-readable instructions, wherein the computer program, when invoked by a computer, executes the steps included in the method.
[0009] According to another aspect of this application, a computer program product is provided, comprising a computer program / instructions that, when executed by a processor, implement the steps of the method.
[0010] This application enables an event-driven and targeted screen capture mechanism by responding to specific interactive request events that occur during gameplay and initiating recording of game scene footage according to preset recording rules associated with those events. This overcomes the technical limitations of traditional solutions that rely on external programs for continuous, all-day recording. It triggers recording operations only when preset conditions are met, thereby significantly reducing the continuous occupation of computing processors, graphics processors, and memory resources when recording unnecessary game footage. It also avoids the waste of storage space caused by generating a large amount of invalid video data, achieving more efficient and precise scheduling and management of system resources.
[0011] Secondly, this application converts the recorded scene videos into encoded graphic materials in a specific format and attaches them to the player's exclusive instant messaging resource library integrated within the game system. This transforms dynamically generated game content into structured data objects that can be directly recognized and managed by the game's internal communication system. This changes the traditional approach where video data is stored independently in an external file system and separated from the game application's data system. It allows exciting moments generated within the game to be seamlessly integrated into the game's own social data ecosystem. As a result, when players intend to share, they do not need to leave the game or manually switch and move files between different applications. This simplifies the operation path from content generation to sharing preparation and ensures the continuity of the game experience.
[0012] Furthermore, by responding to resource reference commands triggered by the player in the game's interactive interface and directly displaying coded graphic materials attached to the instant messaging resource library within that interface for the player to reference, this application introduces a more integrated dynamic content interaction method for in-game social interaction. This allows players to directly and conveniently reference and share dynamic visual materials representing highlights or unique experiences of their gameplay in in-game chats or even in social scenarios such as game communities within the same ecosystem. This not only greatly enriches the information dimensions and expressiveness of in-game social interaction and enhances the functionality and attractiveness of the in-game social system, but also avoids problems such as game lag or even crashes caused by players switching between various processes. As a result, it also provides players with a more intuitive, immersive, and contextualized game interaction experience. Attached Figure Description
[0013] Figure 1 This application provides an exemplary network architecture; Figure 2 This is a flowchart illustrating one embodiment of the game resource interaction method of this application; Figure 3 This is a schematic diagram of the game resource interaction device of this application; Figure 4 This is a schematic diagram of the structure of a game resource interaction device used in this application. Detailed Implementation
[0014] The technical solution of this application can be widely applied to various network architectures to adapt to different types and scales of game applications. In a network architecture such as... Figure 1In the typical network architecture shown, the player's terminal device accesses the game service cluster via the network. This cluster consists of multiple game servers 81. A microservice architecture manages and maintains the operational resources of these game servers 81, providing multiple service instances. Each service instance is responsible for a different service. For example, some service instances can be used to maintain the front-end service for the terminal device 80 to access the game, while others can each be responsible for the gameplay service of one or more maps in the game's world map, providing players with corresponding map dungeon gameplay. The player's terminal device 80 has a computer program product installed and running according to the character interaction control method of this application, or the terminal device can be connected to a cloud server container, where the computer program product runs. After the computer program product runs, it accesses the game service cluster, enabling the player to control their in-game character through the terminal device, interact with various service instances of the game, and explore and interact with different maps.
[0015] Each service instance can maintain a real-time connection with the player's terminal device 80 via the network, handling various events and interactions in the game, such as player character movement, attacks, and item usage. The server provides necessary data support to the terminal device to ensure smooth game operation. This data includes, but is not limited to, map model datasets, which contain map model data for each map and resource model data for its scene resources, such as buildings, player character models, non-player character models, and various other creature or non-creature models, used by the terminal device 80 to render and generate corresponding real-time images. Based on the received map model dataset, the terminal device 80 can generate high-quality real-time images and display them in the graphical user interface, presenting the corresponding game scene to the player. Players obtain visual information about the game through real-time images of the game scene, thereby implementing gameplay.
[0016] This application not only applies to the gaming experience for single players but can also be extended to multiplayer online game environments. In multiplayer games, multiple players' (users') terminal devices simultaneously connect to the game service cluster. Each service instance needs to handle interaction requests from multiple players and update the game status in real time. This application ensures that each player receives consistent and high-quality character interaction control in multiplayer game scenarios, while optimizing the resource utilization of servers and terminal devices and improving the overall operational efficiency of the game system.
[0017] In an exemplary application scenario of this application, consider a massively multiplayer online role-playing game (MMORPG) where players can freely explore a vast open-world map and control their character to enter various specific dungeon maps to complete quests. In this game, the player character can frequently switch between different maps, such as switching from a bustling city map to a mysterious dungeon map, or from one room to another.
[0018] This application can be deployed in various application systems with interactive virtual environments. Typical application scenarios include massively multiplayer online role-playing game clients, virtual reality experience platforms, or social simulation applications. In a common network architecture, the game system consists of a client running on the user's terminal device and a server connected to the network. The two work together to complete data processing and interaction logic. The client is mainly responsible for presenting the virtual scene, responding to real-time user operations, and performing localized media capture and processing tasks. The server is responsible for managing user account data, storing and synchronizing user-generated media resources, and coordinating social interaction events among multiple users. Through this division of labor and collaboration between the client and server, the game system can provide users with an integrated, complete process from content generation to social sharing that can be completed within the virtual environment.
[0019] In one exemplary implementation of this application, when a user explores or engages in combat within a virtual environment, the client program continuously runs and listens for specific game events. Once preset conditions are met, it initiates an efficient media capture process based on associated rules. This process acquires synchronized audio-visual data from the rendering pipeline and audio engine, and processes it to form a structured media file. This media file is then converted into a format suitable for circulation and display within the application and linked to the user's social resource account. The user can then directly browse, select, and share these resources in the in-game chat interface or on community platforms, without needing to switch to other external applications.
[0020] The game information interaction method provided in this application can be specifically implemented in a virtual communication program integrated within the game world, such as a tool called "Feixun." This program allows player characters to communicate with non-player characters or other real player characters within the game. The program's interactive interface mainly includes a communication list window and a chat content window. The communication list window dynamically displays all chat objects that have had communication records with the player, including individual characters or groups. Each chat object and its corresponding multiple independent chat records are stored and managed separately. The list is dynamically sorted according to the time of the most recently received message, with the most recently interacted chat object displayed at the top. Players can select and expand a specific chat record with a chat object to view and interact with. The chat content window is the main area for dialogue interaction, where the message content of both parties is arranged on opposite sides. For example, the messages of other characters are displayed on the left, and the messages of the player-controlled character are displayed on the right. The message content can include various forms such as text, images, and emoticons. When players trigger resource referencing commands during chat, such as clicking a special function button next to the chat input area, they can retrieve and display coded graphic materials already attached to the instant messaging resource library, thus referencing and sending a game video as special message content. The message sending and notification mechanism is implemented in several ways: one is ordinary SMS sending, which only displays a new message notification bubble with a duration at the interface entry point, which players can choose to click to view; another is FeiXun sending, which forces the chat interface to open, directly guiding players to a specified chat context. Furthermore, players can personalize the interface by changing the retrieved chat bubbles and chat background styles for different chat partners or chat logs through the settings interface. The operation of the entire communication system relies on chat log management rules configured in the background. These rules are linked to chat partner information, each chat message content and its logical connections, and manage the jump relationships between chat logs and other game function modules.
[0021] In one exemplary implementation of this application, event-driven recording refers to a mechanism that triggers the media capture process based on specific interactive events occurring in the virtual environment, such as achieving a challenge or encountering a special landscape. Its advantage lies in its ability to achieve precise resource scheduling. A circular memory buffer is an efficient memory management structure used for temporarily caching continuous frame data, often used to implement backtracking or fixed-duration recording. Video encoding and packaging refers to the technical process of compressing and packaging raw image and audio data into a specific format file for storage and transmission. Resource identification and linking refers to assigning a unique identifier to each generated media file and associating it with the user's social resource library within the system, thereby enabling rapid resource retrieval and access. Interactive interface integration refers to the technology of embedding the aforementioned media resources as visual controls into the application's existing user interface, such as chat windows and community feeds, allowing users to view and share resources without interrupting the main experience.
[0022] After providing a general overview of the exemplary network architecture and application scenarios of this application, as well as some basic concepts, the following will continue to describe several specific embodiments of this application.
[0023] Please see Figure 2 The game resource interaction method of this application, in some embodiments, includes the following steps: Step S3100: In response to the interaction request event, start recording the game scene screen according to the preset recording rules associated with the event to obtain the scene recording video.
[0024] During game operation, various command signals are generated. When a player performs a series of actions that indicate they want to start recording the current game scene, an interaction request event is generated. This event can be triggered directly by the player, such as pressing a specific function key or key combination on the keyboard, or clicking a dedicated record button on the game interface. Alternatively, the event can be automatically triggered by the game system based on its internal logic; for example, when the system detects that a player has completed a difficult series of actions in combat, or reached a specific geographical location, it will automatically generate a recording request. Regardless of the source, the event will contain event type information to distinguish its category.
[0025] Recording rules can be a series of pre-configured instructions bound to specific types of interactive request events, allowing for precise control over various parameters of the recording behavior. Recording rules can include the total recording duration, such as a fixed duration starting from the event trigger or a combination of durations covering periods before and after the event trigger; they can also include specific parameters such as video frame size, frame rate per second, video compression format, whether to record audio simultaneously, and audio encoding format. In actual deployment, a rule base is maintained, mapping different event types to different parameter combinations. When an interactive request event arrives, the game system can query this rule base based on its event type to determine the specific rules to follow for this recording.
[0026] Based on the matched recording rules, the game system can begin recording the currently displayed game scene. This process essentially involves continuously capturing consecutive images generated by the game's graphics rendering system. There are several ways to achieve this image capture; for example, it can obtain image data by calling the game engine's built-in image capture interface, or it can intercept and copy frame buffer data sent to the display device. The game system controls the start and end of recording according to the time parameters set in the rules. For instance, if the rules require recording the scene ten seconds after an event is triggered, it will start continuously capturing every frame within those ten seconds when the event is triggered. If the recording rules enable audio recording, the game system will synchronously acquire audio data from the game's audio output channel, ensuring precise time alignment between the sound and the visuals.
[0027] After the recording process is complete, the game system integrates the collected continuous image frames with synchronized audio data to generate the final scene recording video. One specific method is to perform real-time compression encoding during recording, that is, to capture the picture and sound while using a hardware or software encoder to convert them into a specified video format data stream; or, to temporarily store all data in the original format or a lightly compressed format, and then start an encoding task after the recording phase is completely finished to process the temporarily stored data in batches into the final video file. After the final recording is completed, the corresponding output is a scene recording video corresponding to an independent video data unit containing the game's audiovisual content within a specified time period. It can be represented as a standard video file in the file system, or as a data block in the application's memory that can be directly processed.
[0028] Step S3200: Convert the scene recording video into encoded graphic material and attach it to the current player's instant messaging resource library.
[0029] After generating the original scene recording video, secondary processing is required to adapt its format, size, and structure to the display and transmission requirements of the game's in-game real-time communication system. In this application, coded graphic material is a dynamic media resource that has undergone specific encoding processing and can be directly parsed and rendered by the game chat window or social interface. The purpose of this conversion is to transform the scene recording video, originally an independent file, into a standardized data object that can be seamlessly embedded into the game's social interaction flow. The conversion of the scene recording video can involve transcoding and repackaging the original video, i.e., reading the scene recording video data, using different compression algorithms or parameters to compress it again to reduce file size, and then packaging it into a container format well-supported by the game's embedded player. Alternatively, it can involve adding specific header information or metadata tags while retaining the original video encoding, making it recognized by the game system as a dedicated graphic material resource. Different conversion processes can include adjusting the video resolution to fit the preview size of the chat window, or separating or converting the video's audio track into text description information for selective loading, thereby obtaining the converted coded graphic material.
[0030] In this embodiment, the instant messaging resource library is a logical collection of media resources integrated into the game system and built independently for each player. It is essentially an index database used to manage various social media materials that players have the right to access, such as emoticons, screenshots, and coded graphic materials described in this application. This resource library can be physically stored in a specific directory on the player's local device and managed by the game client; or it can be stored on the game server and uniquely bound to the player's account identity.
[0031] After acquiring the coded graphic assets, they can be further integrated into the player's instant messaging resource library, making them part of the library's management system. This allows players to browse, select, and use them within the game's communication interface. The integration process involves storage and index registration. First, storage involves placing the converted coded graphic asset file in a physical or logical storage location managed by the resource library. For example, it could be saved locally to a folder named "Interactive Video Assets" or uploaded to a dedicated storage space under the player's account on the server. Second, index registration involves generating a unique resource identifier for the asset and recording this identifier along with the player's account information, the asset's storage path, thumbnail, and relevant descriptive information in the resource library's index list. Once integrated, when a player opens the in-game friend chat window or community posting interface, the game system can query the resource library's index to present the user's coded graphic assets in a list or thumbnail format for selection and sending. Through this conversion and integration process, a video recording gameplay is effectively integrated into the game's social ecosystem.
[0032] Step S3300: Respond to the resource reference command triggered by the current player's interactive interface in the current game scene, and display the coded graphic material in the instant messaging resource library in the interactive interface for the current player to reference.
[0033] In this embodiment, a resource reference command is a command generated by the player through a specific operation within the interactive interface of the game scene. Its purpose is to request the game system to call upon and prepare to use a specific coded graphic asset stored in the instant messaging resource library. The interactive interface can be a built-in chat window, a community posting panel, or any graphical user interface that allows social interaction. The operation that triggers the resource reference command can be: the player clicks a virtual button designed as a camera or video icon next to the chat input box; the player can open a sidebar called "My Videos" in the interactive interface and select an item from the displayed resource list using a mouse or touchscreen; or the player can directly access the resource selection menu using a keyboard shortcut. Each triggered resource reference command can carry a unique resource identifier or other index information for the target coded graphic asset to allow the game system to locate it.
[0034] Upon receiving a resource reference command, the game system immediately parses it, extracts the identifier information of the requested material, and then queries the instant messaging resource library based on this identifier. The instant messaging resource library can retrieve records in its index database that are associated with the current player account and match the identifier based on the query conditions, thereby obtaining the storage location of the corresponding coded graphic material or directly loading its data. If the resource library is located locally, the material file is read from a dedicated local folder; if the resource library is located on a server, the client sends a request to the server and downloads the preview data or complete data of the material, thereby ensuring that the requested coded graphic material can be quickly located and ready. Next, the loaded coded graphic assets can be displayed within the current interactive interface. The purpose of this display is to present the asset content in an intuitive and visual way for players to browse and confirm. Specific implementations could include dynamically inserting a rectangular preview area above or near the chat input box, displaying a thumbnail of the asset or automatically looping a short, silent preview animation; alternatively, a small floating window can temporarily pop up in the interface, embedding a simple media player that allows players to directly control playback, pause, and view the full content of the asset; or the corresponding item can be highlighted and displayed with a larger preview image directly in the asset selection list of the interactive interface. Furthermore, the display process ensures that the asset content is rendered in a size and format suitable for the interface layout, for example, adjusting the resolution of the video preview to match the interface design, or extracting keyframes from the asset as static covers.
[0035] After the coded graphic asset is displayed, the game system provides an interactive entry point for the current player to reference it. This allows the player to formally incorporate the displayed asset into the current interactive context through subsequent actions, such as attaching it to a message to be sent. Specifically, players can directly click the "Quote" or "Send" button next to the display area, and the game system will automatically insert the asset's identifier or embedding code into the message editing box. Players can also drag and drop the displayed preview image to the message input area and release it; the referencing is completed upon recognizing the drag-and-drop action. In addition, some quick options are provided while displaying the asset, such as "Share to Chat" or "Add to Post," which associate the asset with the currently edited content. Once the referencing operation is complete, the coded graphic asset becomes part of the message or post the player is preparing in this interactive interface, allowing players to easily share previously recorded game video content without leaving the game scene.
[0036] As demonstrated by the above embodiments, by initiating recording in response to specific interactive request events during gameplay, event-driven precise image capture can be achieved. This avoids the unnecessary consumption of computing resources and storage space caused by continuous global recording in traditional solutions, thereby optimizing the allocation and utilization efficiency of system resources. Furthermore, by converting the recorded video into coded graphic materials suitable for the game's internal communication system and linking it to the player's instant messaging resource library, dynamically generated game content can be directly integrated into the game's own social data system. This eliminates the burden of manually switching and transferring files between different applications, ensuring the continuity of the game experience. Moreover, when a player triggers a resource reference command in the game's interactive interface, the game system can directly display and allow the player to reference these materials, thereby achieving seamless sharing and interaction of dynamic visual content within the game. This enriches the information carrying forms of in-game social communication while also enhancing the convenience and immersion of social interaction.
[0037] Based on any embodiment of the method in this application, the scene recording video is converted into encoded graphic material and attached to the current player's instant messaging resource library, including: Step S3110: Encode and compress the scene recording video to generate an intermediate video stream, and encapsulate the intermediate video stream into a specified encapsulation format suitable for embedded playback in an instant messaging interface to obtain the corresponding encoded graphic material.
[0038] For the already generated scene recording videos, further processing is needed to convert them into encoded graphic materials corresponding to a media resource format that is easier to circulate and use in the game's in-game communication environment. Scene recording videos contain unoptimized or only partially processed audiovisual content, and their data volume and encoding methods may not be suitable for fast loading and network transmission. Therefore, encoding compression is the first step. Encoding compression is a process of reducing video data volume using specific algorithms. Its purpose is to reduce the size of the video file while maintaining acceptable visual quality, facilitating subsequent fast uploading, downloading, and instant loading in chat windows. For example, the game system can use a more efficient video encoding standard, achieving compression by adjusting the image group structure, optimizing motion prediction, and reducing redundant information; it can also scale the resolution of the original video proportionally to a smaller size based on the size of the instant messaging interface preview area. This compression process produces a smaller data sequence, but one that does not yet contain a complete file structure; this data sequence is called an intermediate video stream.
[0039] Once the intermediate video stream is obtained, it can be encapsulated into a format suitable for embedded playback within the game's real-time communication interface. Encapsulation involves adding necessary file headers, metadata, and synchronization information to the video stream and, if any, audio stream, organizing them into a single, standard file. The specified encapsulation format refers to a container format that the game's embedded media playback component can directly recognize and decode, such as a widely supported general format or a custom format defined by the game engine. The encapsulation process ensures that the video file can be directly accessed and rendered by the game's chat window or other social interfaces without relying on an external player. Thus, through the aforementioned encoding compression and format encapsulation processes, the scene recording video, originally the raw recording product, is transformed into a compact and format-compatible coded graphic resource, ready to be integrated into the game's social resource system for players to use during communication.
[0040] Step S3120: Generate a resource identifier for the coded graphic material, and associate the resource identifier with the corresponding coded graphic material in the instant messaging resource database according to the current player's account identifier.
[0041] In this embodiment, the resource identifier is a unique string or number sequence automatically generated by the game system, similar to an ID number for the resource in the database. There are several ways to generate this identifier; for example, it can be calculated using a hash algorithm based on the current timestamp, player account information, and a random number; alternatively, the database can directly assign an auto-incrementing sequence number when inserting a new record. The purpose of generating the resource identifier is to accurately and efficiently locate the specific resource in all subsequent retrieval, retrieval, and management operations, avoiding confusion or incorrect referencing.
[0042] The current player's account identifier is a unique credential used to distinguish different users in the game, such as user ID or character ID. When storing the data, the game system will strongly associate the resource identifier generated in the previous step with the account identifier of the player currently performing the operation. This association clarifies the ownership of the coded graphic material and ensures that each player can only access and manage the resources under their own name.
[0043] The instant messaging resource database is a system within the game used to centrally store and manage all socially related media resources. It can be a relational database table or a key-value store. Association-based storage refers to persistently saving the coded graphic material itself or its final storage path, along with the material's resource identifier, the player's account identifier, and other possible metadata such as generation time, video duration, and thumbnail, as a complete record in the database. For example, the game system creates a table named "Player Video Resources" in the database, where each record contains fields such as "Resource ID," "Player ID," and "Video File Path." Newly generated material information is inserted as a new record into this table.
[0044] By encoding, compressing, and encapsulating the scene recording video data through the above-described methods, this embodiment can transform the original video into smaller, uniformly formatted encoded graphic materials. This reduces bandwidth consumption and latency during network transmission and local loading, enabling smooth embedding and playback within the instant messaging interface. Furthermore, a unique resource identifier is generated for each encoded graphic material and associated with the player's account for storage. A precise and orderly index relationship is established in the instant messaging resource database, allowing the system to efficiently manage and retrieve massive amounts of personalized player video content. This ensures the accuracy and immediacy of resource access during social interactions, laying a solid technical foundation for convenient and efficient sharing of dynamic visual content within the game.
[0045] Based on any embodiment of the method in this application, in response to an interactive request event, recording of the game scene is initiated according to a preset recording rule associated with the event, resulting in a scene recording video, including: Step S3210: Match the target recording rule containing the recording duration parameter from the pre-configured recording rule library according to the event type indicated by the interaction request event.
[0046] When an interaction request event is generated, it carries an event type to distinguish the event category. This type identifies whether the event is a normal recording manually triggered by the player or a specific recording automatically triggered by the system when it detects "perfect parry" or "first arrival at a certain location". The pre-configured recording rule library is a component of the game system. It stores the correspondence between various event types and detailed recording parameters. These rules exist in the form of data structures or configuration files. Each rule explicitly specifies the recording duration, such as "record only 5 seconds after the event is triggered" or "record the content between 2 seconds before and 3 seconds after the event is triggered".
[0047] During the matchmaking process, the game system reads the event type in the current interaction request event and uses it as a query condition to search and compare in the recording rule library. This retrieves the specific rule that is completely bound to that type. The found rule is the target recording rule. For example, when the event type is "discover hidden treasure", the game system will find the rule that is pre-set for that type in the recording rule library. Its content can be defined as "record the screen for 10 seconds before and after the event is triggered".
[0048] Step S3220: Determine the target time period for this screen recording according to the target recording rules, and configure a circular memory buffer based on the recording duration parameter so as to write the game scene screen frame data output by the rendering pipeline into the circular memory buffer for caching in real time within the target time period.
[0049] To transform the matched abstract recording rules into specific executable recording tasks and temporarily save the screen data using an efficient data structure, the game system first calculates the specific start and end times of the recording based on the recording duration parameter in the target recording rule and the precise time of the interaction request event. This interval is the target time period. If the rule requires recording the content from two seconds before to three seconds after the event is triggered, the game system will take the moment the event is triggered as the baseline, look back two seconds as the start time, and extend forward three seconds as the end time, thus defining a target time period of five seconds in total.
[0050] Next, the game system prepares a temporary storage area for the upcoming screen data. To do this, it calculates the total number of frames that need to be cached based on the length of the target time period (the total number of seconds to be recorded) and the game's frame rate, and configures a circular memory buffer in memory accordingly. This buffer is a contiguous data structure whose size is precisely set to accommodate all expected screen frame data within the target time period. Its core feature is that when the buffer is full, new data overwrites the oldest data, thus achieving rolling caching of content for a fixed duration.
[0051] After recording is activated, the game system captures image data frame by frame from the game rendering pipeline in real time. The rendering pipeline is the graphics processing flow that generates the final screen image. Each complete frame output by the pipeline is directly written to the aforementioned circular memory buffer. The writing process is continuous and real-time, ensuring that every frame within the target time period is captured and saved sequentially. Therefore, the game system does not need to start capturing only at the beginning of recording. Instead, it uses the circular buffer to continuously retain images from the most recent period. When an event is triggered, the frames corresponding to the target time period are already or are being properly cached in memory, thus achieving reliable capture of past moments.
[0052] Step S3230: Based on the frame data cached in the circular memory buffer, generate a scene recording video corresponding to the target time period.
[0053] In this embodiment, the original frame sequences temporarily stored in the circular memory buffer can be combined into a complete video file corresponding to a scene recording video that can be stored and played independently. The frame data stored in the circular memory buffer is written continuously in chronological order and represents a set of images of the game's visual state at each moment within the target time period. This frame data exists in its original or lightly compressed format and awaits further processing.
[0054] First, the buffer needs to be read. The game system accurately calculates the corresponding frame range based on the start and end points of the target time period and sequentially extracts these consecutive image data from the circular buffer. Due to the circular structure of the buffer, the game system needs to handle potential data overwriting issues to ensure that the complete frame sequence within the correct time interval is read, for example, by locating and verifying each frame using timestamp indexes.
[0055] Next, the extracted frame sequence needs to be converted into a standard video format. First, it is encoded and compressed, that is, the image sequence is compressed into a more compact data stream using video encoding algorithms to reduce the file size. Then, it is encapsulated, specifically, the compressed video stream, along with possibly synchronously recorded audio streams and timecode information, is packaged into a specific format container file, such as a common multimedia format. For example, a game system can call a hardware-accelerated encoder to quickly process frame data and output a video file that can be played directly.
[0056] Ultimately, the output of this process is a scene recording video, which is an independent media file containing all game footage within the target time period. By utilizing a circular buffer, the game system can efficiently and reliably capture and generate a record of the game process at a specified moment.
[0057] The above embodiments provide clear and flexibly definable technical parameters for each recording action by accurately matching preset recording rules based on the type of interaction request event, realizing intelligent triggering and customization of recording operations. Furthermore, by utilizing a circular memory buffer configured according to rules to cache frame data within the target time period in real time, the game system can efficiently and with low latency save crucial game moments, avoiding the enormous memory and storage pressure caused by continuous global recording. Finally, generating scene recording video based on cached data also ensures a fast and reliable conversion from game footage to a complete video file. Thus, the above steps work together to achieve efficient and accurate capture and media encapsulation of in-game events, while further optimizing the efficiency of system resource utilization.
[0058] Based on any embodiment of the method in this application, a scene recording video corresponding to the target time period is generated based on the frame data cached in the circular memory buffer, including: Step S3310: Read the continuous frame data cached within the target time period from the circular memory buffer in chronological order, and align and mix the timestamps of each frame data with the corresponding time period audio data obtained synchronously from the game audio engine.
[0059] When generating scene recording video, the specific process can also involve extracting captured screen data from temporary storage and merging it with corresponding game audio to form a synchronized audio-visual original clip as a generation step. The sequentially cached screen frame data in the circular memory buffer is a series of continuous static images previously saved according to the target time period. The game system reads these frames one by one according to the order in which they were written to the buffer, ensuring that the temporal order of the screen is completely consistent with the original game process. Simultaneously, the game system obtains sound information for the same time period from the game audio engine. The game audio engine is the module responsible for handling all sound playback and mixing within the game; it can provide an audio stream that precisely matches the screen frames. Based on the start and end times of the target time period, the system can request the original audio sample data for the corresponding interval from the audio engine.
[0060] After acquiring the video frames and audio stream, timestamp alignment can be performed. Each frame and each audio segment carries a high-precision timestamp indicating its generation or capture. Alignment involves comparing these timestamps to precisely match video and audio occurring at the same time. For example, the system checks a frame marked "T1" and associates it with an audio sample near the same "T1" time. Finally, a mixing process is performed, which essentially combines the aligned video frame sequence and audio stream into a fully synchronized composite data stream on the timeline. This ensures that the sound and motion in the final video file match precisely, providing a coherent audiovisual experience.
[0061] Step S3320: Call the hardware encoder interface provided by the graphics processor to encode the mixed timestamped audio and video data in real time, and write the corresponding generated scene recording video into the preset storage path.
[0062] Since the mixed, timestamped audio-visual data is a composite data stream consisting of a sequence of video frames and precisely aligned audio samples, its data volume is enormous and uncompressed, making it unsuitable for direct storage or transmission. Converting the synchronized raw audio-visual data into a compact video file allows for persistent storage. The game system can call the hardware encoder interface provided by the graphics processor for real-time encoding. In this embodiment, the graphics processor integrates a dedicated hardware circuit module for video encoding. Its interface allows software to directly send raw data and receive compressed video streams. Calling this interface means the game system sends the audio-visual data stream to the graphics processor's dedicated encoding unit, utilizing its fixed hardware logic for high-speed compression operations. For example, it converts continuous image sequences into compressed video streams that eliminate redundancy through inter-frame prediction. This hardware encoding process significantly reduces the CPU load and dramatically increases encoding speed compared to software encoding. The encoding process is performed in real-time; while raw data is input, compressed video data packets are output simultaneously. These data packets are received and combined sequentially to generate a complete scene recording video that conforms to a specific encoding standard's encapsulation format.
[0063] Finally, the game system writes the newly generated scene recording video data to a preset storage path. This storage path can be a predetermined location in the file system, such as a dedicated directory within the game application's sandbox. The writing operation involves creating or opening a video file at that path, continuously writing the video data stream output by the encoder to that file, and closing the file after completion to ensure data integrity. Once the writing is complete, a synchronized audio-visual video file recording the game process for the target time period is officially saved in the device's storage.
[0064] The synergistic effect of the above embodiments ensures strict audio-visual synchronization of the captured game scene by accurately reading frame data from the circular memory buffer and aligning and mixing it with the corresponding audio obtained from the game audio engine, thereby generating a high-quality audio-visual synchronized raw data stream. Further, the hardware encoder interface of the graphics processor is invoked to encode this data stream in real time, reducing the computational load on the system's main processor during video compression and improving encoding speed, achieving efficient and low-latency video file generation. Finally, the encoded scene recording video is directly written to a preset storage path, ensuring not only secure and persistent storage of video data but also providing a reliable and standardized data source for potential instant access, conversion, and sharing needs. This collectively guarantees a fast and smooth conversion from real-time game footage to high-quality video files.
[0065] Based on any embodiment of the method in this application, prior to the step of responding to the interaction request event, the method includes: Step S3410: Continuously monitor at least one video recording event triggered within the game application process. When the video recording event is detected, obtain the context state data associated with the event.
[0066] In this embodiment, a video recording event refers to a signal triggered during the operation of the game application by the fulfillment of specific conditions or user actions. This signal signifies the initiation of a recording request. The game system continuously monitors the occurrence of such events through a resident background listening service or inspection logic integrated into the main game loop. The objects being monitored can be diverse, such as a player's click command via a virtual button on the graphical user interface, the pressing of a preset keyboard shortcut, or a condition met by internal game logic, such as defeating an enemy in a specific way during combat. Once one of these predefined conditions occurs, the corresponding video recording event is triggered.
[0067] Once the monitoring mechanism detects a video recording event, the game system immediately enters the information gathering phase. Contextual state data refers to a series of instantaneous information closely related to the current state of the game at the moment the event is triggered. Acquiring contextual state data is crucial for accurately recording the background of the event, allowing subsequent steps to be processed based on the complete context. This data can originate from various management modules of the game engine, such as obtaining the player's current position coordinates and orientation from the character controller, querying the progress of ongoing tasks from the task manager, or extracting combat information such as the opponent's health and skills used from the combat system. By accessing the public interfaces of these modules or querying internal state variables, relevant data snapshots are collected, forming a complete contextual description of "when, where, and what happened," providing a basis for decisions regarding whether and how to record.
[0068] Step S3420: Parse the context state data according to the preset condition judgment logic, so as to generate the interaction request event containing the corresponding event type when it is determined that the condition for generating the interaction request event is met.
[0069] The collected contextual state data can be analyzed to determine whether to initiate a formal recording process. The pre-defined conditional judgment logic can be a series of evaluation rules predefined within the game system. These rules constitute the decision criteria for determining whether a video recording event is valuable enough to be converted into a formal recording task. The game system takes the previously acquired contextual state data as input and feeds it into this logic for evaluation. The parsing process involves the game system checking each item of the contextual data according to the rules in the conditional judgment logic. For example, one rule might check if the player is located in a specific scenic area, while another rule might determine if a specific advanced technique was triggered three times consecutively during combat. The corresponding rules can be simple Boolean judgments or complex expressions calculated based on multiple variables. The game system executes these rules to determine whether the currently captured video recording event meets more specific recording conditions, such as whether the event is sufficiently representative or has sufficient viewing value.
[0070] When the parsed conclusions satisfy all or some of the key conditions, the game system determines that an interaction request event needs to be generated. An interaction request event is a more formal and structured internal instruction than the initial video recording event; it signifies that the system has confirmed and approved the recording request. When generating this event, the game system assigns it a specific event type, derived from the conclusion of the conditional judgment logic. This event type precisely identifies the nature of the recording, such as "scenery recording" or "highlights recording." This interaction request event, containing event type information, can then be sent to the subsequent recording processing module, triggering a series of rule-based image capture and video generation operations.
[0071] By continuously monitoring various video recording events triggered within the game application process and acquiring rich contextual state data in real time through the above embodiments, this application establishes a sensitive and comprehensive event perception layer, ensuring that the system can promptly capture all potential recording opportunities. Furthermore, based on preset conditional judgment logic, this contextual data is automatically parsed and filtered, enabling intelligent identification of truly valuable moments worth recording from massive game events. This allows the game system to make accurate recording decisions, generating formal interaction request events only when specific conditions are met. This effectively avoids redundant recording and resource waste caused by arbitrary or invalid triggering, thereby providing a high-quality and highly relevant triggering starting point for subsequent recording processes. This ensures that the final generated video content has high relevance and value, improving the overall system's intelligence level and resource utilization efficiency.
[0072] Based on any embodiment of the method in this application, in response to a resource reference command triggered by the current player's interactive interface in the current game scene, the encoded graphic materials in the instant messaging resource library are displayed in the interactive interface for the current player to reference, including: Step S3510: In response to a reference operation for a material resource detected in a preset input area of the interactive interface, generate the resource reference instruction carrying a target resource identifier.
[0073] The preset input area of the interactive interface refers to a specific interactive component designed to trigger the sharing of special materials within the in-game communication function. Examples include an icon button next to the chat input box, a pop-up list called "My Videos," or a panel area that supports drag-and-drop operations. Referencing a material resource is a specific action performed by the player in this area to express their intention to reference a particular video clip. The specific operation can take various forms, such as clicking a video thumbnail in the material list, long-pressing a material item on the touchscreen and selecting the "Share" option, or dragging a material icon into the chat input box.
[0074] When the system detects such a reference operation through its interface event listening module, it will immediately start the instruction generation process. The game system first parses the specific coded graphic material selected by the player from the interface elements associated with this operation. The target resource identifier of the selected material will be extracted as its unique identity credential. The target resource identifier can also be a unique identification string generated and permanently bound to the coded graphic material.
[0075] The game system then encapsulates the corresponding information into a formatted resource reference instruction. The core of this instruction is the target resource identifier extracted earlier. Its function is equivalent to a command sent to subsequent processing modules, explicitly stating: "The user currently wants to use the asset with identifier XXX." After generating this resource reference instruction, the game system sends it to the next stage responsible for asset acquisition and display, thereby translating the player's interface interaction intent into precisely executable program logic.
[0076] Step S3520: Parse the resource reference instruction to obtain the encoded graphic material associated with the target resource identifier and the current player account identifier from the instant messaging resource library.
[0077] During the parsing of resource reference commands, the game system needs to extract key and valid information, specifically the target resource identifier and the account identifier of the player issuing the command. The current player's account identifier is the core basis for the system to verify resource access permissions. The game system combines the extracted target resource identifier with the current player's account identifier to form a complete query condition. This combined condition clearly identifies "which player" wants to access "which specific resource," thereby ensuring the security and accuracy of resource access and preventing players from unauthorized access to others' private materials.
[0078] The instant messaging resource repository is a centrally managed storage system. Internally, it records the unique identifier of each coded graphic asset, the account identifier of the player to which it belongs, and the actual storage location or data volume of the asset through data structures. The process of retrieving assets is essentially a precise search performed in this resource repository based on query conditions. The game system submits a query request to the resource repository containing the target resource identifier and the player account identifier. The resource repository compares these against its index, searching for records that match both conditions.
[0079] Once a matching record is found, the game system can obtain the corresponding coded graphic material based on the access information stored in that record. The specific method of obtaining the coded graphic material can depend on the architecture of the resource library. If the coded graphic material is directly stored in the database of the resource library, the corresponding data field is read directly. If the resource library only stores the network address or local path of the file corresponding to the coded graphic material, the game system will download it from the remote server or read the file content from the local storage device based on the address or path.
[0080] Step S3530: Load the encoded graphic material into the interactive interface rendering queue of the current game scene, render and output the interface elements corresponding to the encoded graphic material in the designated display area of the interactive interface.
[0081] The game system then needs to visualize the acquired coded graphic assets and integrate them into the player's current game interface. In the specific implementation of the rendering queue for the current game scene, the game system submits the asset data to the graphical user interface management module for preparation before rendering. The rendering queue is a sequence of graphic elements in the game engine used to manage all elements that need to be drawn in the current frame, such as buttons, text, and images. Adding coded graphic assets to this queue means that the game system registers them as an interface object to be drawn and determines their drawing order and hierarchy relative to other interface elements. Next, the game system performs rendering and output operations in a designated display area of the interface. This designated display area is a pre-defined visual area in the interface layout used to present such assets, such as a rectangular preview box in a chat window, the inside of a message bubble, or an independent floating playback panel. The rendering process depends on the type and format of the asset: if the asset is a static preview image, it is directly drawn as a texture map to this area; if the asset is a dynamic video, an embedded media playback component can be called to decode the video data frame by frame and output the image to the corresponding screen space in real time.
[0082] Finally, the rendered image is composited into the game screen, which completes the output of the corresponding interface elements. Players can then see the interface elements representing the coded graphic material at a designated location on the game screen. This interface element can be more than just a static image or dynamic video; it can be an interactive entity, such as having play / pause control buttons or being able to respond to clicks to trigger full-screen playback.
[0083] The embodiments described above, by responding to direct player actions on the interactive interface and generating resource reference instructions carrying precise identifiers, transform the user's sharing intent into a structured request that can be efficiently processed by the system, significantly reducing the complex operational steps required in traditional sharing. Furthermore, the game system parses this instruction and accurately retrieves the corresponding coded graphic materials from the resource library based on the identifier and account information, achieving rapid, secure, and accurate location and retrieval of massive amounts of personalized resources, ensuring the reliability and privacy of resource access. Finally, the retrieved materials are loaded into the rendering queue and rendered in real-time in the designated interface area, allowing dynamic video content to be seamlessly integrated and smoothly displayed in the game's social scenes. This not only enriches the information presentation forms of in-game communication but also provides players with a highly immersive, convenient, and seamless content sharing interaction method.
[0084] Based on any embodiment of the method in this application, rendering and outputting interface elements corresponding to the encoded graphic material in a designated display area of the interactive interface includes: Step S3610: Create a layer independent of the main game scene within the interactive interface, and render the decoded frame data of the encoded graphic material to this layer.
[0085] In this embodiment, the interactive interface is a graphical user interface system whose screen is composed of multiple transparent or opaque layers superimposed together. The independent layer created here is a dedicated graphics layer newly allocated in the interface rendering stack. This layer is independent of the main scene layer that presents the 3D game world in terms of logic and rendering order. The purpose of creating such an independent layer is to ensure that the display of video content does not interfere with the rendering logic of the main game scene. At the same time, by controlling its hierarchical relationship, it can be precisely covered or embedded on interface elements such as chat windows, and avoid visual errors in mixing with 3D objects in the game.
[0086] The encoded graphic material has been prepared in previous steps, but its storage format is usually compressed. In order to display it, it needs to be decoded to restore the original image sequence that can be directly processed by the graphics hardware, i.e., decoded frame data. The corresponding decoding process can be completed by a dedicated media decoding library or the decoding component built into the game engine, which converts the compressed video stream back into a series of continuous bitmap images.
[0087] The game system then renders the decoded frame data frame by frame onto a previously created independent layer, following the inherent temporal order of the video. Rendering refers to the process of filling the screen area corresponding to the layer with a bitmap image. The game system sets a timer to continuously submit the decoded frame image corresponding to the current moment to the graphics interface at a speed matching the video frame rate, drawing it onto the surface of the layer. Thus, the dynamic video content stored in the encoded graphics material is vividly played on this dedicated layer, independent of the game world, in a frame-by-frame refresh manner, providing players with a clear visual medium for watching the video within the interactive interface.
[0088] Step S3620: Render an interactive control layer overlay on the layer, wherein the interactive control layer includes a virtual control for triggering the playback of the encoded graphic material.
[0089] In this embodiment, since the independent layer used to display the video decoding screen forms the basis of the content display, and the interactive control layer superimposed and rendered on top of it is a transparent or semi-transparent graphical layer specifically used to carry interactive elements, these two layers remain logically independent. However, in visual presentation, the interactive control layer will precisely cover a designated area of the video layer, such as the bottom or center of the video screen. The virtual controls contained in the interactive control layer are graphical user interface elements drawn on this layer. Their appearance can be in the form of buttons, sliders, or touch hotspots familiar to players, such as a triangular "play" button located in the center of the video screen, a progress bar, or a volume icon. These controls can be configured not as simple stickers, but as interactive interface objects registered by the system, capable of receiving and responding to user input events, such as mouse clicks, touches, or confirmation commands from a game controller.
[0090] The process of rendering these virtual controls involves the game system drawing corresponding graphics on the interactive control layer based on predefined art resources and layout coordinates, and binding corresponding input event listeners to them. For example, drawing a play button icon at specific coordinates on the layer and notifying the input management module that when the cursor is within this icon area and the user presses the confirmation button, a "play" command should be triggered. By overlaying this interactive control layer and providing intuitive virtual controls, players can control the playback flow of video materials directly through natural operations such as clicking and touching without leaving the current interface or using complex commands, thus transforming a static video display into an interactive multimedia experience with operability.
[0091] Step S3630: In response to the function selection operation for the virtual control, the media playback component in the game scene is invoked to play the encoded graphic material within the area defined by the layer.
[0092] When a player issues a command to a specific graphical element rendered on the interactive control layer via an input device, it is considered a function selection operation for the virtual control. For example, when a player moves the cursor to the area of the "play" button and clicks the left mouse button, or directly clicks the button icon on the touch screen, the game system will capture this interaction and determine that it falls within the effective response area of the virtual control based on the event coordinates, thus confirming that this is a clear function selection operation with the intention of starting playback.
[0093] The media playback component within a game scene can be a software module or engine subsystem integrated within the game application, specifically designed for decoding and presenting audio and video data. It possesses the capabilities to decode mainstream media formats, manage playback timelines, control audio-visual synchronization, and process rendering output. The game system can issue commands to this component, requesting it to take over and process specified encoded graphic materials for use. When issuing the command, the game system explicitly specifies the rendering target area for playback, i.e., the screen space defined by the aforementioned independent layer. This area defines the specific position and size of the video image displayed on the screen. After the media playback component is activated, it initializes based on these area parameters and then begins decoding the encoded graphic materials. The decoding process may involve reading compressed video files and restoring the original image frames and audio samples. Next, the media playback component directly outputs and renders the decoded image frames onto the area defined by the layer, while simultaneously playing the corresponding sound through the audio device. For example, the media playback component will draw the image frame by frame into the corresponding rectangle of the layer according to the video frame rate, thereby achieving smooth playback of the video content within the predetermined interface area. The entire process can be implemented in parallel with the rendering of the main game scene and other interface functions, thus providing users with a seamlessly integrated multimedia interactive experience.
[0094] Through the synergistic effect of the above embodiments, this application can create an independent layer within the interactive interface to render the video decoding screen, achieving non-interference between the main game scene and the display of social content, ensuring the stability of the system's graphics rendering and clear management of the screen hierarchy. Further, by overlaying a control layer with interactive virtual controls on top of the layer, an intuitive and direct operation interface is provided to the user, making video playback control simple and efficient. Finally, by responding to control operations and calling a dedicated media playback component for decoding and output, high-quality and smooth playback of video materials is achieved within a specified area. This collectively constructs a complete embedded multimedia playback and interaction system within the game's social interface, enhancing the user's immersion, ease of operation, and overall smoothness of experience when sharing and watching dynamic content within the game.
[0095] Please see Figure 3According to one aspect of this application, a game resource interaction device includes an event response module 4100, a material conversion module 4200, and a resource interaction module 4300. The event response module 4100 is configured to respond to an interaction request event and, according to a preset recording rule associated with the event, initiate recording of a game scene to obtain a recorded video. The material conversion module 4200 is configured to convert the recorded video into coded graphic materials and attach them to the current player's instant messaging resource library. The resource interaction module 4300 is configured to respond to a resource referencing command triggered by the current player's interactive interface in the current game scene, and display the coded graphic materials from the instant messaging resource library in the interactive interface for the current player to reference.
[0096] Based on any embodiment of the device in this application, the material conversion module 4200 includes: a material acquisition unit, configured to encode and compress the scene recording video to generate an intermediate video stream, encapsulate the intermediate video stream into a specified encapsulation format suitable for embedded playback in an instant messaging interface, and obtain the corresponding encoded graphic material; and an association storage unit, configured to generate a resource identifier for the encoded graphic material, and associate and store the resource identifier with the corresponding encoded graphic material in the instant messaging resource database according to the current player's account identifier.
[0097] Based on any embodiment of the device in this application, the event response module 4100 includes: a rule matching unit, configured to match a target recording rule containing a recording duration parameter from a pre-configured recording rule library according to the event type indicated by the interaction request event; a cache configuration unit, configured to determine the target time period for this screen recording according to the target recording rule, and configure a circular memory buffer based on the recording duration parameter, so as to write the game scene screen frame data output by the rendering pipeline into the circular memory buffer in real time for caching within the target time period; and a video generation unit, configured to generate a scene recording video corresponding to the target time period based on the screen frame data cached in the circular memory buffer.
[0098] Based on any embodiment of the device in this application, the video generation unit further includes: a data synchronization subunit, configured to read consecutive frame data cached within the target time period from the circular memory buffer in chronological order, and to perform timestamp alignment and mixing of each frame data read with audio data of the corresponding time period obtained synchronously from the game audio engine; and a data encoding subunit, configured to call the hardware encoder interface provided by the graphics processor to encode the mixed timestamped audio-visual data in real time, and to write the corresponding generated scene recording video into a preset storage path.
[0099] Based on any embodiment of the device in this application, it further includes: an event listening module, configured to continuously listen for at least one video recording event triggered within the game application process, and when the video recording event is detected to be triggered, to obtain context state data associated with the event; and a condition determination module, configured to parse the context state data according to a preset condition determination logic, so as to generate the interaction request event containing the corresponding event type when it is determined that the condition for generating the interaction request event is met.
[0100] Based on any embodiment of the device in this application, the resource interaction module 4300 includes: an instruction generation unit, configured to generate a resource reference instruction carrying a target resource identifier in response to a reference operation for material resources detected in a preset input area of the interactive interface; an instruction parsing unit, configured to parse the resource reference instruction to obtain the encoded graphic material associated with the target resource identifier and the current player account identifier from the instant messaging resource library; and an element output unit, configured to load the encoded graphic material into the interactive interface rendering queue of the current game scene, render and output the interface element corresponding to the encoded graphic material in a designated display area of the interactive interface.
[0101] Based on any embodiment of the device in this application, the element output unit further includes: a material rendering subunit, configured to create a layer independent of the main game scene within the interactive interface, and render the decoded frame data of the encoded graphic material to the layer; a layer overlay subunit, configured to overlay and render an interactive control layer on the layer, wherein the interactive control layer includes a virtual control for triggering the playback of the encoded graphic material; and a material playback subunit, configured to, in response to a function selection operation for the virtual control, call a media playback component within the game scene to play the encoded graphic material within the area defined by the layer.
[0102] Another embodiment of this application provides a game resource interaction device. For example... Figure 4 The diagram shows the internal structure of a game resource interaction device. This device includes a processor, a computer-readable storage medium, a memory, and a network interface connected via a system bus. The computer-readable, non-volatile storage medium stores an operating system, a database, and computer-readable instructions. The database stores information sequences, and when executed by the processor, these computer-readable instructions enable the processor to implement a game resource interaction method.
[0103] The processor of this game resource interaction device provides computing and control capabilities to support the operation of the entire device. The memory of the device can store computer-readable instructions, which, when executed by the processor, cause the processor to perform the game resource interaction method of this application. The network interface of the device is used for communication with a terminal.
[0104] Those skilled in the art will understand that Figure 4 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the game resource interaction device to which the present application is applied. A specific game resource interaction device may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0105] In this embodiment, the processor is used to execute... Figure 3 The specific functions of each module are described, and the memory stores the program code and various data required to execute the aforementioned modules or sub-modules. The network interface is used to enable data transmission between user terminals or the server. In this embodiment, the non-volatile readable storage medium stores the program code and data required to execute all modules in the game resource interaction device of this application. The server can call the server's program code and data to execute the functions of all modules.
[0106] This application also provides a non-volatile readable storage medium storing computer-readable instructions, which, when executed by one or more processors, cause the one or more processors to perform the steps of the game resource interaction method of any embodiment of this application.
[0107] This application also provides a computer program product, including a computer program / instructions that, when executed by one or more processors, implement the steps of the method described in any embodiment of this application.
[0108] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments of this application can be implemented by a computer program instructing related hardware. This computer program can be stored in a non-volatile readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. The aforementioned storage medium can be a computer-readable storage medium such as a magnetic disk, optical disk, read-only memory (ROM), or random access memory (RAM).
Claims
1. A method for game resource interaction, characterized in that, include: In response to an interactive request event, the game scene is recorded according to the preset recording rules associated with the event, resulting in a recorded video of the scene. The recorded video of the scene is converted into encoded graphic material and attached to the current player's instant messaging resource library; In response to a resource reference command triggered by the current player's interactive interface in the current game scene, the coded graphic material in the instant messaging resource library is displayed in the interactive interface for the current player to reference.
2. The game resource interaction method according to claim 1, characterized in that, The step of converting the recorded video of the scene into encoded graphic assets and attaching them to the current player's instant messaging resource library includes: The video recorded in the scene is encoded and compressed to generate an intermediate video stream. The intermediate video stream is then encapsulated into a specified encapsulation format suitable for embedded playback in an instant messaging interface, thereby obtaining the corresponding encoded graphic material. Generate resource identifiers for the coded graphic materials, and associate the resource identifiers with the corresponding coded graphic materials in the instant messaging resource database based on the current player's account identifier.
3. The game resource interaction method according to claim 1, characterized in that, In response to the interaction request event, the game scene is recorded according to the preset recording rules associated with the event, resulting in a scene recording video, including: Based on the event type indicated by the interaction request event, match the corresponding target recording rule containing the recording duration parameter from the pre-configured recording rule base; The target time period for this recording is determined according to the target recording rules. A circular memory buffer is configured based on the recording duration parameter so that the game scene frame data output by the rendering pipeline is written into the circular memory buffer in real time for caching within the target time period. Based on the frame data cached in the circular memory buffer, a scene recording video corresponding to the target time period is generated.
4. The game resource interaction method according to claim 3, characterized in that, The step of generating a scene recording video corresponding to the target time period based on the frame data cached in the circular memory buffer includes: Read the continuous frame data cached within the target time period from the circular memory buffer in chronological order, and align and mix the timestamps of each frame data with the corresponding time period audio data obtained synchronously from the game audio engine; The hardware encoder interface provided by the graphics processor is called to encode the mixed timestamped audio and video data in real time, and the corresponding generated scene recording video is written to the preset storage path.
5. The game resource interaction method according to claim 3, characterized in that, Prior to the step of responding to the interactive request event, the following are included: Continuously monitor at least one video recording event triggered within the game application process; when the video recording event is detected, obtain the context state data associated with the event. The context state data is parsed according to a preset condition judgment logic, so that when the condition for generating an interaction request event is met, the interaction request event containing the corresponding event type is generated.
6. The game resource interaction method according to claim 3, characterized in that, The response to the resource reference command triggered by the current player's interactive interface in the current game scene, displaying the coded graphic materials from the instant messaging resource library for the current player to reference in the interactive interface, includes: In response to a reference operation for a material resource detected in a preset input area of the interactive interface, a resource reference instruction carrying a target resource identifier is generated; Parse the resource reference instruction to obtain the encoded graphic material associated with the target resource identifier and the current player account identifier from the instant messaging resource library; The encoded graphic material is loaded into the rendering queue of the interactive interface of the current game scene, and the interface elements corresponding to the encoded graphic material are rendered and output in the designated display area of the interactive interface.
7. The game resource interaction method according to claim 6, characterized in that, The step of rendering and outputting the interface elements corresponding to the encoded graphic material in the designated display area of the interactive interface includes: Create a layer independent of the main game scene within the interactive interface, and render the decoded frame data of the encoded graphic material to this layer; An interactive control layer is overlaid and rendered on the layer, wherein the interactive control layer includes a virtual control for triggering the playback of the encoded graphic material; In response to the function selection operation for the virtual control, the media playback component in the game scene is invoked to play the encoded graphic material within the area defined by the layer.
8. A game resource interaction device, characterized in that, include: The event response module is configured to respond to interactive request events, and start recording the game scene according to the preset recording rules associated with the event to obtain the scene recording video; The material conversion module is configured to convert the recorded video of the scene into encoded graphic materials and attach them to the current player's instant messaging resource library; The resource interaction module is configured to respond to resource reference commands triggered by the current player's interaction interface in the current game scene, and to display the coded graphic materials in the instant messaging resource library for the current player to reference in the interaction interface.
9. A game resource interaction device, comprising a central processing unit and a memory, characterized in that, The central processing unit is used to invoke and run a computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 7.
10. A non-volatile readable storage medium, characterized in that, It stores, in the form of computer-readable instructions, a computer program implemented according to any one of claims 1 to 7, which, when invoked by a computer, executes the steps included in the corresponding method.
Citation Information
Patent Citations
Game clip popularity based control
CN105409224A
Multi-scene playback method and device for game
CN112619130A
Game audio processing method and device, storage medium and electronic device
CN115624751A
Game picture processing method and device, computer equipment and storage medium
CN119015697A
Method, device and equipment for sharing information in game and medium
CN119701374A