A game picture acquisition method, device, medium and program product

By automatically identifying and modifying target instructions in the graphics rendering library to create shared texture objects, the problems of long data synchronization time and poor version adaptability in game screen capture are solved, achieving efficient and stable game screen capture.

CN122152537APending Publication Date: 2026-06-05TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
TENCENT MUSIC ENTERTAINMENT TECH (SHENZHEN) CO LTD
Filing Date
2026-04-29
Publication Date
2026-06-05

AI Technical Summary

Technical Problem

In existing technologies, game screen capture methods are time-consuming when synchronizing data across devices, leading to a decrease in game frame rate. Furthermore, frequent manual updates to the graphics rendering library version address make it unable to adapt to new versions, resulting in poor capture stability and reliability.

Method used

By analyzing the instruction sequence of the graphics rendering library through the assembly engine, the target instruction controlling the sharing permissions of texture resources is automatically identified and modified, a shared texture object is created, the game screen is copied in the graphics processor's video memory, and the external process reads it with zero latency.

Benefits of technology

This improved the stability and reliability of game screen capture, avoided manual address updates and frequent version releases, reduced game lag, and increased capture efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122152537A_ABST
    Figure CN122152537A_ABST
Patent Text Reader

Abstract

The application discloses a game picture acquisition method and device, a medium and a program product, and relates to the technical field of computers. The method comprises the following steps: according to the mode characteristics of a target instruction for controlling the sharing permission of a texture resource, an instruction sequence in a graphics rendering library is analyzed by using an assembly engine to identify the target instruction; the target instruction is modified, and a shared texture object is created in the video memory of an image processor after the modification; and a game rendering texture is copied to the shared texture object, so that an external acquisition process can obtain a real-time game picture by accessing the shared texture object. The target instruction for controlling the sharing permission of the texture resource in the graphics rendering library can be automatically located and modified, manual address updating and version updating are avoided, and the stability and reliability of game picture acquisition are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, device, medium, and program product for capturing game screen images. Background Technology

[0002] Game screen capture refers to the real-time capture of image data rendered by the game on the graphics card and its conversion into a video stream suitable for live streaming. Existing technologies primarily employ two methods for game screen capture. One is a synchronous acquisition method; where the live streaming program hooks into the game's rendering function, synchronously copying the screen data from the graphics processor's video memory to system memory after each frame is rendered. However, synchronously acquiring game screen data within the rendering function requires reading data from video memory to system memory, traversing multiple devices, and involves a large amount of data. This results in a long time consumption for each data acquisition, causing a drop in the game's frame rate and resulting in noticeable game stuttering.

[0003] Another approach involves configuring patches to share textures. This involves pre-analyzing different versions of the graphics rendering library (such as d3d9) and recording the addresses that need to be patched for each version—that is, the specific instruction addresses that need to be modified to bypass texture sharing restrictions. At runtime, the program modifies the machine instructions at the corresponding addresses based on the detected d3d9 version, enabling d3d9 to create textures shared across processes. This allows the GPU to directly copy the image to the shared texture, which other processes can then read with zero latency. This method avoids data movement from video memory to system memory, resulting in higher performance. However, because the patch addresses are hardcoded into the program, whenever a new d3d9 version is released, older versions cannot recognize the new addresses that need patching, preventing texture sharing. This necessitates manually re-confirming the new addresses and releasing a new version of the live streaming application. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a game screen capture method, device, medium, and program product that can automatically locate and modify the target instruction controlling texture resource sharing permissions in the graphics rendering library, avoiding frequent manual address updates and version updates, and improving the stability and reliability of game screen capture. The specific solution is as follows: Firstly, this application discloses a method for capturing game footage, including: Based on the pattern characteristics of the target instruction controlling the sharing permissions of texture resources, the assembly engine is used to analyze the instruction sequence in the graphics rendering library to identify the target instruction; The target instruction is modified, and a shared texture object is created in the video memory of the image processor after modification; The game rendering texture is copied to the shared texture object so that an external acquisition process can obtain real-time game footage by accessing the shared texture object.

[0005] Optionally, before the mode feature of the target instruction for controlling texture resource sharing permissions, it further includes: The image capture module is loaded into the target game's process using process injection technology; The image capture module hooks into the target game's rendering function, and uses the rendering function to obtain the handle of the game's rendering texture.

[0006] Optionally, the step of using an assembly engine to analyze the instruction sequence in the graphics rendering library to identify the target instruction includes: The target instruction is determined by analyzing the texture creation function exported from the graphics rendering library.

[0007] Optionally, the step of using the texture creation function exported from the graphics rendering library as the analysis entry point and using an assembly engine to analyze instructions to determine the target instruction includes: Locate the first calling instruction within the N instructions following the texture creation function; Locate the first jump instruction within the M instructions following the first call instruction; The jump instruction is used as the target instruction.

[0008] Optionally, using the jump instruction as the target instruction includes: Check if a target error message text exists after the first jump instruction; If it exists, then the jump instruction will be used as the target instruction.

[0009] Optionally, modifying the target instruction includes: Modify the target instruction to a no-operation instruction or a no-jump instruction.

[0010] Optionally, after the external acquisition process obtains the real-time game screen by accessing the shared texture object, it further includes: The streamer's content is overlaid on the real-time game screen to obtain composite screen data; The synthesized image data is sent to the client via the server.

[0011] Optionally, after creating the shared texture object, the process further includes: Determine whether the shared texture object was created successfully; If creation is successful, then the operation of copying the rendering texture of each frame of the game to the shared texture object will be performed; If creation fails, the modifications to the target instruction are restored.

[0012] Secondly, this application discloses an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the aforementioned game screen capture method.

[0013] Thirdly, this application discloses a computer-readable storage medium for storing a computer program; wherein the computer program, when executed by a processor, implements the aforementioned game screen capture method.

[0014] Fourthly, this application discloses a computer program product, including a computer program that, when executed by a processor, implements the aforementioned game screen capture method.

[0015] In this application, based on the pattern characteristics of the target instruction controlling texture resource sharing permissions, an assembly engine is used to analyze the instruction sequence in the graphics rendering library to identify the target instruction; the target instruction is modified, and a shared texture object is created in the video memory of the image processor after modification; the game rendering texture is copied to the shared texture object so that the external acquisition process can obtain real-time game images by accessing the shared texture object. It can be seen that, based on the pattern characteristics of the instruction controlling texture resource sharing permissions, the instruction is automatically identified from the graphics rendering library and modified to bypass the permission verification of the graphics rendering library for accessing texture resources, realizing automatic querying and modification of the target address. This eliminates the need for pre-configuration of addresses to be modified under various d3d9 versions, avoiding frequent manual address updates and version updates, and improving the stability and reliability of game image acquisition; after modification, a shared texture object is created in the video memory of the image processor, enabling direct copying of the image to the shared texture within the image processor, supporting zero-latency reading by external processes. Attached Figure Description

[0016] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0017] Figure 1 A flowchart of a game screen capture method provided in this application; Figure 2 A flowchart illustrating a specific game screen capture method provided in this application; Figure 3 A specific target instruction diagram is provided for this application; Figure 4 This application provides a structural diagram of an electronic device. Detailed Implementation

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

[0019] In existing technologies, texture sharing is achieved through configuration patches. This involves pre-analyzing different versions of graphics rendering libraries (such as d3d9) and recording the addresses that need to be patched for each version—that is, the specific instruction addresses that need to be modified to bypass texture sharing restrictions. At runtime, the program modifies the machine instructions at the corresponding addresses based on the detected d3d9 version, enabling d3d9 to create textures shared across processes. This allows for direct copying of the image to the shared texture within the GPU, which other processes can then read with zero latency. This method avoids data movement from video memory to system memory, resulting in high performance. However, because the patch addresses are hardcoded into the program, older versions cannot recognize the new addresses that need patching when a new d3d9 version is released, preventing texture sharing and necessitating manual reconfirmation of the new addresses and the release of a new live streaming application version. To overcome these technical problems, this application proposes a game screen capture method that can automatically identify and modify the target instructions controlling texture resource sharing permissions in the graphics rendering library, avoiding frequent manual address and version updates and improving the stability and reliability of game screen capture.

[0020] This application discloses a method for capturing game screen images. See also... Figure 1 As shown, the method may include the following steps: Step S11: Based on the pattern characteristics of the target instruction controlling the texture resource sharing permissions, the assembly engine is used to analyze the instruction sequence in the graphics rendering library to identify the target instruction.

[0021] In this embodiment, based on the pattern characteristics of the target instruction controlling texture resource sharing permissions—that is, the positional pattern, contextual characteristics, and instruction type characteristics of the instruction within the instruction sequence of the graphics rendering library—the assembly engine analyzes the instruction sequence in the graphics rendering library to automatically locate the specific position of the target instruction within the instruction sequence. The assembly engine automatically finds the address that needs modification; this automated identification ignores version differences and eliminates the need to maintain the addresses that need to be patched for each version. The aforementioned graphics rendering library can be d3d9.dll (Direct3DDevice9), a core dynamic link library (DLL) file in the DirectX 9 graphics library, whose main function is to provide 3D graphics rendering and hardware acceleration capabilities for graphics-intensive applications (such as games, 3D modeling software, and video players) on Windows systems.

[0022] The process, prior to determining the pattern characteristics of the target instruction for controlling texture resource sharing permissions, includes: loading the screen capture module into the target game's process using process injection technology; hooking the target game's rendering function using the screen capture module to obtain the handle of the game's rendering texture. Specifically, the screen capture module is dynamically loaded into the target game's process using process injection technology. This module hooks the game's rendering function, intercepting its calls during rendering operations and thereby obtaining the texture handle used for rendering. This allows for subsequent texture copying based on the handle. The screen capture module also performs steps S11 to S13 after the function hooking.

[0023] Taking live streaming software as an example, after opening the software, the user selects a target game. Once the software detects the target game's process, it injects the screen capture module into that process, which then performs screen capture. The aforementioned rendering function is the core implementation responsible for converting 3D models, textures, lighting, and other data from the game world into 2D images and displaying them on the screen. In d3d9, the rendering function is the Present function. Hooking technology modifies the code memory data of a runtime module (e.g., a DLL), altering binary instructions so that when the CPU executes this function, it first jumps to its own function, executes the custom logic, and then returns to the original function. Specifically, when the rendering function is called to render the first frame after the game starts, the hook function can be used to initialize the assembly engine. After initialization, the original rendering function can then be called to allow the game to display normally.

[0024] It's important to note that in the synchronous acquisition scheme, the purpose of the hook rendering function is to intercept and copy screen data synchronously and in a blocking manner when each frame of the game is submitted for display. In the patch shared texture scheme, the hook is not used to perform actual data copying; texture copying is implemented asynchronously in a separate thread, which completely decouples screen acquisition from the game rendering process, avoiding interference with game performance.

[0025] In some embodiments, the step of using an assembly engine to analyze the instruction sequence in the graphics rendering library to identify the target instruction includes: using the texture creation function exported from the graphics rendering library as the analysis entry point, and using an assembly engine to perform instruction analysis to determine the target instruction. For example Figure 2 As shown, it is understandable that the texture creation function exported from the graphics rendering library is used as the entry point for analysis because this function is public, and only through the publicly available function can the address to be checked be located; moreover, the texture creation function is necessary for texture creation operations, so only the instruction sequence corresponding to this function is queried, without having to query all the instruction sequences in the graphics rendering library, thus improving the efficiency of instruction query.

[0026] In some preferred embodiments, the step of using the texture creation function exported from the graphics rendering library as the analysis entry point and using an assembly engine to analyze instructions to determine the target instruction includes: locating the first call instruction within N instructions following the texture creation function; locating the first jump instruction within M instructions following the first call instruction; and using the jump instruction as the target instruction. For example... Figure 3 As shown, the target instruction used to control texture resource sharing permissions is most likely the first jump instruction (such as the conditional jump instruction jnz) after the first call instruction (call instruction) after the texture creation function; limiting the query range with N and M improves query efficiency and accuracy. In d3d9, the texture creation function is the CreateTexture function.

[0027] Furthermore, the aforementioned use of the jump instruction as the target instruction may include: checking whether a target error message text exists after the first jump instruction; if it exists, then the jump instruction is used as the target instruction. It is understood that graphics rendering libraries such as d3d9.dll do not support texture sharing, therefore an error message text will exist after the first jump instruction, such as "push offset aDeviceIsNotC_3", which indicates that sharing is not supported (Device is notcapable of sharing resource. CreateTexture fails). If a target error message text is matched, then the currently found first jump instruction can be considered the target instruction that needs to be modified, i.e., the instruction controlling texture resource sharing permissions; if no target error message text is matched, then the currently found first jump instruction is considered not the target instruction, and a new search is needed. Specifically, checking whether a target error message text exists after the first jump instruction includes: checking whether a target error message text exists in a specified type of instruction after the first jump instruction. Specified type instructions include push instructions, mov instructions, and lea instructions, for example... Figure 3 As shown, the push instruction following the first jump instruction contains the target error message text (push offset aDeviceIsNotC_3). Considering that some versions of d3d9.dll use the mov and lea instructions for this logic, in order to be compatible with the differences in DLL implementation, the push, mov, and lea instructions are all designated as instruction types. By matching the target error message text, the accuracy of target instruction location is further improved.

[0028] Step S12: Modify the target instruction, and then create a shared texture object in the video memory of the image processor.

[0029] After locating the target instruction, it is automatically modified. Specifically, the target instruction can be modified to have no operation or no jump instruction, thus invalidating the logic that restricts the creation of shared textures under D3D9 restrictions. This is achieved through patching technology, where the patch program modifies the code memory data of a runtime module, altering binary instructions to cause the CPU to execute in a different logic. Specifically, in the live streaming program, the game loads the screen capture module via injection and hooks the game's rendering function. When game footage needs to be captured, the address is automatically patched to bypass the D3D9 restriction on creating shared textures. Then, a shared texture object is created, and the game footage is copied onto the shared texture so that other threads / processes can read the footage from this shared texture to obtain the game footage.

[0030] In some embodiments, after creating the shared texture object, the method further includes: determining whether the shared texture object was created successfully; if created successfully, performing the operation of copying the rendering texture of each frame of the game to the shared texture object; if creation fails, restoring the modification of the target instruction. That is, a shared texture object can only be successfully created after successfully modifying the target instruction to skip the permission check for shared texture creation. If the shared texture object cannot be created, it indicates that the located target instruction is not an instruction controlling the permission for sharing texture resources, and therefore the instruction needs to be restored to its state before modification.

[0031] Step S13: Copy the game rendering texture to the shared texture object so that the external acquisition process can obtain the real-time game screen by accessing the shared texture object.

[0032] After creating a shared texture object, the game's rendering texture can be copied to the shared texture object in real time. The rendering texture is essentially the electronic canvas of the game screen in the graphics card's memory; each frame of the game is first drawn on this canvas. External acquisition processes (such as live streaming software) can then access the shared texture object to obtain the real-time game screen. This allows for efficient acquisition of game screen data during game live streaming, eliminating the need to synchronously copy game screen data from video memory to RAM within the game's rendering function. Therefore, it has minimal impact on the game's frame rate and avoids stuttering that could affect the gaming experience. Furthermore, it eliminates the need to pre-configure the addresses required for each release version in the program; adaptive matching logic can precisely locate the target instructions controlling texture resource sharing permissions, avoiding frequent upgrades to the live streaming software to adapt to new D3D9 system versions.

[0033] In some embodiments, after the external acquisition process obtains the real-time game screen by accessing the shared texture object, it further includes: overlaying the streamer's content onto the real-time game screen to obtain composite screen data; and sending the composite screen data to the client via a server. That is, after obtaining the game screen data through the shared texture object, content such as the streamer's avatar can be overlaid onto the game screen data, and then the final composite screen data is pushed to the live streaming server via the network and distributed to the client.

[0034] As can be seen from the above, in this embodiment, based on the pattern characteristics of the target instruction controlling texture resource sharing permissions, the assembly engine analyzes the instruction sequence in the graphics rendering library to identify the target instruction; the target instruction is modified, and a shared texture object is created in the graphics processor's video memory after modification; the game rendering texture is copied to the shared texture object so that the external acquisition process can obtain the real-time game screen by accessing the shared texture object. It is evident that, based on the pattern characteristics of the instruction controlling texture resource sharing permissions, the instruction is automatically identified and modified from the graphics rendering library, rendering the graphics rendering library's permission verification of texture resources ineffective, achieving automated location and modification of the target instruction. This eliminates the need for pre-configuration of patch addresses for different versions of the graphics rendering library, avoiding frequent manual address updates and program version releases. After modification, a cross-process shared texture resource is created in the graphics processor's video memory, enabling the screen data to be directly copied to the shared texture within the graphics processor, allowing external processes to read it directly with zero latency.

[0035] The following section uses a game live streaming app as an example to illustrate the technical solution of this application.

[0036] Assuming a user has installed this game live-streaming app on their client, when they need to stream a target game live, they enter the app. The app first loads its screen capture module into the target game's process using process injection technology. By running the screen capture module, it analyzes the instruction sequence in the graphics rendering library based on the pattern characteristics of the target instruction controlling texture resource sharing permissions, thus identifying the target instruction. Then, it modifies the target instruction and creates a shared texture object in the graphics processor's video memory. During game execution, the game's rendered texture is copied to the shared texture object in real time, and the game live-streaming app's external capture process accesses the shared texture object to obtain the real-time game screen.

[0037] Accordingly, this application also discloses a game screen capture device, which includes: The instruction recognition module is used to identify the target instruction by analyzing the instruction sequence in the graphics rendering library using an assembly engine based on the pattern characteristics of the target instruction that controls the sharing permissions of texture resources. The instruction modification module is used to modify the target instruction and create a shared texture object in the video memory of the image processor after modification. The texture copying module is used to copy the game rendering texture to the shared texture object so that an external acquisition process can obtain real-time game footage by accessing the shared texture object.

[0038] As can be seen from the above, in this embodiment, based on the instruction pattern characteristics of controlling texture resource sharing permissions, the instruction is automatically identified and modified from the graphics rendering library, thereby invalidating the permission verification of the graphics rendering library for texture resources. This achieves automated location and modification of the target instruction, eliminating the need for pre-configuration of patch addresses for each version of the graphics rendering library and avoiding frequent manual address updates and program version releases. After modification, a cross-process shared texture resource is created in the graphics processor's video memory, enabling the image data to be directly copied to the shared texture within the graphics processor, allowing external processes to read it directly with zero latency.

[0039] In some specific embodiments, the game screen capture device may specifically include: The injection unit is used to load the screen capture module into the process of the target game using process injection technology before the pattern characteristics of the target instruction that controls the texture resource sharing permissions are defined. The function hooking unit is used to hook the rendering function of the target game through the screen capture module, and use the rendering function to obtain the handle of the game rendering texture.

[0040] In some specific embodiments, the instruction recognition module is used to determine the target instruction by using the texture creation function exported from the graphics rendering library as the analysis entry point and performing instruction analysis using an assembly engine.

[0041] In some specific embodiments, the instruction recognition module may specifically include: The first call instruction locating unit is used to locate the first call instruction within N instructions following the texture creation function; The first jump instruction locating unit is used to locate the first jump instruction within the M instructions following the first call instruction, and to use the jump instruction as the target instruction.

[0042] In some specific embodiments, the first jump instruction locating unit is used to query whether there is a target error message text after the first jump instruction; if there is, the jump instruction is used as the target instruction.

[0043] In some specific embodiments, the instruction modification module is used to modify the target instruction into a no-operation instruction or a no-jump instruction.

[0044] In some specific embodiments, the game screen capture device may further include: The image compositing unit is used to overlay the streamer's content onto the real-time game screen after the external acquisition process obtains the real-time game screen by accessing the shared texture object, so as to obtain the composited image data. The image sending unit is used to send the synthesized image data to the client via the server.

[0045] In some specific embodiments, the game screen capture device may specifically include: The judgment unit is used to determine whether the shared texture object has been successfully created after it has been created. An execution unit is used to perform the operation of copying the rendering texture of each frame of the game to the shared texture object if the creation is successful. The instruction recovery unit is used to restore the modifications to the target instruction if the creation fails.

[0046] Furthermore, this application also discloses an electronic device, see [link to relevant documentation]. Figure 4 As shown, the content in the figure should not be considered as any limitation on the scope of use of this application.

[0047] Figure 4 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. The electronic device 20 may specifically include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the game screen capture method disclosed in any of the foregoing embodiments.

[0048] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0049] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored on it include operating system 221, computer program 222 and data 223, etc., and the storage method can be temporary storage or permanent storage.

[0050] The operating system 221 manages and controls the various hardware devices on the electronic device 20 and the computer program 222 to enable the processor 21 to perform calculations and processing on the massive amounts of data 223 in the memory 22. The operating system 221 can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the game screen capture method executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0051] Furthermore, this application also discloses a computer storage medium storing computer-executable instructions. When the computer-executable instructions are loaded and executed by a processor, they implement the game screen capture method steps disclosed in any of the foregoing embodiments.

[0052] Furthermore, this application also discloses a computer program product, including a computer program that, when executed by a processor, implements the game screen capture method steps disclosed in any of the foregoing embodiments.

[0053] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0054] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0055] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0056] The above provides a detailed description of the game screen capture method, device, medium, and program product provided by the present invention. Specific examples have been used to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only for the purpose of helping to understand the method and core ideas of the present invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of the present invention. Therefore, the content of this specification should not be construed as a limitation of the present invention.

Claims

1. A method for capturing game footage, characterized in that, include: Based on the pattern characteristics of the target instruction controlling the sharing permissions of texture resources, the assembly engine is used to analyze the instruction sequence in the graphics rendering library to identify the target instruction; The target instruction is modified, and a shared texture object is created in the video memory of the image processor after modification; The game rendering texture is copied to the shared texture object so that an external acquisition process can obtain real-time game footage by accessing the shared texture object.

2. The game screen capture method according to claim 1, characterized in that, Before the pattern features of the target instruction for controlling texture resource sharing permissions, it also includes: The image capture module is loaded into the target game's process using process injection technology; The image capture module hooks into the target game's rendering function, and uses the rendering function to obtain the handle of the game's rendering texture.

3. The game screen capture method according to claim 1, characterized in that, The step of using an assembly engine to analyze instruction sequences in a graphics rendering library to identify the target instruction includes: The target instruction is determined by analyzing the texture creation function exported from the graphics rendering library.

4. The game screen capture method according to claim 3, characterized in that, The analysis begins with the texture creation function exported from the graphics rendering library. An assembly engine is used to analyze the instructions and determine the target instruction, including: Locate the first calling instruction within the N instructions following the texture creation function; Locate the first jump instruction within the M instructions following the first call instruction; The jump instruction is used as the target instruction.

5. The game screen capture method according to claim 4, characterized in that, The step of using the jump instruction as the target instruction includes: Check if a target error message text exists after the first jump instruction; If it exists, then the jump instruction will be used as the target instruction.

6. The game screen capture method according to claim 1, characterized in that, The modification of the target instruction includes: Modify the target instruction to a no-operation instruction or a no-jump instruction.

7. The game screen capture method according to claim 1, characterized in that, After the external acquisition process obtains the real-time game screen by accessing the shared texture object, it also includes: The streamer's content is overlaid on the real-time game screen to obtain composite screen data; The synthesized image data is sent to the client via the server.

8. The game screen capture method according to any one of claims 1 to 7, characterized in that, After creating the shared texture object, the process also includes: Determine whether the shared texture object was created successfully; If creation is successful, then the operation of copying the rendering texture of each frame of the game to the shared texture object will be performed; If creation fails, the modifications to the target instruction are restored.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the game screen capture method as described in any one of claims 1 to 8.

10. A computer-readable storage medium, characterized in that, Used to store computer programs; wherein the computer programs, when executed by a processor, implement the game screen capture method as described in any one of claims 1 to 8.

11. A computer program product, characterized in that, Includes a computer program that, when executed by a processor, implements the game screen capture method according to any one of claims 1 to 8.