WO2017129117A1 - 一种gpu资源重建的方法、用户设备,系统及存储介质 - Google Patents

一种gpu资源重建的方法、用户设备,系统及存储介质 Download PDF

Info

Publication number
WO2017129117A1
WO2017129117A1 PCT/CN2017/072537 CN2017072537W WO2017129117A1 WO 2017129117 A1 WO2017129117 A1 WO 2017129117A1 CN 2017072537 W CN2017072537 W CN 2017072537W WO 2017129117 A1 WO2017129117 A1 WO 2017129117A1
Authority
WO
WIPO (PCT)
Prior art keywords
gpu
resource pool
user equipment
resource
default resource
Prior art date
Application number
PCT/CN2017/072537
Other languages
English (en)
French (fr)
Inventor
韩祥
程东哲
王学强
叶劲峰
沈超
聂志明
李从兵
艾风
顾煜
王杨军
曹文升
Original Assignee
腾讯科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 腾讯科技(深圳)有限公司 filed Critical 腾讯科技(深圳)有限公司
Priority to JP2018538859A priority Critical patent/JP6715334B2/ja
Priority to KR1020187022500A priority patent/KR102091961B1/ko
Publication of WO2017129117A1 publication Critical patent/WO2017129117A1/zh

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/50Allocation of resources, e.g. of the central processing unit [CPU]
    • G06F9/5005Allocation of resources, e.g. of the central processing unit [CPU] to service a request
    • G06F9/5027Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals
    • G06F9/5044Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resource being a machine, e.g. CPUs, Servers, Terminals considering hardware capabilities
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/461Saving or restoring of program or task context
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/44Arrangements for executing specific programs
    • G06F9/4401Bootstrapping
    • G06F9/4418Suspend and resume; Hibernate and awake

Definitions

  • the present application relates to the field of cloud technologies, and in particular, to a method, user equipment, and system for resource reconstruction.
  • Cloud interactive systems usually include servers and multiple user devices. Servers can be cluster servers, multiple interactions. Applications can run in a cloud interactive system.
  • the server is usually responsible for image drawing. After the drawing is completed, the drawn image frame is sent to the user equipment, and the user equipment receives the drawn image. After the frame, the image frame is directly decoded, and then the image screen is displayed.
  • the usage status of the GPU resource is not directly recorded, and the GPU resource cannot be released and reconstructed when the GPU is restored after the GPU is lost.
  • the embodiment of the present application provides a resource reconstruction method, a user equipment, a system, and a storage medium, which ensure normal use of the system and improve user experience.
  • a first aspect of the present application provides a method for resource reconstruction, the method being applied to a cloud interactive system, where the cloud interactive system includes a user equipment and a server, where the user equipment includes a graphics processor GPU, and the GPU Having a corresponding default resource pool, the method includes:
  • the user equipment receives the drawing data sent by the server, where the drawing data includes a drawing instruction and a drawing resource corresponding to the drawing instruction;
  • the GPU resource that needs to be created in the default resource pool is recorded as the resource held in the default resource pool;
  • the user equipment releases the resources held in the default resource pool, and reconstructs resources in the default resource pool according to the resources held in the default resource pool.
  • the second aspect of the present application provides a user equipment, where the user equipment is located in the cloud interactive system, the cloud interactive system further includes a server, where the user equipment includes a graphics processor GPU, The GPU has a corresponding default resource pool, and the user equipment includes:
  • a receiving unit configured to receive drawing data sent by the server, where the drawing data includes a drawing instruction and a drawing resource corresponding to the drawing instruction;
  • a recording unit configured to record, by the drawing resource, a GPU resource created in a default resource pool as a resource held in the default resource pool;
  • a determining unit configured to determine, according to the drawing instruction, whether the GPU is in a lost state, and if yes, determine whether to perform GPU recovery;
  • a reconstruction unit configured to: when the GPU is determined to perform GPU recovery, release the resources held in the default resource pool, and reconstruct resources in the default resource pool according to the resources held in the default resource pool.
  • a third aspect of the present application provides a cloud interactive system, including a server and a user equipment, where the user equipment is the user equipment according to any one of the second aspects.
  • a fourth aspect of embodiments of the present application provides a non-volatile storage medium in which computer readable instructions are stored. When the instructions are executed, the computer is caused to perform the resource reconstruction method described above.
  • Figure 1 is a schematic diagram of a cloud game architecture
  • FIG. 2 is a schematic diagram of an embodiment of a method for reconstructing GPU resources in an embodiment of the present application
  • FIG. 3 is a schematic diagram of a specific cloud game architecture of a method for reconstructing GPU resources in an embodiment of the present application
  • FIG. 4 is a schematic diagram of another embodiment of a method for reconstructing GPU resources in an embodiment of the present application.
  • FIG. 5 is a schematic diagram of an embodiment of a user equipment in an embodiment of the present application.
  • FIG. 6 is a schematic diagram of another embodiment of a user equipment in an embodiment of the present application.
  • the embodiment of the present application provides a method for resource reconstruction, a user equipment, a system, and a storage medium, which ensure normal use of the system and improve user experience.
  • the cloud interactive system includes a user equipment and a server, and the user equipment may have multiple, and the server may also be a server cluster.
  • An interactive application can run in a cloud interactive system.
  • the user equipment can be a terminal device such as a personal computer (PC), a notebook, and a mobile phone.
  • the server may be a dedicated game server. Currently, the server records the data stream, compresses and transmits the data to the user equipment through the network, and the user equipment can play back the drawing instruction, play the drawing resource, and reproduce the rendering picture.
  • the user equipment includes the graphics processor. GPU.
  • Direct3D is a 3D (3Dimensions, 3D) graphical programming interface developed by Microsoft for the Windows operating system. It is the basic library for 3D game development on Windows and is the programming interface of the Graphics Processing Unit (GPU).
  • GPU Graphics Processing Unit
  • the GPU resources managed in Direct 3D are classified into three types according to the storage location: Managed Resources, Default Resources, and System Memory Resources. Among them, the managed resource pool resource and the system memory resource pool resource are not affected by the GPU loss, and need not be processed when the GPU is lost. The resources in the default resource pool need to be released and re-created when device recovery is detected after the GPU is lost.
  • the user equipment has a corresponding default resource pool
  • the user equipment may be a smart terminal such as a smart phone or a tablet computer, or may be an MP3 player (Moving Picture Experts Group Audio Layer III). Level 3), MP4 (Moving Picture Experts Group Audio Layer IV) player, laptop portable computer, car audio and video equipment, desktop computer and so on.
  • MP3 player Moving Picture Experts Group Audio Layer III. Level 3
  • MP4 Moving Picture Experts Group Audio Layer IV
  • an embodiment of a method for resource reconstruction in an embodiment of the present application includes:
  • the user equipment receives the drawing data sent by the server.
  • the drawing data includes a drawing instruction and a drawing resource corresponding to the drawing instruction
  • the server records the data stream by recording, compresses and transmits the data to the user equipment through the network, and the user equipment receives the drawing data sent by the server.
  • the user equipment where the drawing resource needs to be created in the default resource pool, is recorded as a resource held in the default resource pool.
  • the GPU resource needs to be created in the default resource pool.
  • the GPU resource created in the default resource pool is recorded in the default resource pool.
  • the resources to be held need to be described. If the mapped resource needs to create a corresponding GPU resource in the default resource pool and is recorded as the resource held in the default resource pool, the record may not be repeated.
  • the user equipment determines whether the GPU is lost according to the drawing instruction, and if so, step 204;
  • a GPU Graphics Processing Unit
  • GPU Graphics Processing Unit
  • the application is re-assigned to the GPU. When the GPU is lost, the application cannot continue to render effectively. When the device is restored, the previously held GPU resources are re-released.
  • the drawing instruction may include a first detection function for detecting a current GPU state.
  • the user equipment determines, according to the drawing instruction, whether the GPU is in a lost state, including: playing back the user equipment.
  • the drawing instruction acquires a first return value returned by the first detection function; and the user equipment determines, according to the first return value, whether the GPU is lost.
  • the first detection function may be a Present function included in the drawing instruction.
  • the Present function returns D3DERR_DEVICELOST. At this time, the return value is obtained, and then the GPU is lost.
  • the user equipment determines whether to perform GPU recovery, and if so, step 205;
  • the method may further include:
  • the user equipment inserts a second detection function for detecting whether to perform GPU recovery in the drawing instruction. At this time, the user equipment determines whether to perform GPU recovery, and the user equipment may play back the drawing instruction. Obtaining a second return value returned by the second detection function; and determining, by the user equipment, whether to perform GPU recovery according to the second return value.
  • the second detection function may be a TestCooperativeLevel function, and when the return value of the TestCooperativeLevel function is obtained as D3DERR_DEVICENOTRESET, it is determined to perform GPU recovery.
  • the TestCooperativeLevel function can also be used to determine whether the GPU is lost.
  • the return value of the TestCooperativeLevel function includes D3DERR_DEVICELOST, the return value can be obtained at this time to determine whether the GPU is lost.
  • the user equipment releases the resources held in the default resource pool, and re-establishes the resources in the default resource pool according to the recorded resources in the default resource pool.
  • GPU graphics processing unit
  • the GPU usage right may be deprived, and the GPU resources held by the application are also released. This process is that the GPU is lost and corresponds to the GPU loss.
  • Another state is GPU recovery, in which the application is re-assigned to the GPU to release and rebuild the previously held GPU resources when the GPU is restored.
  • D3DPOOL_DEFAULT (default resource pool)
  • the resources created for the parameters are the memory allocated in the graphics card, so make sure all the devices are reset before resetting the device. Resources of the D3DPOOL_DEFAULT (default resource pool) type must be released.
  • the user equipment needs to release the resources held in the default resource pool, and reconstruct the resources in the default resource pool according to the resources held in the default resource pool.
  • the user equipment releases the resources held in the default resource pool and reconstructs the resources in the default resource pool according to the recorded resources in the default resource pool, which may be implemented by using a Reset function of the processing device loss recovery. .
  • the GPU resources that need to be created in the default GPU resource pool are mapped to the resources held in the default resource pool, and the GPU is restored after the GPU is lost. Releasing the resources held in the default resource pool and performing resource reconstruction in the default resource pool by using the resources held in the default resource pool currently recorded, thereby implementing GPU recovery and avoiding in the interactive application system. Since all the data is obtained from the server, the GPU recovery process cannot be performed after the GPU is lost, which ensures the normal use of the system and improves the user experience.
  • the drawing instruction needs to include the target GPU resource in the GPU resource created in the default resource pool, where the drawing instruction includes the lifetime information of the target GPU resource;
  • the method further includes: when the user equipment reaches the lifetime of the target GPU resource, releasing the target GPU resource, and deleting the target GPU resource as a record holding the resource in the default resource pool, that is, the default When the GPU resource held in the resource pool reaches the lifetime, the resource is released, and the record holding the resource in the default resource pool is deleted, and the resource is more effectively utilized, and the default resource is reconstructed. Avoid unnecessary resource rebuilds when holding resources in the pool.
  • the method may further include:
  • the user equipment detects whether all the resources held in the default resource pool are successfully re-established, and if not, releases the resources held in the default resource pool, and according to the recorded resources in the default resource pool Rebuild the resources in the default resource pool.
  • the cloud game client running on the device is shown in Figure 3.
  • the game runs on the cloud game server.
  • the cloud game server records the data stream through compression, and then transmits it to the cloud game client through the Internet.
  • the cloud game client plays back. Drawing instructions, playing drawing data, and reproducing the rendered picture.
  • a Direct 3D status recorder is set in the cloud game client, and the drawing resource received from the cloud game server needs to be created in the default resource pool. GPU resources.
  • another embodiment of the resource reconstruction method in this embodiment of the present application includes:
  • the cloud game client receives the drawing data sent by the cloud game server.
  • the drawing data includes a drawing instruction and a drawing resource corresponding to the drawing instruction.
  • the cloud game client records, by using a Direct 3D state recorder, the GPU resource that needs to be created in the Default Resources by the drawing resource, and records the resource held by the Default Resources;
  • the drawing instruction includes a Present function.
  • TestCooperativeLevel function is used to detect whether GPU recovery is performed.
  • step 405 the cloud game client plays back the drawing instruction to determine whether it is in the GPU lost state, and if so, step 405 is performed;
  • the cloud game client plays back the drawing instruction to determine whether it is in a GPU lost state, and may be: playing back the drawing instruction to determine whether the GPU is in a lost state according to the return value of the Present function, and when the GPU loses the state, the Present function returns a D3DERR_DEVICELOST, At this point, the return value is obtained to determine whether the GPU is lost.
  • the cloud game client determines whether to perform GPU recovery.
  • TestCooperativeLevel function When the return value of the TestCooperativeLevel function is obtained as D3DERR_DEVICENOT RESET, it is determined to perform GPU recovery.
  • the cloud game client releases the resources held in the Default Resources, and reconstructs the resources in the default resource pool according to the resources held in the recorded Default Resources.
  • the user equipment is located in the cloud interactive system, and the cloud interactive system further includes a server, where the user equipment includes a graphics processor GPU, and the GPU has Corresponding default resource pool.
  • an embodiment of the user equipment 500 in this embodiment of the present application includes:
  • the receiving unit 501 is configured to receive the drawing data sent by the server, where the drawing data includes a drawing instruction and a drawing resource corresponding to the drawing instruction;
  • a recording unit 502 configured to record, by the drawing instruction, a GPU resource created in a default resource pool as a resource held in the default resource pool;
  • the determining unit 503 is configured to determine, according to the drawing instruction, whether the GPU is in a lost state, and if yes, determine whether to perform GPU recovery;
  • the reconstruction unit 504 is configured to: when determining to perform GPU recovery, release resources held in the default resource pool, and reconstruct resources in the default resource pool according to the recorded resources in the default resource pool.
  • the recording unit 502 when the receiving unit 501 receives the drawing data sent by the server, the recording unit 502 will draw the GPU resources that need to be created in the default GPU resource pool, and record the resources held in the default resource pool.
  • the unit 504 releases the resources held in the default resource pool, and performs resource reconstruction in the default resource pool by using the resources held in the default resource pool currently recorded.
  • the GPU recovery is implemented, and in the interactive application system, since all the data is obtained from the server, the GPU recovery process cannot be performed after the GPU is lost, thereby ensuring the normal use of the system and improving the user experience.
  • the drawing instruction includes a first detection function for detecting a current GPU state
  • the determining unit 503 is specifically configured to play back the drawing instruction, obtain a first return value returned by the first detecting function, and determine whether the GPU is lost according to the first return value.
  • the user equipment further includes:
  • An insertion unit configured to insert, in the drawing instruction, a second detection function for detecting whether to perform GPU recovery;
  • the determining unit 503 is further configured to: play back the drawing instruction, acquire a second return value returned by the second detecting function, and determine whether to perform GPU recovery according to the second return value.
  • the drawing instruction needs to include the target GPU resource in the GPU resource created in the default resource pool, where the drawing instruction includes the lifetime information of the target GPU resource;
  • the user equipment further includes:
  • a deleting unit configured to release the target GPU resource when the lifetime of the target GPU resource is reached, and delete the target GPU resource as a record holding the resource in the default resource pool.
  • the re-establishing unit 504 is further configured to detect whether all the resources held in the default resource pool are successfully re-established, and if not, release the resources held in the default resource pool, and according to the record, The resources held in the default resource pool rebuild the resources in the default resource pool.
  • the user equipment in the embodiment of the present application is described above from the perspective of the unitized functional entity.
  • the user equipment in the embodiment of the present application is described from the perspective of hardware processing. Referring to FIG. 6, the user equipment is applied to the cloud interaction.
  • the user equipment 600 in the embodiment of the present application includes:
  • the input device 601, the output device 602, the processor 603, and the memory 604 (wherein the number of the processors 603 may be one or more, and one processor 603 is taken as an example in FIG. 6), and the user equipment further includes a GPU 605.
  • the GPU has a corresponding default resource pool.
  • the input device 601, the output device 602, the processor 603, the memory 604, and the GPU 605 may be connected by a bus or other means, wherein the bus connection is taken as an example in FIG.
  • the user equipment involved in the embodiments of the present application may have more or less components than those shown in FIG. 6, may combine two or more components, or may have different component configurations or settings, and each component may include Hardware, software, or a combination of hardware and software implementations of one or more signal processing and/or application specific integrated circuits.
  • the processor 603 is configured to perform the following steps by calling an operation instruction stored in the memory 604:
  • the GPU resource that needs to be created in the default resource pool is recorded as the resource held in the default resource pool;
  • the GPU 605 is configured to perform the following steps by calling an operation instruction stored in the memory 604:
  • the resources held in the default resource pool are released, and the resources in the default resource pool are reconstructed according to the resources held in the default resource pool recorded.
  • the drawing instruction includes a first detection function for detecting a current GPU state.
  • the GPU 605 is specifically configured to perform the following operations by using an operation instruction stored in the memory 604:
  • the GPU 605 is further configured to perform the following operations by calling an operation instruction stored in the memory 604:
  • the GPU 605 is specifically configured to perform the following operations by calling an operation instruction stored in the memory 604:
  • Whether to perform GPU recovery is determined according to the second return value.
  • the drawing instruction needs to include the target GPU resource in the GPU resource created in the default resource pool, where the drawing instruction includes the lifetime information of the target GPU resource;
  • the GPU 605 is further configured to perform the following operations by calling an operation instruction stored in the memory 604:
  • the target GPU resource When the lifetime of the target GPU resource is reached, the target GPU resource is released, and the target GPU resource is deleted as a record of the resource held in the default resource pool.
  • the GPU 605 is further configured to perform the following operations by using an operation instruction stored in the memory 604. :
  • the memory 604 can be used to store software programs and modules, and the processor 603 executes various functional applications and data processing by running software programs and modules stored in the memory 604.
  • the memory 604 can mainly include a storage program area and a storage data area, wherein the storage program area can store an operating system, an application required for at least one function, and the like; the storage data area can store data created according to the use of the server (such as a mirrored container). Data) and so on.
  • memory 604 can include high speed random access memory, and can also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid state storage device.
  • Processor 603 may be an integrated circuit chip with signal processing capabilities. In the implementation process The steps of the above method may be completed by an integrated logic circuit of hardware in the processor 603 or an instruction in the form of software.
  • the processor 603 described above may be a general purpose processor, a digital signal processor (DSP), an application specific integrated circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, a discrete gate or transistor logic device, or discrete hardware. Component.
  • the methods, steps, and logical block diagrams disclosed in the embodiments of the present application can be implemented or executed.
  • the general purpose processor may be a microprocessor or the processor or any conventional processor or the like.
  • the steps of the method disclosed in the embodiments of the present application may be directly implemented by the hardware decoding processor, or may be performed by a combination of hardware and software modules in the decoding processor.
  • the software module can be located in a conventional storage medium such as random access memory, flash memory, read only memory, programmable read only memory or electrically erasable programmable memory, registers, and the like.
  • the storage medium is located in memory 604, and processor 604 reads the information in memory 604 and, in conjunction with its hardware, performs the steps of the above method.
  • the embodiment of the present application further provides a computer storage medium, wherein the computer storage medium may store a program, and the program includes some or all of the steps of the method for resource reconstruction described in the foregoing method embodiments.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling through some interface, device or unit.
  • a communication connection which may be in electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of a software functional unit.
  • the integrated unit if implemented in the form of a software functional unit and sold or used as a standalone product, may be stored in a computer readable storage medium.
  • a computer readable storage medium A number of instructions are included to cause a computer device (which may be a personal computer, server, or network device, etc.) to perform all or part of the steps of the methods described in various embodiments of the present application.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

本申请实施例公开了一种资源重建的方法、用户设备及系统,所述方法应用于云交互式系统,云交互式系统包括用户设备和服务器,用户设备中包括GPU,GPU具有对应的默认资源池,本申请实施例方法包括:用户设备接收服务器发送的绘制数据,绘制数据中包括绘制指令和与绘制指令对应的绘制资源;将绘制资源需要在默认资源池中创建的GPU资源,记录为默认资源池中持有的资源;用户设备根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;在确定进行GPU恢复时,用户设备释放所述默认资源池中持有的资源,并根据记录的默认资源池中持有的资源重建所述默认资源池中的资源。本申请实施例保证了系统的正常使用,提升了用户体验。

Description

一种GPU资源重建的方法、用户设备,系统及存储介质
本申请要求于2016年1月29日提交中国专利局、申请号为201610067210.1、发明名称为“一种GPU资源重建的方法、用户设备及系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及云技术领域,特别涉及一种资源重建的方法、用户设备及系统。
背景技术
随着近年来终端技术和网络带宽的高速发展,云计算技术的日趋成熟催生了云交互系统,现有的云交互式系统通常包括服务器和多个用户设备,服务器可以是集群服务器,多种交互式应用都可以运行在云交互系统中。
目前,在云交互系统中有关图像绘制方面的应用,现有技术中通常都是由服务器负责图像绘制,绘制完成后,将绘制好的图像帧发送给用户设备,用户设备接收到绘制好的图像帧后,直接解码图像帧,然后显示图像画面。在云交互系统中,由于用户设备中显示图像画面时,不直接记录GPU资源的使用状态,导致在GPU丢失后进行GPU恢复时,无法释放和重建GPU资源。
发明内容
本申请实施例提供了一种资源重建的方法、用户设备,系统及存储介质,保证了系统的正常使用,提升了用户体验。
本申请第一方面提供了一种资源重建的方法,所述方法应用于云交互式系统,所述云交互式系统包括用户设备和服务器,所述用户设备中包括图形处理器GPU,所述GPU具有对应的默认资源池,所述方法包括:
所述用户设备接收所述服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
所述用户设备根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;
在确定进行GPU恢复时,所述用户设备释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
本申请实施例中第二方面提供了一种用户设备,所述用户设备位于所述云交互式系统,所述云交互式系统还包括服务器,所述用户设备中包括图形处理器GPU,所述GPU具有对应的默认资源池,所述用户设备包括:
接收单元,用于接收所述服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
记录单元,用于将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
判断单元,用于根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;
重建单元,用于在确定进行GPU恢复时,释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
本申请实施例中第三方面提供了一种云交互式系统,包括服务器和用户设备,所述用户设备为如第二方面中任一所述的用户设备。
本申请实施例第四方面提供一种非易失性存储介质,其中存储有计算机可读指令。当所述指令被执行时,使得计算机执行上述的资源重建方法。
附图说明
图1是云游戏架构示意图;
图2是本申请实施例中GPU资源重建的方法的一个实施例示意图;
图3是本申请实施例中GPU资源重建的方法的一个具体云游戏架构示意图;
图4是本申请实施例中GPU资源重建的方法的另一个实施例示意图;
图5是本申请实施例中用户设备的一个实施例示意图;
图6是本申请实施例中用户设备的另一个实施例示意图。
具体实施方式
本申请实施例提供了一种资源重建的方法用户设备,系统及存储介质,保证了系统的正常使用,提升了用户体验。
为了使本技术领域的人员更好地理解本申请方案,下面将结合本申请实施例中的附图,对本申请实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本申请一部分的实施例,而不是全部的实施例。基于本申请中的实施例,本领域普通技术人员在没有做出创造性劳动前提下所获得的所有其他实施例,都应当属于本申请保护的范围。
本申请的说明书和权利要求书及上述附图中的术语“第一”、“第二”等(如果存在)是用于区别类似的对象,而不必用于描述特定的顺序或先后次序。应该理解这样使用的数据在适当情况下可以互换,以便这里描述的实施例能够以除了在这里图示或描述的内容以外的顺序实施。此外,术语“包括”和“具有”以及他们的任何变形,意图在于覆盖不排他的包含,例如,包含了一系列步骤或单元的过程、方法、系统、产品或设备不必限于清楚地列出的那些步骤或单元,而是可包括没有清楚地列出的或对于这些过程、方法、产品或设备固有的其它步骤或单元。
下面首先介绍本申请实施例中资源重建的方法的实施例。
本申请实施例中资源重建的方法应用于云交互式系统中,如图1所示,所述云交互式系统包括用户设备和服务器,用户设备可以有多个,服务器也可以是服务器集群,多种交互式应用都可以运行在云交互系统中。用户设备可以是个人电脑(Personal Computer,PC)、笔记本和手机等终端设备。服务器可以是专用的游戏服务器,目前服务器通过录制绘制数据流,压缩后通过网络传输到用户设备,用户设备可以回放绘制指令,播放绘制资源,重现渲染画面,所述用户设备中包括图形处理器GPU。
Direct3D是微软公司为Windows操作系统开发的三维(3Dimensions,3D)图形编程接口,是Windows上3D游戏开发的基础库,是图形处理器(Graphics Processing Unit,GPU)的编程接口。
Direct 3D中管理的GPU资源按存储位置分为三种类型:托管资源池资源(Managed Resources),默认资源池资源(Default Resources),系统内存资源池资源(System Memory Resources)。其中,托管资源池资源和系统内存资源池资源不受GPU丢失影响,不需要在GPU丢失时处理。默认资源池中的资源需要在GPU丢失后检测到设备恢复时,需要释放和重新创建。
本申请实施例中用户设备具有对应的默认资源池,所述用户设备可以是智能手机、平板电脑等智能终端,也可以是MP3播放器(Moving Picture Experts Group Audio Layer III,动态影像专家压缩标准音频层面3)、MP4(Moving Picture Experts Group Audio Layer IV,动态影像专家压缩标准音频层面4)播放器、膝上型便携计算机、车载影音设备和台式计算机等等。
请参阅图2,本申请实施例中资源重建的方法一个实施例包括:
201、用户设备接收所述服务器发送的绘制数据;
其中,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源,服务器通过录制绘制数据流,压缩后通过网络传输到用户设备,用户设备接收所述服务器发送的绘制数据。
202、用户设备将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
用户设备在播放绘制资源时,都需要在默认资源池中创建对应的GPU资源使用,此步骤中,将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源,需要说明的是,若所述绘制的资源需要在默认资源池中创建对应的GPU资源,已记录为所述默认资源池中持有的资源,则可以不再重复记录。
203、用户设备根据所述绘制指令判断是否处于GPU丢失状态,若是,执行步骤204;
GPU(Graphics Processing Unit,图形处理器)是一种执行图形运算的微处理器。基于Direct3D的游戏使用GPU时,可能被剥夺GPU使用权,导致无法继续有效渲染,应用程序持有的GPU资源亦被释放,该过程称为GPU丢失,同GPU丢失有关的另外一个状态是GPU恢复,应用程序被重新赋予GPU使用权,应用程序在GPU丢失时,无法继续有效渲染,在设备恢复时,释放后重建之前持有的GPU资源。
本实施例中,所述绘制指令中可以包括用于检测当前GPU状态的第一检测函数,此时,所述用户设备根据所述绘制指令判断是否处于GPU丢失状态,包括:所述用户设备回放所述绘制指令,获取所述第一检测函数返回的第一返回值;所述用户设备根据所述第一返回值判断是否GPU丢失。
具体的,所述第一检测函数可以是绘制指令中包括的Present函数,当GPU丢失状态时,Present函数会返回D3DERR_DEVICELOST,此时获取该返回值,即可判断是否GPU丢失。
204、用户设备判断是否进行GPU恢复,若是,执行步骤205;
本实施例中,在确定处于GPU丢失状态之后,所述方法还可以包括:
所述用户设备在所述绘制指令中插入用于检测是否进行GPU恢复的第二检测函数;此时,所述用户设备判断是否进行GPU恢复,可以是:所述用户设备回放所述绘制指令,获取所述第二检测函数返回的第二返回值;所述用户设备根据所述第二返回值判断是否进行GPU恢复。
具体的,所述第二检测函数可以是TestCooperativeLevel函数,当获取到TestCooperativeLevel函数的返回值为D3DERR_DEVICENOTRESET时,确定进行GPU恢复。
本实施例中,步骤203中也可以通过TestCooperativeLevel函数进行判断是否处于GPU丢失状态,当TestCooperativeLevel函数的返回值中包括D3DERR_DEVICELOST时,此时获取该返回值,即可判断是否GPU丢失。
205、用户设备释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
一般来说,用户设备中应用程序使用图形处理器(Graphics Processing Unit,GPU)时,可能被剥夺GPU使用权,应用程序持有的GPU资源亦被释放,此过程即GPU丢失,同GPU丢失对应的另外一个状态是GPU恢复,即应用程序被重新赋予GPU使用权,在GPU恢复时,释放并重建之前持有的GPU资源。
这是由于GPU丢失后,GPU与显卡就失去了联系,所以一切与显卡有关的资源也都无法再通过设备访问了,那么这些资源必须释放并重新创建,一般来说,以D3DPOOL_DEFAULT(默认资源池)为参数创建的资源,都是在显卡中分配的内存,所以,在重置设备之前要保证所有 D3DPOOL_DEFAULT(默认资源池)类型的资源都必须释放掉。
因此,在确定进行GPU恢复时,用户设备需要释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源,本实施例中,用户设备释放所述默认资源池中持有的资源并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源可以使用处理设备丢失恢复的Reset函数来实现。
本申请实施例中在接收服务器发送的绘制数据时,都将绘制资源需要在默认GPU资源池中创建的GPU资源,记录为所述默认资源池中持有的资源,在GPU丢失后进行GPU恢复时,释放所述默认资源池中持有的资源,并通过当前记录的所述默认资源池中持有的资源进行默认资源池中的资源重建,实现GPU恢复,避免了在交互式应用系统中,由于所有数据均从服务器获取,无法进行GPU丢失后,GPU恢复的处理,保证了系统的正常使用,提升了用户体验。
可选的,本申请实施例中,所述绘制指令需要在所述默认资源池中创建的GPU资源中包括目标GPU资源,所述绘制指令中包括所述目标GPU资源的生存期信息;所述方法还包括:所述用户设备在到达所述目标GPU资源的生存期时,释放所述目标GPU资源,并删除所述目标GPU资源为所述默认资源池中持有资源的记录,即在默认资源池中持有的GPU资源达到生存期时,即释放掉该资源,并删除所述默认资源池中持有该资源的记录,实现资源更大程度的有效利用,并在重建所述默认资源池中持有的资源时,避免不必要的资源重建。
可选的,本申请实施例中,在所述根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源之后,所述方法还可以包括:
所述用户设备检测所述默认资源池中持有的资源是否全部重建成功,若否,则释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
在一些特殊情况下,可能会发生默认资源池中持有的资源未全部重建成功的情况,此时可以重新做一次释放并重建默认资源池中持有的资源步骤,确保默认资源池中持有的资源未重建成功。
下面以一具体应用场景对上述资源重建的方法进行描述,用户设备以用 户设备上运行的云游戏客户端举例,请参阅图3,游戏在云游戏服务器端上运行,云游戏服务器通过录制绘制数据流,压缩后通过互联网传输到云游戏客户端,云游戏客户端回放绘制指令,播放绘制数据,重现渲染画面,本实施例中,在云游戏客户端中设置了一Direct 3D状态记录器,用于记录接收自云游戏服务器的绘制资源需要在默认资源池中创建的GPU资源。
请参阅图4,本申请实施例中资源重建方法的另一个实施例包括:
401、云游戏客户端接收所述云游戏服务器发送的绘制数据;
其中,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源。
402、云游戏客户端通过Direct 3D状态记录器将所述绘制资源需要在Default Resources中创建的GPU资源,记录为Default Resources中持有的资源;
所述绘制指令中包括Present函数。
403、在所述绘制指令中插入TestCooperativeLevel函数;
所述TestCooperativeLevel函数用于检测是否进行GPU恢复。
404、云游戏客户端回放所述绘制指令判断是否处于GPU丢失状态,若是,执行步骤405;
云游戏客户端回放所述绘制指令判断是否处于GPU丢失状态,可以是回放所述绘制指令根据所述Present函数的返回值判断是否处于GPU丢失状态,当GPU丢失状态时,Present函数会返回D3DERR_DEVICELOST,此时获取该返回值,即可判断是否GPU丢失。
405、云游戏客户端判断是否进行GPU恢复;
当获取到TestCooperativeLevel函数的返回值为D3DERR_DEVICENOT RESET时,确定进行GPU恢复。
406、在确定进行GPU恢复时,云游戏客户端释放Default Resources中持有的资源,并根据记录的所述Default Resources中持有的资源重建所述默认资源池中的资源。
下面介绍本申请实施例中用户设备的实施例,所述用户设备位于所述云交互式系统,所述云交互式系统还包括服务器,所述用户设备中包括图形处理器GPU,所述GPU具有对应的默认资源池。
请参阅图5,本申请实施例中用户设备500的一个实施例包括:
接收单元501,用于接收所述服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
记录单元502,用于将所述绘制指令需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
判断单元503,用于根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;
重建单元504,用于在确定进行GPU恢复时,释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
本申请实施例中记录单元502在接收单元501接收服务器发送的绘制数据时,都将绘制资源需要在默认GPU资源池中创建的GPU资源,记录为所述默认资源池中持有的资源,重建单元504在判断单元503确定GPU丢失后进行GPU恢复时,释放所述默认资源池中持有的资源,并通过当前记录的所述默认资源池中持有的资源进行默认资源池中的资源重建,实现GPU恢复,避免了在交互式应用系统中,由于所有数据均从服务器获取,无法进行GPU丢失后,GPU恢复的处理,保证了系统的正常使用,提升了用户体验。
可选的,所述绘制指令中包括用于检测当前GPU状态的第一检测函数;
所述判断单元503具体用于回放所述绘制指令,获取所述第一检测函数返回的第一返回值;根据所述第一返回值判断是否GPU丢失。
可选的,在确定处于GPU丢失状态之后,所述用户设备还包括:
插入单元,用于在所述绘制指令中插入用于检测是否进行GPU恢复的第二检测函数;
所述判断单元503具体还用于回放所述绘制指令,获取所述第二检测函数返回的第二返回值;根据所述第二返回值判断是否进行GPU恢复。
可选的,所述绘制指令需要在所述默认资源池中创建的GPU资源中包括目标GPU资源,所述绘制指令中包括所述目标GPU资源的生存期信息;
所述用户设备还包括:
删除单元,用于在到达所述目标GPU资源的生存期时,释放所述目标GPU资源,并删除所述目标GPU资源为所述默认资源池中持有资源的记录。
所述根据记录的所述默认资源池中持有的资源重建所述默认资源池中的 资源之后,所述重建单元504具体还用于检测所述默认资源池中持有的资源是否全部重建成功,若否,则释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
上面从单元化功能实体的角度对本申请实施例中的用户设备进行了描述,下面从硬件处理的角度对本申请实施例中的用户设备进行描述,请参阅图6,所述用户设备应用于云交互式系统,所述云交互式系统还包括服务器,本申请实施例中的用户设备600包括:
输入装置601、输出装置602、处理器603和存储器604(其中处理器603的数量可以一个或多个,图6中以一个处理器603为例),所述用户设备中还包括GPU 605,所述GPU具有对应的默认资源池。在本申请的一些实施例中,输入装置601、输出装置602、处理器603、存储器604、GPU 605,可通过总线或其它方式连接,其中,图6中以通过总线连接为例。
本申请实施例涉及的用户设备可以具有比图6所示出的更多或更少的部件,可以组合两个或更多个部件,或者可以具有不同的部件配置或设置,各个部件可以在包括一个或多个信号处理和/或专用集成电路在内的硬件、软件或硬件和软件的组合实现。
其中,通过调用存储器604存储的操作指令,处理器603用于执行如下步骤:
通过输入装置601接收所述服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
通过调用存储器604存储的操作指令,所述GPU 605用于执行如下步骤:
根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;
在确定进行GPU恢复时,释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
可选的,所述绘制指令中包括用于检测当前GPU状态的第一检测函数;通过调用存储器604存储的操作指令,所述GPU 605具体用于执行如下操作:
回放所述绘制指令,获取所述第一检测函数返回的第一返回值;
根据所述第一返回值判断是否GPU丢失。
可选的,通过调用存储器604存储的操作指令,所述GPU 605还用于执行如下操作:
在确定处于GPU丢失状态之后,在所述绘制指令中插入用于检测是否进行GPU恢复的第二检测函数;
通过调用存储器604存储的操作指令,所述GPU 605具体用于执行如下操作:
回放所述绘制指令,获取所述第二检测函数返回的第二返回值;
根据所述第二返回值判断是否进行GPU恢复。
可选的,所述绘制指令需要在所述默认资源池中创建的GPU资源中包括目标GPU资源,所述绘制指令中包括所述目标GPU资源的生存期信息;
通过调用存储器604存储的操作指令,所述GPU 605还用于执行如下操作:
在到达所述目标GPU资源的生存期时,释放所述目标GPU资源,并删除所述目标GPU资源为所述默认资源池中持有资源的记录。
可选的,在所述根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源之后,通过调用存储器604存储的操作指令,所述GPU 605还用于执行如下操作:
检测所述默认资源池中持有的资源是否全部重建成功,若否,则释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
本实施例中,存储器604可用于存储软件程序以及模块,处理器603通过运行存储在存储器604的软件程序以及模块,从而执行各种功能应用以及数据处理。
存储器604可主要包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需的应用程序等;存储数据区可存储根据服务器的使用所创建的数据(比如镜像容器数据)等。此外,存储器604可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他易失性固态存储器件。
处理器603可能是一种集成电路芯片,具有信号的处理能力。在实现过程 中,上述方法的各步骤可以通过处理器603中的硬件的集成逻辑电路或者软件形式的指令完成。
上述的处理器603可以是通用处理器、数字信号处理器(DSP)、专用集成电路(ASIC)、现成可编程门阵列(FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
结合本申请实施例所公开的方法的步骤可以直接体现为硬件译码处理器执行完成,或者用译码处理器中的硬件及软件模块组合执行完成。软件模块可以位于随机存储器,闪存、只读存储器,可编程只读存储器或者电可擦写可编程存储器、寄存器等本领域成熟的存储介质中。该存储介质位于存储器604,处理器604读取存储器604中的信息,结合其硬件完成上述方法的步骤。
本申请实施例还提供一种计算机存储介质,其中,该计算机存储介质可存储有程序,该程序执行时包括上述方法实施例中记载的至少资源重建的方法的部分或全部步骤。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分,可以参见其他实施例的相关描述。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在本申请所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合 或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本申请各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用软件功能单元的形式实现。
所述集成的单元如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的全部或部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。
以上所述,以上实施例仅用以说明本申请的技术方案,而非对其限制;尽管参照前述实施例对本申请进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本申请各实施例技术方案的精神和范围。

Claims (12)

  1. 一种资源重建的方法,其特征在于,所述方法应用于云交互式系统,所述云交互式系统包括用户设备和服务器,所述用户设备中包括图形处理器GPU,所述GPU具有对应的默认资源池,所述方法包括:
    所述用户设备接收所述服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
    所述用户设备将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
    所述用户设备根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;以及
    在确定进行GPU恢复时,所述用户设备释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
  2. 根据权利要求1所述的方法,其特征在于,所述绘制指令中包括用于检测当前GPU状态的第一检测函数;
    所述用户设备根据所述绘制指令判断是否处于GPU丢失状态,包括:
    所述用户设备回放所述绘制指令,获取所述第一检测函数返回的第一返回值;以及
    所述用户设备根据所述第一返回值判断是否GPU丢失。
  3. 根据权利要求1或2所述的方法,其特征在于,在确定处于GPU丢失状态之后,所述方法还包括:
    所述用户设备在所述绘制指令中插入用于检测是否进行GPU恢复的第二检测函数;
    所述用户设备判断是否进行GPU恢复,包括:
    所述用户设备回放所述绘制指令,获取所述第二检测函数返回的第二返回值;以及
    所述用户设备根据所述第二返回值判断是否进行GPU恢复。
  4. 根据权利要求1或2所述的方法,其特征在于,所述绘制资源需要在所述默认资源池中创建的GPU资源中包括目标GPU资源,所述绘制指令中包括所述目标GPU资源的生存期信息;
    所述方法还包括:
    所述用户设备在到达所述目标GPU资源的生存期时,释放所述目标GPU资源,并删除所述目标GPU资源为所述默认资源池中持有资源的记录。
  5. 根据权利要求1或2所述的方法,其特征在于,在所述根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源之后,所述方法还包括:
    所述用户设备检测所述默认资源池中持有的资源是否全部重建成功,若否,则释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
  6. 一种用户设备,其特征在于,所述用户设备位于所述云交互式系统,所述云交互式系统还包括服务器,所述用户设备中包括图形处理器GPU,所述GPU具有对应的默认资源池,所述用户设备包括:
    接收单元,用于接收所述服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
    记录单元,用于将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
    判断单元,用于根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;以及
    重建单元,用于在确定进行GPU恢复时,释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
  7. 根据权利要求6所述的用户设备,其特征在于,所述绘制指令中包括用于检测当前GPU状态的第一检测函数;
    所述判断单元具体用于回放所述绘制指令,获取所述第一检测函数返回的第一返回值;根据所述第一返回值判断是否GPU丢失。
  8. 根据权利要求6或7所述的用户设备,其特征在于,在确定处于GPU丢失状态之后,所述用户设备还包括:
    插入单元,用于在所述绘制指令中插入用于检测是否进行GPU恢复的第二检测函数;
    所述判断单元具体还用于回放所述绘制指令,获取所述第二检测函数返 回的第二返回值;根据所述第二返回值判断是否进行GPU恢复。
  9. 根据权利要求6或7所述的用户设备,其特征在于,所述绘制资源需要在所述默认资源池中创建的GPU资源中包括目标GPU资源,所述绘制指令中包括所述目标GPU资源的生存期信息;
    所述用户设备还包括:
    删除单元,用于在到达所述目标GPU资源的生存期时,释放所述目标GPU资源,并删除所述目标GPU资源为所述默认资源池中持有资源的记录。
  10. 根据权利要求6或7所述的用户设备,其特征在于,在所述根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源之后,所述重建单元具体还用于检测所述默认资源池中持有的资源是否全部重建成功,若否,则释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
  11. 一种云交互式系统,其特征在于,包括服务器和用户设备,所述用户设备为如权利要求6至10中任一所述的用户设备。
  12. 一种非易失性存储介质,用于存储一个或多个计算机程序,其中,所述计算机程序包括具有一个或多个存储器的处理器可运行的指令,所述指令被计算机执行时,使得所述计算机执行以下操作:
    接收服务器发送的绘制数据,所述绘制数据中包括绘制指令和与所述绘制指令对应的绘制资源;
    将所述绘制资源需要在默认资源池中创建的GPU资源,记录为所述默认资源池中持有的资源;
    根据所述绘制指令判断是否处于GPU丢失状态,若是,判断是否进行GPU恢复;以及
    在确定进行GPU恢复时,释放所述默认资源池中持有的资源,并根据记录的所述默认资源池中持有的资源重建所述默认资源池中的资源。
PCT/CN2017/072537 2016-01-29 2017-01-25 一种gpu资源重建的方法、用户设备,系统及存储介质 WO2017129117A1 (zh)

Priority Applications (2)

Application Number Priority Date Filing Date Title
JP2018538859A JP6715334B2 (ja) 2016-01-29 2017-01-25 Gpuリソース再構築方法、ユーザー・デバイス、システム及び記憶媒体
KR1020187022500A KR102091961B1 (ko) 2016-01-29 2017-01-25 Gpu 자원 재구성 방법, 사용자 디바이스, 시스템 및 저장 매체

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201610067210.1A CN105740061B (zh) 2016-01-29 2016-01-29 一种gpu资源重建的方法、用户设备及系统
CN201610067210.1 2016-01-29

Publications (1)

Publication Number Publication Date
WO2017129117A1 true WO2017129117A1 (zh) 2017-08-03

Family

ID=56247261

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/072537 WO2017129117A1 (zh) 2016-01-29 2017-01-25 一种gpu资源重建的方法、用户设备,系统及存储介质

Country Status (4)

Country Link
JP (1) JP6715334B2 (zh)
KR (1) KR102091961B1 (zh)
CN (1) CN105740061B (zh)
WO (1) WO2017129117A1 (zh)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110502399A (zh) * 2019-08-23 2019-11-26 广东浪潮大数据研究有限公司 故障检测方法及装置
CN110648272A (zh) * 2019-08-21 2020-01-03 北京达佳互联信息技术有限公司 图形资源转换方法、装置、电子设备及存储介质
CN113347432A (zh) * 2021-05-27 2021-09-03 深圳市斯博科技有限公司 一种视频编解码方法、装置、计算机设备及存储介质

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105740061B (zh) * 2016-01-29 2019-05-31 腾讯科技(深圳)有限公司 一种gpu资源重建的方法、用户设备及系统
CN111680015B (zh) 2020-05-29 2023-08-11 北京百度网讯科技有限公司 文件资源处理方法、装置、设备和介质

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070262995A1 (en) * 2006-05-12 2007-11-15 Available For Licensing Systems and methods for video editing
CN102866919A (zh) * 2012-07-31 2013-01-09 电子科技大学 一种基于云端绘制的大规模三维场景多人协同创作方法
CN103095828A (zh) * 2013-01-14 2013-05-08 上海电力学院 基于云渲染的Web3D同步会议系统及实现同步的方法
CN105740061A (zh) * 2016-01-29 2016-07-06 腾讯科技(深圳)有限公司 一种gpu资源重建的方法、用户设备及系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100618159B1 (ko) * 2004-08-05 2006-08-29 한국정보통신대학교 산학협력단 정책 쿼럼 기반의 그리드 자원 관리 시스템 및 그 방법
TWI369126B (en) 2006-08-01 2012-07-21 Nvidia Corp Multi-graphics processor system and method for processing content communicated over a network for display purposes
CN100555245C (zh) * 2007-01-10 2009-10-28 中兴通讯股份有限公司 资源存储方法及装置
US8803892B2 (en) * 2010-06-10 2014-08-12 Otoy, Inc. Allocation of GPU resources across multiple clients
US9146909B2 (en) 2011-07-27 2015-09-29 Qualcomm Incorporated Web browsing enhanced by cloud computing
CN103595828A (zh) * 2012-08-13 2014-02-19 南京杰诺瀚软件科技有限公司 一种扩展手机和平板电脑功能的装置和方法
CN104822429A (zh) * 2012-11-28 2015-08-05 辉达公司 掌上游戏机
KR20150054484A (ko) * 2013-11-12 2015-05-20 주식회사 시큐아이 웹 어플리케이션을 구동하는 컴퓨팅 장치 및 그것의 응답시간 측정 방법

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20070262995A1 (en) * 2006-05-12 2007-11-15 Available For Licensing Systems and methods for video editing
CN102866919A (zh) * 2012-07-31 2013-01-09 电子科技大学 一种基于云端绘制的大规模三维场景多人协同创作方法
CN103095828A (zh) * 2013-01-14 2013-05-08 上海电力学院 基于云渲染的Web3D同步会议系统及实现同步的方法
CN105740061A (zh) * 2016-01-29 2016-07-06 腾讯科技(深圳)有限公司 一种gpu资源重建的方法、用户设备及系统

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110648272A (zh) * 2019-08-21 2020-01-03 北京达佳互联信息技术有限公司 图形资源转换方法、装置、电子设备及存储介质
CN110648272B (zh) * 2019-08-21 2023-10-03 北京达佳互联信息技术有限公司 图形资源转换方法、装置、电子设备及存储介质
CN110502399A (zh) * 2019-08-23 2019-11-26 广东浪潮大数据研究有限公司 故障检测方法及装置
CN110502399B (zh) * 2019-08-23 2023-09-01 广东浪潮大数据研究有限公司 故障检测方法及装置
CN113347432A (zh) * 2021-05-27 2021-09-03 深圳市斯博科技有限公司 一种视频编解码方法、装置、计算机设备及存储介质

Also Published As

Publication number Publication date
KR102091961B1 (ko) 2020-03-20
CN105740061B (zh) 2019-05-31
JP2019509547A (ja) 2019-04-04
JP6715334B2 (ja) 2020-07-01
KR20180100626A (ko) 2018-09-11
CN105740061A (zh) 2016-07-06

Similar Documents

Publication Publication Date Title
WO2017129117A1 (zh) 一种gpu资源重建的方法、用户设备,系统及存储介质
JP6438598B2 (ja) ビデオ画像の上に情報を表示するための方法及びデバイス
US10600140B2 (en) Method for selecting a display capturing mode
US11438510B2 (en) System and method for editing video contents automatically technical field
US10929460B2 (en) Method and apparatus for storing resource and electronic device
US20170324998A1 (en) Method for playing video, client, and computer storage medium
CN107426606B (zh) 录制屏幕的方法、装置、电子设备和系统
US10278001B2 (en) Multiple listener cloud render with enhanced instant replay
CN107995482B (zh) 视频文件的处理方法和装置
CN111095939A (zh) 识别媒体项目的先前流传输部分以避免重复重放
JP2018528634A (ja) 動画像をプレビューする方法及びデバイス、並びに表現パッケージを表示する方法及びデバイス
US11245885B2 (en) Method and system for playing media data
KR20220125198A (ko) 데이터의 추가 기록 방법, 장치, 전자 기기, 저장 매체 및 컴퓨터 프로그램매체
CN112822431A (zh) 一种私密音视频通话的方法与设备
CN112218148A (zh) 屏幕录制方法、装置、计算机设备和计算机可读存储介质
CN114584821B (zh) 视频处理方法及装置
CN111918082A (zh) 云游戏直播方法、装置、存储介质及设备
JP7361399B2 (ja) 画面キャプチャ方法、端末および記憶媒体
CN110719493A (zh) 弹幕显示方法、装置、电子设备及可读存储介质
US20210064270A1 (en) Method and adevice for downloading resources
CN110189388B (zh) 动画检测方法、可读存储介质及计算机设备
CN112929728A (zh) 一种视频渲染方法、装置、系统、电子设备及存储介质
CN111009021A (zh) 一种电子白板的回放方法及相关设备
CN113724225B (zh) 应用程序传输质量的确定方法及装置
WO2024124670A1 (zh) 视频播放方法、装置、计算机设备及计算机可读存储介质

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17743732

Country of ref document: EP

Kind code of ref document: A1

ENP Entry into the national phase

Ref document number: 2018538859

Country of ref document: JP

Kind code of ref document: A

NENP Non-entry into the national phase

Ref country code: DE

ENP Entry into the national phase

Ref document number: 20187022500

Country of ref document: KR

Kind code of ref document: A

WWE Wipo information: entry into national phase

Ref document number: 1020187022500

Country of ref document: KR

122 Ep: pct application non-entry in european phase

Ref document number: 17743732

Country of ref document: EP

Kind code of ref document: A1