CN116843541A - Cloud rendering method and system under multi-view angle - Google Patents

Cloud rendering method and system under multi-view angle Download PDF

Info

Publication number
CN116843541A
CN116843541A CN202311122532.8A CN202311122532A CN116843541A CN 116843541 A CN116843541 A CN 116843541A CN 202311122532 A CN202311122532 A CN 202311122532A CN 116843541 A CN116843541 A CN 116843541A
Authority
CN
China
Prior art keywords
rendering
client
reasoning
operation request
rendering server
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202311122532.8A
Other languages
Chinese (zh)
Inventor
毛波
刘祥德
安琪
李继永
陈志浩
付永强
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Beijing Digital City Research Center
Original Assignee
Beijing Digital City Research Center
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 Beijing Digital City Research Center filed Critical Beijing Digital City Research Center
Priority to CN202311122532.8A priority Critical patent/CN116843541A/en
Publication of CN116843541A publication Critical patent/CN116843541A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T1/00General purpose image data processing
    • G06T1/20Processor architectures; Processor configuration, e.g. pipelining
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/28Databases characterised by their database models, e.g. relational or object models
    • G06F16/284Relational databases
    • 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/5011Allocation of resources, e.g. of the central processing unit [CPU] to service a request the resources being hardware resources other than CPUs, Servers and Terminals
    • G06F9/5022Mechanisms to release resources
    • 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
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N5/00Computing arrangements using knowledge-based models
    • G06N5/04Inference or reasoning models

Abstract

The embodiment of the application provides a cloud rendering method and a cloud rendering system under multiple views, which relate to the technical field of cloud rendering, respond to an operation request of a client, and receive the operation request and determine a user identifier corresponding to the operation request by a working thread corresponding to a user identifier of the client; packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifications to the reasoning rendering server so as to obtain RGB data of each packaged operation request through the reasoning rendering server; based on the mapping relation, the working thread of the user identifier corresponding to the operation request transmits the RGB data of the operation request to the track corresponding to the user identifier, and outputs a video stream to the client corresponding to the user identifier through video encoding and decoding. Therefore, the parallelization technology of the GPU is fully used to improve the reasoning rendering efficiency, and the multi-view reasoning rendering service is provided.

Description

Cloud rendering method and system under multi-view angle
Technical Field
The application relates to the technical field of cloud rendering, in particular to a cloud rendering method and system under multiple viewing angles.
Background
At present, a great amount of calculation is needed for training and reasoning of a neural network model, and the energy consumption is high, so that most of the training and reasoning can be performed at the cloud, the high performance and expandability of the cloud are fully utilized, the computational power consumption of a client is reduced, and better experience service is provided for users.
At present, a transmission scheme of video streams is usually provided by adopting a cloud rendering mode, mainly a technical scheme of rendering video streams with single service and single view angle is provided, one 3090GPU is needed for model training and reasoning of the main stream, a plurality of GPU cards are needed for use of a plurality of users, large-scale hardware resources are needed for supporting popularization of the technology and the method, the hardware cost is huge, and how to improve the utilization rate of GPU resources is a problem to be solved urgently.
Disclosure of Invention
In view of this, the embodiments of the present application provide a cloud rendering method and system under multiple views, which aim to implement a single-service multiple-view cloud rendering service, so as to improve the utilization rate of GPU resources and reduce hardware cost.
In a first aspect, an embodiment of the present application provides a cloud rendering method under multiple viewing angles, where the method includes:
responding to an operation request of a client, and receiving the operation request and determining a user identifier corresponding to the operation request by a working thread corresponding to the user identifier of the client;
Packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to the reasoning rendering server so as to obtain RGB data of each packaged operation request through the reasoning rendering server;
based on the mapping relation, the working thread of the user identifier corresponding to the operation request transmits RGB data of the operation request to the track corresponding to the user identifier, and outputs video streams to the client corresponding to the user identifier through video encoding and decoding, wherein the user identifiers are arranged in one-to-one correspondence with the tracks.
Optionally, before responding to the operation request of the client, the method further comprises:
responding to a login request carrying a user identifier and a project identifier sent by a client, distributing an inference rendering server capable of processing a project corresponding to the project identifier for the user identifier, wherein the inference rendering server is configured with an inference rendering model corresponding to the project identifier;
and sending the connection information of the reasoning rendering server to the client so that the client can establish P2P connection of a webrtc protocol with the reasoning rendering server through signaling service according to the connection information.
Optionally, the assigning an inference rendering server capable of processing the item corresponding to the item identifier to the user identifier includes:
determining an inference rendering server for processing the item corresponding to the item identifier according to the item identifier;
if the number of the clients of the current service is smaller than a first threshold value, the inference rendering server is used as the inference rendering server allocated to the user corresponding to the user identifier, and the first threshold value is the maximum value or the preset value of the number of the clients served by the inference rendering server;
if no inference rendering server with the number of the clients of the current service being smaller than a first threshold value exists, assigning an idle inference rendering server for the user corresponding to the user identifier, and configuring an inference rendering model corresponding to the item identifier for the inference rendering server.
Optionally, before the responding to the login request with the user identifier and the item identifier sent by the client, the method further includes:
training a neural network model of an item in response to a video or a picture of the item uploaded by a client, and generating an inference rendering model file;
and storing the address of the reasoning rendering model file of the project and the project identification of the project in a relational database correspondingly.
Optionally, the configuring the inference rendering model corresponding to the item identifier for the inference rendering server includes:
determining the address of the reasoning rendering model file corresponding to the item identification according to the relational database;
and loading the reasoning rendering model file corresponding to the address to the reasoning rendering server, so that the reasoning rendering server configures a reasoning rendering model corresponding to the reasoning rendering model file and is used for processing an operation request of the item corresponding to the item identification.
Optionally, the method further comprises:
generating a user identifier of the client in response to the first login of the client;
and responding to the logout of the client, ending the working thread corresponding to the user identifier of the client, and releasing the reasoning rendering server resource serving the client.
Optionally, in response to an operation request of a client, a worker thread corresponding to a user identifier of the client receives the operation request and determines the user identifier corresponding to the operation request, including:
responding to an operation request of a client, and if a working thread corresponding to a user identifier of the client exists, receiving the operation request and determining the user identifier corresponding to the operation request by the working thread;
If the working thread corresponding to the user identifier does not exist, a working thread corresponding to the user identifier is created, the working thread receives the operation request and determines the user identifier corresponding to the operation request, and the working thread is used for receiving the operation request of the client and transmitting RGB data obtained after the operation request is processed by the reasoning rendering server to a track corresponding to the user identifier of the client.
Optionally, after the worker thread corresponding to the user identifier of the client receives the operation request and determines the user identifier corresponding to the operation request, the method further includes:
the working thread correspondingly stores the operation request and the user identification corresponding to the operation request into the message middleware;
the step of packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to the reasoning rendering server comprises the following steps:
the message middleware packages operation requests of a plurality of clients of the same reasoning rendering service and the mapping relation between the operation requests and user identifiers to form package data;
And transmitting the packed data to the reasoning rendering server through a first pipeline, wherein the first pipeline is a pipeline which is preset by the message middleware and corresponds to the reasoning rendering server.
Optionally, the packaging and conveying the operation requests of the plurality of clients served by the same inference rendering server and the mapping relation between the operation requests and the user identifier to the inference rendering server includes:
and periodically packaging and conveying operation requests of a plurality of clients served by the same reasoning rendering server and the mapping relation between the operation requests and the user identification to the reasoning rendering server.
In a second aspect, an embodiment of the present application provides a cloud rendering system under multiple views, where the system includes a bridge server and an inference rendering server, where the bridge server includes a message middleware, a video encoder, and an RGB data receiving end;
the camera controller of the client establishes communication connection with the message middleware, and is used for receiving an operation request sent by the camera controller through a working thread corresponding to a user identifier of the client and storing the operation request to the message middleware;
The message middleware is connected with an inference rendering server and is used for packaging and transmitting operation requests of a plurality of clients served by the same inference rendering server and the mapping relation between the operation requests and user identifiers to the inference rendering server so as to obtain RGB data of each packaged operation request through the inference rendering server and send the RGB data to the RGB data receiving end;
the RGB data receiving end is connected with the video encoder through a track, the track is arranged in one-to-one correspondence with the user identifications of a plurality of clients, and a working thread corresponding to the user identifications of each operation request is used for conveying the RGB data of the operation request to the track of the user identifications and forming a coded video stream corresponding to the user identifications through the video encoder;
the video encoder is connected with the video decoder of the client and is used for transmitting the encoded video stream to the video decoder of the client corresponding to the user identifier according to the user identifier of the encoded video stream so as to decode the decoded video stream for display at the client.
The embodiment of the application provides a cloud rendering method and a cloud rendering system under multiple views. After the client sends an operation request, the cloud end can timely receive a work thread which is pre-configured corresponding to the user identification of the client. And then, packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and the mapping relation between the operation requests and user identifiers to the reasoning rendering server so as to obtain the RGB data of each packaged operation request through the reasoning rendering server. And packaging and pushing operation requests of a plurality of clients served by the same reasoning rendering server to the reasoning rendering server, wherein the operation requests are packaged and pushed, and the parallelization technology of the GPU is fully used to improve the efficiency of the reasoning rendering server. Meanwhile, one reasoning and rendering server receives operation requests of a plurality of clients in a package, and realizes reasoning and rendering of the operation requests of the plurality of clients (multiple perspectives) in one project. And finally, based on the mapping relation, the working thread of the user identifier corresponding to the operation request transmits the RGB data of the operation request to the track corresponding to the user identifier, and outputs a video stream to the client corresponding to the user identifier through the encoding and decoding of the video, wherein the user identifiers are arranged in one-to-one correspondence with the tracks. And the working thread corresponding to the user identifier transmits the RGB data of the operation request corresponding to the user identifier to the track corresponding to the user identifier and outputs a video stream to the client of the user identifier through video encoding and decoding. Therefore, each reasoning rendering server can process operation requests of a plurality of clients served by the reasoning rendering server at the same time, multi-view reasoning rendering is achieved, the parallelization technology of the GPU is fully used for improving the reasoning rendering efficiency, RGB data of the operation requests are obtained at the same time, finally, video streams are output to the corresponding clients through tracks corresponding to the user identification, and multi-view reasoning rendering service is provided.
Drawings
In order to more clearly illustrate this embodiment or the technical solutions of the prior art, the drawings that are required for the description of the embodiment or the prior art will be briefly described, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a cloud rendering method under multiple views according to an embodiment of the present application;
FIG. 2 is a schematic diagram of RGB data corresponding relation of operation request, user identifier and reasoning rendering provided by the embodiment of the application;
fig. 3 is a schematic structural diagram of a cloud rendering system under multiple viewing angles according to an embodiment of the present application.
Detailed Description
The transmission scheme for providing video streams by adopting a cloud rendering mode is mainly a technical scheme for rendering video streams with single service and single view angle, one 3090GPU is needed for one model training and reasoning of the main stream, a plurality of GPU cards are needed for use by a plurality of users, large-scale hardware resources are needed for supporting popularization of the technology and the method, the hardware cost is huge, and how to improve the utilization rate of the GPU resources is an urgent problem to be solved.
Based on the problems, the method and the system establish the tracks of the video streams for the clients under the single rendering service item, realize that the users only need to carry out in the same reasoning rendering server under the same scene experience, and use one GPU card, so that the rendering capability of the view angle scenes of the clients can be realized, the rendering of multiple views is realized, and the hardware cost and the hardware scene introduction of cloud rendering are greatly reduced.
The method provided by the embodiment of the application is executed by at least one client and the cloud server.
In a scene (e.g., a 3D scene) of a certain project, the client responds to an operation request (e.g., an operation request for triggering shooting in a 3D scene of VR) executed by a user of the client, establishes communication connection with the cloud server through a websocket protocol, and sends the operation request to the cloud server.
The cloud server may process at least one item (e.g., a 3D rendering item of a fitness scene and a 3D rendering item of a game scene), including a plurality of GPUs, each GPU acting as an inferential rendering server.
The server distributes the reasoning rendering server for processing the items of the client to the client in advance. The reasoning rendering server is preloaded with a reasoning rendering model aiming at the project scene, and the reasoning rendering server conducts reasoning rendering service on the operation request to output RGB data.
A P2P connection of a webtc protocol is created between the reasoning rendering server and the client through a signaling service. The reasoning rendering server outputs the RGB data of the operation request of the client to the client based on the webtc protocol.
It will be apparent that the described embodiments are only some, but not all, embodiments of the application. All other embodiments, which can be made by those skilled in the art based on the embodiments of the application without making any inventive effort, are intended to be within the scope of the application.
Fig. 1 is a flow chart of a cloud rendering method under multiple views, which is provided in an embodiment of the present application, referring to fig. 1, and the cloud rendering method under multiple views includes:
s101, responding to an operation request transformation of a client, receiving the operation request by a working thread corresponding to a user identification of the client, and determining the user identification corresponding to the operation request.
The operation request is an operation request corresponding to the triggered operation under the view angle corresponding to the client under the scene needing to be inferentially rendered. For example, in a VR scenario, under the perspective of the current client (user), a corresponding operation request to be inferentially rendered is formed through a shooting operation triggered by a handle.
The user identifier is an identifier for identifying a client terminal that transmits an operation request. In one possible implementation, the client first requests to log on to the cloud server, and a corresponding user identifier may be generated.
The cloud server creates a working thread corresponding to each user identifier. Each working thread is used for receiving an operation request of a client corresponding to the working thread.
S102, packaging and conveying operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to the reasoning rendering server so as to obtain RGB data of each packaged operation request through the reasoning rendering server.
One inferential rendering server may serve at least one client, the inferential rendering server processing the same cloud-rendered items as the clients of the service.
The inference rendering server is preloaded with an inference rendering model of a project to be processed, wherein the inference rendering model is obtained by performing cloud rendering neural network model training on scene pictures or videos in the project.
Referring to fig. 2, a schematic diagram of the RGB data correspondence relationship between an operation request, a user identifier, and a reasoning rendering is shown. The operation requests of a plurality of clients served by the same reasoning rendering server and the mapping relation between the operation requests and the user identifier are packaged, and each time package is formed into a package data Batch, for example, see the package data Batch1 shown in fig. 2, the operation request transform1 corresponding to the user identifier useid 1 and the user identifier 1, the operation request transform2 corresponding to the user identifier useid 2 and the user identifier 2, the operation request transform3 corresponding to the user identifier useid 3 and the user identifier 3, and the like.
And transmitting the packed data of each packing to an inference rendering server to obtain RGB data of each operation request inference rendering in the packed data. For example, see fig. 2, transform 1-to-transform rendering data RGB1 corresponding to userid1, transform 2-to-transform rendering data RGB2 corresponding to userid2, transform 3-to-transform rendering data RGB3 corresponding to userid3, and the like.
S103, based on the mapping relation, the working thread of the user identifier corresponding to the operation request transmits RGB data of the operation request to the track corresponding to the user identifier, and outputs video streams to the client corresponding to the user identifier through encoding and decoding of video, wherein the user identifiers are arranged in one-to-one correspondence with the tracks.
And the reasoning rendering server performs reasoning rendering on each operation request in the packed data to obtain RGB data. The RGB data comprises RGB matrix of each frame obtained after the reasoning rendering according to the operation request and the reasoning rendering model, and is used for forming the video stream through the track of the video stream and combining the encoding and decoding of the encoder and the decoder.
The mapping relation is the corresponding relation between the user identification of the client and the operation request.
Each working thread of the user identifier transmits RGB data corresponding to the operation request to a track corresponding to the user identifier, the track compresses the RGB data, the video encoder outputs the encoded video stream to a client corresponding to the user identifier, the client decodes the encoded video stream through the decoder, and the decoded video stream is displayed on the client.
According to the above steps S101-S103, each inference rendering server of the present application can process operation requests of multiple clients served by the inference rendering server at the same time, so as to implement multi-view inference rendering, fully use the parallelization technology of the GPU to improve the inference rendering efficiency, and obtain RGB data of multiple operation requests at the same time, and finally, output video streams to corresponding clients through the tracks set corresponding to each user identifier, so as to provide multi-view inference rendering service.
In the embodiment of the present application, there are a plurality of possible implementations before step S101 in fig. 1, and the following description will be given. It should be noted that the implementations presented in the following description are only exemplary and not representative of all implementations of the embodiments of the present application.
In one possible implementation.
A1, responding to a login request carrying a user identifier and a project identifier sent by a client, distributing an inference rendering server capable of processing a project corresponding to the project identifier for the user identifier, wherein the inference rendering server is configured with an inference rendering model corresponding to the project identifier.
The client side carries a User ID and an item ID to request a resource scheduling service in the cloud server.
The item identification corresponding to the item served by the reasoning rendering server is the same as the item identification of the item corresponding to the client.
The inferred rendering model is formed from pictures or videos in a cloud rendering scene of an item in conjunction with neural network model (e.g., instance-NGP, block-NeRF, or MERF) training. The trained reasoning rendering model is used for carrying out 3D image rendering in the cloud rendering scene of the project according to an operation request generated by the operation triggered by the user at the client to obtain RGB values of the reasoning image.
A2, sending the connection information of the reasoning rendering server to the client so that the client can establish P2P connection of a webrtc protocol with the reasoning rendering server through signaling service according to the connection information.
The client creates P2P connection of the webtc protocol through a signaling service with the distributed reasoning rendering server, so that the follow-up client receives a video stream formed by the reasoning rendering server after encoding and decoding RGB data which are rendered according to the operation request of the client based on the webtc protocol.
Based on the above steps A1-A2, it can be known that, based on the user identifier and the item identifier of each client, an inference rendering server matched with the item of the client is allocated to the client, and the client and the allocated inference rendering server are connected, so that the inference rendering server processes the operation request of the client corresponding to the item.
When a plurality of clients request to allocate the reasoning rendering server, each client correspondingly executes the steps A1-A3 once, and allocates the reasoning rendering server for each client. In the application, each reasoning rendering server can process a plurality of operation requests in parallel corresponding to the same item, so that each reasoning rendering server can serve a plurality of clients simultaneously, and when the reasoning rendering servers are distributed for the clients, in one possible implementation manner, the specific method can be as follows:
a11, determining an inference rendering server for processing the item corresponding to the item identification according to the item identification.
And screening out an reasoning rendering server which is currently used for processing the item corresponding to the item identification in the cloud server.
A12, if the number of clients of the current service is smaller than a first threshold value, the inference rendering server is used as the inference rendering server allocated to the user corresponding to the user identifier, and the first threshold value is the maximum value or the preset value of the number of clients served by the inference rendering server.
Each inferential rendering server services has a maximum of an upper limit on the number of clients. I.e., the upper limit on the number of operation requests of clients that each inferential rendering server can handle simultaneously. The first threshold value of the application can be the maximum value of the number of clients which can be simultaneously served by the reasoning rendering server, and can also be a preset value which is set according to the considered needs.
And (c) taking one of the reasoning rendering servers, of which the number of the clients served in the step (A11) is smaller than a first threshold, as the reasoning rendering server allocated for the clients.
A13, if no inference rendering server with the number of clients of the current service being smaller than a first threshold value exists, assigning an idle inference rendering server for the user corresponding to the user identifier, and configuring an inference rendering model corresponding to the item identifier for the inference rendering server.
According to the above steps a11-a13, each inference rendering server loads an inference rendering model to process an item, and when a new client requests to allocate the inference rendering server, allocates the inference rendering servers with the number of clients of a service not exceeding the first threshold for the new client according to the item corresponding to the new client. And only if the number of clients served by the reasoning rendering server corresponding to the item exceeds a first threshold value, allocating idle reasoning rendering servers for the reasoning rendering servers. And the flexible scheduling of the reasoning rendering servers is realized, and each reasoning rendering server is fully utilized.
Based on the above step a13, when a spare inference rendering server needs to be allocated to a new client, the current spare inference rendering server is enabled to have the function of processing the operation request of the new client, in one possible implementation manner, the inference rendering server loads, from the relational database, an inference rendering model file corresponding to the item identifier of the client, so that the inference rendering server can process the operation request under the cloud rendering scene corresponding to the item.
Further, the method for generating the reasoning rendering model file can be that,
a131, training a neural network model of the project in response to the video or the picture of the project uploaded by the client, and generating an inference rendering model file.
The neural network model can adopt an instance-NGP, a block-NeRF or a MERF and the like.
And A132, storing the address of the reasoning rendering model file of the project and the project identification of the project in a relational database correspondingly.
When the idle reasoning rendering server is to provide service for the project of the new client, the project identifier corresponding to the project is searched from the relational database, and the address of the reasoning rendering model file corresponding to the project identifier is determined, so that the reasoning rendering file of the address is loaded into the reasoning rendering server, the reasoning rendering server is enabled to configure the reasoning rendering model corresponding to the reasoning rendering model file, and the reasoning rendering server has the capability of processing the operation request corresponding to the project.
In an embodiment of the present application, possible implementation manners before the step A1 further include: and generating a user identification of the client in response to the first login of the client.
When a new client logs in a cloud server for the first time, a user identifier is registered and generated, and a subsequent cloud server determines a corresponding client according to the user identifier.
In an embodiment of the present application, the step S103 of fig. 1 may further include: and responding to the logout of the client, ending the working thread corresponding to the user identifier of the client, and releasing the reasoning rendering server resource serving the client.
After repeating steps S101-S103 to output the corresponding video stream for the client, the client simply exits the cloud server, and may end the working thread corresponding to the client, release the reasoning rendering server allocated to the client, and release the resource.
In the embodiment of the present application, there are possible implementations of step S101 in fig. 1, and the following description will respectively describe. It should be noted that the implementations presented in the following description are only exemplary and not representative of all implementations of the embodiments of the present application.
B1, responding to an operation request of a client, and if a working thread corresponding to a user identifier of the client exists, receiving the operation request and determining the user identifier corresponding to the operation request by the working thread.
The working threads are in one-to-one correspondence with the user identifications, and are used for receiving the operation requests of the corresponding clients (for the periodical packaging of the operation requests in the following step S102 and for being sent to an inference rendering server allocated for a client list), and transmitting RGB data obtained after the inference rendering server processes the operation requests of the clients to the tracks of the corresponding user identifications, so that video streams are output to the clients.
Because the system overhead of creating each working thread is large, the working thread is directly used under the condition that the client side has the corresponding working thread.
And B2, if the working thread corresponding to the user identifier does not exist, creating the working thread corresponding to the user identifier, wherein the working thread is used for receiving the operation request and determining the user identifier corresponding to the operation request, and the working thread is used for receiving the operation request of the client and transmitting RGB data obtained after the operation request is processed by the reasoning rendering server to a track corresponding to the user identifier of the client.
Based on the above steps B1-B2, it can be known that the user identifier of each client correspondingly creates a working thread for controlling the complete flow from sending the operation request to obtaining the video stream corresponding to the operation request.
In the embodiment of the present application, for step S101 of fig. 1, after the worker thread corresponding to the user identifier of the client receives the operation request and determines the user identifier corresponding to the operation request, the method further includes: and the working thread correspondingly stores the operation request and the user identification corresponding to the operation request into the message middleware.
An exemplary message middleware may employ a message queue library ZeroMQ (ZMQ).
The message middleware establishes a pipeline corresponding to each working reasoning rendering server, and the working thread sends the corresponding user identification and the received operation request to the reasoning rendering server allocated by the corresponding client according to the reasoning rendering server allocated by the client.
In the embodiment of the present application, after sending the operation request to the message middleware based on the working thread, in step S102 of fig. 1, the specific implementation manner may be:
the step of packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to the reasoning rendering server comprises the following steps:
and the message middleware packages operation requests of a plurality of clients of the same reasoning rendering service and the mapping relation between the operation requests and the user identification to form package data.
And transmitting the packed data to the reasoning rendering server through a first pipeline, wherein the first pipeline is a pipeline which is preset by the message middleware and corresponds to the reasoning rendering server.
The data corresponding to each pipeline of the message middleware is packaged regularly, and the packaged data is transmitted to the corresponding reasoning rendering server through the corresponding pipeline.
The cloud rendering method under multiple views provided by the embodiment of the application is introduced, and the cloud rendering method under multiple views is exemplarily described below in combination with specific application scenes.
Exemplary, a specific application method of cloud rendering under multiple views includes:
s31, responding to a login request of the client, and generating a user identifier of the client.
The client may be a browser, an Zhuoduan, ISO, unit, or the like.
S32, responding to the content of the first item uploaded by the client list through shooting and/or video recording and the like, generating an item identification of the first item, performing neural network model training on the uploaded content of the first item, generating an inference model file, and storing the relation between the file address and Project ID of the inference model file in a relation database.
S33, roaming experience of a user under the view angle of the client side is realized by the following specific logic:
s331, responding to a login request carrying a user identifier and a project identifier sent by a client, and distributing an inference rendering server capable of processing the project corresponding to the project identifier for the user identifier by a resource scheduling service.
The method for allocating the reasoning rendering server to the client is detailed in the steps A11-A13 in the embodiment.
And S332, sending the connection information of the reasoning rendering server to the client so that the client can establish P2P connection of a webrtc protocol with the reasoning rendering server through signaling service according to the connection information.
S333, responding to the first operation request of the user, confirming whether the user identifier of the client of the user has a corresponding working thread, if so, continuing to execute the subsequent steps, and if not, creating a working thread corresponding to the user identifier.
The working thread creates a corresponding video stream track according to the user identification, and the track is bound with the user identification correspondingly. The working thread is used for regularly receiving an operation request transfrom of a user transmitted by the client, and transmitting RGB values generated by the post-reasoning rendering server corresponding to the operation request of the client to a track corresponding to the user identifier.
S334, triggering operation by a user through the client, generating different operation requests trans-from, and transmitting the operation requests trans-from through the client and the cloud server through a websocket protocol. And responding to the operation request sent by the client, receiving the operation request by a working thread corresponding to the user identifier of the client in the cloud server, and sending the operation request and the corresponding user identifier to a message middleware (ZMQ) by the working thread.
S335, the message middleware packages operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to form a package data batch, and transmits the package data to the reasoning rendering server.
S336, after unpacking the received Batch into a plurality of operation requests, the reasoning rendering model in the reasoning rendering server calculates each operation request to obtain RGB values of the reasoning image under each operation request.
S337, based on the mapping relation, the working thread of the user identifier corresponding to the operation request transmits RGB data of the operation request to the track corresponding to the user identifier, and outputs a video stream to the client corresponding to the user identifier through video encoding and decoding (based on Webrtc).
S338, repeating the steps S334-S337, and continuously outputting the video stream by the client.
And S339, stopping the use of the user, logging out the client, ending the working thread corresponding to the user identification of the client, informing the resource scheduling service, disconnecting the cloud server from the client, and releasing the reasoning rendering server resource serving the client.
Based on the embodiment, the method and the device package and push the operation requests of the clients served by the same reasoning rendering server to the reasoning rendering server, package and push, and fully use the parallelization technology of the GPU to improve the efficiency of the reasoning rendering server. Meanwhile, the RGB data of each operation request outputs video streams to the client through the track corresponding to each user identifier, and multi-view reasoning rendering service is provided. And finally, the number of the reasoning rendering servers needed by the resource scheduling server elastic scheduling is distributed to the new clients after the number of the clients of the reasoning rendering service of each working state of the corresponding item reaches a first threshold.
The embodiments of the present application provide some specific implementation manners of a cloud rendering method under multiple views, and based on this, the present application also provides a corresponding system. The system provided by the embodiment of the application is described below.
Referring to fig. 3, a schematic structural diagram of a cloud rendering system under multiple viewing angles is shown, the system includes:
bridge Server and inference rendering Server Render Cloud (e.g., inference rendering Server 1, inference rendering Server 2, and inference rendering Server 3 in fig. 3. Three inference rendering servers may correspond to the same item, or may also correspond to items respectively;
the camera controller Camera Controller of the client establishes communication connection based on websocket protocol with the message middleware, and is used for receiving an operation request sent by the camera controller through a working thread corresponding to a user identifier of the client and storing the operation request to the message middleware;
the message middleware is connected with an inference rendering server and is used for packaging and transmitting operation requests of a plurality of clients served by the same inference rendering server and the mapping relation between the operation requests and user identifiers to the inference rendering server so as to obtain RGB data of each packaged operation request through the inference rendering server and send the RGB data to the RGB data receiving end;
The RGB data receiving end is connected with the video encoder through a track, the track is arranged in one-to-one correspondence with the user identifications of a plurality of clients, and a working thread corresponding to the user identifications of each operation request is used for conveying the RGB data of the operation request to the track of the user identifications and forming a coded video stream corresponding to the user identifications through the video encoder;
the video encoder is connected with the video decoder of the client and is used for transmitting the encoded video stream to the video decoder of the client corresponding to the user identifier according to the user identifier of the encoded video stream so as to decode the decoded video stream for display at the client.
According to the cloud rendering system under the multi-view angle, the bridge server is arranged between the client and the reasoning rendering server, decoupling of the client and the reasoning rendering server can be well achieved, the reasoning rendering server can provide services according to requirements (resource scheduling services can be arranged in the bridge server, the number of the reasoning rendering servers is increased or reduced according to the number of the clients to be served, the clients at the front end are not perceived), each reasoning rendering server can process operation requests of a plurality of clients served by the reasoning rendering server at the same time, multi-view reasoning rendering is achieved, the parallelization technology of the GPU is fully used for improving reasoning rendering efficiency, RGB data of the plurality of operation requests are obtained at the same time, finally, video streams are output to the corresponding clients through tracks set corresponding to each user identifier, and the multi-view reasoning rendering service is provided.
In a possible implementation manner, the bridge server further comprises a resource scheduling service module, which is used for responding to a login request carrying a user identifier and a project identifier sent by a client, and distributing an inference rendering server capable of processing a project corresponding to the project identifier for the user identifier; and sending the connection information of the reasoning rendering server to the client so that the client can establish P2P connection of a webrtc protocol with the reasoning rendering server through signaling service according to the connection information.
Further, the resource scheduling service module is further configured to determine, according to the item identifier, an inference rendering server that processes an item corresponding to the item identifier; if the number of the clients of the current service is smaller than a first threshold value, the inference rendering server is used as the inference rendering server allocated to the user corresponding to the user identifier, and the first threshold value is the maximum value or the preset value of the number of the clients served by the inference rendering server; if no reasoning rendering server with the number of the clients of the current service being smaller than the first threshold value exists, an idle reasoning rendering server is allocated for the user corresponding to the user identifier.
In one possible implementation, the system further includes a model training module and a relational database, the model training module is used for training a neural network model of an item in response to video or pictures of the item uploaded by a client, and generating an inference rendering model file. The relational database is used for storing the address of the reasoning rendering model file of the project and the project identification of the project.
Further, the inference rendering server is configured to load an inference rendering model file corresponding to the item identifier from the relational database, so that the inference rendering server can process an operation request under a cloud rendering scene corresponding to the item.
In one possible implementation, the system is further configured to generate a user identification of the client in response to a first login of the client. The system is also used for responding to the log-out of the client, ending the working thread corresponding to the user identification of the client and releasing the reasoning rendering server resource serving the client.
In one possible implementation manner, the system is further configured to respond to an operation request of a client, and if a working thread corresponding to a user identifier of the client exists, the working thread receives the operation request and determines the user identifier corresponding to the operation request; if the working thread corresponding to the user identifier does not exist, a working thread corresponding to the user identifier is created, the working thread receives the operation request and determines the user identifier corresponding to the operation request, and the working thread is used for receiving the operation request of the client and transmitting RGB data obtained after the operation request is processed by the reasoning rendering server to a track corresponding to the user identifier of the client.
In one possible implementation manner, the working thread is configured to store the operation request and the user identifier corresponding to the operation request to the message middleware.
The message middleware is used for packaging operation requests of a plurality of clients served by the same reasoning rendering service and mapping relations between the operation requests and user identifiers to form packaged data; and transmitting the packed data to the reasoning rendering server through a first pipeline, wherein the first pipeline is a pipeline which is preset by the message middleware and corresponds to the reasoning rendering server.
Further, the message middleware is further configured to periodically package and send operation requests of a plurality of clients served by the same inference rendering server and mapping relations between the operation requests and user identifiers to the inference rendering server.
The embodiment of the application also provides corresponding equipment and a computer storage medium, which are used for realizing the scheme provided by the embodiment of the application.
The device comprises a memory and a processor, wherein the memory is used for storing instructions or codes, and the processor is used for executing the instructions or codes so as to enable the device to execute the cloud rendering method under the multi-view angle.
The computer storage medium stores codes, and when the codes are executed, equipment for executing the codes realizes the cloud rendering method under the multi-view angle according to any embodiment of the application.
The "first" and "second" in the names of "first", "second" (where present) and the like in the embodiments of the present application are used for name identification only, and do not represent the first and second in sequence.
From the above description of embodiments, it will be apparent to those skilled in the art that all or part of the steps of the above described example methods may be implemented in software plus general hardware platforms. Based on such understanding, the technical solution of the present application may be embodied in the form of a software product, which may be stored in a storage medium, such as a read-only memory (ROM)/RAM, a magnetic disk, an optical disk, etc., and includes several instructions for causing a computer device (which may be a personal computer, a server, or a network communication device such as a router) to perform the method according to the embodiments or some parts of the embodiments of the present application.
In this specification, each embodiment is described in a progressive manner, and identical and similar parts of each embodiment are all referred to each other, and each embodiment mainly describes differences from other embodiments. In particular, for the device embodiments, since they are substantially similar to the method embodiments, the description is relatively simple, and reference is made to the description of the method embodiments for relevant points. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment. Those of ordinary skill in the art will understand and implement the present application without undue burden.
The foregoing description of the exemplary embodiments of the application is merely illustrative of the application and is not intended to limit the scope of the application.

Claims (10)

1. A method of cloud rendering at multiple viewing angles, the method comprising:
responding to an operation request of a client, and receiving the operation request and determining a user identifier corresponding to the operation request by a working thread corresponding to the user identifier of the client;
packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to the reasoning rendering server so as to obtain RGB data of each packaged operation request through the reasoning rendering server;
based on the mapping relation, the working thread of the user identifier corresponding to the operation request transmits RGB data of the operation request to the track corresponding to the user identifier, and outputs video streams to the client corresponding to the user identifier through video encoding and decoding, wherein the user identifiers are arranged in one-to-one correspondence with the tracks.
2. The method of claim 1, further comprising, prior to responding to the operation request of the client:
Responding to a login request carrying a user identifier and a project identifier sent by a client, distributing an inference rendering server capable of processing a project corresponding to the project identifier for the user identifier, wherein the inference rendering server is configured with an inference rendering model corresponding to the project identifier;
and sending the connection information of the reasoning rendering server to the client so that the client can establish P2P connection of a webrtc protocol with the reasoning rendering server through signaling service according to the connection information.
3. The method of claim 2, wherein assigning the user identification with an inferential rendering server capable of handling the item corresponding to the item identification comprises:
determining an inference rendering server for processing the item corresponding to the item identifier according to the item identifier;
if the number of the clients of the current service is smaller than a first threshold value, the inference rendering server is used as the inference rendering server allocated to the user corresponding to the user identifier, and the first threshold value is the maximum value or the preset value of the number of the clients served by the inference rendering server;
if no inference rendering server with the number of the clients of the current service being smaller than a first threshold value exists, assigning an idle inference rendering server for the user corresponding to the user identifier, and configuring an inference rendering model corresponding to the item identifier for the inference rendering server.
4. The method of claim 3, further comprising, prior to said responding to the client-sent login request carrying the user identifier and the item identifier:
training a neural network model of an item in response to a video or a picture of the item uploaded by a client, and generating an inference rendering model file;
and storing the address of the reasoning rendering model file of the project and the project identification of the project in a relational database correspondingly.
5. The method of claim 4, wherein configuring the inference rendering model corresponding to the item identification for the inference rendering server comprises:
determining the address of the reasoning rendering model file corresponding to the item identification according to the relational database;
and loading the reasoning rendering model file corresponding to the address to the reasoning rendering server, so that the reasoning rendering server configures a reasoning rendering model corresponding to the reasoning rendering model file and is used for processing an operation request of the item corresponding to the item identification.
6. The method according to claim 1, wherein the method further comprises:
generating a user identifier of the client in response to the first login of the client;
And responding to the logout of the client, ending the working thread corresponding to the user identifier of the client, and releasing the reasoning rendering server resource serving the client.
7. The method of claim 1, wherein in response to an operation request of a client, a worker thread corresponding to a user identification of the client receives the operation request and determines the user identification corresponding to the operation request, comprising:
responding to an operation request of a client, and if a working thread corresponding to a user identifier of the client exists, receiving the operation request and determining the user identifier corresponding to the operation request by the working thread;
if the working thread corresponding to the user identifier does not exist, a working thread corresponding to the user identifier is created, the working thread receives the operation request and determines the user identifier corresponding to the operation request, and the working thread is used for receiving the operation request of the client and transmitting RGB data obtained after the operation request is processed by the reasoning rendering server to a track corresponding to the user identifier of the client.
8. The method of claim 1, further comprising, after the worker thread corresponding to the user identifier of the client receives the operation request and determines the user identifier corresponding to the operation request:
The working thread correspondingly stores the operation request and the user identification corresponding to the operation request into the message middleware;
the step of packaging and transmitting operation requests of a plurality of clients served by the same reasoning rendering server and mapping relations between the operation requests and user identifiers to the reasoning rendering server comprises the following steps:
the message middleware packages operation requests of a plurality of clients of the same reasoning rendering service and the mapping relation between the operation requests and user identifiers to form package data;
and transmitting the packed data to the reasoning rendering server through a first pipeline, wherein the first pipeline is a pipeline which is preset by the message middleware and corresponds to the reasoning rendering server.
9. The method of claim 1, wherein the packaging and delivering to the inferential rendering server operation requests of a plurality of clients served by the same inferential rendering server and a mapping relationship of the operation requests and user identifications, comprises:
and periodically packaging and conveying operation requests of a plurality of clients served by the same reasoning rendering server and the mapping relation between the operation requests and the user identification to the reasoning rendering server.
10. The cloud rendering system under the multi-view angle is characterized by comprising a network bridge server and an reasoning rendering server, wherein the network bridge server comprises a message middleware, a video encoder and an RGB data receiving end;
the camera controller of the client establishes communication connection with the message middleware, and is used for receiving an operation request sent by the camera controller through a working thread corresponding to a user identifier of the client and storing the operation request to the message middleware;
the message middleware is connected with an inference rendering server and is used for packaging and transmitting operation requests of a plurality of clients served by the same inference rendering server and the mapping relation between the operation requests and user identifiers to the inference rendering server so as to obtain RGB data of each packaged operation request through the inference rendering server and send the RGB data to the RGB data receiving end;
the RGB data receiving end is connected with the video encoder through a track, the track is arranged in one-to-one correspondence with the user identifications of a plurality of clients, and a working thread corresponding to the user identifications of each operation request is used for conveying the RGB data of the operation request to the track of the user identifications and forming a coded video stream corresponding to the user identifications through the video encoder;
The video encoder is connected with the video decoder of the client and is used for transmitting the encoded video stream to the video decoder of the client corresponding to the user identifier according to the user identifier of the encoded video stream so as to decode the decoded video stream for display at the client.
CN202311122532.8A 2023-09-01 2023-09-01 Cloud rendering method and system under multi-view angle Pending CN116843541A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311122532.8A CN116843541A (en) 2023-09-01 2023-09-01 Cloud rendering method and system under multi-view angle

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311122532.8A CN116843541A (en) 2023-09-01 2023-09-01 Cloud rendering method and system under multi-view angle

Publications (1)

Publication Number Publication Date
CN116843541A true CN116843541A (en) 2023-10-03

Family

ID=88162070

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311122532.8A Pending CN116843541A (en) 2023-09-01 2023-09-01 Cloud rendering method and system under multi-view angle

Country Status (1)

Country Link
CN (1) CN116843541A (en)

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387206A (en) * 2011-10-20 2012-03-21 镇江睿泰信息科技有限公司 Synthesis method and system of concurrent request of Web service
CN111860845A (en) * 2020-07-17 2020-10-30 苏州浪潮智能科技有限公司 Method and equipment for improving performance of reasoning platform
CN112354177A (en) * 2020-09-30 2021-02-12 江苏视博云信息技术有限公司 Webrtc-based cloud game instant starting method, device and system
CN112416583A (en) * 2020-11-17 2021-02-26 平安科技(深圳)有限公司 High-frequency request processing method and device, electronic equipment and storage medium
WO2022093237A1 (en) * 2020-10-29 2022-05-05 Telefonaktiebolaget Lm Ericsson (Publ) Multisession remote game rendering
CN115292014A (en) * 2022-08-03 2022-11-04 苏州创意云网络科技有限公司 Image rendering method and device and server
CN115865916A (en) * 2022-12-02 2023-03-28 湖南人文科技学院 Multi-user cooperation method and system for mobile virtual reality based on edge computing
CN115952373A (en) * 2022-12-07 2023-04-11 南京烽火星空通信发展有限公司 Method for realizing one-to-many function based on cloud rendering

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102387206A (en) * 2011-10-20 2012-03-21 镇江睿泰信息科技有限公司 Synthesis method and system of concurrent request of Web service
CN111860845A (en) * 2020-07-17 2020-10-30 苏州浪潮智能科技有限公司 Method and equipment for improving performance of reasoning platform
CN112354177A (en) * 2020-09-30 2021-02-12 江苏视博云信息技术有限公司 Webrtc-based cloud game instant starting method, device and system
WO2022093237A1 (en) * 2020-10-29 2022-05-05 Telefonaktiebolaget Lm Ericsson (Publ) Multisession remote game rendering
CN112416583A (en) * 2020-11-17 2021-02-26 平安科技(深圳)有限公司 High-frequency request processing method and device, electronic equipment and storage medium
CN115292014A (en) * 2022-08-03 2022-11-04 苏州创意云网络科技有限公司 Image rendering method and device and server
CN115865916A (en) * 2022-12-02 2023-03-28 湖南人文科技学院 Multi-user cooperation method and system for mobile virtual reality based on edge computing
CN115952373A (en) * 2022-12-07 2023-04-11 南京烽火星空通信发展有限公司 Method for realizing one-to-many function based on cloud rendering

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
任政;杨旭波;肖双九;马利庄;: "远程渲染分发管理系统的设计与实现", 计算机应用与软件, no. 07 *
金平;张海东;齐越;沈旭昆;: "基于远程渲染的三维模型发布系统", 北京航空航天大学学报, no. 03, pages 1 - 5 *

Similar Documents

Publication Publication Date Title
US10924783B2 (en) Video coding method, system and server
CN106453536B (en) A kind of network request processing method, server and system
CN105577801B (en) A kind of business accelerating method and device
US9002969B2 (en) Distributed multimedia server system, multimedia information distribution method, and computer product
CN113157418B (en) Server resource allocation method and device, storage medium and electronic equipment
CN103270492A (en) Hardware accelerated graphics for network enabled applications
EP3624453A1 (en) A transcoding task allocation method, scheduling device and transcoding device
CN105635751A (en) Video cloud platform video playing method and device
US20230217034A1 (en) Split Rendering To Improve Tolerance To Delay Variation In Extended Reality Applications With Remote Rendering
KR20170125252A (en) Message Fragmentation Method using a MQTT Protocol in M2M/IoT Platforms
CN108614820B (en) Method and device for realizing streaming source data analysis
CN116843541A (en) Cloud rendering method and system under multi-view angle
CN106658047B (en) Streaming media server cloud data processing method and device
KR102417055B1 (en) Method and device for post processing of a video stream
CN111835770B (en) Data processing method, device, server and storage medium
CN109391817A (en) Data texturing transmission method and device
CN112532534A (en) Data transmission method and device and computer readable storage medium
CN112543373B (en) Transcoding control method and device and electronic equipment
CN113473180B (en) Wireless-based Cloud XR data transmission method and device, storage medium and electronic device
CN112654021B (en) Method for communication between devices, related device and system
CN107360445A (en) Content delivery method, device and system and content distributed network system
CN117692528A (en) Data transmission method, device, computer equipment and storage medium
CN104933167A (en) Picture processing system, device and method
KR20230149225A (en) Apparatus and Method for Providing 3-Dimensional Spatial Data based on Spatial Random Access
CN112684883A (en) Method and system for multi-user object distinguishing processing

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination