Rendering method and device for rail transit simulation driving

文档序号:192775 发布日期:2021-11-02 浏览:33次 中文

阅读说明:本技术 一种轨道交通模拟驾驶的渲染方法及装置 (Rendering method and device for rail transit simulation driving ) 是由 朱运兰 高志生 王延飞 张二阳 许艺杰 刘帅 张冶 于 2021-08-09 设计创作,主要内容包括:本申请涉及模拟驾驶技术领域,具体涉及一种轨道交通模拟驾驶的渲染方法及装置,所述方法能够评估云渲染服务器渲染模拟驾驶素材需要的预占用资源,从管理服务器管理的多个目标云渲染服务器中,分配对应的可用资源大于预占用资源的第一目标云渲染服务器渲染模拟驾驶素材;并且当监测到第一目标云渲染服务器的可用资源无法满足渲染时,从更新后的多个目标云渲染服务器中选取可用资源满足渲染模拟驾驶素材需要的实际占用资源的第二目标云渲染服务器,对模拟驾驶素材尽心渲染,最终将生成的渲染结果发送至客户端向用户展示。一方面满足随时随地进行模拟驾驶的需求;另一方面保证云渲染服务器资源免于闲置和超载,提高云渲染服务器的可用性和健壮性。(The method can evaluate pre-occupied resources needed by a cloud rendering server to render a simulated driving material, and allocates a first target cloud rendering server rendering simulated driving material with available resources larger than the pre-occupied resources from a plurality of target cloud rendering servers managed by a management server; and when it is monitored that the available resources of the first target cloud rendering server cannot meet the rendering requirements, selecting a second target cloud rendering server, the available resources of which meet the actual occupied resources needed by rendering the simulated driving materials, from the updated plurality of target cloud rendering servers, rendering the simulated driving materials at best, and finally sending the generated rendering result to the client for display to the user. On one hand, the requirement of simulating driving at any time and any place is met; on the other hand, the cloud rendering server resources are prevented from being idle and overloaded, and the availability and the robustness of the cloud rendering server are improved.)

1. A rendering method for rail transit simulation driving is characterized by comprising the following steps:

responding to an operation instruction from a client, and acquiring a simulated driving material corresponding to the operation instruction by a management server;

evaluating pre-occupied resources required by the cloud rendering server to render the simulated driving materials;

distributing a first target cloud rendering server, of which the corresponding available resources are larger than the pre-occupied resources, from a plurality of target cloud rendering servers managed by the management server to render the simulated driving material; the target cloud rendering server is a cloud rendering server of which the corresponding rendering task is smaller than a preset threshold value;

in the process of rendering the simulated driving material by the first target cloud rendering server, if it is monitored that available resources of the first target cloud rendering server cannot meet the rendering for the simulated driving material, acquiring a plurality of updated target cloud rendering servers managed by the management server, selecting a second target cloud rendering server, of which available resources meet actual occupied resources required for rendering the simulated driving material, from the plurality of updated target cloud rendering servers, and allocating the second target cloud rendering server to render the simulated driving material;

sending a rendering result of the second target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

2. The rendering method of rail transit simulated driving according to claim 1, wherein in response to an operation instruction from a client, the management server obtains simulated driving materials corresponding to the operation instruction, and the method comprises:

selecting a plurality of simulated driving scenes displayed by a client, and generating an operation instruction according to the selected simulated driving scene client;

and uploading the operating instruction to a management server so that the management server loads the prestored simulated driving materials corresponding to the operating instruction according to the operating instruction.

3. The rendering method of rail transit simulated driving according to claim 2, wherein the step of rendering the simulated driving material by a first target cloud rendering server which allocates corresponding available resources larger than the pre-occupied resources comprises:

determining, from among a plurality of target cloud rendering servers managed by the management server, that a corresponding available resource is greater than the pre-occupied resource and is a largest first target cloud rendering server among the plurality of target cloud rendering servers managed by the management server; wherein the available resources are calculated by:

dividing the total resources of the target cloud rendering server into disposable resources for rendering the simulation driving materials and fixed resources for calling an operating system;

respectively setting specific gravity coefficients for CPU resources, memory resources and GPU resources in the disposable resources;

and acquiring available resources of the target cloud rendering server based on the disposable resources of the target cloud rendering server, the proportion coefficients of the CPU resources, the memory resources and the GPU resources and the pre-occupied resources.

4. The rendering method for rail transit simulated driving according to claim 3, wherein the first target cloud rendering server which allocates the available resource larger than the pre-occupied resource renders the simulated driving material, further comprising:

and if the first target cloud rendering server with the available resources larger than the pre-occupied resources does not exist, sending a prompt that the available resources of the cloud rendering server are insufficient to the client.

5. The rendering method of rail transit simulated driving according to claim 4, wherein selecting a second target cloud rendering server from the updated plurality of target cloud rendering servers, the second target cloud rendering server having available resources satisfying actual occupied resources required for rendering the simulated driving material, comprises:

and determining the actual occupied resources jointly according to the occupied resources needed by the simulated driving materials and the extra occupied resources corresponding to the intermediate data generated by the first target cloud rendering server after the simulated driving materials are rendered.

6. The rendering method for rail transit simulated driving according to claim 4, wherein sending the rendering result of the second target cloud rendering server for the simulated driving material to a client so that the client presents the rendering result to a user comprises:

generating a video stream according to the rendering result of the second target cloud rendering server, compressing the video stream and then sending the compressed video stream to a client;

and decompressing the compressed video stream received by the client, and displaying a rendering result to a user.

7. The rendering method for rail transit simulated driving according to claim 6, wherein in the process of rendering the simulated driving material by the first target cloud rendering server, the rendering method further comprises:

if the available resources of the first target cloud rendering server meet the rendering of the simulated driving materials;

sending a rendering result of the first target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

8. A rendering device for rail transit simulation driving is characterized by comprising:

the response module is used for responding to an operation instruction from the client and the management server acquires a simulated driving material corresponding to the operation instruction;

the evaluation module is used for evaluating the pre-occupied resources required by the cloud rendering server to render the simulated driving materials;

the distribution module is used for distributing corresponding available resources to a first target cloud rendering server, which is larger than the pre-occupied resources, from a plurality of target cloud rendering servers managed by the management server to render the simulated driving materials; the target cloud rendering server is a cloud rendering server of which the corresponding rendering task is smaller than a preset threshold value;

a monitoring module, configured to, in a process of rendering the simulated driving material by the first target cloud rendering server, if it is monitored that available resources of the first target cloud rendering server cannot meet the rendering for the simulated driving material, obtain a plurality of updated target cloud rendering servers managed by the management server, select a second target cloud rendering server whose available resources meet actual occupied resources required for rendering the simulated driving material from the plurality of updated target cloud rendering servers, and allocate the second target cloud rendering server to render the simulated driving material;

the sending module is used for sending the rendering result of the second target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

9. An electronic device, comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is running, the machine-readable instructions when executed by the processor performing the steps of the rendering method of any of claims 1 to 7.

10. A computer-readable storage medium, characterized in that the computer-readable storage medium has stored thereon a computer program which, when being executed by a processor, performs the steps of the rendering method according to any one of claims 1 to 7.

Technical Field

The application relates to the technical field of simulated driving, in particular to a rendering method and device for rail transit simulated driving.

Background

With the rapid development of domestic rail transit construction, the training requirements of rail transit drivers are increasing day by day. In order to effectively assist the skill training and evaluation of rail transit drivers, a rail transit simulated driving practical training evaluation system is generally adopted, the simulated driving practical training evaluation system mainly comprises a driver main operating platform, a secondary operating area, forward visual display equipment, a teacher monitoring terminal and the like, a good interactive environment is constructed, and the operation practical training of standardized operation, abnormal driving, fault treatment and the like of the motor train unit can be completed.

However, the adopted rail transit simulation driving practical training evaluation system cannot meet the requirement that training personnel can carry out rail transit simulation driving at any time and any place.

Disclosure of Invention

In view of this, an object of the present application is to provide a rendering method and device for rail transit simulation driving, which can meet the requirement of training personnel for rail transit simulation driving at any time and any place.

The rendering method for rail transit simulation driving provided by the embodiment of the application comprises the following steps:

responding to an operation instruction from a client, and acquiring a simulated driving material corresponding to the operation instruction by a management server;

evaluating pre-occupied resources required by the cloud rendering server to render the simulated driving materials;

distributing a first target cloud rendering server, of which the corresponding available resources are larger than the pre-occupied resources, from a plurality of target cloud rendering servers managed by the management server to render the simulated driving material; the target cloud rendering server is a cloud rendering server of which the corresponding rendering task is smaller than a preset threshold value;

in the process of rendering the simulated driving material by the first target cloud rendering server, if it is monitored that available resources of the first target cloud rendering server cannot meet the rendering for the simulated driving material, acquiring a plurality of updated target cloud rendering servers managed by the management server, selecting a second target cloud rendering server, of which available resources meet actual occupied resources required for rendering the simulated driving material, from the plurality of updated target cloud rendering servers, and allocating the second target cloud rendering server to render the simulated driving material;

sending a rendering result of the second target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

In some embodiments, in response to an operation instruction from a client, the acquiring, by a management server, a simulated driving material corresponding to the operation instruction includes:

selecting a plurality of simulated driving scenes displayed by a client, and generating an operation instruction according to the selected simulated driving scene client;

and uploading the operating instruction to a management server so that the management server loads the prestored simulated driving materials corresponding to the operating instruction according to the operating instruction.

In some embodiments, allocating a first target cloud rendering server having a corresponding available resource greater than the pre-occupied resource to render the simulated driving material comprises:

determining, from among a plurality of target cloud rendering servers managed by the management server, that a corresponding available resource is greater than the pre-occupied resource and is a largest first target cloud rendering server among the plurality of target cloud rendering servers managed by the management server; wherein the available resources are calculated by:

dividing the total resources of the target cloud rendering server into disposable resources for rendering the simulation driving materials and fixed resources for calling an operating system;

respectively setting specific gravity coefficients for CPU resources, memory resources and GPU resources in the disposable resources;

and acquiring available resources of the target cloud rendering server based on the disposable resources of the target cloud rendering server, the proportion coefficients of the CPU resources, the memory resources and the GPU resources and the pre-occupied resources.

In some embodiments, allocating a first target cloud rendering server having a corresponding available resource greater than the pre-occupied resource to render the simulated driving material further comprises:

and if the first target cloud rendering server with the available resources larger than the pre-occupied resources does not exist, sending a prompt that the available resources of the cloud rendering server are insufficient to the client.

In some embodiments, selecting a second target cloud rendering server from the updated plurality of target cloud rendering servers having available resources that meet actual occupied resources required for rendering the simulated driving material includes:

and determining the actual occupied resources jointly according to the occupied resources needed by the simulated driving materials and the extra occupied resources corresponding to the intermediate data generated by the first target cloud rendering server after the simulated driving materials are rendered.

In some embodiments, sending the rendering result of the second target cloud rendering server for the simulated driving material to a client to cause the client to present the rendering result to a user includes:

generating a video stream according to the rendering result of the second target cloud rendering server, compressing the video stream and then sending the compressed video stream to a client;

and decompressing the compressed video stream received by the client, and displaying a rendering result to a user.

In some embodiments, in the process of rendering the simulated driving material by the first target cloud rendering server, the method further includes:

if the available resources of the first target cloud rendering server meet the rendering of the simulated driving materials;

sending a rendering result of the first target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

In some embodiments, there is also provided a rendering apparatus for rail transit simulation driving, including:

the response module is used for responding to an operation instruction from the client and the management server acquires a simulated driving material corresponding to the operation instruction;

the evaluation module is used for evaluating the pre-occupied resources required by the cloud rendering server to render the simulated driving materials;

the distribution module is used for distributing corresponding available resources to a first target cloud rendering server, which is larger than the pre-occupied resources, from a plurality of target cloud rendering servers managed by the management server to render the simulated driving materials; the target cloud rendering server is a cloud rendering server of which the corresponding rendering task is smaller than a preset threshold value;

a monitoring module, configured to, in a process of rendering the simulated driving material by the first target cloud rendering server, if it is monitored that available resources of the first target cloud rendering server cannot meet the rendering for the simulated driving material, obtain a plurality of updated target cloud rendering servers managed by the management server, select a second target cloud rendering server whose available resources meet actual occupied resources required for rendering the simulated driving material from the plurality of updated target cloud rendering servers, and allocate the second target cloud rendering server to render the simulated driving material;

the sending module is used for sending the rendering result of the second target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

In some embodiments, there is also provided an electronic device comprising: a processor, a memory and a bus, the memory storing machine-readable instructions executable by the processor, the processor and the memory communicating over the bus when the electronic device is operating, the machine-readable instructions when executed by the processor performing the steps of the rendering method.

In some embodiments, a computer-readable storage medium is also provided, having stored thereon a computer program which, when executed by a processor, performs the steps of the rendering method.

According to the rendering method for rail transit simulation driving, pre-occupied resources required by a cloud rendering server to render simulation driving materials can be evaluated, and a first target cloud rendering server rendering simulation driving material, of which the corresponding available resources are larger than the pre-occupied resources, is allocated from a plurality of target cloud rendering servers managed by a management server; and when it is monitored that the available resources of the first target cloud rendering server cannot meet the rendering requirements of the simulated driving materials, selecting a second target cloud rendering server, the available resources of which meet the actual occupied resources required by the rendered simulated driving materials, from the updated plurality of target cloud rendering servers, allocating the second target cloud rendering server to render the simulated driving materials, and finally sending the rendering results of the second target cloud rendering server to the client so that the client can display the rendering results to the user. On one hand, the requirement of training personnel for rail transit simulation driving at any time and any place can be met; on the other hand, by dynamically monitoring the cloud rendering service resources and reasonably allocating the dynamic resources according to the rendering requirements of training personnel, the cloud rendering server resources can be prevented from being idle and overloaded, and the availability and the robustness of the cloud rendering server are improved.

Drawings

In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained from the drawings without inventive effort.

Fig. 1 shows a flowchart of a rendering method provided by an embodiment of the present application;

FIG. 2 is a flowchart illustrating a management server acquiring a simulated driving material according to an embodiment of the present application;

FIG. 3 illustrates a flowchart of computing cloud rendering server available resources provided by an embodiment of the present application;

fig. 4 is a schematic structural diagram illustrating a rendering apparatus provided in an embodiment of the present application;

fig. 5 shows a schematic structural diagram of an electronic device according to an embodiment of the present application.

Detailed Description

In order to make the purpose, technical solutions and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application, and it should be understood that the drawings in the present application are for illustrative and descriptive purposes only and are not used to limit the scope of protection of the present application. Additionally, it should be understood that the schematic drawings are not necessarily drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flow diagrams may be performed out of order, and steps without logical context may be performed in reverse order or simultaneously. One skilled in the art, under the guidance of this application, may add one or more other operations to, or remove one or more operations from, the flowchart.

In addition, the described embodiments are only a part of the embodiments of the present application, and not all of the embodiments. The components of the embodiments of the present application, generally described and illustrated in the figures herein, can be arranged and designed in a wide variety of different configurations. Thus, the following detailed description of the embodiments of the present application, presented in the accompanying drawings, is not intended to limit the scope of the claimed application, but is merely representative of selected embodiments of the application. All other embodiments, which can be derived by a person skilled in the art from the embodiments of the present application without making any creative effort, shall fall within the protection scope of the present application.

It should be noted that in the embodiments of the present application, the term "comprising" is used to indicate the presence of the features stated hereinafter, but does not exclude the addition of further features.

In the railway teaching and training, in order to enrich the railway driving experience of a student, a driving simulation training evaluation system is adopted to simulate the actual operation scene of a railway, such as standard operation, abnormal driving, fault treatment and other training, but the driving simulation training evaluation system needs fixed configuration, namely, the student is trained to perform driving simulation training in a fixed place, such as a classroom. The requirement of a user for rail transit simulation driving at any time and any place cannot be met.

In order to solve the above problem, as shown in fig. 1 of the specification, the present application provides a rendering method for rail transit simulation driving, including:

s1, responding to an operation instruction from the client, and acquiring a simulated driving material corresponding to the operation instruction by the management server;

s2, evaluating pre-occupied resources required by the cloud rendering server to render the simulated driving materials;

s3, distributing corresponding available resources to a first target cloud rendering server, of which the available resources are larger than the pre-occupied resources, from a plurality of target cloud rendering servers managed by the management server to render the simulated driving materials; the target cloud rendering server is a cloud rendering server of which the corresponding rendering task is smaller than a preset threshold value;

s4, in the process of rendering the simulated driving material by the first target cloud rendering server, if it is monitored that available resources of the first target cloud rendering server cannot meet the rendering of the simulated driving material, acquiring a plurality of updated target cloud rendering servers managed by the management server, selecting a second target cloud rendering server, of which available resources meet actual occupied resources required for rendering the simulated driving material, from the plurality of updated target cloud rendering servers, and allocating the second target cloud rendering server to render the simulated driving material;

s5, sending the rendering result of the second target cloud rendering server for the simulated driving material to a client, so that the client can display the rendering result to a user.

In step S1, as shown in fig. 2, in an embodiment, the method includes the following steps:

s101, selecting a plurality of simulated driving scenes displayed by a client, and generating an operation instruction according to the selected simulated driving scene client;

and S102, uploading the operation instruction to a management server, so that the management server loads the prestored simulated driving material corresponding to the operation instruction according to the operation instruction.

The management server loads and stores corresponding simulated driving materials through the unique identification of the simulated driving scene after receiving the operation instruction.

In other embodiments, the operation instruction generated by the client may directly include the simulated driving materials of the corresponding simulated driving scene, that is, the simulated driving materials are stored in the client, and after the user selects the simulated driving scene, the client sends the simulated driving materials corresponding to the simulated driving scene to the management server.

In the present application, the manner in which the management server acquires the simulated driving material is not limited or fixed.

After the management server obtains the simulated driving material corresponding to the operation instruction, through the step S2, the pre-occupied resources required by the cloud rendering server to render the simulated driving material are evaluated. In one embodiment, the management server may set a previously trained evaluation model, through which pre-occupied resources required for evaluating the cloud rendering server to render the simulated driving materials are provided. The evaluation model can be trained through a large number of training samples based on deep learning, parameters of the evaluation model are adjusted until the evaluation model meets training cutoff conditions, and a trained classification model is obtained. The training process should be a technique known to those skilled in the art and will not be described in detail herein.

In step S3, the management server selects a target cloud rendering server from the managed multiple target cloud rendering servers to render the simulated driving material, where the target cloud rendering server is a cloud rendering server whose corresponding rendering task is smaller than a preset threshold. Specifically, in an embodiment, when the management server manages a plurality of driving simulation materials allocated to the cloud rendering server, the cloud rendering server needs to render each driving simulation material in sequence, so to improve rendering efficiency, preferably, the preset threshold value is 1, and the management server selects a first target cloud rendering server, of which available resources are greater than pre-occupied resources, from a cloud rendering server having only one rendering task and a currently idle cloud rendering server to render the driving simulation materials.

And when the first target cloud rendering server with available resources larger than the pre-occupied resources does not exist, sending a prompt that the available resources of the cloud rendering server are insufficient to the client.

Further, from the plurality of target cloud rendering servers managed by the management server, it is determined that the corresponding available resource is larger than the pre-occupied resource and is the largest first target cloud rendering server in the plurality of target cloud rendering servers managed by the management server. The simulation driving material is rendered by selecting the target cloud rendering server with the most sufficient available resources, so that the problem of rendering failure caused by inaccurate pre-occupied resource assessment in the process of rendering the simulation driving material by the first target cloud rendering server is avoided.

The method for calculating the available resources comprises the following steps, specifically, as shown in fig. 3 in the specification:

s301, dividing total resources of a target cloud rendering server into disposable resources for rendering simulation driving materials and fixed resources for calling an operating system;

s302, respectively setting proportion coefficients for CPU resources, memory resources and GPU resources in the disposable resources;

s303, acquiring available resources of the target cloud rendering server based on the disposable resources of the target cloud rendering server, the proportion coefficients of the CPU resources, the memory resources and the GPU resources and the pre-occupied resources.

In an embodiment, when a target rendering server is determined to render a simulated driving material from a target rendering server a and a target rendering server B managed by a management server, where total resources of the target rendering server a are (3, 3, 3), total resources of the target rendering server B are (3, 2, 4), and pre-occupied resources are (1,1,1), that is, the total resources of the rendering server a include a CPU resource of 3 cores, a memory resource of 3G, and a GPU resource of 3 cores, the total resources of the rendering server B include a CPU resource of 3 cores, a memory resource of 2G, and a GPU resource of 4 cores, and the pre-occupied resources need to satisfy the CPU resource of 1 core, the memory resource of 1G, and the GPU resource of 1 core; in addition, in order to ensure that the pseudo-ginseng principle is implemented by the target rendering server on the rendering effect of the simulated driving materials, 70% of total resources of the target cloud rendering server are used for rendering the disposable resources of the simulated driving materials, and the rest 30% of total resources of the target cloud rendering server are used for calling the fixed resources of the operating system; meanwhile, specific gravity coefficients are respectively set for a CPU resource, a memory resource and a GPU resource in the resources which can be dominated by the target cloud rendering server, wherein in the embodiment, the specific gravity coefficient of the CPU resource is 0.8, the specific gravity coefficient of the memory resource is 0.8, and the specific gravity coefficient of the GPU resource is 1.

Then the available resources of the target rendering server a obtained according to the above algorithm are:

P1=((3*0.7-1)*0.8,(3*0.7-1)*0.8,(3*0.7-1)*1)=(0.88,0.88,1.1)=0.88+0.88+1.1=2.46。

the available resources of the target rendering server B obtained according to the algorithm are as follows:

P2=((3*0.7-1)*0.8,(2*0.7-1)*0.8,(4*0.7-1)*1)=(0.88,0.32,1.8)=0.88+0.32+1.8=3。

it can be seen that the available resources of the target rendering server B are greater than those of the target rendering server a, that is, the available resources of the target rendering server B for rendering the simulated driving material are sufficient, and the management server selects the target rendering server B for rendering the simulated driving material.

In the step S4, it may happen that the available resources of the first target cloud rendering server cannot meet the rendering of the simulated driving material, because in the step S2, it is estimated that the pre-occupied resources required by the cloud rendering server to render the simulated driving material are not accurate enough, that is, the pre-occupied resources required by the cloud rendering server to render the simulated driving material are underestimated, or the additional occupied resources are caused by intermediate data generated by the first target cloud rendering server after rendering the simulated driving material, so that the actual occupied resources for rendering the simulated driving material are larger than the available resources of the first target cloud rendering server. And at this time, selecting a second target cloud rendering server with available resources meeting the actual occupied resources required for rendering the simulated driving material from the plurality of updated target cloud rendering servers managed by the management server, and allocating the second target cloud rendering server to render the simulated driving material. Specifically, the state of the cloud rendering server managed by the management server changes every moment, some cloud rendering servers may be allocated to render the simulated driving material from the idle state, and some cloud rendering servers may place the simulated driving material in the idle state after rendering. And monitoring the resources of the cloud rendering server in real time through the management server, and determining whether a second target cloud rendering server which can meet the actual occupied resources required by rendering the simulation driving materials exists in the updated target cloud rendering server or not.

When the actual occupied resources for rendering the simulated driving materials are determined, one mode is that the actual occupied resources are determined together according to the pre-occupied resources needed by the simulated driving materials and the extra occupied resources corresponding to the intermediate data generated by the first target cloud rendering server when the simulated driving materials are rendered. Another way is that an addition proportion, for example, 150%, may be set, the available resources of the first target cloud rendering server are multiplied by the addition proportion to obtain the actually occupied resources, that is, the minimum value of the available resources of the second target cloud rendering server, and then the cloud rendering server which is greater than the resource value and is the largest is selected from the updated cloud rendering servers as the second target cloud rendering server to render the simulated driving material; and if the cloud rendering server larger than the resource value is not selected from the updated cloud rendering servers, newly configuring a cloud rendering server meeting the resource value by the management server as a second target cloud rendering server to render the simulated driving material.

After the second target cloud rendering server is determined, performing the step S5, specifically, the method includes the following steps:

generating a video stream according to the rendering result of the second target cloud rendering server, compressing the video stream and then sending the compressed video stream to a client; compressing the video stream by adopting an H264 algorithm;

and decompressing the compressed video stream received by the client, and displaying a rendering result to a user.

In fact, since the available resources of the selected first target cloud rendering server are sufficient, the situation that the available resources of the first target cloud rendering server cannot meet the simulated driving material rendering is rare.

In addition, the rendering method further includes: if the available resources of the first target cloud rendering server meet the rendering of the simulated driving materials; sending a rendering result of the first target cloud rendering server for the simulated driving material to a client so that the client can display the rendering result to a user.

According to the rendering method for rail transit simulation driving, a user can meet the requirements of rail transit simulation driving through a client at any time and any place, wherein the client can be a PC (personal computer) end, a Pad end and an APP (application) end; on the other hand, cloud rendering service resources are dynamically monitored, and the cloud rendering servers are reasonably and dynamically distributed according to the driving simulation scene selected by the user, so that the idleness and overload of the cloud rendering server resources are avoided, and the usability and the robustness of the driving simulation process are improved.

As shown in fig. 4 in the specification, an embodiment of the present application further provides a rendering apparatus for rail transit simulated driving, including:

the response module 401 is configured to respond to an operation instruction from the client, and the management server obtains a simulated driving material corresponding to the operation instruction;

an evaluation module 402, configured to evaluate pre-occupied resources required by the cloud rendering server to render the simulated driving material;

an allocating module 403, configured to allocate, from among multiple target cloud rendering servers managed by the management server, a first target cloud rendering server whose corresponding available resource is greater than the pre-occupied resource to render the simulated driving material; the target cloud rendering server is a cloud rendering server of which the corresponding rendering task is smaller than a preset threshold value;

a monitoring module 404, configured to, in a process of rendering the simulated driving material by the first target cloud rendering server, if it is monitored that available resources of the first target cloud rendering server cannot meet the rendering for the simulated driving material, obtain a plurality of updated target cloud rendering servers managed by the management server, select a second target cloud rendering server whose available resources meet actual occupied resources required for rendering the simulated driving material from the plurality of updated target cloud rendering servers, and allocate the second target cloud rendering server to render the simulated driving material;

a sending module 405, configured to send a rendering result of the second target cloud rendering server for the simulated driving material to a client, so that the client displays the rendering result to a user.

As shown in fig. 5 in the specification, an embodiment of the present application further provides an electronic device, including: a processor 501, a memory 502 and a bus 503, the memory 502 storing machine readable instructions executable by the processor 501, the processor 501 and the memory 502 communicating via the bus 503 when the electronic device is running, the machine readable instructions when executed by the processor 501 performing the steps of the rendering method.

Embodiments of the present application further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the computer program performs the steps of the rendering method.

It can be clearly understood by those skilled in the art that, for convenience and brevity of description, the specific working processes of the system and the apparatus described above may refer to corresponding processes in the method embodiments, and are not described in detail in this application. In the several embodiments provided in the present application, it should be understood that the disclosed system, apparatus and method may be implemented in other ways. The above-described apparatus embodiments are merely illustrative, and for example, the division of the modules is merely a logical division, and there may be other divisions in actual implementation, and for example, a plurality of modules or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or communication connection may be an indirect coupling or communication connection of devices or modules through some communication interfaces, and may be in an electrical, mechanical or other form.

The modules described as separate parts may or may not be physically separate, and parts displayed as modules may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.

In addition, functional units in the embodiments of the present application may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.

The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present application or portions thereof that substantially contribute to the prior art may be embodied in the form of a software product stored in a storage medium and including instructions for causing a computer device (which may be a personal computer, a platform server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present application. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.

The above description is only for the specific embodiments of the present application, but the scope of the present application is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present application, and shall be covered by the scope of the present application. Therefore, the protection scope of the present application shall be subject to the protection scope of the claims.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种渲染的方法、装置、电子设备和计算机可读存储介质

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!