Data transmission method, device, computer equipment and program product

By creating isolated application processes for each user and allocating independent streaming service instances, the problems of content consistency and resource waste in multi-user streaming are solved, achieving personalized data transmission and secure isolation.

CN120434230BActive Publication Date: 2025-09-19LONGSIYUN (BEIJING) TECH CO LTD +1
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510738787.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-06-04
Publication Date
2025-09-19
Estimated Expiration
2045-06-04

AI Technical Summary

Technical Problem

Existing streaming technologies cannot achieve independent data transmission between multiple users, resulting in users seeing the same content, failing to achieve personalized streaming, and posing risks to resources and security/privacy.

Method used

An isolated application process is created for each user and an independent streaming service instance is assigned. Data is encoded and transmitted using user identification information to ensure that each user receives a unique streaming data packet.

Benefits of technology

It achieves stream isolation between multiple users, improves resource utilization, and ensures user data security and personalized experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120434230B_ABST
    Figure CN120434230B_ABST
Patent Text Reader

Abstract

The present disclosure provides a data transmission method, apparatus, computer device and program product, wherein the method includes: creating an application process corresponding to a designated application of each user and determining the application process information of each application process based on the user identification information of each user among multiple users; allocating a streaming service instance to each user based on the application process information of each application process; wherein the streaming service instances allocated to different users are different; utilizing the user identification information of each user and the streaming service instance allocated to each user, performing streaming encoding on the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process; and transmitting each streaming data packet to the user terminal of the corresponding user.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of computer technology, and in particular to a data transmission method, apparatus, computer equipment, and program product. Background Art

[0002] Streaming technology is a technology that transmits and plays data (such as audio data, video data, text data, etc.) in real time in the form of a continuous data stream. Through this technology, users can start playing or using data without waiting for the entire data file to be completely downloaded, greatly improving user experience and data transmission efficiency.

[0003] Common streaming technologies deploy streaming service software on the server to capture and encode the server's data content, then send the encoded video stream data packets to the client for decoding, display, and use. However, because a server can only output uniform data content, when multiple users connect to the server for streaming, the data transmitted to each user's client is identical, preventing independent data transmission. Summary of the Invention

[0004] The embodiments of the present disclosure at least provide a data transmission method, apparatus, computer device, and program product.

[0005] In a first aspect, an embodiment of the present disclosure provides a data transmission method, including:

[0006] creating, according to user identification information of each user among the multiple users, an application process corresponding to a designated application of each of the users and determining application process information of each of the application processes;

[0007] Allocating a streaming service instance to each user according to the application process information of each application process; wherein different streaming service instances are allocated to different users;

[0008] Using the user identification information of each user and the streaming service instance allocated to each user, stream encoding is performed on the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process;

[0009] Each of the stream data packets is transmitted to a corresponding user terminal.

[0010] In a possible implementation, before creating an application process corresponding to a designated application of each user according to the user identification information of each user among the multiple users, the method further includes:

[0011] Receiving an authentication request sent by a client of any of the users;

[0012] Calling an authentication service program to parse the user's identity authentication information from the authentication request;

[0013] The user is authenticated using the identity authentication information to obtain an authentication result, and the authentication result is sent to the user terminal.

[0014] In a possible implementation, the using the identity authentication information to authenticate the user and obtain an authentication result includes:

[0015] If the identity authentication information is consistent with the pre-stored authentication information, determining that the user authentication is successful and generating a session identifier;

[0016] Determining user identification information of the user based on the identity authentication information and the session identifier;

[0017] An authentication result is generated according to the user identification information and an authentication status indicating that the authentication is passed.

[0018] In a possible implementation, creating an application process corresponding to a designated application of each user and determining application process information of each application process according to user identification information of each user among multiple users includes:

[0019] For each of the users, use the context switching function to switch to the operating environment corresponding to the user;

[0020] In the operating environment, according to the configuration file and the user identification information, an application process corresponding to the user's designated application is created, and a process identifier is assigned to the application process;

[0021] Application process information is determined according to the user identification information, the process identification, and the application information of the specified application.

[0022] In a possible implementation, allocating a streaming service instance to each user according to the application process information of each application process includes:

[0023] Allocating a corresponding target streaming service instance to each user from a plurality of dynamically created streaming service instances;

[0024] For each of the application processes, determining an instance configuration command according to an operating system supported by the application process created for the user;

[0025] The instance configuration command is used to configure a target streaming service instance corresponding to the application process according to the application process information corresponding to the application process.

[0026] In one possible implementation, using the user identification information of each user and the streaming service instance allocated to each user to stream encode the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process includes:

[0027] Utilizing the streaming service instance allocated to each user, continuously obtaining the data output stream of the application process created for the user;

[0028] The data output and the user identification information are stream-encoded using a data encoding service to obtain a stream data packet corresponding to each of the application processes.

[0029] In one possible implementation, the method further includes:

[0030] Using the distribution service, receiving the connection request initiated by the user end;

[0031] After establishing the network connection with the user terminal, the currently maintained user terminal connection table is updated according to the user identification information and the network address of the user terminal carried in the connection request.

[0032] In a possible implementation manner, transmitting each of the streaming data packets to a corresponding user terminal includes:

[0033] For each of the streaming data packets, using a distribution service to parse the user identification information from the streaming data packet;

[0034] Determining, based on the user identification information, a network address of a user terminal that matches the user identification information from a currently maintained user terminal connection table;

[0035] The streaming data packet is sent to a client of a corresponding user according to the network address.

[0036] In a possible implementation manner, after transmitting each of the streaming data packets to a corresponding user terminal, the method further includes:

[0037] Determining data transmission indicator information corresponding to each of the user terminals using a distribution service; the data transmission indicator information includes at least one of a data volume, a frame rate, and a network delay of the user terminal;

[0038] Determining, according to the type of each type of data transmission indicator information, an information adjustment method of the data transmission indicator information;

[0039] Adjusting the data transmission indicator information according to the information adjustment method, and screening out abnormal user terminals with abnormal transmission from various user terminals based on the adjusted information;

[0040] Send abnormal prompt information to the abnormal user terminal and / or optimize data transmission for the abnormal user terminal.

[0041] In a second aspect, an embodiment of the present disclosure further provides a data transmission device, including:

[0042] A creation module, configured to create, based on user identification information of each user among multiple users, an application process corresponding to a designated application of each user and determine application process information of each application process;

[0043] an allocation module, configured to allocate a streaming service instance to each user based on the application process information of each application process; wherein different streaming service instances are allocated to different users;

[0044] an encoding module, configured to perform stream encoding on the data output of the application process created for each user by using the user identification information of each user and the streaming service instance allocated to each user, to obtain a streaming data packet corresponding to each application process;

[0045] The transmission module is used to transmit each of the stream data packets to the user terminal of the corresponding user.

[0046] In a third aspect, an optional implementation of the present disclosure further provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory, and when the machine-readable instructions are executed by the processor, the steps of the above-mentioned first aspect or any possible implementation of the first aspect are performed.

[0047] In a fourth aspect, an optional implementation of the present disclosure further provides a computer program product, including a computer program, which, when executed, implements the above-mentioned first aspect, or the steps in any possible implementation of the first aspect.

[0048] The data transmission method, apparatus, computer equipment and program product provided by the embodiments of the present disclosure can enable each independent application process running on the server to independently output the data required by the user by creating an isolated application process for each of the multiple users and assigning corresponding application process information. Then, by assigning an independent streaming service instance to each user, each streaming service instance can independently capture the data output of the corresponding user application process, obtain an independent streaming data packet corresponding to each user, and ensure that the streaming data packets obtained by each streaming service instance are different. By sending the streaming data packet to the user terminal of the corresponding user, the same server can be used to transmit independent streaming data to each of the multiple users, thereby realizing independent access to the server by different users and playing the role of stream isolation between multiple users.

[0049] For a description of the effects of the above-mentioned data transmission device, computer equipment, and computer program product, please refer to the description of the above-mentioned data transmission method, which will not be repeated here.

[0050] In order to make the above-mentioned objectives, features and advantages of the present disclosure more obvious and easy to understand, preferred embodiments are given below and described in detail with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following briefly introduces the drawings required for use in the embodiments. The drawings herein are incorporated into and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and, together with the specification, are used to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For those of ordinary skill in the art, other relevant drawings can be obtained based on these drawings without inventive effort.

[0052] Figure 1 A flow chart of a data transmission method applied to a server provided by an embodiment of the present disclosure is shown;

[0053] Figure 2 A specific implementation flow chart of a data transmission method provided by an embodiment of the present disclosure is shown;

[0054] Figure 3 A schematic diagram of a data transmission device applied to a server provided by an embodiment of the present disclosure is shown;

[0055] Figure 4 A schematic structural diagram of a computer device provided by an embodiment of the present disclosure is shown. DETAILED DESCRIPTION

[0056] In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work are within the scope of protection of the present disclosure.

[0057] In addition, the terms "first," "second," and the like in the description and claims of the embodiments of the present disclosure and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, such that the embodiments described herein can be practiced in an order other than that shown or described herein.

[0058] In this document, "multiple or several" refers to two or more. "And / or" describes the relationship between associated objects, indicating that three possible relationships exist. For example, "A and / or B" can mean: A exists alone, A and B exist simultaneously, or B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0059] Research has found that streaming technology is currently widely used in a variety of fields, including remote control, cloud gaming, and video on demand. For example, in the remote control field, common streaming technologies, such as Moonlight, allow users to remotely control their personal computers over the internet and provide a smooth user experience. These technologies achieve efficient remote access and control by encoding and compressing the server's screen content in real time and transmitting it to the client device. Cloud gaming platforms such as NVIDIA GeForce Now also use similar technologies to stream game screens to users. Specifically, current streaming technologies typically employ a server-client architecture, where streaming service software runs on the server, capturing and encoding the server's data content (e.g., the screen image). The client then runs streaming data packet receiving software, which decodes and displays the data packets from the server. However, because each server outputs only a single screen, when multiple users connect simultaneously, the streaming data output to each user is identical, resulting in each user seeing the same screen. This makes streaming personalization and stream isolation impossible. Furthermore, due to the lack of effective isolation between users, simultaneous user operations can interfere with each other, impacting the user experience and posing potential data security and privacy risks. Furthermore, for high-configuration servers, this issue can significantly reduce server resource utilization, making it impossible to provide independent streaming services to different users. For example, in an enterprise or educational environment, a high-performance server can usually only serve one user. Even if it serves multiple users, the streaming data received by multiple users will be inconsistent, causing the remaining server resources to remain idle and resulting in resource waste.

[0060] Based on the above research, the present disclosure provides a data transmission method, apparatus, computer equipment and program product. By creating an isolated application process for each of a plurality of users and allocating corresponding application process information, each independent application process running on the server can independently output the data required by the user. Then, by allocating an independent streaming service instance to each user, each streaming service instance can independently capture the data output of the corresponding user application process, obtain an independent streaming data packet corresponding to each user, and ensure that the streaming data packets obtained by each streaming service instance are different. By sending the streaming data packet to the user terminal of the corresponding user, the same server can be used to transmit independent streaming data to each of the multiple users, thereby realizing independent access to the server by different users and playing the role of stream isolation between multiple users.

[0061] The defects in the above solutions are the results obtained by the inventors after practice and careful research. Therefore, the process of discovering the above problems and the solutions proposed by this disclosure for the above problems below should be the contributions made by the inventors to this disclosure during the disclosure process.

[0062] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, it does not need to be further defined or explained in subsequent drawings.

[0063] It is understandable that before using the technical solutions disclosed in the various embodiments of this disclosure, the type, scope of use, usage scenarios, etc. of the personal information involved in this disclosure should be informed to the user and the user's authorization should be obtained in an appropriate manner in accordance with relevant laws and regulations.

[0064] It should be noted that the specific terms mentioned in the embodiments of the present disclosure include:

[0065] Moonlight: Open-source game streaming software that allows users to stream games from a high-performance gaming console or computer to other devices over the internet for gaming.

[0066] Sunshine: A game streaming server software, mainly used to record and transmit real-time images to the Moonlight client;

[0067] SetUID: is a permission setting used in Unix and Unix-like systems that allows a program to run as the program's owner rather than the user who runs the program.

[0068] ‌Setgid:‌ is a permission control function in the Linux system that is used to set the effective user ID (EUID) of a process to a specified group ID. The main function of the Setgid function is to change the execution permissions of a process so that it runs as a specified group identity;

[0069] ‌CreateProcessAsUser API:‌ is a Windows API function used to create a new process in a specified security context;

[0070] PowerShell's Start-Process command: Used to start a new process. This command can start external programs and processes and provides a variety of parameters to control how the process is started.

[0071] Credential parameter: A parameter used to specify credentials when performing an operation. Credentials are information used to authenticate and authorize users to access resources, typically including user names and passwords, access keys, certificates, etc.

[0072] su command: full name switch user, is a command used to switch user identities in Linux system;

[0073] Windows handle: In Windows system, handle is a special identifier used to identify and operate various system resources, such as files, windows, processes, threads, events, etc.

[0074] Kasm Workspaces - a containerized application streaming technology based on Docker that supports running isolated desktop environments in the browser;

[0075] Parsec; a high-performance remote desktop tool optimized for game streaming, supporting 4K / 60FPS and low latency, and can be used to host your own server or use cloud services;

[0076] ‌DXGI Desktop Duplication API: This is a new interface introduced in Windows 8 and later versions for implementing screen capture functionality;

[0077] X11: Provides a window capture function in Linux systems, allowing users to capture the window contents on the screen;

[0078] ‌Wayland: A window capture feature that captures window contents via the Wayland compositor and saves them as an image;

[0079] H.264, also known as Advanced Video Coding, is a widely used video compression format used in various fields such as web streaming, Blu-ray discs, webcams, etc.

[0080] H.265: High Efficiency Video Coding (HEVC), the successor to H.264, provides higher compression efficiency and better image quality, and supports higher resolutions.

[0081] To facilitate understanding of this embodiment, a data transmission method disclosed in an embodiment of the present disclosure is first introduced in detail. The execution subject of the data transmission method provided in the embodiment of the present disclosure is generally a terminal device or other processing device with certain computing capabilities, where the terminal device can be a user equipment (UE), a mobile device, a user terminal, a terminal, a personal digital assistant (PDA), a handheld device, a computer device, etc.; in some possible implementations, the data transmission method can be implemented by a processor calling computer-readable instructions stored in a memory.

[0082] The data transmission method provided by the embodiment of the present disclosure is described below by taking the execution subject as the server as an example.

[0083] like Figure 1 FIG. 1 is a flowchart of a data transmission method applied to a server provided in an embodiment of the present disclosure, which may include the following steps:

[0084] S101: creating an application process corresponding to a designated application of each user according to user identification information of each user among multiple users and determining application process information of each application process.

[0085] First, it should be noted that the data transmission method provided by the embodiment of the present disclosure can be executed using a streaming service program pre-developed on the server side. That is, the service program implements independent streaming for different users by executing S101 to S104.

[0086] Multiple users may all be users who have a need to stream from the server. The number of multiple users is not specifically limited in this disclosure. User identification information is used to identify the user, and the user identification information of different users is different. User identification information may include a user name and a unique session identifier described below.

[0087] Designated applications are applications that users specify to run on the server. These can be different for different users, or they can be duplicates. For example, User 1's designated application is Browser 1, User 2's is Browser 2, User 3's is a game program, and User 3's is a live streaming program. A single user can have one or more designated applications. If a user specifies multiple applications, corresponding application processes can be created for that user simultaneously, and the same streaming service instance can be assigned to each of these application processes.

[0088] The application process information is used to uniquely characterize the created application, which may include information such as the application's process ID, session ID, program type, program name, user name, and running time.

[0089] In a specific implementation, after multiple users' client terminals are connected to the server terminal, the server terminal can create an independent session for each user and assign a session identifier. Each user can then send a streaming request to the server terminal through the client terminal. The server terminal can determine each user's designated application based on each user's streaming request. Then, based on each user's user identification information, the server terminal can create an independent application process for each user's designated application and create a unique process identifier for each application process. The application processes created by the server for each user are isolated from each other. At the same time, the server terminal can determine the application process information of each application process based on information such as each user's user name, the start time of the application process, the program type, the process identifier and program name, the windows handle, and the session identifier assigned to the user.

[0090] In addition, the server can record the association between the application process created for each user and the process identifier of the application process in the process mapping table to facilitate subsequent process monitoring, resource allocation and streaming channel configuration.

[0091] For example, the relationship could be:

[0092] {"session_id":"550e8400-e29b-41d4-a716-446655440000","username":"user1","process_id":1234 5,"app_name":"firefox","start_time":"2023-09-15T10:30:00Z","window_handle":"0xA7B3C9D2"}.

[0093] Where session_id represents the session ID, username represents the user name, process_id represents the process ID, app_name represents the application name, and start_time represents the time when the application process started. Window_handle represents the window handle. The process mapping table can be stored in a server-side in-memory data structure or persisted in a database.

[0094] In one embodiment, in order to improve the security of data streaming, the client authentication program can be extended in the client's streaming software. For example, the client authentication program can be pre-extended in the client's streaming software Moonlight. The user can submit an authentication request with a user name and password to the server through the client authentication program. At the same time, an independent authentication service program can be pre-deployed in the server, which can provide an application programming interface (API) for calling. The user name and password submitted by the client are verified through the authentication service program to determine whether the user has streaming permission. The authentication service program is essentially an independently running background service program. For example, a lightweight authentication service can be developed using Node.js, which listens to a specific port (such as port 8080) and provides an API calling interface. By extending the client software functions and the server software functions, it supports user authentication and exclusive video stream reception, thereby improving the entire multi-user streaming isolation system. Specifically, before executing S101, identity authentication can be performed according to the following steps A to C:

[0095] Step A: Receive an authentication request sent by any user's client.

[0096] Here, the authentication request may be an identity authentication request sent by the user through the user terminal, and the request at least carries the user name and password information submitted by the user.

[0097] For example, when a user requests streaming, they can submit identity authentication information, specifically a username and password, through a client authentication program on the user's end. The client authentication program can encapsulate the identity authentication information in JSON format and then generate an authentication request based on the encapsulated information.

[0098] Step B: Call the authentication service program to parse the user's identity authentication information from the authentication request.

[0099] In specific implementation, the streaming service program on the server side can call the authentication service program through the authentication service program's API interface, and use the authentication service program to parse the authentication request to obtain the user's identity authentication information.

[0100] Step C: Use the identity authentication information to authenticate the user, obtain the authentication result, and send the authentication result to the user end.

[0101] In specific implementation, the authentication service program can be used to compare the user authentication information with the user account data pre-stored in the server operating system to verify the validity of the user identity and obtain the user authentication result. After obtaining the authentication result, the authentication result can be sent to the user end.

[0102] Alternatively, optionally, the authentication service program set up on the server side can be combined with the authentication mechanisms of different operating systems. After the authentication service program parses the identity authentication information, it can determine the system authentication module to be called based on the type of operating system on the server side, and then use the system authentication module to authenticate the user based on the identity authentication information. For example, when the operating system on the server side is a Linux operating system, the pluggable authentication module (Pluggable Authentication Modules, PAM) can be called to verify the user's identity authentication information; when the operating system on the server side is a Windows operating system, the local security authority subsystem service (Local Security Authority Subsystem Service, LSASS) can be called to verify the user's identity authentication information. Among them, the system authentication module can authenticate the user based on the identity authentication information and the user account information registered in the operating system.

[0103] In one embodiment, the above step C can also be implemented as follows:

[0104] Step C-1: If the identity authentication information is consistent with the pre-stored authentication information, it is determined that the user authentication is successful and a session identifier is generated.

[0105] Here, the pre-stored authentication information may be user account information pre-stored in the operating system, and the user account information may include user name and user password information.

[0106] During specific implementation, the target authentication information whose user name is consistent with the user name in the identity authentication information can be found from the pre-stored authentication information, and then it can be determined whether the user password information in the target authentication information is consistent with the password information in the identity authentication information. If they are consistent, it is determined that the user authentication is successful; if there is no target authentication information or the password information is inconsistent, it is determined that the user authentication is unsuccessful.

[0107] If the user authentication fails, an authentication result indicating that the authentication failed can be sent to the user terminal to inform the user that the authentication failed and that the user needs to resubmit the authentication information. Here, the authentication result can carry an authentication status indicating that the authentication failed, such as "status": "fail"".

[0108] If authentication is successful, the server will create a separate session for the user and generate a unique session ID for the session. The session ID can be a random string of at least a set length. For example, a random session ID can be generated using the same Universally Unique Identifier (UUID) method. For example, the generated session ID might be "550e8400-e29b-41d4-a716-446655440000." Optionally, the session ID can be generated by combining the current timestamp and a hash of the user information. User information can include, but is not limited to, the user's identity authentication information, client identifier, and the client's network address. The current timestamp and hash of the user information can be included in the session ID as a whole or in a scrambled form.

[0109] After obtaining the session identifier, the session identifier can be associated with the user. Specifically, the session identifier and user can be bound to form a temporary session record. This record can include the user's identity authentication information, user login time (for example, session establishment time or authentication request initiation time), and user permission level. The user permission level can be determined based on the user's identity authentication information, with different permission levels corresponding to different streaming operation permissions. The temporary session record is stored in the server's memory or database as an identity credential for subsequent operations.

[0110] Step C-2: Determine the user identification information of the user based on the identity authentication information and the session identifier.

[0111] In specific implementation, the identity authentication information and the session identifier may be combined as the user identification information. Alternatively, the user name in the identity authentication information and the session identifier may be combined as the user identification information.

[0112] Step C-3: Generate an authentication result based on the user identification information and the authentication status indicating that the authentication is passed.

[0113] Here, the authentication status may include a status indicating that the authentication is passed and a status indicating that the authentication is not passed. The status of the authentication passing may be, for example, "status: success".

[0114] In specific implementation, the server can combine the user identification information and the authentication status indicating that the authentication is successful into an authentication result in Json format. For example, the authentication result can be:

[0115] {"status":"success","session_id":"550e8400-e29b-41d4-a716-446655440000","username":"user1"}.

[0116] The server can save the generated authentication results in a data structure similar to a hash map HashMap, in which the key can be the session identifier and the value can include the user name and authentication status, so as to facilitate subsequent tracking of user sessions.

[0117] After obtaining the authentication result, the server can send an authentication response including the authentication result to the user. After receiving the authentication response, the user can determine whether the authentication is successful based on the authentication result in the authentication response. If the authentication is successful, the authentication result is saved.

[0118] It is understandable that only when the authentication result indicates that the authentication is passed, the server will create an application process corresponding to the user's specified application based on the user's user identification information and determine the application process information of the application process; if the authentication result indicates that the authentication fails, the application process will not be created for the user.

[0119] In this way, through the user identity authentication system, different users can achieve independent access to the same server, ensuring the uniqueness and security of user identity.

[0120] In one embodiment, the above S101 can be implemented according to the following steps:

[0121] S101 - 1 : For each user, use the context switching function to switch to the operating environment corresponding to the user.

[0122] Here, since the application process of the user's designated application needs to run in a corresponding operating environment, the corresponding operating environment needs to be created before creating the application process. In the case where the user's designated application includes multiple applications, the operating environment can be an environment that supports the operation of multiple designated applications.

[0123] For example, if the user authentication is successful, the authentication result and session ID can be used as prerequisites for process creation. For example, the process management service in the streaming service program can obtain the authentication result through an internal API call or message queue, and obtain the session ID, user name, authentication status, and other information from the authentication result. For example, the authentication result can be:

[0124] {"username":"user1",session_id":"550e8400-e29b-41d4-a716-446655440000","permissions":["app_launch","stream_receive"]}.

[0125] "permissions":["app_launch","stream_receive"] indicates permission to launch the streaming application. This information serves as a prerequisite for creating user-specific processes, ensuring that only authenticated users can create processes on the server. If these prerequisites are met, the streaming service can switch to the user's operating environment for each user by leveraging the server operating system's user context switching functionality, the user's process execution requirements, and the operating system type. The process execution requirements can be proactively determined by the streaming service based on the user's specified application, or included in the user's authentication request or, as described later, the connection request. The operating system type determines the instructions or functions required for context switching. For example, in Linux, this can be achieved through the setuid or setgid functions, or using functions similar to the su command. For example, in Linux, you might execute something like: sudo -u user1 / bin / bash -c "command." This causes subsequently launched processes to run as "user1," with that user's permissions and environment variables. In Windows systems, you can use the CreateProcessAsUser API or the PowerShell Start-Process command with the Credential parameter to switch to the user's corresponding operating environment.

[0126] S101 - 2 : In the running environment, an application process corresponding to the user's designated application is created according to the configuration file and the user identification information, and a process identification is allocated to the application process.

[0127] Here, different applications can be pre-set with different configuration files, or the configuration files can also be carried in the user's authentication request or the connection request described later. Among them, the configuration files can carry information such as the application's startup path and startup parameters, startup method, startup requirements, etc.

[0128] During specific implementation, the process management service can obtain the configuration file, determine the startup path and startup parameters and other information of the user's specified application based on the configuration file and / or authentication request and / or connection request, and create an application process corresponding to the user's specified application on the server based on the startup path and parameters and other information as well as other information in the configuration file, and assign a unique process identifier related to the user to the application process.

[0129] For example, in a remote desktop application scenario, you might start a graphical interface application: / usr / bin / firefox --new-instance --profile / home / user1 / firefox_profile. This command will start a new Firefox browser application process as user1 and use the user-specific profile to ensure application process isolation.

[0130] It is understandable that if another user has already started a specific application and created a corresponding application process, when creating an application process for the current user, a separate process independent of the previously created application process can be created to ensure isolation between application processes of different users.

[0131] S101 - 3 : Determine application process information according to the user identification information, the process identification, and the application information of the specified application.

[0132] Here, the application information may include but is not limited to application name, application process, window handle and other information.

[0133] In specific implementation, user identification information, process identification, application information, etc. can be encapsulated in Json format to obtain application process information. For example, application process information can be:

[0134] {"session_id":"550e8400-e29b-41d4-a716-446655440000","username":"user1","process_id":123 45,"app_name":"firefox","start_time":2023-09-15T10:30:00Z","window_handle":"0xA7B3C9D2"}.

[0135] In this way, the present disclosure can bind the user identity to the application process on the server side, and realize the isolated operation of different user processes.

[0136] S102: Allocate a streaming service instance to each user according to the application process information of each application process; wherein different streaming service instances are allocated to different users.

[0137] Here, a streaming service instance is an instance used to capture and encode streaming data on the server. For example, a streaming service instance can be a sunshine instance. Different streaming service instances created on the server are distinct and independent of each other.

[0138] During specific implementation, the streaming service program can allocate a streaming service instance to the user associated with the application process information based on the application process information of the application process. For example, based on the session identifier, user identifier and process identifier in the application process information, a streaming service instance associated with the session identifier and process identifier is allocated to the user corresponding to the user identifier. Optionally, different users are allocated different streaming service instances, and the types of streaming service instances allocated to different users may also be different. For example, user 1 is allocated sunshine instance 1, user 2 is allocated sunshine instance 2, user 3 is allocated GeForce NOW instance 1, user 4 is allocated Parsec instance, and user 5 is allocated Kasm Workspaces instance. Among them, the sunshine instance, Parsec instance and Kasm Workspaces instance belong to different types of streaming service instances. Among them, the type of streaming service instance that different users need to allocate is determined according to the streaming technology agreed upon by the user end and the server end.

[0139] Moreover, for the same user, if the user corresponds to multiple application processes, the user can also be assigned only one streaming service instance, and the multiple application processes corresponding to the user will also correspond to the same streaming service instance.

[0140] In one embodiment, the above S102 may be implemented according to the following steps:

[0141] S102 - 1 : Allocate a corresponding target streaming service instance to each user from a plurality of dynamically created streaming service instances.

[0142] Here, the server can pre-create multiple service instance pools, which can include a preset number of unallocated streaming service instances in the service instance pool. When an instance needs to be allocated, any streaming service instance can be extracted from the service instance pool and allocated to the user, so that the number of streaming service instances in the service instance pool will be reduced by one. After an allocated streaming service instance completes the streaming task, the instance can be directly destroyed, thereby releasing resources on the server. In addition, a monitoring mechanism can be used to continuously monitor the number of unallocated streaming service instances in the service instance pool. When the number is less than the target number, the server will create multiple new streaming service instances to join the service instance pool.

[0143] Among them, each streaming service instance in the service instance pool can have a pre-allocated port. For example, streaming service instance 1 can use port 47990 for control communication and the port range 47991-47995 for video data transmission; streaming service instance 2 can use port 48000 for control communication and the port range 48001-48005 for video data transmission. This port isolation ensures that the data streams of different users will not interfere with each other.

[0144] During specific implementation, after obtaining the application process information of each application process, the streaming service program can randomly allocate a target streaming service instance to each user from the service instance pool.

[0145] S102 - 2 : For each user, determine an instance configuration command according to the operating system supported by the application process created for the user.

[0146] Here, the operating system may include, for example, a Windows operating system and a Linux operating system. Different operating systems correspond to different configuration commands. The configuration commands may be used to configure the port, running configuration, and window handle (i.e., window handle) of the serial service instance.

[0147] For example, in a Windows system, a DXGI Desktop Duplication API command may be used to capture a specific window handle; in a Linux system, an X11 window capture function or a specific window capture command of Wayland may be used.

[0148] S102-3: Using the instance configuration command, configure the target streaming service instance corresponding to the application process according to the application process information corresponding to the application process.

[0149] In specific implementations, the application process's window handle, user name, and application type can be determined based on the application process's corresponding application process information. The streaming software used by the client corresponding to the application process can then be determined based on the application type. The target streaming service instance corresponding to each application process can then be configured using the corresponding instance configuration command, combining the window handle, user name, and application type information.

[0150] For example, the configuration command might be as follows: sunshine.exe --capture-method DXGI --window-handle 0xA7B3C9D2 --config / etc / sunshine / user1_config.conf.

[0151] This configuration command instructs the server to capture the data in the window handle 0xA7B3C9D2. user1_config.conf represents the configuration file for user 1. This configuration file can be included in the authentication request or the connection request described later, or the server can proactively request it from the client corresponding to user 1. This configuration ensures that the streaming service only captures the graphical output of the specified user process, achieving visual isolation.

[0152] Optionally, if there is no pre-allocated port in each streaming service instance in the service instance pool, the corresponding port can be allocated to the target streaming service instance when configuring the target streaming service instance. For example, the port can be allocated to the target streaming service instance according to the content that the application process needs to capture and the role of each port. For example, when the content that the application process needs to capture is image content, a port for image transmission can be allocated; when the content that the application process needs to capture is video content, a port for video transmission can be allocated; when the content that the application process needs to capture is text content, a port for text transmission can be allocated. When the content that the user's corresponding multiple application processes need to capture is different, a port that can meet the content that each application process needs to capture can be allocated to the user.

[0153] In this way, by adopting independent streaming channel technology, each user is allocated a dedicated video capture instance and encoding resources, which can avoid mutual interference when multiple users stream.

[0154] S103: Utilizing the user identification information of each user and the streaming service instance allocated to each user, stream encoding is performed on the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process.

[0155] Here, the data output of the application process may be a graphic output of the application process.

[0156] In specific implementation, for any application process created for any user, the streaming service program can use the streaming service instance allocated and configured for the user to capture and stream encode the data output of the application process to obtain the streaming data packet corresponding to the application process.

[0157] In one embodiment, the above S103 can be implemented according to the following steps:

[0158] S103 - 1 : Utilize the streaming service instance allocated to each user to continuously obtain the data output stream of the application process created for the user.

[0159] For example, for any application process created for any user, you can use the streaming service instance assigned and configured for that user to continuously capture the data output of the application process during its execution on the windows handle corresponding to the application process. For example, you can use the streaming service instance to continuously capture the content output of Firefox on the handle 0xA7B3C9D2.

[0160] S103 - 2 : Using the data encoding service, perform stream encoding on the data output and the user identification information to obtain a stream data packet corresponding to each application process.

[0161] Here, the data encoding service may be any encoding service pre-deployed on the server, such as encoding algorithms such as H.264 or H.265.

[0162] In practice, for any application process created for any user, the data encoding service can be used to compress and encode the captured data output of the application process. To facilitate subsequent verification of the encoded data stream by the user, user identification information can also be encoded into the metadata of the data output stream. Alternatively, user identification information can be marked using a specific packet header field.

[0163] Taking the captured data output as each video frame as an example, the session identifier in the user identification information can be added to the user data area of ​​each video frame for labeling. For example, the resulting label can be {"user_session":"550e8400-e29b-41d4-a716-446655440000","frame_number":12567}, where "user_session" indicates the session identifier and "frame_number" represents the number of the video frame. The video frame data with the added session identifier can then be encoded to obtain a streaming data packet. Alternatively, user identification information can be added to a specific header field of each streaming data packet to identify the user. In this way, the generated streaming data not only contains the image content of the user application, but also carries the user's unique identifier, laying the foundation for subsequent precise distribution.

[0164] Alternatively, the process of stream encoding the captured data output using the data encoding service can refer to the stream encoding process in the prior art and will not be described in detail here. After obtaining the encoded data stream, user identification information can be added to the data stream to obtain a stream data packet with a unique user identification.

[0165] S104: Transmit each streaming data packet to the corresponding user's client.

[0166] During specific implementation, for any user, the server can transmit the streaming data packet corresponding to the user to the user terminal corresponding to the user. The user terminal can receive the streaming data packet sent by the server through the established receiving channel. The received streaming data packet is then decoded to obtain the data output and user identification information. When the user identification information is consistent with the user identification information stored locally on the client, the data output can be presented on the local display device to complete the streaming display process. When the user identification information is inconsistent with the user identification information stored locally on the client, it can be determined that there is a problem with the streaming data packet, and problem feedback information can be generated and sent to the server, and streaming error indication information can be presented on the local display device. Among them, the locally stored user identification information can be determined from the latest authentication result related to the user stored locally.

[0167] In one embodiment, after the user terminal receives an authentication result indicating that the authentication is successful, the user terminal may also initiate a connection request to the distribution service in the server terminal. The connection request is used to request the establishment of a distribution connection with the server terminal to facilitate the subsequent distribution of streaming data packets. The connection request may carry the network address and user identification information of the user terminal. The distribution service may be a service pre-deployed in the server terminal. For any user, the server terminal may use the distribution service to receive a connection request initiated by the user terminal corresponding to the user. Then, after the network connection between the distribution service and the user terminal is established, the currently maintained user terminal connection table may be updated based on the user identification information and the network address of the user terminal carried in the connection request.

[0168] Here, the distribution service needs to maintain a real-time updated client connection table, which records the mapping relationship between the network address of each active client and the corresponding user identification information. This connection table may be stored in a hash table or database in memory, as follows:

[0169] [{client_ip:"192.168.1.100",client_port:35001,user_session:"550e8400-e29b-41d4-a716-446655440000",connection_time:"2023-09-15T11:15:30Z"}, {client_ip:"192.168.1.101",client_port:35002,user_session:"661f9511-f39c-52e5-b827-557766551111",connection_time:"2023-09-15T11:20:45Z"}], etc.

[0170] Where client_ip represents the client's network address, client_port represents the client's port, and connection_time represents the time the client was connected to the distribution service. When a client connects or disconnects, the distribution service updates the client's connection table in real time to ensure the accuracy of subsequent data packet distribution.

[0171] Exemplarily, after establishing a connection with any user terminal, the distribution service can save the mapping relationship between the user identification information of the user terminal and the network address of the user terminal in the user terminal connection table, and if a disconnected user terminal is detected, the mapping relationship of the user terminal in the user terminal connection table can be deleted.

[0172] In this way, by designing an intelligent distribution mechanism through the distribution service and the user terminal connection table, the corresponding streaming data packet can be accurately sent to the corresponding user terminal according to the user identification information, thereby improving the accuracy of data transmission.

[0173] In one embodiment, the above S104 can be implemented according to the following steps:

[0174] S104-1: For each streaming data packet, parse the user identification information from the streaming data packet using the distribution service;

[0175] S104-2: Determine, based on the user identification information, from the currently maintained user terminal connection table, the network address of the user terminal that matches the user identification information;

[0176] S104 - 3 : Send the streaming data packet to the client of the corresponding user according to the network address.

[0177] For example, for any streaming service instance encoding a streaming data packet, the streaming service instance can send the streaming data packet to the distribution service, which can then use the distribution service to parse the user identification information from the streaming data packet. The distribution service then obtains the latest client connection table currently maintained and queries the client connection table to see if there is a client network address that matches the user identification information. If not, it indicates that the client corresponding to the streaming data packet has gone offline. The streaming data packet can then be stored in a first-in-first-out storage queue corresponding to the client and wait for a preset time. If the client does not reconnect within the preset time, the streaming task for the client is determined to be completed, and the first-in-first-out storage queue corresponding to the client is cleared. If the client reconnects within the preset time, the streaming data packets in the storage queue can be sequentially sent to the client's network address.

[0178] Optionally, if the user identification information of the user terminal has not changed, but the network address of the user terminal has changed, the user terminal under the changed network address can actively connect to the distribution service of the server to update the network address corresponding to the user identification information in the user terminal connection table.

[0179] For example, for each received streaming data packet, the distribution service can extract the user_session value, such as "550e8400-e29b-41d4-a716-446655440000", then search the client connection table for a record with the same user_session value to obtain the corresponding client_ip and client_port values, such as "192.168.1.100" and "35001". Based on these client_ip and client_port values, the streaming data packet is transmitted to the corresponding client. The client_ip and client_port value lookup process can typically be implemented using a hash table to ensure fast response and reduce latency.

[0180] Optionally, after determining the network address of the user terminal, the distribution service may use a preset transmission protocol to transmit the streaming data packets to achieve real-time transmission of the data packets and reduce transmission delay. The preset transmission protocol may be, for example, the User Datagram Protocol (UDP).

[0181] In this way, through this precise distribution mechanism, it is ensured that each user terminal only receives the streaming data belonging to its corresponding user, thereby achieving complete isolation of multi-user streaming and avoiding data confusion and mutual interference.

[0182] In one embodiment, in order to ensure the stability and security of the streaming transmission of each user terminal, the data transmission process can also be monitored, and whether there is a transmission anomaly is determined based on the monitoring results. Specifically, after executing S104, anomaly monitoring can also be performed according to the following steps P1 to P4:

[0183] P1: Using the distribution service, determine the data transmission indicator information corresponding to each user terminal; the data transmission indicator information includes at least one of the user terminal's data volume, frame rate, and network delay.

[0184] Here, the data volume of the user terminal may specifically be the data volume of the streaming data packets sent to the user terminal. The frame rate may be the frame rate of the user terminal during the transmission of the streaming data packets. The network delay may be the network delay when sending the streaming data packets to the user terminal.

[0185] P2: Determine the information adjustment method of the data transmission indicator information according to the type of each data transmission indicator information.

[0186] Here, the information adjustment method is a method of statistically analyzing the data transmission indicator information. For example, the information adjustment method may include a mean method, a variance method, a weighted sum method, and a preset value comparison method. Different types of data transmission indicator information correspond to different information adjustment methods, and the information adjustment methods corresponding to various data transmission indicator information can be pre-agreed and stored on the server. For example, for the data volume of the user end, the information adjustment method may be to take the mean or variance of the data volume of each streaming data packet within a set time length; for the frame rate of the user end, the information adjustment method may be to take the minimum value or mean square deviation of each frame rate within the set time length; for network delay, the information adjustment method may be to take the maximum value of each network delay within the set time length, or to take the average of each network delay within the set time length, and then compare the average with the set value.

[0187] Optionally, a prediction model deployed on the server side may be used to predict an information adjustment method corresponding to the data transmission indicator information according to the type of the data transmission indicator information.

[0188] P3: Adjust the data transmission indicator information according to the information adjustment method, and based on the adjusted information, screen out abnormal user terminals with abnormal transmission from various user terminals.

[0189] During specific implementation, the data transmission indicator information of each user terminal can be adjusted separately according to the information adjustment method to obtain the adjusted information. For example, the adjusted information may include the mean value of the data volume of the user terminal, the mean square deviation of the user terminal frame rate, and the size comparison result between the mean value of the network delay and the set value. Then, for any user terminal, it can be determined whether there is a user terminal that meets the transmission anomaly rule based on the various adjusted information of the user terminal. If so, the user terminal can be regarded as an abnormal user terminal. If not, it can be determined that there is no transmission anomaly in the user terminal. Among them, the transmission anomaly rule may include rules corresponding to various data transmission indicator information. For example, the transmission anomaly rule may include that the mean value of the data volume is less than the set mean value, the mean square deviation of the user terminal frame rate is less than the set variance, and the size comparison result between the mean value of the network delay and the set value is less than the set value.

[0190] P4: Send abnormal prompt information to the abnormal user terminal and / or optimize data transmission for the abnormal user terminal.

[0191] Here, the abnormal prompt information may include indication information indicating the existence of a transmission abnormality and / or the abnormal cause causing the transmission abnormality, wherein the abnormal cause may be determined based on the data transmission indicator information corresponding to the adjusted information that complies with the transmission abnormality rule.

[0192] In specific implementations, after identifying an abnormal client, the cause of the abnormality can be determined and an abnormality prompt message containing an indication and the cause of the abnormality can be generated. This abnormality prompt message is then sent to the abnormal client, enabling the abnormal client to proactively optimize transmission based on the cause of the abnormality. Alternatively, the server can optimize data transmission between the server and client based on the cause of the abnormality, for example by reducing network latency, increasing network frame rate, or reducing the size of data packets. This facilitates subsequent abnormality analysis and performance optimization by users through abnormality monitoring.

[0193] Based on the above embodiments, by creating an isolated application process for each of the multiple users and assigning corresponding application process information, each independent application process running on the server can independently output the data required by the user. Then, by assigning an independent streaming service instance to each application process, each streaming service instance can independently capture the data output of the corresponding user application process, obtain an independent streaming data packet corresponding to each user, and ensure that the streaming data packets obtained by each streaming service instance are different. By sending the streaming data packet to the user terminal of the corresponding user, the same server can be used to transmit independent streaming data to each of the multiple users, thereby realizing independent access to the server by different users and playing the role of streaming isolation between multiple users.

[0194] like Figure 2 FIG. 1 is a flowchart of a specific implementation of a data transmission method provided by an embodiment of the present disclosure, which may include the following steps:

[0195] S201: Receive an authentication request sent by a client of any user, and call an authentication service program to parse the authentication request to obtain the user's identity authentication information.

[0196] S202: When the identity authentication information is consistent with the pre-stored authentication information, it is determined that the user authentication is successful and a session identifier is generated.

[0197] S203: Based on the identity authentication information and the session identifier, determine the user identification information of the user, generate an authentication result according to the user identification information and the authentication status indicating that the authentication is passed, and send the authentication result to the user terminal.

[0198] S204: For each user, use the context switching function to switch to the operating environment corresponding to the user.

[0199] S205: In the running environment, an application process corresponding to the user's designated application is created according to the configuration file and the user identification information, and a process identification is allocated to the application process.

[0200] S206: Determine application process information according to the user identification information, the process identification, and the application information of the specified application.

[0201] S207: Allocate a streaming service instance to each user according to the application process information of the application process corresponding to each user.

[0202] S208: Utilize the streaming service instance allocated to each user to continuously obtain the data output stream of the application process.

[0203] S209: Utilizing the data encoding service, stream encoding is performed on the data output and the user identification information to obtain a stream data packet corresponding to each application process.

[0204] S210: For each streaming data packet, parse the user identification information from the streaming data packet using the distribution service, and determine the network address of the user terminal that matches the user identification information from the currently maintained user terminal connection table based on the user identification information.

[0205] S211: Send the streaming data packet to the client of the corresponding user according to the network address.

[0206] Regarding the specific implementation process of the above S201 to S211, reference can be made to the introduction of the above embodiments, which will not be repeated here.

[0207] Those skilled in the art will understand that in the above-mentioned method of the specific implementation method, the writing order of each step does not mean a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.

[0208] Based on the same inventive concept, the embodiment of the present disclosure also provides a data transmission device corresponding to the data transmission method. Since the principle of solving the problem by the device in the embodiment of the present disclosure is similar to the above-mentioned data transmission method in the embodiment of the present disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be repeated.

[0209] like Figure 3 FIG. 1 is a schematic diagram of a data transmission device applied to a server provided by an embodiment of the present disclosure, including:

[0210] A creation module 301 is configured to create, based on user identification information of each user among multiple users, an application process corresponding to a designated application of each user and determine application process information of each application process;

[0211] an allocation module 302, configured to allocate a streaming service instance to each user based on the application process information of each application process; wherein different streaming service instances are allocated to different users;

[0212] The encoding module 303 is configured to perform stream encoding on the data output of the application process created for each user by using the user identification information of each user and the streaming service instance allocated to each user, to obtain a streaming data packet corresponding to each application process;

[0213] The transmission module 304 is configured to transmit each of the stream data packets to a corresponding user terminal.

[0214] In a possible implementation, the apparatus further includes an authentication module 305, which is configured to:

[0215] Receiving an authentication request sent by a client of any of the users;

[0216] Calling an authentication service program to parse the user's identity authentication information from the authentication request;

[0217] The user is authenticated using the identity authentication information to obtain an authentication result, and the authentication result is sent to the user terminal.

[0218] In a possible implementation, the authentication module 305, when performing identity authentication on the user using the identity authentication information and obtaining an authentication result, is configured to:

[0219] If the identity authentication information is consistent with the pre-stored authentication information, determining that the user authentication is successful and generating a session identifier;

[0220] Determining user identification information of the user based on the identity authentication information and the session identifier;

[0221] An authentication result is generated according to the user identification information and an authentication status indicating that the authentication is passed.

[0222] In a possible implementation, the creation module 301, when creating an application process corresponding to a specified application of each user according to the user identification information of each user among multiple users and determining the application process information of each application process, is configured to:

[0223] For each of the users, use the context switching function to switch to the operating environment corresponding to the user;

[0224] In the operating environment, according to the configuration file and the user identification information, an application process corresponding to the user's designated application is created, and a process identifier is assigned to the application process;

[0225] Application process information is determined according to the user identification information, the process identification, and the application information of the specified application.

[0226] In a possible implementation, the allocation module 302, when allocating the streaming service instance to each user based on the application process information of each application process, is configured to:

[0227] Allocating a corresponding target streaming service instance to each user from a plurality of dynamically created streaming service instances;

[0228] For each of the application processes, determining an instance configuration command according to an operating system supported by the application process created for the user;

[0229] The instance configuration command is used to configure a target streaming service instance corresponding to the application process according to the application process information corresponding to the application process.

[0230] In one possible implementation, the encoding module 303, when performing stream encoding on the data output of the application process created for each user using the user identification information of each user and the streaming service instance allocated to each user to obtain the streaming data packet corresponding to each application process, is configured to:

[0231] Utilizing the streaming service instance allocated to each user, continuously obtaining the data output stream of the application process created for the user;

[0232] The data output and the user identification information are stream-encoded using a data encoding service to obtain a stream data packet corresponding to each of the application processes.

[0233] In a possible implementation, the transmission module 304 is further configured to:

[0234] Using the distribution service, receiving the connection request initiated by the user end;

[0235] After establishing the network connection with the user terminal, the currently maintained user terminal connection table is updated according to the user identification information and the network address of the user terminal carried in the connection request.

[0236] In a possible implementation, the transmission module 304, when transmitting each of the streaming data packets to the corresponding user terminal, is configured to:

[0237] For each of the streaming data packets, using a distribution service to parse the user identification information from the streaming data packet;

[0238] Determining, based on the user identification information, a network address of a user terminal that matches the user identification information from a currently maintained user terminal connection table;

[0239] The streaming data packet is sent to a client of a corresponding user according to the network address.

[0240] In a possible implementation manner, after transmitting each of the streaming data packets to the corresponding user's terminal, the transmission module 304 is further configured to:

[0241] Determining data transmission indicator information corresponding to each of the user terminals using a distribution service; the data transmission indicator information includes at least one of a data volume, a frame rate, and a network delay of the user terminal;

[0242] Determining, according to the type of each type of data transmission indicator information, an information adjustment method of the data transmission indicator information;

[0243] Adjusting the data transmission indicator information according to the information adjustment method, and screening out abnormal user terminals with abnormal transmission from various user terminals based on the adjusted information;

[0244] Send abnormal prompt information to the abnormal user terminal and / or optimize data transmission for the abnormal user terminal.

[0245] For descriptions of the processing flow of each module in the device and the interaction flow between each module, reference can be made to the relevant descriptions in the above method embodiment, which will not be described in detail here.

[0246] Based on the same technical concept, the embodiment of the present application also provides a computer device. Figure 4 FIG. 1 is a schematic diagram of a computer device according to an embodiment of the present invention, comprising:

[0247] Processor 401, memory 402, and bus 403. Memory 402 stores machine-readable instructions executable by processor 401, and processor 401 is configured to execute the machine-readable instructions stored in memory 402. When the machine-readable instructions are executed by processor 401, processor 401 performs the following steps: S101: based on user identification information of each user among multiple users, create an application process corresponding to a designated application of each user and determine application process information of each application process; S102: based on the application process information of each application process, allocate a streaming service instance to each user; wherein different streaming service instances are allocated to different users; S103: using the user identification information of each user and the streaming service instance allocated to each user, perform stream encoding on the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process; and S104: transmit each streaming data packet to the user terminal of the corresponding user.

[0248] The above-mentioned memory 402 includes internal memory 4021 and external memory 4022; the memory 4021 here is also called internal memory, which is used to temporarily store the calculation data in the processor 401, as well as the data exchanged with the external memory 4022 such as the hard disk. The processor 401 exchanges data with the external memory 4022 through the memory 4021. When the computer device is running, the processor 401 and the memory 402 communicate through the bus 403, so that the processor 401 executes the execution instructions mentioned in the above method embodiment.

[0249] The present disclosure also provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the computer program executes the steps of the data transmission method described in the above method embodiment. The storage medium can be a volatile or non-volatile computer-readable storage medium.

[0250] The embodiments of the present disclosure also provide a computer program product, which carries program code. The instructions included in the program code can be used to execute the steps of the software update method described in the above method embodiment. For details, please refer to the above method embodiment and will not be repeated here.

[0251] The computer program product may be implemented in hardware, software, or a combination thereof. In one embodiment, the computer program product is implemented as a computer storage medium. In another embodiment, the computer program product is implemented as a software product, such as a software development kit (SDK).

[0252] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the systems and devices described above can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

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

[0254] In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.

[0255] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium that is executable by a processor. Based on this understanding, the technical solution of the present disclosure, or the part that contributes to the prior art, or the part of the technical solution, can be embodied in the form of a software product. The computer software product is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present disclosure. The aforementioned storage medium includes: various media that can store program code, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk.

[0256] If the technical solution of this application involves personal information, the product that applies the technical solution of this application has clearly informed the personal information processing rules and obtained the individual's voluntary consent before processing personal information. If the technical solution of this application involves sensitive personal information, the product that applies the technical solution of this application has obtained the individual's separate consent before processing sensitive personal information, and at the same time meets the "explicit consent" requirement. For example, on personal information collection devices such as cameras, a clear and prominent sign is set to inform that the personal information collection scope has been entered and personal information will be collected. If the individual voluntarily enters the collection scope, it is deemed that they agree to the collection of their personal information; or on the personal information processing device, when the personal information processing rules are notified by obvious signs / information, the individual's authorization is obtained through pop-up information or by asking the individual to upload their personal information; among which, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the type of personal information processed.

[0257] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The scope of protection of the present disclosure is not limited thereto. Although the present disclosure has been described in detail with reference to the above-mentioned embodiments, those skilled in the art should understand that any person skilled in the art can modify or easily conceive of changes to the technical solutions described in the above-mentioned embodiments within the technical scope disclosed in the present disclosure, or replace some of the technical features therein with equivalents. Such modifications, changes, or replacements do not deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the scope of protection of the present disclosure. Therefore, the scope of protection of the present disclosure should be based on the scope of protection of the claims.

Claims

1. A data transmission method, characterized in that: Applied to the server, including: creating, based on user identification information of each user among the multiple users, an application process corresponding to a designated application of each user and determining application process information of each application process; the application process information being related to the user identification information, the process identifier of the application process, and the application information of the designated application; Allocating a streaming service instance to each user based on the application process information of each application process; wherein the streaming service instances allocated to different users are different; wherein, if multiple application processes are created for the same user, the streaming service instances allocated to the multiple application processes are the same; Using the user identification information of each user and the streaming service instance allocated to each user, stream encoding is performed on the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process; Each of the stream data packets is transmitted to a corresponding user terminal; after each of the stream data packets is transmitted to the corresponding user terminal, the method further includes: Determining data transmission indicator information corresponding to each of the user terminals using a distribution service; the data transmission indicator information includes at least one of a data volume, a frame rate, and a network delay of the user terminal; Determining, according to the type of each type of data transmission indicator information, an information adjustment method of the data transmission indicator information; Adjusting the data transmission indicator information according to the information adjustment method, and screening out abnormal user terminals with abnormal transmission from various user terminals based on the adjusted information; Send abnormal prompt information to the abnormal user terminal and / or optimize data transmission for the abnormal user terminal.

2. The method according to claim 1, characterized in that Before creating an application process corresponding to a designated application of each user according to the user identification information of each user among the multiple users, the method further includes: Receiving an authentication request sent by a client of any of the users; Calling an authentication service program to parse the user's identity authentication information from the authentication request; The user is authenticated using the identity authentication information to obtain an authentication result, and the authentication result is sent to the user terminal.

3. The method according to claim 2, characterized in that The step of performing identity authentication on the user using the identity authentication information to obtain an authentication result includes: If the identity authentication information is consistent with the pre-stored authentication information, determining that the user authentication is successful and generating a session identifier; Determining user identification information of the user based on the identity authentication information and the session identifier; An authentication result is generated according to the user identification information and an authentication status indicating that the authentication is passed.

4. The method according to claim 1, wherein The step of creating an application process corresponding to a designated application of each user and determining application process information of each application process according to user identification information of each user among the multiple users includes: For each of the users, use the context switching function to switch to the operating environment corresponding to the user; In the operating environment, according to the configuration file and the user identification information, an application process corresponding to the user's designated application is created, and a process identifier is assigned to the application process; Application process information is determined according to the user identification information, the process identification, and the application information of the specified application.

5. The method according to claim 1, wherein Allocating a streaming service instance to each user according to the application process information of each application process includes: Allocating a corresponding target streaming service instance to each user from a plurality of dynamically created streaming service instances; For each of the application processes, determining an instance configuration command according to an operating system supported by the application process created for the user; The instance configuration command is used to configure a target streaming service instance corresponding to the application process according to the application process information corresponding to the application process.

6. The method according to claim 1, characterized in that The method of using the user identification information of each user and the streaming service instance allocated to each user to perform streaming encoding on the data output of the application process created for each user to obtain a streaming data packet corresponding to each application process includes: Utilizing the streaming service instance allocated to each user, continuously obtaining the data output stream of the application process created for the user; The data output and the user identification information are stream-encoded using a data encoding service to obtain a stream data packet corresponding to each of the application processes.

7. The method according to claim 1, characterized in that The method further comprises: Using the distribution service, receiving the connection request initiated by the user end; After establishing the network connection with the user terminal, the currently maintained user terminal connection table is updated according to the user identification information and the network address of the user terminal carried in the connection request.

8. The method according to claim 7, characterized in that The step of transmitting each of the stream data packets to a corresponding user terminal includes: For each of the streaming data packets, using a distribution service to parse the user identification information from the streaming data packet; Determining, based on the user identification information, a network address of a user terminal that matches the user identification information from a currently maintained user terminal connection table; The streaming data packet is sent to a client of a corresponding user according to the network address.

9. A data transmission device, characterized in that: Applied to the server, including: a creation module, configured to create, based on user identification information of each user among multiple users, an application process corresponding to a designated application of each user and determine application process information of each application process; the application process information being related to the user identification information, the process identifier of the application process, and the application information of the designated application; an allocation module, configured to allocate a streaming service instance to each user based on the application process information of each application process; wherein the streaming service instances allocated to different users are different; wherein, if multiple application processes are created for the same user, the streaming service instances allocated to the multiple application processes are the same; an encoding module, configured to perform stream encoding on the data output of the application process created for each user by using the user identification information of each user and the streaming service instance allocated to each user, to obtain a streaming data packet corresponding to each application process; a transmission module configured to transmit each of the streaming data packets to a corresponding user terminal; after transmitting each of the streaming data packets to the corresponding user terminal, the transmission module is further configured to: determine data transmission indicator information corresponding to each of the user terminals using a distribution service; the data transmission indicator information includes at least one of a data volume, a frame rate, and a network delay of the user terminal; Determining, according to the type of each type of data transmission indicator information, an information adjustment method of the data transmission indicator information; Adjusting the data transmission indicator information according to the information adjustment method, and screening out abnormal user terminals with abnormal transmission from various user terminals based on the adjusted information; Send abnormal prompt information to the abnormal user terminal and / or optimize data transmission for the abnormal user terminal.

10. A computer device, characterized in that: include: A processor and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is used to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the processor performs the steps of the data transmission method according to any one of claims 1 to 8.

11. A computer program product comprising a computer program, characterized in that When the computer program is executed by a computer device, the computer device performs the steps of the data transmission method according to any one of claims 1 to 8.

Citation Information

Patent Citations

  • Audio data streaming method and device of cloud host, equipment and storage medium

    CN112631736A