A real-time image rendering method based on virtual simulation engine

Through the real-time image rendering method based on the virtual simulation engine, the problems of unstable communication connection and poor video rendering effect in real-time audio and video communication are solved, and a more stable communication connection and better video rendering effect are achieved.

CN114531473BActive Publication Date: 2024-10-29辽宁向日葵数字技术股份有限公司
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202210148092.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-02-17
Publication Date
2024-10-29
Estimated Expiration
2042-02-17

AI Technical Summary

Technical Problem

In the existing audio and video real-time communication technology, the communication connection is unstable and the video rendering effect is poor.

Method used

A real-time image rendering method based on a virtual simulation engine is used to obtain the connection information of the requesting connection end, send it to a pre-built third-party server for information exchange, obtain the connection information of the target connection end, and use session information exchange to establish a communication connection, and finally use the web page The real-time communication framework realizes real-time rendering of communication videos.

Benefits of technology

It solves the problems of unstable communication connections and poor video rendering effects, and achieves more stable communication connections and better video rendering effects.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114531473B_ABST
    Figure CN114531473B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of real-time audio and video communication, and discloses a method for real-time image rendering based on a virtual simulation engine, including: exchanging connection information of a requesting connection end to obtain connection information of a target connection end, establishing a communication connection based on the connection information of the requesting connection end and the target connection end, exchanging session information using the session information of the requesting connection end to obtain target session information, building a session connection based on the target session information and the communication connection, and using the session connection and a web page real-time communication framework to achieve real-time rendering of communication videos of the requesting connection end and the target connection end. The present invention also proposes a real-time image rendering device, an electronic device, and a computer-readable storage medium based on a virtual simulation engine. The present invention can solve the problem that the communication connection mode has unstable communication connections and poor video rendering effects.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of real-time audio and video communication, and in particular to a real-time image rendering method, device, electronic device and computer-readable storage medium based on a virtual simulation engine. Background Art

[0002] With the development of real-time communication technology, the audio and video real-time communication functions of real-time communication are beginning to play an increasingly important role in business conversations and people's daily communications.

[0003] Currently, the two parties in communication need to send their respective NAT (Network Address Translation) information, IP address, port and other communication information to each other to achieve communication connection between the two parties. However, this simple communication connection method has the problems of unstable communication connection and poor video rendering effect. Summary of the invention

[0004] The present invention provides a method, device and computer-readable storage medium for real-time image rendering based on a virtual simulation engine, the main purpose of which is to solve the problems of unstable communication connection and poor video rendering effect in the communication connection mode.

[0005] To achieve the above object, the present invention provides a real-time image rendering method based on a virtual simulation engine, comprising:

[0006] Acquire connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end;

[0007] Establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end;

[0008] In the third-party server, session information is exchanged using the session information of the request connection end to obtain target session information;

[0009] Establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection;

[0010] The session connection and the pre-built web page real-time communication framework are used to achieve real-time rendering of the communication video of the request connection end and the target connection end.

[0011] Optionally, obtaining the connection information of the requested connection end includes:

[0012] Using a pre-built STUN server, receiving a connection request from the connection requesting end;

[0013] According to the connection request, query the STUN server for NAT information, public network IP, subnet IP and port of the requested connection end;

[0014] The NAT information, public network IP, subnet IP and port of the requesting connection end are sent to the requesting connection end to obtain the connection information of the requesting connection end.

[0015] Optionally, establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end includes:

[0016] Extracting NAT information of the request connection end and the target connection end;

[0017] Determine whether the NAT information of the request connection end is the same as that of the target connection end;

[0018] If the NAT information of the requesting connection end is the same as that of the target connection end, a communication connection between the requesting connection end and the target connection end is established by using the pre-built intranet information;

[0019] If the NAT information of the requesting connection end is different from that of the target connection end, determining whether there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end;

[0020] If there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end, the pre-built TURN server is used to forward the connection information of the requesting connection end and the target connection end, so as to establish a communication connection between the requesting connection end and the target connection end;

[0021] If there is no symmetric NAT in the NAT information of the requesting connection end and the target connection end, query the public network information of the requesting connection end and the target connection end by using the STUN server;

[0022] A communication connection between the requesting connection end and the target connection end is established by using the public network information of the requesting connection end and the target connection end.

[0023] Optionally, the using a pre-built TURN server to forward data between the request connection end and the target connection end, and establishing a communication connection between the request connection end and the target connection end, includes:

[0024] Packing the connection information in the request connection end and / or the target connection end of the symmetric NAT to obtain a connection information packet;

[0025] Sending the connection information packet to the TURN server, using the TURN server to perform information packet exchange according to the connection information packet to obtain the other party's connection information packet;

[0026] A communication connection is established between the connection requesting end and the target connection end according to the other party connection information packet.

[0027] Optionally, in the third-party server, using the session information of the request connection end to exchange session information to obtain target session information includes:

[0028] At the target connection end, using a pre-built calling method, obtaining session information of the target connection end;

[0029] The session information of the target connection end is transmitted to the request connection end through the third-party server to obtain the target session information.

[0030] Optionally, the establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection includes:

[0031] At the connection request end, extracting the target key and the expected transmission content in the target session information;

[0032] Constructing a request message according to the target key and the expected transmission content;

[0033] The request end message is sent to the IP port of the target connection end through the communication connection to realize the session connection between the request connection end and the target connection end.

[0034] Optionally, the using the session connection and the pre-built web real-time communication framework to achieve real-time rendering of the communication video of the request connection end and the target connection end includes:

[0035] Obtaining original audio and video information in the web application of the target connection end;

[0036] Sending the audio and video information to the browser interface layer in the webpage real-time communication framework through the pre-built webpage development interface layer to obtain the audio and video information to be processed;

[0037] Using the audio and video engine in the webpage real-time communication framework, the audio and video information to be processed is subjected to audio and video processing to obtain target audio and video information;

[0038] The target audio and video information is connected through the session to perform real-time rendering of the communication video in the web application at the requesting connection end.

[0039] In order to solve the above problems, the present invention also provides an image real-time rendering device based on a virtual simulation engine, the device comprising:

[0040] A communication connection establishment module is used to obtain connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end; and establish a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end;

[0041] A target session information acquisition module, configured to perform session information exchange in the third-party server using the session information of the request connection end to obtain target session information;

[0042] A session connection establishing module, used to establish a session connection between the request connection end and the target connection end according to the target session information and the communication connection;

[0043] The communication video real-time rendering module is used to utilize the session connection and the pre-built web page real-time communication framework to achieve real-time rendering of the communication video of the request connection end and the target connection end.

[0044] In order to solve the above problem, the present invention further provides an electronic device, the electronic device comprising:

[0045] a memory storing at least one instruction; and

[0046] The processor executes the instructions stored in the memory to implement the above-mentioned real-time image rendering method based on the virtual simulation engine.

[0047] In order to solve the above problem, the present invention also provides a computer-readable storage medium, in which at least one instruction is stored. The at least one instruction is executed by a processor in an electronic device to implement the above-mentioned real-time image rendering method based on a virtual simulation engine.

[0048] Compared with the background technology, the communication connection mode has the phenomenon that the communication connection between each other is unstable and the video rendering effect is poor. The embodiment of the present invention obtains the connection information of the request connection end, and obtains the information of the target connection end according to the connection information of the request connection end. After obtaining the connection information of the request connection end and the target connection end, the communication connection is established, and the session information of the request connection end and the target connection end are exchanged by using a pre-built third-party server to obtain the target session information. Finally, the session connection between the request connection end and the target connection end is established according to the target session information and the communication connection. After the session connection between the two ends is established, the real-time communication framework of the web page is used to realize the real-time rendering of the communication video between the request connection end and the target connection end. Therefore, the real-time image rendering method, device, electronic device and computer-readable storage medium based on the virtual simulation engine proposed by the present invention can solve the problem that the communication connection mode has the problem that the communication connection between each other is unstable and the video rendering effect is poor. BRIEF DESCRIPTION OF THE DRAWINGS

[0049] Figure 1 A schematic diagram of a flow chart of a method for real-time image rendering based on a virtual simulation engine provided by an embodiment of the present invention;

[0050] Figure 2 for Figure 1 A detailed implementation flow chart of one of the steps in the process;

[0051] Figure 3 for Figure 1 A detailed implementation flow diagram of another step in FIG.

[0052] Figure 4 A functional module diagram of a real-time image rendering device based on a virtual simulation engine provided by an embodiment of the present invention;

[0053] Figure 5 A schematic diagram of the structure of an electronic device for implementing the real-time image rendering method based on a virtual simulation engine provided by an embodiment of the present invention.

[0054] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0055] It should be understood that the specific embodiments described herein are only used to explain the present invention, and are not used to limit the present invention.

[0056] The embodiment of the present application provides a method for real-time rendering of images based on a virtual simulation engine. The execution subject of the method for real-time rendering of images based on a virtual simulation engine includes but is not limited to at least one of the electronic devices such as a server and a terminal that can be configured to execute the method provided by the embodiment of the present application. In other words, the method for real-time rendering of images based on a virtual simulation engine can be executed by software or hardware installed on a terminal device or a server device, and the software can be a blockchain platform. The server includes but is not limited to: a single server, a server cluster, a cloud server or a cloud server cluster, etc.

[0057] Reference Figure 1 FIG. 1 is a flow chart of a method for real-time image rendering based on a virtual simulation engine according to an embodiment of the present invention. In this embodiment, the method for real-time image rendering based on a virtual simulation engine includes:

[0058] S1. Acquire connection information of a requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of a target connection end.

[0059] It can be explained that the connection information refers to the NAT information, public IP, subnet IP and port information of the requesting connection end or the target connection end. The NAT (Network Address Translation) information refers to network address translation information. NAT can provide a public IP address for the requesting application end, and through the public IP address, a dedicated communication port corresponding to the private IP address of the requesting application end can be established.

[0060] Explanatory note: the connection information may be expressed as ICE Candidate.

[0061] It should be understood that ICE (Interactive Connectivity Establishment) stands for interactive connection establishment, which is a framework that can use various NAT traversal technologies (such as STUN and TURN), which can allow the client to successfully traverse various firewalls that may exist between the remote user and the network.

[0062] The third-party server refers to a public server of the request connection end and the target connection end.

[0063] For details, see Figure 2 As shown, the connection information of the connection end of the acquisition request includes:

[0064] S11, using a pre-built STUN server to receive a connection request from the connection requesting end;

[0065] S12. According to the connection request, query the STUN server for NAT information, public network IP, subnet IP and port of the requested connection end;

[0066] S13: Send the NAT information, public network IP, subnet IP and port of the requesting connection end to the requesting connection end to obtain the connection information of the requesting connection end.

[0067] It can be explained that the STUN server refers to a server that can provide the STUN protocol. The STUN (Simple Traversal of UDP over NATs) is a network protocol, which refers to the simple UDP traversal of NAT. It allows the client behind NAT (or multiple NATs) to find out its public network address, find out what type of NAT it is behind and the network port that NAT is bound to for a local port. This information is used to establish UDP communication between two hosts behind NAT routers at the same time.

[0068] S2. Establish a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end.

[0069] In the embodiment of the present invention, establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end includes:

[0070] Extracting NAT information of the request connection end and the target connection end;

[0071] Determine whether the NAT information of the request connection end is the same as that of the target connection end;

[0072] If the NAT information of the requesting connection end is the same as that of the target connection end, a communication connection between the requesting connection end and the target connection end is established by using the pre-built intranet information;

[0073] If the NAT information of the requesting connection end is different from that of the target connection end, determining whether there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end;

[0074] If there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end, the pre-built TURN server is used to forward the connection information of the requesting connection end and the target connection end, so as to establish a communication connection between the requesting connection end and the target connection end;

[0075] If there is no symmetric NAT in the NAT information of the requesting connection end and the target connection end, query the public network information of the requesting connection end and the target connection end by using the STUN server;

[0076] A communication connection between the requesting connection end and the target connection end is established by using the public network information of the requesting connection end and the target connection end.

[0077] It should be understood that even if a public IP address is obtained through a STUN server, it is not necessarily possible to establish a connection between the requesting connection end and the target connection end. This is because different NAT types handle incoming UDP packets differently. There are four main types of UDP packet methods, three of which can be penetrated using STUN, namely: full cone NAT, restricted cone NAT, and port restricted cone NAT. Symmetric NAT (also known as bidirectional NAT) is often used in large corporate networks, and STUN penetration cannot be used. This type of router will deploy Symmetric NAT restrictions through NAT, and the router will only accept previously connected nodes. This type of network requires the use of TURN technology.

[0078] Explainably, the TURN (Traversal Using Relays around NAT) refers to opening a connection and forwarding data through a TURN server, thereby bypassing the limitations of Symmetric NAT. You can establish a connection through the TURN server, then tell all endpoints to send connection information packets to the TURN server, and finally let the TURN server send connection information packets to itself. This method is more time-consuming and occupies more bandwidth, so this method is used only when there are no other alternatives.

[0079] For details, see Figure 3 As shown, the use of the pre-built TURN server to forward the connection information between the request connection end and the target connection end to establish a communication connection between the request connection end and the target connection end includes:

[0080] S21, packing the connection information in the request connection end and / or the target connection end of the symmetric NAT to obtain a connection information packet;

[0081] S22, sending the connection information packet to the TURN server, using the TURN server to perform information packet exchange according to the connection information packet to obtain the other party's connection information packet;

[0082] S23: Establish a communication connection between the connection requesting end and the target connection end according to the other party connection information packet.

[0083] S3. In the third-party server, the session information of the request connection end is used to exchange session information to obtain target session information.

[0084] It can be explained that the session information refers to Session Description data, and the Session Description data involves the key of the corresponding connection end and the expected transmission content.

[0085] It should be understood that if the requesting connection end and the target connection end want to establish a connection, generally speaking, they need a server accessible to both parties to help the two ends exchange the information required for the connection. After having a server for exchanging data, the first data to be exchanged is the Session Description data (SD for short). The Session Description data describes what kind of connection the connecting parties want to establish, that is, the form and content of the connection.

[0086] In the embodiment of the present invention, the third-party server uses the session information of the request connection end to exchange session information to obtain target session information, including:

[0087] At the target connection end, using a pre-built calling method, obtaining session information of the target connection end;

[0088] The session information of the target connection end is transmitted to the request connection end through the third-party server to obtain the target session information.

[0089] It is understandable that before establishing a connection, the requesting connection end and the target connection end need to first specify the data type they want to transmit, such as Audio, Video, and DataChannel, etc., as well as the data type they want to receive through the API. After clarifying the data type of their output and reception, the requesting connection end obtains the Session Description data of the offer type by calling the CreateOffer() method, and then passes it to the target connection end through the public server. Similarly, the target connection end obtains the Session Description data of the answer type by calling the CreateAnswer() method, and passes it to the requesting connection end through the public server. In this process, it does not matter which party creates the Offer (Answer), as long as the Session Description data types created by the two connected parties correspond to each other.

[0090] S4. Establish a session connection between the request connection end and the target connection end according to the target session information and the communication connection.

[0091] In the embodiment of the present invention, the step of establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection includes:

[0092] At the connection request end, extracting the target key and the expected transmission content in the target session information;

[0093] Constructing a request message according to the target key and the expected transmission content;

[0094] The request end message is sent to the IP port of the target connection end through the communication connection to realize the session connection between the request connection end and the target connection end.

[0095] It should be understood that the request connection end and the target connection end send a message to the target IP port, and establish an encrypted long connection through the key involved in the SessionDescription data and the content expected to be transmitted.

[0096] S5. Realize real-time rendering of the communication video of the request connection end and the target connection end by using the session connection and the pre-built web real-time communication framework.

[0097] It should be understood that the web real-time communication framework refers to WebRTC (Web Real-Time Communication), which is a real-time communication solution that supports web browsers for real-time voice or video conversations, including functions such as video and audio acquisition, encoding and decoding, data transmission, and audio and video display. Using the web real-time communication framework, an audio and video communication application can be quickly built. The web real-time communication framework not only supports audio and video communication between Webs, but also supports Android and IOS. In addition, since the project is open source, it can achieve interoperability across all platforms by compiling C++ code.

[0098] It can be explained that the architecture components of the web real-time communication framework include: Your Web App, Web API, WebRTC Native C++API, Transport / Session, AudioEngine and VideoEngine components. Among them, the Web API includes: Media API, RTCPeerConnection and Peer-to-peer Date API.

[0099] In an embodiment of the present invention, the use of the session connection and the pre-built web real-time communication framework to achieve real-time rendering of the communication video of the request connection end and the target connection end includes:

[0100] Obtaining original audio and video information in the web application of the target connection end;

[0101] Sending the audio and video information to the browser interface layer in the webpage real-time communication framework through the pre-built webpage development interface layer to obtain the audio and video information to be processed;

[0102] Using the audio and video engine in the webpage real-time communication framework, the audio and video information to be processed is subjected to audio and video processing to obtain target audio and video information;

[0103] The target audio and video information is connected through the session to perform real-time rendering of the communication video in the web application at the requesting connection end.

[0104] It is interpretable and utilizes the combination of the independently developed graphics rendering engine with the GPU of the RTX30 series graphics cards and the second-generation ray tracing technology to perform real-time image rendering on the graphics card cluster on the server side and display it to the client terminal through WebRTC technology.

[0105] Compared with the background technology, the communication connection mode has the phenomenon that the communication connection between each other is unstable and the video rendering effect is poor. The embodiment of the present invention obtains the connection information of the request connection end, and obtains the information of the target connection end according to the connection information of the request connection end. After obtaining the connection information of the request connection end and the target connection end, the communication connection is established, and the session information of the request connection end and the target connection end are exchanged by using a pre-built third-party server to obtain the target session information. Finally, the session connection between the request connection end and the target connection end is established according to the target session information and the communication connection. After the session connection between the two ends is established, the real-time communication framework of the web page is used to realize the real-time rendering of the communication video between the request connection end and the target connection end. Therefore, the real-time image rendering method, device, electronic device and computer-readable storage medium based on the virtual simulation engine proposed by the present invention can solve the problem that the communication connection mode has the problem that the communication connection between each other is unstable and the video rendering effect is poor.

[0106] like Figure 4 , which is a functional module diagram of a real-time image rendering device based on a virtual simulation engine provided by an embodiment of the present invention.

[0107] The image real-time rendering device 100 based on the virtual simulation engine of the present invention can be installed in an electronic device. According to the functions to be implemented, the image real-time rendering device 100 based on the virtual simulation engine can include a communication connection establishment module 101, a target session information acquisition module 102, a session connection establishment module 103 and a communication video real-time rendering module 104. The module of the present invention can also be called a unit, which refers to a series of computer program segments that can be executed by an electronic device processor and can complete fixed functions, which are stored in the memory of the electronic device.

[0108] The communication connection establishment module 101 is used to obtain connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end; establish a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end;

[0109] It can be explained that the connection information refers to the NAT information, public IP, subnet IP and port information of the requesting connection end or the target connection end. The NAT (Network Address Translation) information refers to network address translation information. NAT can provide a public IP address for the requesting application end, and through the public IP address, a dedicated communication port corresponding to the private IP address of the requesting application end can be established.

[0110] Explanatory note: the connection information may be expressed as ICE Candidate.

[0111] It should be understood that ICE (Interactive Connectivity Establishment) stands for interactive connection establishment, which is a framework that can use various NAT traversal technologies (such as STUN and TURN), which can allow the client to successfully traverse various firewalls that may exist between the remote user and the network.

[0112] The third-party server refers to a public server of the request connection end and the target connection end.

[0113] In the embodiment of the present invention, the obtaining of connection information of the connection request end includes:

[0114] Using a pre-built STUN server, receiving a connection request from the connection requesting end;

[0115] According to the connection request, query the STUN server for NAT information, public network IP, subnet IP and port of the requested connection end;

[0116] The NAT information, public network IP, subnet IP and port of the requesting connection end are sent to the requesting connection end to obtain the connection information of the requesting connection end.

[0117] It can be explained that the STUN server refers to a server that can provide the STUN protocol. The STUN (Simple Traversal of UDP over NATs) is a network protocol, which refers to the simple UDP traversal of NAT. It allows the client behind NAT (or multiple NATs) to find out its public network address, find out what type of NAT it is behind and the network port that NAT is bound to for a local port. This information is used to establish UDP communication between two hosts behind NAT routers at the same time.

[0118] In the embodiment of the present invention, establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end includes:

[0119] Extracting NAT information of the request connection end and the target connection end;

[0120] Determine whether the NAT information of the request connection end is the same as that of the target connection end;

[0121] If the NAT information of the requesting connection end is the same as that of the target connection end, a communication connection between the requesting connection end and the target connection end is established by using the pre-built intranet information;

[0122] If the NAT information of the requesting connection end is different from that of the target connection end, determining whether there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end;

[0123] If there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end, the pre-built TURN server is used to forward the connection information of the requesting connection end and the target connection end, so as to establish a communication connection between the requesting connection end and the target connection end;

[0124] If there is no symmetric NAT in the NAT information of the requesting connection end and the target connection end, query the public network information of the requesting connection end and the target connection end by using the STUN server;

[0125] A communication connection between the requesting connection end and the target connection end is established by using the public network information of the requesting connection end and the target connection end.

[0126] It should be understood that even if a public IP address is obtained through a STUN server, it is not necessarily possible to establish a connection between the requesting connection end and the target connection end. This is because different NAT types handle incoming UDP packets differently. There are four main types of UDP packet methods, three of which can be penetrated using STUN, namely: full cone NAT, restricted cone NAT, and port restricted cone NAT. Symmetric NAT (also known as bidirectional NAT) is often used in large corporate networks, and STUN penetration cannot be used. This type of router will deploy Symmetric NAT restrictions through NAT, and the router will only accept previously connected nodes. This type of network requires the use of TURN technology.

[0127] Explainably, the TURN (Traversal Using Relays around NAT) refers to opening a connection and forwarding data through a TURN server, thereby bypassing the limitations of Symmetric NAT. You can establish a connection through the TURN server, then tell all endpoints to send connection information packets to the TURN server, and finally let the TURN server send connection information packets to itself. This method is more time-consuming and occupies more bandwidth, so this method is used only when there are no other alternatives.

[0128] In an embodiment of the present invention, the use of a pre-built TURN server to forward data between the request connection end and the target connection end, and to establish a communication connection between the request connection end and the target connection end, includes:

[0129] Packing the connection information in the request connection end and / or the target connection end of the symmetric NAT to obtain a connection information packet;

[0130] Sending the connection information packet to the TURN server, using the TURN server to perform information packet exchange according to the connection information packet to obtain the other party's connection information packet;

[0131] A communication connection is established between the connection requesting end and the target connection end according to the other party connection information packet.

[0132] The target session information acquisition module 102 is used to exchange session information in the third-party server using the session information of the request connection end to obtain target session information;

[0133] It can be explained that the session information refers to Session Description data, and the Session Description data involves the key of the corresponding connection end and the expected transmission content.

[0134] It should be understood that if the requesting connection end and the target connection end want to establish a connection, generally speaking, they need a server accessible to both parties to help the two ends exchange the information required for the connection. After having a server for exchanging data, the first data to be exchanged is the Session Description data (SD for short). The Session Description data describes what kind of connection the connecting parties want to establish, that is, the form and content of the connection.

[0135] In the embodiment of the present invention, the third-party server uses the session information of the request connection end to exchange session information to obtain target session information, including:

[0136] At the target connection end, using a pre-built calling method, obtaining session information of the target connection end;

[0137] The session information of the target connection end is transmitted to the request connection end through the third-party server to obtain the target session information.

[0138] It is understandable that before establishing a connection, the requesting connection end and the target connection end need to first specify the data type they want to transmit, such as Audio, Video, and DataChannel, etc., as well as the data type they want to receive through the API. After clarifying the data type of their output and reception, the requesting connection end obtains the Session Description data of the offer type by calling the CreateOffer() method, and then passes it to the target connection end through the public server. Similarly, the target connection end obtains the Session Description data of the answer type by calling the CreateAnswer() method, and passes it to the requesting connection end through the public server. In this process, it does not matter which party creates the Offer (Answer), as long as the Session Description data types created by the two connected parties correspond to each other.

[0139] The session connection establishing module 103 is used to establish a session connection between the request connection end and the target connection end according to the target session information and the communication connection;

[0140] In the embodiment of the present invention, the step of establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection includes:

[0141] At the connection request end, extracting the target key and the expected transmission content in the target session information;

[0142] Constructing a request message according to the target key and the expected transmission content;

[0143] The request end message is sent to the IP port of the target connection end through the communication connection to realize the session connection between the request connection end and the target connection end.

[0144] It should be understood that the request connection end and the target connection end send a message to the target IP port, and establish an encrypted long connection through the key involved in the SessionDescription data and the content expected to be transmitted.

[0145] The communication video real-time rendering module 104 is used to utilize the session connection and the pre-built web real-time communication framework to achieve the communication video real-time rendering of the request connection end and the target connection end.

[0146] It should be understood that the web real-time communication framework refers to WebRTC (Web Real-Time Communication), which is a real-time communication solution that supports web browsers for real-time voice or video conversations, including functions such as video and audio acquisition, encoding and decoding, data transmission, and audio and video display. Using the web real-time communication framework, an audio and video communication application can be quickly built. The web real-time communication framework not only supports audio and video communication between Webs, but also supports Android and IOS. In addition, since the project is open source, it can achieve interoperability across all platforms by compiling C++ code.

[0147] It can be explained that the architecture components of the web real-time communication framework include: Your Web App, Web API, WebRTC Native C++API, Transport / Session, AudioEngine and VideoEngine components. Among them, the Web API includes: Media API, RTCPeerConnection and Peer-to-peer Date API.

[0148] In an embodiment of the present invention, the use of the session connection and the pre-built web real-time communication framework to achieve real-time rendering of the communication video of the request connection end and the target connection end includes:

[0149] Obtaining original audio and video information in the web application of the target connection end;

[0150] Sending the audio and video information to the browser interface layer in the web real-time communication framework through the pre-built web development interface layer to obtain the audio and video information to be processed;

[0151] Using the audio and video engine in the webpage real-time communication framework, the audio and video information to be processed is subjected to audio and video processing to obtain target audio and video information;

[0152] The target audio and video information is connected through the session to perform real-time rendering of the communication video in the web application at the requesting connection end.

[0153] It is interpretable and utilizes the combination of the independently developed graphics rendering engine with the GPU of the RTX30 series graphics cards and the second-generation ray tracing technology to perform real-time image rendering on the graphics card cluster on the server side and display it to the client terminal through WebRTC technology.

[0154] In detail, the image real-time rendering device 100 based on the virtual simulation engine in the embodiment of the present invention can produce the following technical effects:

[0155] Compared with the background technology, the communication connection mode has the phenomenon that the communication connection between each other is unstable and the video rendering effect is poor. The embodiment of the present invention obtains the connection information of the request connection end, and obtains the information of the target connection end according to the connection information of the request connection end. After obtaining the connection information of the request connection end and the target connection end, the communication connection is established, and the session information of the request connection end and the target connection end are exchanged by using a pre-built third-party server to obtain the target session information. Finally, the session connection between the request connection end and the target connection end is established according to the target session information and the communication connection. After the session connection between the two ends is established, the real-time communication framework of the web page is used to realize the real-time rendering of the communication video between the request connection end and the target connection end. Therefore, the real-time image rendering method, device, electronic device and computer-readable storage medium based on the virtual simulation engine proposed by the present invention can solve the problem that the communication connection mode has the problem that the communication connection between each other is unstable and the video rendering effect is poor.

[0156] like Figure 5 FIG. 1 is a schematic diagram of the structure of an electronic device for implementing a method for real-time image rendering based on a virtual simulation engine provided by an embodiment of the present invention.

[0157] The electronic device 1 may include a processor 10, a memory 11 and a bus 12, and may also include a computer program stored in the memory 11 and executable on the processor 10, such as a real-time image rendering program based on a virtual simulation engine.

[0158] Wherein, the memory 11 includes at least one type of readable storage medium, and the readable storage medium includes flash memory, mobile hard disk, multimedia card, card-type memory (for example: SD or DX memory, etc.), magnetic memory, disk, optical disk, etc. The memory 11 may be an internal storage unit of the electronic device 1 in some embodiments, such as a mobile hard disk of the electronic device 1. The memory 11 may also be an external storage device of the electronic device 1 in other embodiments, such as a plug-in mobile hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (SecureDigital, SD) card, a flash card (Flash Card), etc. equipped on the electronic device 1. Further, the memory 11 may also include both an internal storage unit of the electronic device 1 and an external storage device. The memory 11 may not only be used to store application software and various types of data installed in the electronic device 1, such as the code of a real-time image rendering program based on a virtual simulation engine, but also be used to temporarily store data that has been output or is to be output.

[0159] The processor 10 may be composed of an integrated circuit in some embodiments, for example, a single packaged integrated circuit, or a plurality of packaged integrated circuits with the same or different functions, including one or more central processing units (CPUs), microprocessors, digital processing chips, graphics processors, and combinations of various control chips, etc. The processor 10 is the control core (Control Unit) of the electronic device, and uses various interfaces and lines to connect various components of the entire electronic device, and executes or executes programs or modules stored in the memory 11 (such as real-time image rendering programs based on virtual simulation engines, etc.), and calls data stored in the memory 11 to execute various functions of the electronic device 1 and process data.

[0160] The bus may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The bus may be divided into an address bus, a data bus, a control bus, etc. The bus is configured to realize connection and communication between the memory 11 and at least one processor 10, etc.

[0161] Figure 5 Only an electronic device with components is shown, and those skilled in the art will understand that Figure 5The structure shown does not constitute a limitation on the electronic device 1, and may include fewer or more components than shown in the figure, or combine certain components, or arrange the components differently.

[0162] For example, although not shown, the electronic device 1 may also include a power source (such as a battery) for supplying power to each component. Preferably, the power source may be logically connected to the at least one processor 10 through a power management device, so that the power management device can realize functions such as charging management, discharging management, and power consumption management. The power source may also include any components such as one or more DC or AC power sources, recharging devices, power failure detection circuits, power converters or inverters, power status indicators, etc. The electronic device 1 may also include a variety of sensors, Bluetooth modules, Wi-Fi modules, etc., which will not be repeated here.

[0163] Furthermore, the electronic device 1 may also include a network interface. Optionally, the network interface may include a wired interface and / or a wireless interface (such as a WI-FI interface, a Bluetooth interface, etc.), which is generally used to establish a communication connection between the electronic device 1 and other electronic devices.

[0164] Optionally, the electronic device 1 may further include a user interface, which may be a display, an input unit (such as a keyboard), or a standard wired interface or a wireless interface. Optionally, in some embodiments, the display may be an LED display, a liquid crystal display, a touch-sensitive liquid crystal display, and an OLED (Organic Light-Emitting Diode) touch device. The display may also be appropriately referred to as a display screen or a display unit, which is used to display information processed in the electronic device 1 and to display a visual user interface.

[0165] It should be understood that the embodiment is for illustration only and the scope of the patent application is not limited to this structure.

[0166] The image real-time rendering program based on the virtual simulation engine stored in the memory 11 of the electronic device 1 is a combination of multiple instructions. When running in the processor 10, it can achieve:

[0167] Acquire connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end;

[0168] Establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end;

[0169] In the third-party server, session information is exchanged using the session information of the request connection end to obtain target session information;

[0170] Establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection;

[0171] The session connection and the pre-built web page real-time communication framework are used to achieve real-time rendering of the communication video of the request connection end and the target connection end.

[0172] Specifically, the specific implementation method of the processor 10 for the above instructions can refer to Figures 1 to 5 The description of the relevant steps in the corresponding embodiments will not be repeated here.

[0173] Furthermore, if the module / unit integrated in the electronic device 1 is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. The computer-readable storage medium can be volatile or non-volatile. For example, the computer-readable medium can include: any entity or device capable of carrying the computer program code, a recording medium, a USB flash drive, a mobile hard disk, a magnetic disk, an optical disk, a computer memory, and a read-only memory (ROM).

[0174] The present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor of an electronic device, the computer program can implement:

[0175] Acquire connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end;

[0176] Establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end;

[0177] In the third-party server, session information is exchanged using the session information of the request connection end to obtain target session information;

[0178] Establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection;

[0179] The session connection and the pre-built web page real-time communication framework are used to achieve real-time rendering of the communication video of the request connection end and the target connection end.

[0180] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are only schematic, for example, the division of the modules is only a logical function division, and there may be other division methods in actual implementation.

[0181] The modules described as separate components may or may not be physically separated, and the components shown as modules may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0182] In addition, each functional module in each embodiment of the present invention may be integrated into one processing unit, each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of hardware plus software functional modules.

[0183] It is obvious to those skilled in the art that the present invention is not limited to the details of the above exemplary embodiments, and that the present invention can be implemented in other specific forms without departing from the spirit or essential characteristics of the present invention.

[0184] Therefore, no matter from which point of view, the embodiments should be regarded as illustrative and non-restrictive, and the scope of the present invention is limited by the appended claims rather than the above description, so it is intended that all changes falling within the meaning and scope of the equivalent elements of the claims are included in the present invention. Any attached figure mark in the claims should not be regarded as limiting the claims involved.

[0185] The blockchain referred to in this invention is a new application mode of computer technologies such as distributed data storage, peer-to-peer transmission, consensus mechanism, encryption algorithm, etc. Blockchain is essentially a decentralized database, a string of data blocks generated by cryptographic methods. Each data block contains a batch of network transaction information, which is used to verify the validity of its information (anti-counterfeiting) and generate the next block. Blockchain can include the underlying blockchain platform, platform product service layer, and application service layer.

[0186] In addition, it is clear that the word "comprising" does not exclude other units or steps, and the singular does not exclude the plural. Multiple units or devices stated in the system claim can also be implemented by one unit or device through software or hardware. The second and other words are used to indicate names, but not to indicate any particular order.

[0187] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the spirit and scope of the technical solution of the present invention.

Claims

1. A real-time image rendering method based on a virtual simulation engine, characterized in that: The method comprises: Acquire connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end; Establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end; The step of establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end includes: Extracting NAT information of the request connection end and the target connection end; Determine whether the NAT information of the request connection end is the same as that of the target connection end; If the NAT information of the requesting connection end is the same as that of the target connection end, a communication connection between the requesting connection end and the target connection end is established by using the pre-built intranet information; If the NAT information of the requesting connection end is different from that of the target connection end, determining whether there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end; If there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end, the pre-built TURN server is used to forward the connection information of the requesting connection end and the target connection end, so as to establish a communication connection between the requesting connection end and the target connection end; If there is no symmetric NAT in the NAT information of the requesting connection end and the target connection end, query the public network information of the requesting connection end and the target connection end by using the STUN server; Using the public network information of the requesting connection end and the target connection end, establishing a communication connection between the requesting connection end and the target connection end; The method of using the pre-built TURN server to forward the connection information between the request connection end and the target connection end and establish a communication connection between the request connection end and the target connection end includes: Packing the connection information in the request connection end and / or the target connection end of the symmetric NAT to obtain a connection information packet; Sending the connection information packet to the TURN server, using the TURN server to perform information packet exchange according to the connection information packet to obtain the other party's connection information packet; Establishing a communication connection between the requesting connection end and the target connection end according to the other party connection information packet; In the third-party server, session information is exchanged using the session information of the request connection end to obtain target session information; Establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection; Using the session connection and the pre-built web real-time communication framework, the communication video of the request connection end and the target connection end is rendered in real time; The step of establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection includes: At the connection request end, extracting the target key and the expected transmission content in the target session information; Constructing a request message according to the target key and the expected transmission content; Sending the requesting end message to the IP port of the target connection end through the communication connection to realize the session connection between the requesting connection end and the target connection end; The method of utilizing the session connection and the pre-built webpage real-time communication framework to realize the real-time rendering of the communication video of the request connection end and the target connection end includes: Obtaining original audio and video information in the web application of the target connection end; The original audio and video information is sent to the browser interface layer in the web real-time communication framework through the pre-built web development interface layer to obtain the audio and video information to be processed; Using the audio and video engine in the webpage real-time communication framework, the audio and video information to be processed is subjected to audio and video processing to obtain target audio and video information; The target audio and video information is connected through the session to perform real-time rendering of the communication video in the web application at the requesting connection end.

2. The real-time image rendering method based on a virtual simulation engine according to claim 1, characterized in that: The obtaining of connection information of the requested connection end includes: Using a pre-built STUN server, receiving a connection request from the connection requesting end; According to the connection request, query the STUN server for NAT information, public network IP, subnet IP and port of the requested connection end; The NAT information, public network IP, subnet IP and port of the requesting connection end are sent to the requesting connection end to obtain the connection information of the requesting connection end.

3. The real-time image rendering method based on a virtual simulation engine according to claim 1, characterized in that: The third-party server uses the session information of the request connection end to exchange session information to obtain target session information, including: At the target connection end, using a pre-built calling method, obtaining session information of the target connection end; The session information of the target connection end is transmitted to the request connection end through the third-party server to obtain the target session information.

4. A real-time image rendering device based on a virtual simulation engine, characterized in that: The device comprises: A communication connection establishment module is used to obtain connection information of the requesting connection end, send the connection information of the requesting connection end to a pre-built third-party server for information exchange, and obtain connection information of the target connection end; and establish a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end; The step of establishing a communication connection between the requesting connection end and the target connection end according to the connection information of the requesting connection end and the target connection end includes: Extracting NAT information of the request connection end and the target connection end; Determine whether the NAT information of the request connection end is the same as that of the target connection end; If the NAT information of the requesting connection end is the same as that of the target connection end, a communication connection between the requesting connection end and the target connection end is established by using the pre-built intranet information; If the NAT information of the requesting connection end is different from that of the target connection end, determining whether there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end; If there is a symmetric NAT in the NAT information of the requesting connection end and the target connection end, the pre-built TURN server is used to forward the connection information of the requesting connection end and the target connection end, so as to establish a communication connection between the requesting connection end and the target connection end; If there is no symmetric NAT in the NAT information of the requesting connection end and the target connection end, query the public network information of the requesting connection end and the target connection end by using the STUN server; Using the public network information of the requesting connection end and the target connection end, establishing a communication connection between the requesting connection end and the target connection end; The method of using the pre-built TURN server to forward the connection information between the request connection end and the target connection end and establish a communication connection between the request connection end and the target connection end includes: Packing the connection information in the request connection end and / or the target connection end of the symmetric NAT to obtain a connection information packet; Sending the connection information packet to the TURN server, using the TURN server to perform information packet exchange according to the connection information packet to obtain the other party's connection information packet; Establishing a communication connection between the requesting connection end and the target connection end according to the other party connection information packet; A target session information acquisition module, configured to perform session information exchange in the third-party server using the session information of the request connection end to obtain target session information; A session connection establishing module, used to establish a session connection between the request connection end and the target connection end according to the target session information and the communication connection; A communication video real-time rendering module, used to realize the communication video real-time rendering of the request connection end and the target connection end by using the session connection and the pre-built web real-time communication framework; The step of establishing a session connection between the request connection end and the target connection end according to the target session information and the communication connection includes: At the connection request end, extracting the target key and the expected transmission content in the target session information; Constructing a request message according to the target key and the expected transmission content; Sending the requesting end message to the IP port of the target connection end through the communication connection to realize the session connection between the requesting connection end and the target connection end; The method of utilizing the session connection and the pre-built webpage real-time communication framework to realize the real-time rendering of the communication video of the request connection end and the target connection end includes: Obtaining original audio and video information in the web application of the target connection end; The original audio and video information is sent to the browser interface layer in the web real-time communication framework through the pre-built web development interface layer to obtain the audio and video information to be processed; Using the audio and video engine in the webpage real-time communication framework, the audio and video information to be processed is subjected to audio and video processing to obtain target audio and video information; The target audio and video information is connected through the session to perform real-time rendering of the communication video in the web application at the requesting connection end.

5. An electronic device, characterized in that: The electronic device comprises: at least one processor; and, a memory communicatively connected to the at least one processor; wherein, The memory stores instructions that can be executed by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the real-time image rendering method based on the virtual simulation engine as described in any one of claims 1 to 3.

6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the real-time image rendering method based on a virtual simulation engine as described in any one of claims 1 to 3 is implemented.

Citation Information

Patent Citations

  • Multiport multimedia data processing method, device and system

    CN107155083A