Data processing method, device, storage medium and computer equipment
By matching the work process in the signaling server and establishing a low-latency communication connection to process the client data flow, the problem of virtual character dialogue delay caused by insufficient terminal performance is solved and the data processing efficiency is improved.
Patent Information
- Application Number
- CN202210161668.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-02-22
- Publication Date
- 2024-08-30
- Estimated Expiration
- 2042-02-22
AI Technical Summary
In the existing technology, the terminal needs to process it again after receiving the data sent by the server, which leads to delays in the conversation between the user and the virtual character when the terminal performance is insufficient or the transmission method is backward.
Receive signaling messages sent by the client through the signaling server, match the most suitable worker process from the worker process pool, establish a low-latency communication connection between the client and the target server, receive and process the data stream, and process the The data stream is sent back to the client to reduce data processing delay.
It achieves fast transmission of client data processing, reduces the delay in the conversation between the user and the virtual character, and improves the efficiency of data interaction between the server and the client.
Smart Images

Figure CN114598738B
Abstract
Description
Technical Field
[0001] The present application relates to the field of communication technology, and in particular to a data processing method, device, storage medium and computer equipment. Background Art
[0002] With the development of network technology, information has been transmitted from text to graphics and then to video. At present, it is even possible to have conversations between real people and virtual characters. The current method is that the server collects data from the terminal and then returns some data to realize the conversation operation of the virtual character on the terminal.
[0003] However, in the prior art, after receiving the data sent by the server, the terminal needs to process the data again. When the terminal performance is insufficient or the transmission method between the terminal and the server is relatively backward, it will cause delays in the process of communication between the user and the virtual character. Summary of the invention
[0004] The embodiments of the present application provide a data processing method, device, storage medium and computer equipment. The data processing method can realize rapid processing and transmission of data sent by a client, thereby reducing the delay in the data processing process.
[0005] In a first aspect, an embodiment of the present application provides a data processing method, including:
[0006] Receiving, through the signaling server, a first signaling message sent by the first client for requesting a target application service, and determining a first working process matching the first signaling message from a working process pool;
[0007] Establishing a communication connection between the first client and the target server corresponding to the first working process;
[0008] Receive a first data stream sent by a first client, and send the first data stream to a target server corresponding to the first working process;
[0009] The first working process calls the corresponding function module to process the first data stream to obtain the second data stream;
[0010] The second data stream is sent to the first client, so that the first client displays an interface corresponding to the second data stream.
[0011] In a second aspect, an embodiment of the present application provides a data processing device, including:
[0012] A matching unit, configured to receive, through a signaling server, a first signaling message sent by a first client for requesting a target application service, and determine, from a work process pool, a first work process that matches the first signaling message;
[0013] A connection unit, used to establish a communication connection between the first client and a target server corresponding to the first working process;
[0014] A first transmission unit, configured to receive a first data stream sent by a first client, and send the first data stream to a target server corresponding to a first working process;
[0015] A calling unit, configured to call a corresponding function module through a first working process to process the first data stream and obtain a second data stream;
[0016] The second transmission unit is used to send the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream.
[0017] In a third aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a plurality of instructions, and the instructions are suitable for a processor to load to execute the steps in the data processing method provided in the embodiment of the present application.
[0018] In a fourth aspect, an embodiment of the present application provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the program, the steps in the data processing method provided in the embodiment of the present application are implemented.
[0019] In an embodiment of the present application, a computer device receives a first signaling message sent by a first client to request a target application service through a signaling server, determines a first working process that matches the first signaling message from a working process pool; then establishes a communication connection between the first client and the target server corresponding to the first working process; then receives a first data stream sent by the first client, and sends the first data stream to the target server corresponding to the first working process; and obtains a second data stream after processing the first data stream by calling a corresponding functional module through the first working process; finally, sends the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream. The first client can match the target server that best suits the first client through the signaling server, and a low-latency communication connection is established between the first client and the target server, thereby reducing the delay in interactive data between the first client and the target server. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 It is a schematic diagram of the first scenario of data processing provided in an embodiment of the present application.
[0022] Figure 2 It is a first flow chart of the data processing method provided in an embodiment of the present application.
[0023] Figure 3 It is a schematic diagram of the second scenario of data processing provided in an embodiment of the present application.
[0024] Figure 4 It is a second flow chart of the data processing method provided in an embodiment of the present application.
[0025] Figure 5 It is a schematic diagram of the third scenario of data processing provided in an embodiment of the present application.
[0026] Figure 6 It is a structural diagram of a data processing device provided in an embodiment of the present application.
[0027] Figure 7 It is a schematic diagram of the structure of the server provided in the embodiment of the present application.
[0028] Figure 8 It is a flow chart of the data interaction method provided in the embodiment of the present application.
[0029] Fig. 9 It is a schematic diagram of a data interaction scenario provided in an embodiment of the present application.
[0030] Fig.10 It is a schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0031] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.
[0032] With the development of network technology, information has been transmitted from text to graphics and then to video. At present, it is even possible to have conversations between real people and virtual characters. The current method is that the server collects data from the terminal and then returns some data to realize the conversation operation of the virtual character on the terminal.
[0033] However, in the prior art, after receiving the data sent by the server, the terminal needs to process the data again. When the terminal performance is insufficient or the transmission method between the terminal and the server is relatively backward, it will cause delays in the process of communication between the user and the virtual character.
[0034] In order to solve this technical problem, an embodiment of the present application provides a data processing method, which can be applied to a server. The server can quickly process and transmit the data sent by the client according to the data processing method, thereby reducing the delay in the data processing process.
[0035] See also Figure 1 , Figure 1 It is a schematic diagram of the first scenario of the data processing method provided in an embodiment of the present application.
[0036] In some application scenarios of the embodiments of the present application, the server can be connected to multiple clients at the same time to process data sent by multiple clients, and then the server sends the processed data to the corresponding clients.
[0037] like Figure 1 As shown, the server may include a signaling server, a work process pool, and multiple service terminals. The signaling server may be understood as a module or entity device in the server, and the multiple service terminals may be modules or sub-servers in the server. The service terminal may correspond to one or more work processes.
[0038] When the server establishes multiple idle working processes, the idle working processes will be added to the working process pool. A first signaling connection can be established between each working process and the signaling server. Taking the first client and the server as an example, a second signaling connection can be established between the first client and the signaling server.
[0039] The first client can send the first signaling message to the signaling server through the second signaling connection, and the signaling server can determine the first working process matching the first signaling message in the working process pool. Figure 1 As shown, work process 1 is the first work process matched by the first client.
[0040] Then the server establishes a communication connection between the first client and the target server corresponding to the work process 1. Figure 1 , work process 1 can be a work process corresponding to the target server, and the target server corresponds to multiple functional modules, such as functional module 1, functional module 2, etc.
[0041] The target server may be understood as the server that is most suitable for the first client. For example, the target server processes the first data stream faster.
[0042] After a communication connection is established between the first client and the target server, the first client can obtain one or more of the user's voice information, text information, video information, and image information, thereby generating a first data stream that the client needs to transmit to the target server.
[0043] The target server obtains the first data stream sent by the first client through the communication connection. The communication connection can be a connection with low latency, high bandwidth, and high speed to achieve fast transmission of the first data stream, or fast transmission of the second data stream sent by the target server to the first client.
[0044] The first client collects one or more of the user's voice information, text information, video information, and image information through the electronic device used by the user, thereby generating a first data stream that the first client needs to transmit to the target server. The server processes the first data stream by controlling the first working process to load the functional module corresponding to the first data stream, thereby generating a second data stream that needs to be transmitted to the first client.
[0045] like Figure 1 As shown, in the process of the server processing the first data stream, the work process 1 can load different functional modules at the same time to process the first data stream. For example, if the first data stream includes images and sounds, the work process 1 can load a functional module for processing images and a functional module for processing sounds, thereby processing the first data stream in real time and outputting a second data stream.
[0046] The server can input the second data stream into the first client through a communication connection, and the first client can directly use the second data stream to implement corresponding functions. For example, when the user communicates with virtual customer service, virtual cartoon characters, virtual pets, etc., the first client can display the corresponding virtual human role on the first client by driving the second data stream, thereby realizing interaction between the virtual human role and the user.
[0047] For example, the virtual customer service or virtual character on the first client can directly reply to the user's questions, or actively communicate with the user, etc. Alternatively, the virtual human character can realize functions such as expression transfer and text message reply to the user.
[0048] In the embodiment of the present application, since the signaling server can match the first working process that is most suitable for the first client, the target server corresponding to the first working process is the most suitable for the first client, and the first data stream output by the first client can be processed better and faster. At the same time, the first working process corresponding to the first client can load different functional modules to realize real-time processing of the first data stream, and a low-latency, high-bandwidth, and high-speed communication connection is established between the first client and the target server, and the target server can quickly transmit the second data stream generated according to the first data stream to the first client.
[0049] The user device corresponding to the first client does not need to expend much performance to continue processing the first data stream to generate the second data stream corresponding to the virtual human character, thereby reducing the delay in the user's conversation with the virtual human character through the first client, or reducing the delay in the data processing process between the server and the client in other usage scenarios.
[0050] See also Figure 2 , Figure 2 1 is a first flow chart of a data processing method provided in an embodiment of the present application. The data processing method may include the following steps:
[0051] 110. Receive, through a signaling server, a first signaling message sent by a first client for requesting a target application service, and determine, from a work process pool, a first work process that matches the first signaling message.
[0052] In some embodiments, the server may include a signaling server, wherein the signaling server may be understood as a working module in the server, or the signaling server may be a separate entity server. The first client may establish a second signaling connection with the entire server through the signaling server, and the first client and the server may conduct a conversation through the second signaling connection.
[0053] For example, if the second signaling connection is a WebSocket connection, the server can obtain the first signaling information transmitted by the first client through the WebSocket connection.
[0054] WebSocket is a protocol for full-duplex communication over a single TCP connection. WebSocket makes data exchange between the first client and the server much simpler, allowing the server to actively push data to the client. In the WebSocket API, the browser and the server only need to complete a handshake once, and a persistent connection can be directly established between the two, and two-way data transmission can be carried out.
[0055] The signaling service can be used to pair the first client with the idle working process set in the server, thereby determining the first working process corresponding to the first client. The signaling service can also be a transit service for the server and the first client in the process of establishing a signaling connection, and can also prevent the server and the first client from exposing privacy information when connecting, such as preventing the user's identity information from being exposed.
[0056] In the process of establishing the second signaling connection, the server may receive the first signaling message for requesting the target application service sent by the first client through the signaling server. For example, by establishing a second WebSocket connection to connect to the signaling server, after the second WebSocket connection is established, the first client may send the first signaling message for requesting the target application service to the server through the second WebSocket connection. The server receives the first signaling message, which also includes SDK (Software Development Kit) information required by the target application service of the first client.
[0057] For example, if the first data stream subsequently sent by the first client to the server is video data, then before sending the first data stream, the first signaling message sent by the first client includes the name of the software development kit corresponding to the video data, or the name of the model corresponding to the video data, or the name of the software module.
[0058] In some embodiments, after the server receives the first signaling message, the server may determine the first work process that matches the first signaling message in the work process pool according to the first signaling message. For example, there are multiple idle work processes in the work process pool, and the server may randomly determine an idle work process from the multiple idle work processes as the first work process. Alternatively, the server may find the first work process that best suits the first client from the multiple idle work processes according to the first signaling message, such as finding an idle work process whose performance occupancy can meet the requirements of the first client as the first work process.
[0059] In some implementations, before receiving a first signaling message sent by a first client to request a target application service through a signaling server and determining a first working process matching the first signaling message from a working process pool, the server may also receive a connection request from any working process, establish a connection between the signaling server and any working process, and place the successfully connected working process into the working process pool.
[0060] For example, the server can start multiple idle working processes, and the working processes can establish a first signaling connection with the signaling server, such as a first WebSocket connection, and the signaling server obtains the identity information corresponding to each idle working process through the first signaling connection, and then adds each idle working process to the idle working process pool.
[0061] Please also read Figure 3 , Figure 3 It is a schematic diagram of the second scenario of the data processing method provided in an embodiment of the present application.
[0062] The server includes a signaling server and multiple working processes, and the multiple working processes include no less than a preset number of idle working processes.
[0063] In some implementations, before the server obtains the first signaling message transmitted by the first client, the server may create no less than a preset number of idle work processes, and set corresponding unique identity information for each idle work process. The identity information corresponding to each idle work process may include an identifier corresponding to the idle work process, and may also include a model, software development kit, software module, etc. that can be loaded corresponding to the idle work process.
[0064] For example, Figure 3 As shown, among the multiple working processes, the idle working process 1 is correspondingly set with unique identity information, and the idle working process N is correspondingly set with unique identity information.
[0065] In some implementations, before the server obtains the first signaling message sent by the first client, the server may also create a corresponding first signaling connection for each idle working process. For example, idle working process 1 is provided with a corresponding first signaling connection, and idle working process N is provided with a corresponding first signaling connection. The first signaling connection may be a first WebSocket connection.
[0066] like Figure 3 As shown, the first signaling connection can be a signaling connection between each idle working process and the signaling server.
[0067] In some embodiments, the idle work processes created in the server will be used by different clients, and the remaining idle work processes will become fewer and fewer. If the number of remaining idle work processes is less than a preset number, the server needs to continue to create new idle work processes and their corresponding identity information and the first signaling connection.
[0068] In some implementations, after a certain idle work process is determined to be the first work process, the server may delete the first work process from the work process pool to ensure that all work processes in the work process pool are idle work processes.
[0069] like Figure 3 As shown, after the idle work process 1 is determined to be the first work process corresponding to the first client, the server can delete the idle work process 1 from the work process pool, and then determine the idle work process 1 as the first work process in the ready work process pool, that is, move the idle work process 1 from the work process pool to the ready work process pool.
[0070] 120. Establish a communication connection between the first client and the target server corresponding to the first working process.
[0071] In some implementations, after the server determines the first working process corresponding to the first client, it can determine the server corresponding to the first working process as the target server, for example, the target server can be a subserver that created the process. A communication connection can be established between the first client and the target server, and the communication connection has the characteristics of low latency, high bandwidth, and high rate.
[0072] For example, a Web Real-Time Communication (WebRTC) connection may be established between the target server and the first client. The first client may then transmit the acquired first data stream to the server through the communication connection, wherein the first data stream includes at least one of video, image, voice, text, and other information.
[0073] In some embodiments, before establishing a communication connection between the first working process and the first client, the server can obtain a first Internet Protocol address corresponding to the first client and a second Internet Protocol address corresponding to the first working process, and then send the second Internet Protocol address to the first client through a second signaling connection, and send the first Internet Protocol address to the first working process through a first signaling connection corresponding to the first working process.
[0074] For example, the first Internet Protocol address may be a public IP address (Internet Protocol Address) corresponding to the client, and the second Internet Protocol address may be a public IP address corresponding to the server.
[0075] Then, the server can receive the first session description protocol information (SDP, Session Description Protocol) transmitted by the first client and the second session description message sent by the first working process through the signaling server, forward the first session description message to the first working process through the signaling server, and forward the second session description message to the first client.
[0076] For example, the signaling server can obtain the first session description protocol through the second signaling connection, obtain the second session description protocol through the first signaling connection, and then forward the second session description protocol to the first client through the second signaling connection, and forward the first session description protocol to the first working process through the first signaling connection.
[0077] After the first client and the target server corresponding to the first working process obtain the session description protocol, a communication connection may be established between the first client and the target server corresponding to the first working process, such as a WebRTC connection.
[0078] In some embodiments, after the first client can establish a communication connection with the target server corresponding to the first working process, the signaling server can disconnect the second signaling connection and the first signaling connection. At this time, data can be transmitted directly between the client and the first working process through the communication connection.
[0079] 130. Receive a first data stream sent by a first client, and send the first data stream to a target server corresponding to the first working process.
[0080] In some implementations, the first client may send the first data stream to the server through a communication connection, and the server sends the first data stream to a target server corresponding to the first working process.
[0081] For example, the first data stream is video data, sound data, text data, etc. For example, when a user interacts with a virtual human character, the user device corresponding to the first client can turn on the camera to capture a data stream containing user expressions, and then send the data stream containing user expressions to the target server; the user device corresponding to the first client can collect the user's sound data by turning on the microphone, and then send the sound data to the target server; the user device corresponding to the first client can also collect text information input by the user, and then send the text information to the target server.
[0082] 140. The first working process calls a corresponding function module to process the first data stream to obtain a second data stream.
[0083] In some implementations, the server may determine a functional module for processing the first data stream according to the first signaling message, and then control the first working process to load the functional module corresponding to the first data stream, and the first working process may call the functional module to process the first data stream, thereby obtaining the second data stream.
[0084] For example, when the first data stream is video data, the server can load the dynamic face recognition function module corresponding to the video data through the first working process to identify the video, thereby processing the first data stream, obtaining dynamic face data, and using winter's face data as the second data stream.
[0085] For another example, when the first data stream is a data stream containing user expressions, the server can load a functional module for expression migration through the first working process, process the first data stream through the functional module, obtain expression dimension data corresponding to the first data stream, and use the expression dimension data as the second data stream.
[0086] For another example, when the first data stream contains text information input by the user, the server calls a function module for speech synthesis through the first working process, generates reply information for the text information through the function module, and uses the reply information as the second data stream.
[0087] It should be noted that when the first data stream is a data stream containing multiple types of data, the first working process can simultaneously load different functional modules to process the first data stream, thereby obtaining a second data stream, which contains the data processed and output by each functional module.
[0088] 150. Send the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream.
[0089] After the first working process processes the first data stream, the second data stream is outputted. At this time, the server can send the second data stream to the first client through the communication connection. After receiving the second data stream, the first client can directly drive and use the second data stream to implement the corresponding function.
[0090] For example, the first client may drive the virtual human character through the second data stream, thereby realizing changes in the expression of the virtual human character, such as transferring the user's expression to the virtual human character.
[0091] The first client can also drive the virtual human character to answer the user's questions through the second data stream, and answer the user's questions through text or voice, thereby realizing the interaction between the virtual human character and the user.
[0092] The interaction between the virtual human character and the user can be carried out on a certain interface. For example, when the user opens the virtual human character interaction interface, the first client will transmit the first data stream in the above manner, and then obtain the second data stream to drive the interaction between the virtual human character and the user. Since the server selects a suitable first working process to process the first data stream during the whole process, and uses a low-latency communication connection to transmit the first data stream and the second data stream, the virtual human character will have a low delay in responding to the user when the user interacts with the virtual human character.
[0093] In addition, since the first working process corresponding to the first client can load different functional modules to realize real-time processing of the first data stream, the speed of processing the first data stream is further improved. The user device corresponding to the first client does not need to expend more performance to continue processing the second data stream, thereby reducing the delay in the user's conversation with the virtual human character through the client, or reducing the delay in the data processing process between the server and the client in other usage scenarios.
[0094] In an embodiment of the present application, a computer device receives a first signaling message sent by a first client to request a target application service through a signaling server, determines a first working process that matches the first signaling message from a working process pool; then establishes a communication connection between the first client and the target server corresponding to the first working process; then receives a first data stream sent by the first client, and sends the first data stream to the target server corresponding to the first working process; and obtains a second data stream after processing the first data stream by calling a corresponding functional module through the first working process; finally, sends the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream. The first client can match the target server that best suits the first client through the signaling server, and a low-latency communication connection is established between the first client and the target server, thereby reducing the delay in interactive data between the first client and the target server.
[0095] For a more detailed understanding of the data processing method provided in the embodiments of the present application, please refer to Figure 4 , Figure 4 1 is a second flow chart of the data processing method provided in the embodiment of the present application. The data processing method may include the following steps:
[0096] 201. Receive a connection request from any working process, establish a first signaling connection between the signaling server and any working process, and put the successfully connected working process into a working process pool.
[0097] In some embodiments, the server includes multiple service terminals, each of which can establish one or more work processes. When the work process is an idle work process, the work process will issue a connection request. The server receives the connection request of any work process, establishes the first signaling connection between the signaling server and the work process, and places the successfully connected work process into the work process pool.
[0098] In some embodiments, a work process manager is provided in the server, and the work process manager can manage multiple work processes in the server. For example, the work process manager can create multiple new work processes. The new work process can issue a connection request, and the server can establish a first signaling connection with any work process according to the connection request, and put the successfully connected work process into the work process pool.
[0099] The first signaling connection may be a WebSocket connection. When each work process is created, identity information corresponding to each work process is also created, and the signaling server may also obtain the identity information of each work process added to the work process pool through the second server.
[0100] Please also read Figure 5 , Figure 5 It is a schematic diagram of the third scenario of the data processing method provided in an embodiment of the present application.
[0101] The server includes a signaling server, a proxy service, and a work process. The signaling server can be understood as a work module in the server, or a sub-server. The signaling server can pair the first client with the idle work process set in the server, so as to determine the first work process that matches the first client. The signaling server can also provide a transit service for the server and the first client during the process of establishing a signaling connection. The signaling server can also prevent the exposure of privacy information when the connection between the server and the first client is established, such as preventing the exposure of the user's identity information.
[0102] In some embodiments, the server can create multiple idle working processes, each of which can correspond to a first signaling connection, where the first signaling connection can be a first WebSocket connection. When the idle working process and the signaling server are connected successfully, the server can add the idle working process to the working process pool.
[0103] When the server creates multiple idle work processes, corresponding identity information may be created for each idle work process. For example, the identity information corresponding to each idle work process may include an identifier corresponding to the idle work process, and may also include a model, software development kit, software module, etc. that can be loaded corresponding to the idle work process.
[0104] 202. Receive a connection request sent by the first client, and establish a second signaling connection between the signaling server and the first client.
[0105] In some embodiments, Figure 5 As shown, a second signaling connection can be established between the signaling server and the first client, wherein the second signaling connection can be a second WebSocket connection, and the first client can actively initiate a session to the server through the second signaling connection.
[0106] Among them, the second signaling connection can be generated when the target application service in the first client needs to obtain server data. For example, the target application service in the first client is for the user to communicate and interact with the virtual human character. At this time, the first client can actively initiate a second signaling connection to the server.
[0107] 203. Receive, through the signaling server, a first signaling message sent by the first client for requesting a target application service, and determine, from a work process pool, a first work process that matches the first signaling message.
[0108] In some embodiments, after establishing a second signaling connection with the first client, the server receives a first signaling message sent by the first client through the second signaling connection, wherein the first signaling message includes characteristic information corresponding to the first data stream subsequently sent by the first client, such as the name of the software development kit corresponding to the first data stream, the data type corresponding to the first data stream, etc.
[0109] In some embodiments, after the server receives the first signaling message, the server may determine the first work process that matches the first signaling message in the work process pool according to the first signaling message. For example, there are multiple idle work processes in the work process pool, and the server may randomly determine an idle work process from the multiple idle work processes as the first work process. Alternatively, the server may find the first work process that best suits the first client from the multiple idle work processes according to the first signaling message, such as finding an idle work process whose performance occupancy can meet the requirements of the first client as the first work process.
[0110] For example, the server can determine the first working process corresponding to the target application service of the first client according to the data type information in the first signaling message. When the data type is video data, it can be determined that the working process that can call the video processing function module is the first working process.
[0111] For another example, the server can identify the first signaling information, thereby determining the model, software development kit, and software module information contained in the first information. Then, the server can match the model, software development kit, and software module information corresponding to each idle work process, and then identify the target identity information with the highest matching degree, and determine the work process corresponding to the target identity information as the first work process. The first work process can load the model, software development kit, and software module corresponding to the first client, thereby processing the first data stream subsequently transmitted by the first client.
[0112] Alternatively, after receiving the second signaling connection, the server may randomly select an idle working process from a plurality of idle working processes as the first working process corresponding to the first client.
[0113] In some embodiments, the server can randomly select a target first signaling connection and a second signaling connection to pair from multiple first signaling connections through a signaling server, and subsequently the first client and its corresponding first working process can exchange information with the target first signaling connection and the second signaling connection.
[0114] 204. Receive, through the signaling server, a first session description message sent by the first client and a second session description message sent by the first working process.
[0115] For example, the first client may send the first session description message to the signaling server through the second signaling connection, and the signaling server receives the first session description protocol through the second signaling connection.
[0116] The first working process may send the second session description message to the signaling server through the first signaling connection, and the signaling server receives the second session description protocol through the first signaling connection.
[0117] The first session description message and the second session description message may be Session Description Protocol (SDP, Session Description Protocol).
[0118] In some implementations, before receiving the first session description message sent by the first client and the second session description message sent by the first working process through the signaling server, the server may also obtain a first Internet Protocol address corresponding to the first client and a second Internet Protocol address corresponding to the first working process.
[0119] like Figure 5 As shown, in some implementations, the server can obtain the first Internet Protocol address corresponding to the client and the second Internet Protocol address corresponding to the first working process through a proxy service.
[0120] For example, the proxy service may obtain the first Internet Protocol address corresponding to the client through the second signaling connection, and obtain the second Internet Protocol address corresponding to the first working process through the first signaling connection.
[0121] The first Internet Protocol address may be a public IP address (Internet Protocol Address) corresponding to the client, and the second Internet Protocol address may be a public IP address corresponding to the server.
[0122] After the server obtains the first Internet Protocol address and the second Internet Protocol address, it sends the second Internet Protocol address to the first client through the second signaling connection, and sends the first Internet Protocol address to the first working process through the first signaling connection.
[0123] 205. Forward the first session description message to the first working process through the signaling server, and forward the second session description message to the first client.
[0124] The signaling server sends the first session description message to the first working process through the first signaling connection.
[0125] The signaling server sends the second session description message to the first client through the second signaling connection.
[0126] 206. Receive a session end message sent by the first client through the signaling server, and send the session end message to the first working process.
[0127] In some implementations, when the first client confirms that the session is over, the signaling server may receive a session end message sent by the first client through the second signaling connection, and then the signaling server sends the session end message to the first working process through the first signaling connection.
[0128] 207. Receive, through the signaling server, a session end confirmation message generated according to the session end message and sent by the first working process.
[0129] After receiving the session end message, the first working process generates a session end confirmation message according to the session end message, and then sends the session end confirmation message to the signaling server through the first signaling connection.
[0130] 208. Send a session end confirmation message to the first client through the signaling server.
[0131] The signaling server sends a session end confirmation message to the first client through the second signaling connection, and then the first client generates a signaling connection end message according to the session end confirmation message, and then sends the signaling connection end message to the signaling server.
[0132] 209. Receive, through the signaling server, a signaling connection end message generated by the first client according to the session end confirmation message.
[0133] When the signaling server receives the signaling connection end message, it will disconnect the second signaling connection with the first client and delete the first working process from the working process pool. At this time, the first working process is no longer an idle process, but a process that needs to process the data corresponding to the first client.
[0134] In some embodiments, all work processes in the work process pool are idle work processes. When an idle work process in the work process pool matches the first client, the idle work process is determined to be the first work process. At this time, the server deletes the first work process from the work process pool and adds the first work process to the ready work process pool.
[0135] In some implementations, after the session between the first client and the server ends, the server may disconnect the first signaling connection between the first working process and the signaling server, and disconnect the second signaling connection between the first client and the signaling server.
[0136] 210. Establish a communication connection between the first client and the target server corresponding to the first working process.
[0137] In some implementations, after the server determines the first working process corresponding to the first client, it can determine the server corresponding to the first working process as the target server, for example, the target server can be a subserver that created the process. A communication connection can be established between the first client and the target server, and the communication connection has the characteristics of low latency, high bandwidth, and high rate.
[0138] For example, a Web Real-Time Communication (WebRTC) connection may be established between the target server and the first client.
[0139] 211. Receive a first data stream sent by a first client, and send the first data stream to a target server corresponding to a first working process.
[0140] In some implementations, the first client may send the first data stream to the server through a communication connection, and the server sends the first data stream to a target server corresponding to the first working process.
[0141] For example, the first data stream is video data, sound data, text data, etc. For example, when a user interacts with a virtual human character, the user device corresponding to the first client can turn on the camera to capture a data stream containing user expressions, and then send the data stream containing user expressions to the target server; the user device corresponding to the first client can collect the user's sound data by turning on the microphone, and then send the sound data to the target server; the user device corresponding to the first client can also collect text information input by the user, and then send the text information to the target server.
[0142] In some implementations, after establishing a communication connection between the first client and the target server corresponding to the first working process and before acquiring the first data stream, the server may send a preset video stream to the first client, and then receive text information input by the user returned by the first client according to the preset video stream.
[0143] For example, the server pushes a video, and after watching the video, the user can enter his or her own opinions or description of the video, thereby generating text information entered by the user.
[0144] 212. The first working process calls a corresponding function module to process the first data stream to obtain a second data stream.
[0145] In some implementations, the server may determine the function module for processing the first data stream according to the first signaling message, and then control the first working process to load the function module corresponding to the first data stream, and the first working process may call the function module to process the first data stream, thereby obtaining the second data stream.
[0146] For example, when the first data stream is video data, the server can load the dynamic face recognition function module corresponding to the video data through the first working process to identify the video, thereby processing the first data stream, obtaining dynamic face data, and using winter's face data as the second data stream.
[0147] For another example, when the first data stream is a data stream containing user expressions, the server can load a functional module for expression migration through the first working process, process the first data stream through the functional module, obtain expression dimension data corresponding to the first data stream, and use the expression dimension data as the second data stream.
[0148] For another example, when the first data stream contains text information input by the user, the server calls the function module for speech synthesis through the first working process, generates reply information for the text information through the function module, and uses the reply information as the second data stream. The reply information may be audio information and / or text information.
[0149] It should be noted that when the first data stream is a data stream containing multiple types of data, the first working process can simultaneously load different functional modules to process the first data stream, thereby obtaining a second data stream, which contains the data processed and output by each functional module.
[0150] For example, the first working process may load different functional modules, for example, the first working process may load different types of software development kits, thereby processing the first data stream.
[0151] For the first data stream, the first working process can load different types of software development kits such as "expression migration SDK", "real person image SDK", "action migration SDK", etc., so as to process the first data stream and obtain the second data stream.
[0152] 213. Send the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream.
[0153] After the first working process processes the first data stream, the second data stream is outputted. At this time, the server can send the second data stream to the first client through the communication connection. After receiving the second data stream, the first client can directly drive and use the second data stream to implement the corresponding function.
[0154] For example, the first client may drive the virtual human character through the second data stream, thereby realizing changes in the expression of the virtual human character, such as transferring the user's expression to the virtual human character.
[0155] The first client can also drive the virtual human character to answer the user's questions through the second data stream, and answer the user's questions through text or voice, thereby realizing the interaction between the virtual human character and the user.
[0156] The interaction between the virtual human character and the user can be carried out on a certain interface. For example, when the user opens the virtual human character interaction interface, the first client will transmit the first data stream in the above manner, and then obtain the second data stream to drive the interaction between the virtual human character and the user. Since the server selects the target server corresponding to the first working process that best matches the first client to process the first data stream during the entire process, and uses a low-latency communication connection to transmit the first data stream and the second data stream, ultimately when the user interacts with the virtual human character, the delay in the virtual human character responding to the user is low.
[0157] In addition, since the first working process corresponding to the first client can load different functional modules to realize real-time processing of the first data stream, the speed of processing the first data stream is further improved. The user device corresponding to the first client does not need to expend more performance to continue processing the second data, thereby reducing the delay in the user's conversation with the virtual human character through the client, or reducing the delay in the data processing process between the server and the client in other usage scenarios.
[0158] In the embodiment of the present application, the server establishes a first signaling connection between the signaling server and any work process by receiving a connection request from any work process, and puts the successfully connected work process into the work process pool. The server receives a connection request sent by a first client, establishes a second signaling connection between the signaling server and the first client, receives a first signaling message sent by the first client for requesting a target application service through the signaling server, and determines a first work process matching the first signaling message from the work process pool.
[0159] The first session description message sent by the first client and the second session description message sent by the first working process are then received through the signaling server. The first session description message is forwarded to the first working process through the signaling server, and the second session description message is forwarded to the first client. The session end message sent by the first client is received through the signaling server, and the session end message is sent to the first working process. The session end confirmation message generated according to the session end message and sent by the first working process is received through the signaling server. The session end confirmation message is sent to the first client through the signaling server. The signaling server receives the signaling connection end message generated by the first client according to the session end confirmation message.
[0160] Finally, a communication connection is established between the first client and the target server corresponding to the first working process, the first data stream sent by the first client is received, and the first data stream is sent to the target server corresponding to the first working process. The first working process calls the corresponding functional module to process the first data stream to obtain a second data stream, and the second data stream is sent to the first client, so that the first client displays the interface corresponding to the second data stream.
[0161] In the process of transmitting data between the first client and the server, the server can quickly process the first data stream and return the second data stream to the first client in real time, thereby reducing the delay in the entire data transmission process. In the scenario where the user and the virtual human character interact, the delay of the virtual human character replying to the user can be reduced.
[0162] See also Figure 5 , which will be described below in conjunction with specific scenarios.
[0163] This data processing scenario can be applied to a scenario where a user and a virtual person are talking, or to a scenario where a virtual character is constructed on the client side, and of course, can also be applied to other scenarios, and should not be limited to this application.
[0164] like Figure 5 As shown, inside the server, there are signaling servers, proxy services and working processes. The working process is managed by the working process manager.
[0165] The server can create multiple idle work processes, and each work process is provided with corresponding identity information. A first signaling connection is established between each idle work process and the signaling server, and the first signaling connection can be a first WebSocket connection. Then the signaling server can obtain the first signaling connection and identity information corresponding to each idle work process.
[0166] When the user needs to use some services, such as virtual human services, the user can enter the web page by opening a browser, thereby opening the corresponding first client, and then establish a second signaling connection between the first client and the server, such as establishing a second WebSocket connection.
[0167] Then the server may receive the first signaling information sent by the client, such as the first signaling message including the software development kit name, etc. Then the server randomly selects one from the multiple first signaling connections to pair with the target first signaling connection and the second signaling connection, and confirms that the idle working process corresponding to the target first signaling connection is the first working process.
[0168] The server returns a first working process ready message to the first client through the second signaling connection, and the first client receives the first working process ready message through the second signaling connection.
[0169] Then, the server obtains the first Internet Protocol address corresponding to the client and the second Internet Protocol address corresponding to the first working process through the proxy service. The proxy service can use a turn proxy. Specifically, the proxy server can obtain the first Internet Protocol address corresponding to the first client through the second signaling connection and obtain the second Internet Protocol address corresponding to the first working process through the first signaling connection.
[0170] The proxy server may also send the second Internet Protocol address to the first client via the second signaling connection, and send the first Internet Protocol address to the first working process via the first signaling connection.
[0171] The first client can send a first session description message through the second signaling connection, the signaling server sends the first session description message to the first working process through the first signaling connection, the first working process returns the second session description message through the first signaling connection, and the first client receives the second session description message through the second signaling connection.
[0172] After the first client receives the second session description message, it can send a session end message to the signaling server through the second signaling connection. The first working process receives the session end message through the first signaling connection with the signaling server, and then generates a session end confirmation message based on the session end message, and then sends the session end confirmation message to the signaling server through the first signaling connection. The signaling server sends the session end confirmation message to the first client through the second signaling connection.
[0173] The server receives a signaling connection end message generated by the first client based on the session end confirmation message through the signaling server, thereby disconnecting the second signaling connection between the first client and the signaling server, and deleting the first working process from the working process pool, disconnecting the first signaling connection between the first working process and the signaling server.
[0174] The server then establishes a communication connection between the server and the first client through the proxy service, such as establishing a Web Real-Time Communication (WebRTC) connection.
[0175] After establishing a communication connection between the server and the client, the first client can send a first data stream to the server, such as video, audio, image, text, etc. The server can control the first working process to call and load the corresponding function module to process the first data stream, such as calling the corresponding audio synthesis SDK, live-action image SDK, etc. to process the first data stream.
[0176] In some implementations, when the first client transmits the first data stream to the server, the first working process can process the data stream that has been transmitted in real time, and the second data stream obtained after processing can be transmitted to the first client in real time through the communication connection, thereby reducing the delay in the data processing process. At the same time, the server has high-performance hardware, such as a high-performance CPU and GPU, which can quickly process the first data stream, thereby reducing the delay in the data processing process.
[0177] When the first client receives the second data stream, it can directly drive the second data stream to implement the corresponding function. For example, after receiving the second data stream, the first client can use the second data to drive the virtual human character to talk with the user, answer questions raised by the user, or display the requirements raised by the user. The second client can also implement audio and video playback according to the second data stream, thereby realizing the display of the virtual human character.
[0178] Specifically, in actual application scenarios, taking the expression migration scenario as an example, after the first client obtains the user's expression data stream through the camera, the first client sends the first data stream to the target server corresponding to the first working process. The first working process can call the function module for expression migration, and then process the expression data stream through the function module to obtain expression dimension data, and send the expression dimension data as the second data stream to the first client.
[0179] The first client can use the expression dimension data to drive the virtual character, so that the virtual character displays expressions on the first client, thereby realizing interaction between the virtual character and the user.
[0180] For another example, in a scenario where a user interacts with a virtual person, after establishing a communication connection between the first client and the target server corresponding to the first working process, the server may send a preset video stream to the client to be played by the first client, where the preset video includes a preset target character, such as a character in a game.
[0181] Alternatively, after establishing a communication connection between the first client and the target server corresponding to the first working process, the server may send preset text, audio and other data to the client, thereby achieving interaction between the target character and the user.
[0182] The user can interact with the target character. The user can say something or type something, thereby generating a text message on the first client. The first client sends the text message to the target server. The target server can call the first working process to load the speech synthesis function module, and then generate a reply message for the text message, and use the reply message as the second data stream. For example, the first working process can reply to the user according to the text message, thereby calling the speech synthesis module to generate the corresponding audio and / or text, and then use the audio and / or text as the reply message, so as to use the reply message on the first client to realize the interaction between the target character and the user.
[0183] In an embodiment of the present application, the server can control the first working process to load the corresponding functional module for the first data stream transmitted by the first client, thereby realizing fast processing of different types of data in the first data stream, and at the same time, a low-latency communication connection is established between the first client and the server, which can reduce the delay of data transmission. Finally, when the server processes the data transmitted by the first client, the first client can quickly receive the processed data, and when the first client implements the corresponding function, it will reduce the user's waiting time and improve the experience of the first client implementing the corresponding function.
[0184] See also Figure 6 , Figure 6 300 is a schematic diagram of the structure of a data processing device provided in an embodiment of the present application. The data processing device 300 includes:
[0185] The matching unit 310 is configured to receive, through a signaling server, a first signaling message sent by a first client for requesting a target application service, and determine a first working process that matches the first signaling message from a working process pool.
[0186] The matching unit 310 is also used to receive a connection request from any working process, establish a first signaling connection between the signaling server and any working process, and put the successfully connected working process into the working process pool; receive a connection request sent by the first client, and establish a second signaling connection between the signaling server and the first client.
[0187] The matching unit 310 is also used to receive a first session description message sent by the first client and a second session description message sent by the first working process through a signaling server before establishing a communication connection between the first client and the target server corresponding to the first working process; forward the first session description message to the first working process through the signaling server, and forward the second session description message to the first client.
[0188] The matching unit 310 is also used to receive a session end message sent by the first client through the signaling server and send the session end message to the first working process after forwarding the first session description message to the first working process through the signaling server and forwarding the second session description message to the first client; receive a session end confirmation message sent by the first working process and generated according to the session end message through the signaling server; send the session end confirmation message to the first client through the signaling server; receive a signaling connection end message generated by the first client according to the session end confirmation message through the signaling server, and delete the first working process from the working process pool.
[0189] The connection unit 320 is used to establish a communication connection between the first client and the target server corresponding to the first working process.
[0190] The connection unit 320 is further configured to establish a communication connection between the first client and a target server corresponding to the first working process through the WebRTC protocol.
[0191] The connection unit 320 is also used to send a preset video stream to the first client for playback after establishing a communication connection between the first client and the target server corresponding to the first working process, where the preset video includes a preset target character.
[0192] The first transmission unit 330 is used to receive a first data stream sent by the first client, and send the first data stream to a target server corresponding to the first working process.
[0193] The calling unit 340 is used to call the corresponding function module through the first working process to process the first data stream and obtain the second data stream.
[0194] The calling unit 340 is also used to call the functional module for expression migration through the first working process when the first data stream includes a data stream containing user expressions obtained through a camera; process the first data stream through the functional module to obtain expression dimension data corresponding to the first data stream, and use the expression dimension data as the second data stream.
[0195] The calling unit 340 is also used to call the function module for speech synthesis through the first working process when the first data stream includes text information input by the user; generate reply information for the text information through the function module, and use the reply information as the second data stream. The reply information includes audio information and / or text information.
[0196] The second transmission unit 350 is used to send the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream.
[0197] The second transmission unit 350 is further configured to send the second data stream to the first client, so that the first client drives the virtual human character displayed by the first client according to the second data stream, wherein the virtual human character is an object that interacts with the user.
[0198] The second transmission unit 350 is further configured to send the second data stream to the first client, so that the first client drives the target character to output reply information according to the second data stream.
[0199] The computer device receives a first signaling message for requesting a target application service sent by a first client through a signaling server, determines a first working process matching the first signaling message from a working process pool, then establishes a communication connection between the first client and the target server corresponding to the first working process, then receives a first data stream sent by the first client, and sends the first data stream to the target server corresponding to the first working process, and obtains a second data stream by processing the first data stream through the first working process calling a corresponding function module, and finally sends the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream. The first client can match the target server that best suits the first client through the signaling server, and a low-latency communication connection is established between the first client and the target server, thereby reducing the delay in interactive data between the first client and the target server.
[0200] The present application also provides a server, such as Figure 7 As shown, it shows a schematic diagram of the structure of the server involved in the embodiment of the present application, specifically:
[0201] The server may include one or more processing core processors 401, one or more computer-readable storage media memories 402, a power supply 403, an input unit 404 and other components. Those skilled in the art will appreciate that Figure 7 The server structure shown in the figure does not constitute a limitation on the server, and may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. Among them:
[0202] The processor 401 is the control center of the server, and uses various interfaces and lines to connect various parts of the entire server. By running or executing software programs and / or modules stored in the memory 402, and calling data stored in the memory 402, the processor 401 performs various functions of the server and processes data, thereby monitoring the server as a whole. Optionally, the processor 401 may include one or more processing cores; preferably, the processor 401 may integrate an application processor and a modem processor, wherein the application processor mainly processes the operating system, user interface, and application programs, and the modem processor mainly processes wireless communications. It is understandable that the above-mentioned modem processor may not be integrated into the processor 401.
[0203] The memory 402 can be used to store software programs and modules. The processor 401 executes various functional applications and data processing by running the software programs and modules stored in the memory 402. The memory 402 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the server, etc. In addition, the memory 402 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. Accordingly, the memory 402 may also include a memory controller to provide the processor 401 with access to the memory 402.
[0204] See also Figure 8 , Figure 8 : is a flow chart of a data interaction method provided in an embodiment of the present application. The data interaction method is applied to a client. The data interaction method may include the following steps:
[0205] 510. Obtain a first data stream, and determine first signaling information corresponding to the first data stream.
[0206] In some implementations, when a user needs to use a corresponding function on a client, the client can obtain a first data stream such as video, audio, image, text, etc. through a user device. For example, the client can obtain the first data stream through a sensor device such as a microphone or camera of the user device.
[0207] After obtaining the first data, the first client will also determine the first signaling information corresponding to the first data stream. For example, when the first data stream is video data, the first signaling information includes the name of the functional module corresponding to the video data processing, for example, the first information is a model name, a software development kit name, a software module name, etc.
[0208] 520. Create a second signaling connection with the server, and send the first signaling information to the server through the second signaling connection.
[0209] The first client may actively initiate an application to the server to create a second signaling connection. After identifying the client, the server may create a second signaling connection with the client, and then the first client sends the first information to the server through the second signaling connection.
[0210] After receiving the first information, the server can determine the first working process corresponding to the first client and the first signaling connection corresponding to the first working process. The server sends a message to the first client that the first working process is ready.
[0211] 530. Create a communication connection with the server, and send the first data stream to the server.
[0212] In some embodiments, when the first client receives the message that the first working process is ready, it will initiate a request to the server to create a communication connection, and the server can create a communication connection according to the request. For example, the client can send the first Internet Protocol address corresponding to the first client and the first session description message to the server, where the first Internet Protocol address can be the public network IP corresponding to the client, and the first session description message can be the session description protocol SDP.
[0213] The first client and the server may establish a webpage instant messaging connection. The first client may send the first data stream to the server via the communication connection. The communication connection has the characteristic of low latency.
[0214] The first client may send the acquired first data stream to the server in real time. For example, the first client may send the acquired video data to the server in real time.
[0215] 540. Obtain, through a communication connection, a second data stream returned by the server according to the first signaling information and the first data stream.
[0216] After receiving the first data stream, the server can control the first working process to call the corresponding functional module according to the first information, such as controlling the first working process to call the model, software development kit, software module, etc. corresponding to the first data stream.
[0217] The first working process processes the first data stream by loading the function module corresponding to the first data stream, thereby obtaining the second data stream, and the first client obtains the second data stream through the communication connection, and then displays the information on the user device. For example, the second data stream is used to drive the virtual human character to interact with the user.
[0218] In some implementations, after receiving the second data stream, the first client generates presentation information according to the second data stream, and displays the presentation information to the user based on a graphical user interface, where the presentation information includes at least one of video, image, voice, and text.
[0219] In some embodiments, the first working process can process the first data stream in real time. For example, the first data stream is video data. The first working process can process each frame of video data in real time and send the processed second data stream to the first client in real time through a communication connection.
[0220] In an embodiment of the present application, the first client creates a second signaling connection with the server, and sends the first signaling information to the server through the second signaling connection. Then, the first information is sent to the server through the second signaling connection, and then a communication connection is created with the server, and the first data stream is sent to the server. Finally, the second data stream returned by the server based on the first signaling information and the first data stream is obtained through the communication connection. The first client establishes a low-latency communication connection with the server, and the server can process the first data stream in real time, and the client can receive the processed second data stream in real time, thereby reducing the data interaction delay between the server and the first client.
[0221] For a more detailed understanding of the data interaction method provided in the embodiment of the present application, please continue to refer to Fig. 9 , Fig. 9 It is a schematic diagram of a data interaction scenario provided in an embodiment of the present application.
[0222] like Fig. 9 As shown, a communication connection is established between the client and the server.
[0223] Before the first client sends the first data stream to the server, the first client may obtain user data and process the user data to generate the first data stream. For example, the first client may obtain video, audio, image, text and other data input by the user. The first client then integrates the user data to obtain the first data stream, for example, by packaging the associated user data to generate the first data stream.
[0224] After receiving the first data stream, the server may call the corresponding first working process to load the functional module corresponding to the first data stream to process the first data stream to obtain a second data stream, and then send the second data stream to the first client.
[0225] After receiving the second data stream, the first client generates display information according to the second data stream, and displays the display information to the user based on the graphical user interface, where the display information includes at least one of video, image, voice, and text. For example, video and audio are played, or the virtual character displayed by the first client can answer the user's question, or the virtual character and the user communicate.
[0226] During the entire data interaction process, the first client establishes a low-latency communication connection with the server, and the server can process the first data stream in real time, and the first client can receive the processed second data stream in real time, thereby reducing the data interaction delay between the server and the first client.
[0227] It should be noted that in the embodiment of the present application, the data processing method provided in the embodiment of the present application can also be executed by a variety of computer devices other than the server, and is not limited to being executed by the server.
[0228] Accordingly, the embodiment of the present application also provides a computer device, which may be a terminal, and the terminal may be a smart phone, a tablet computer, a laptop computer, a touch screen, a game console, a personal computer (PC, Personal Computer), a personal digital assistant (Personal Digital Assistant, PDA) and other terminal devices. Fig.10 As shown, Fig.10 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. The computer device 1000 includes a processor 701 having one or more processing cores, a memory 702 having one or more computer-readable storage media, and a computer program stored in the memory 702 and executable on the processor. The processor 701 is electrically connected to the memory 702. Those skilled in the art will appreciate that the computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or fewer components than shown, or combine certain components, or arrange components differently.
[0229] The processor 701 is the control center of the computer device 1000. It uses various interfaces and lines to connect the various parts of the entire computer device 1000, executes various functions of the computer device 1000 and processes data by running or loading software programs and / or modules stored in the memory 702, and calling data stored in the memory 702, thereby monitoring the computer device 1000 as a whole.
[0230] In the embodiment of the present application, the processor 701 in the computer device 1000 will load instructions corresponding to the processes of one or more application programs into the memory 702 according to the following steps, and the processor 701 will run the application programs stored in the memory 702 to implement various functions:
[0231] Receiving, through the signaling server, a first signaling message sent by the first client for requesting a target application service, and determining a first working process matching the first signaling message from a working process pool;
[0232] Establishing a communication connection between the first client and the target server corresponding to the first working process;
[0233] Receive a first data stream sent by a first client, and send the first data stream to a target server corresponding to the first working process;
[0234] The first working process calls the corresponding function module to process the first data stream to obtain the second data stream;
[0235] The second data stream is sent to the first client, so that the first client displays an interface corresponding to the second data stream.
[0236] Optional, such as Fig.10 As shown, the computer device 1000 further includes: a processor 701, a memory 702, a touch screen 703, a radio frequency circuit 704, an audio circuit 705, an input unit 706, and a power supply 707. The processor 701 is electrically connected to the touch screen 703, the radio frequency circuit 704, the audio circuit 705, the input unit 706, and the power supply 707. Those skilled in the art can understand that Fig.10 The computer device structure shown in the figure does not constitute a limitation on the computer device, and may include more or less components than shown in the figure, or combine certain components, or arrange the components differently.
[0237] The touch display screen 703 can be used to display a graphical user interface and receive operation instructions generated by the user acting on the graphical user interface. The touch display screen 703 may include a display panel and a touch panel. Among them, the display panel may be used to display information input by the user or information provided to the user and various graphical user interfaces of the computer device, and these graphical user interfaces may be composed of graphics, text, icons, videos and any combination thereof. Optionally, the display panel may be configured in the form of a liquid crystal display (LCD, Liquid Crystal Display), an organic light emitting diode (OLED, Organic Light-Emitting Diode) and the like. The touch panel may be used to collect the user's touch operation on or near it (such as the user using any suitable object or attachment such as a finger, a stylus, etc. on the touch panel or near the touch panel), and generate corresponding operation instructions, and the operation instructions execute corresponding programs. Optionally, the touch panel may include two parts, a touch detection device and a touch controller. Among them, the touch detection device detects the user's touch orientation, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into the touch point coordinates, and then sends it to the processor 701, and can receive the command sent by the processor 701 and execute it. The touch panel can cover the display panel. When the touch panel detects a touch operation on or near it, it is transmitted to the processor 701 to determine the type of touch event, and then the processor 701 provides a corresponding visual output on the display panel according to the type of touch event. In an embodiment of the present application, the touch panel and the display panel can be integrated into the touch display screen 703 to realize the input and output functions. However, in some embodiments, the touch panel and the touch panel can be used as two independent components to realize the input and output functions. That is, the touch display screen 703 can also be used as a part of the input unit 706 to realize the input function.
[0238] The RF circuit 704 may be used to send and receive RF signals, so as to establish wireless communication with a network device or other computer devices through wireless communication, and to send and receive signals between the network device or other computer devices.
[0239] The audio circuit 705 can be used to provide an audio interface between the user and the computer device through a speaker and a microphone. The audio circuit 705 can transmit the electrical signal converted from the received audio data to the speaker, which is converted into a sound signal for output; on the other hand, the microphone converts the collected sound signal into an electrical signal, which is received by the audio circuit 705 and converted into audio data, and then the audio data is output to the processor 701 for processing, and then sent to another computer device through the radio frequency circuit 704, or the audio data is output to the memory 702 for further processing. The audio circuit 705 may also include an earplug jack to provide communication between an external headset and the computer device.
[0240] The input unit 706 may be used to receive input numbers, character information or user feature information (such as fingerprint, iris, facial information, etc.), and generate keyboard, mouse, joystick, optical or trackball signal input related to user settings and function control.
[0241] The power supply 707 is used to supply power to various components of the computer device 1000. Optionally, the power supply 707 can be logically connected to the processor 701 through a power management system, so that the power management system can manage charging, discharging, and power consumption. The power supply 707 can also include one or more DC or AC power supplies, recharging systems, power failure detection circuits, power converters or inverters, power status indicators, and other arbitrary components.
[0242] although Fig.10 Not shown, the computer device 1000 may also include a camera, a sensor, a wireless fidelity module, a Bluetooth module, etc., which will not be described in detail here.
[0243] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0244] As can be seen from the above, when the computer device provided in this embodiment is a server, the server receives the first signaling message sent by the first client for requesting the target application service through the signaling server, determines the first working process matching the first signaling message from the working process pool; then establishes a communication connection between the first client and the target service end corresponding to the first working process; then receives the first data stream sent by the first client, and sends the first data stream to the target service end corresponding to the first working process; and obtains the second data stream after processing the first data stream by calling the corresponding function module through the first working process; finally, sends the second data stream to the first client, so that the first client displays the interface corresponding to the second data stream. The delay in the data processing process is reduced.
[0245] A person of ordinary skill in the art will appreciate that all or part of the steps in the various methods of the above embodiments may be completed by instructions, or by controlling related hardware through instructions. The instructions may be stored in a computer-readable storage medium and loaded and executed by a processor.
[0246] To this end, an embodiment of the present application provides a computer-readable storage medium. When the computer-readable storage medium is a storage medium of a server, multiple instructions are stored therein, and the instructions can be loaded by a processor to execute the steps in any data processing method provided in the embodiment of the present application. For example, the instructions can execute the following steps:
[0247] Receiving, through the signaling server, a first signaling message sent by the first client for requesting a target application service, and determining a first working process matching the first signaling message from a working process pool;
[0248] Establishing a communication connection between the first client and the target server corresponding to the first working process;
[0249] Receive a first data stream sent by a first client, and send the first data stream to a target server corresponding to the first working process;
[0250] The first working process calls the corresponding function module to process the first data stream to obtain the second data stream;
[0251] The second data stream is sent to the first client, so that the first client displays an interface corresponding to the second data stream.
[0252] The specific implementation of each of the above operations can be found in the previous embodiments, which will not be described in detail here.
[0253] The computer-readable storage medium may include: a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0254] Since the instructions stored in the computer-readable storage medium can execute the steps in any data processing method provided in the embodiments of the present application, the beneficial effects that can be achieved by any data processing method provided in the embodiments of the present application can be achieved. Please refer to the previous embodiments for details and will not be repeated here.
[0255] The above is a detailed introduction to a data processing method, device, storage medium and computer equipment provided in the embodiments of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.
Claims
1. A data processing method, characterized in that: include: Receive a connection request from any work process, establish a first signaling connection between the signaling server and any work process, and put the successfully connected work process into a work process pool; receiving a connection request sent by a first client, and establishing a second signaling connection between the signaling server and the first client; Based on the first signaling connection and the second signaling connection, receiving, through the signaling server, a first signaling message sent by the first client for requesting a target application service, and determining a first working process matching the first signaling message from the working process pool; Establishing a communication connection between the first client and a target server corresponding to the first working process; Receive a first data stream sent by the first client, and send the first data stream to a target server corresponding to the first working process; The first working process calls the corresponding function module in the target server to process the first data stream to obtain a second data stream; The second data stream is sent to the first client, so that the first client displays an interface corresponding to the second data stream.
2. The data processing method according to claim 1, characterized in that: The first data stream includes a data stream containing user expressions acquired through a camera; The step of processing the first data stream by calling a corresponding function module in the target server through the first working process to obtain a second data stream includes: Calling a function module for expression migration through the first working process; The first data stream is processed by the functional module to obtain expression dimension data corresponding to the first data stream, and the expression dimension data is used as the second data stream.
3. The method according to claim 2, characterized in that The sending the second data stream to the first client so that the first client displays an interface corresponding to the second data stream includes: The second data stream is sent to the first client, so that the first client drives the expression display of the virtual character according to the second data stream, wherein the virtual character is an object displayed by the first client to interact with the user.
4. The data processing method according to claim 1, characterized in that: The first data stream includes text information from a user; The step of processing the first data stream by calling a corresponding function module in the target server through the first working process to obtain a second data stream includes: Calling a function module for speech synthesis through the first working process; Reply information for the text information is generated through the functional module, and the reply information is used as the second data stream.
5. The data processing method according to claim 4, characterized in that: After establishing a communication connection between the first client and the target server corresponding to the first working process, the method further includes: Sending a preset video stream to the first client for playback, the preset video including a preset target character; The sending the second data stream to the first client so that the first client displays an interface corresponding to the second data stream includes: The second data stream is sent to the first client, so that the first client drives the target character to output the reply information according to the second data stream.
6. The data processing method according to claim 4, characterized in that: The reply information includes audio information and / or text information.
7. The data processing method according to claim 1, characterized in that: The establishing of a communication connection between the first client and a target server corresponding to the first working process includes: A communication connection is established between the first client and the target server corresponding to the first working process through the WebRTC protocol.
8. The data processing method according to claim 1, characterized in that: Before establishing a communication connection between the first client and the target server corresponding to the first working process, the method further includes: Receiving, by the signaling server, a first session description message sent by the first client and a second session description message sent by the first working process; The first session description message is forwarded to the first working process through the signaling server, and the second session description message is forwarded to the first client.
9. The data processing method according to claim 8, characterized in that: After forwarding the first session description message to the first working process and forwarding the second session description message to the first client through the signaling server, the method further includes: Receiving, by the signaling server, a session end message sent by the first client, and sending the session end message to the first working process; Receiving, through the signaling server, a session end confirmation message generated according to the session end message and sent by the first working process; Sending the session end confirmation message to the first client through the signaling server; The signaling server receives a signaling connection end message generated by the first client according to the session end confirmation message, and deletes the first working process from the working process pool.
10. A data processing device, characterized in that: include: A matching unit, configured to receive a connection request from any work process, establish a first signaling connection between the signaling server and any work process, and place the successfully connected work process into a work process pool; Receive a connection request sent by a first client, and establish a second signaling connection between the signaling server and the first client; based on the first signaling connection and the second signaling connection, receive, through the signaling server, a first signaling message sent by the first client for requesting a target application service, and determine a first working process matching the first signaling message from the working process pool; A connection unit, used to establish a communication connection between the first client and a target server corresponding to the first working process; A first transmission unit, configured to receive a first data stream sent by the first client, and send the first data stream to a target server corresponding to the first working process; A calling unit, configured to call a corresponding function module in the target server through the first working process to process the first data stream and obtain a second data stream; The second transmission unit is used to send the second data stream to the first client, so that the first client displays an interface corresponding to the second data stream.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the steps in the data processing method according to any one of claims 1 to 9.
12. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the program, the steps in the data processing method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Live broadcast starting method and device based on cloud game and storage medium
CN110536146A
Multi-modal interaction method, device and system based on virtual character, storage medium and terminal
CN112162628A
