WO2023078222A1 - 数据传输方法、装置、设备和介质 - Google Patents

数据传输方法、装置、设备和介质 Download PDF

Info

Publication number
WO2023078222A1
WO2023078222A1 PCT/CN2022/128847 CN2022128847W WO2023078222A1 WO 2023078222 A1 WO2023078222 A1 WO 2023078222A1 CN 2022128847 W CN2022128847 W CN 2022128847W WO 2023078222 A1 WO2023078222 A1 WO 2023078222A1
Authority
WO
WIPO (PCT)
Prior art keywords
instruction
operation instruction
server
original operation
original
Prior art date
Application number
PCT/CN2022/128847
Other languages
English (en)
French (fr)
Inventor
徐斌
吴昊
Original Assignee
北京字节跳动网络技术有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 北京字节跳动网络技术有限公司 filed Critical 北京字节跳动网络技术有限公司
Publication of WO2023078222A1 publication Critical patent/WO2023078222A1/zh

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0023Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
    • H04L1/0028Formatting
    • H04L1/0031Multiple signaling transmission
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0023Systems modifying transmission characteristics according to link quality, e.g. power backoff characterised by the signalling
    • H04L1/0027Scheduling of signalling, e.g. occurrence thereof
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0033Systems modifying transmission characteristics according to link quality, e.g. power backoff arrangements specific to the transmitter
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/1607Details of the supervisory signal
    • H04L1/1635Cumulative acknowledgement, i.e. the acknowledgement message applying to all previous messages
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/12Arrangements for detecting or preventing errors in the information received by using return channel
    • H04L1/16Arrangements for detecting or preventing errors in the information received by using return channel in which the return channel carries supervisory signals, e.g. repetition request signals
    • H04L1/18Automatic repetition systems, e.g. Van Duuren systems
    • H04L1/1867Arrangements specially adapted for the transmitter end
    • H04L1/188Time-out mechanisms

Definitions

  • the present disclosure relates to the field of data processing, for example, to a data transmission method, device, device and medium.
  • the Acknowledge (ACK) mechanism of the Transmission Control Protocol can be used (ACK is performed packet by packet, that is, when the packet is lost, the sender retransmits after timeout), flow control transmission Protocol (Stream Control Transmission Protocol, SCTP) Selective Acknowledgment (Selective ACK, SACK) mechanism (when the receiving end receives an out-of-order packet, it will actively initiate SACK to notify the sending end of the packet loss status) or User Datagram Protocol (User Datagram Protocol) , UDP) non-acknowledgement (Non-Acknowledge, NACK) mechanism (the receiving end initiates a NACK at a fixed time, and notifies the sending end of the packet loss status) for data transmission.
  • Stream Control Transmission Protocol SCTP
  • Selective Acknowledgment Selective ACK, SACK
  • UDP User Datagram Protocol
  • NACK non-acknowledgement
  • Embodiments of the present disclosure provide a data transmission method, device, device, and medium, which realize packet loss concealment with relatively low delay.
  • an embodiment of the present disclosure provides a data transmission method applied to a client, including:
  • the embodiment of the present disclosure also provides a data transmission device applied to a client, including:
  • the first determination module is configured to determine the instruction type of the original operation instruction corresponding to the trigger operation in response to the trigger operation on the target cloud game;
  • the second determining module is configured to configure a corresponding protection instruction for the original operation instruction according to the instruction type to obtain a target operation instruction;
  • the transmission module is configured to transmit the target operation instruction to the server.
  • an embodiment of the present disclosure also provides an electronic device, including:
  • processors one or more processors
  • memory configured to store one or more programs
  • the one or more processors are made to implement the data transmission method as described in any one of the foregoing embodiments.
  • an embodiment of the present disclosure further provides a computer storage medium, the medium stores a computer program, and when the computer program is executed by a processor, the data transmission method according to any one of the above embodiments is implemented.
  • Figure 1 is a schematic diagram of a cloud game architecture provided by related technologies
  • FIG. 2 is a flowchart of a data transmission method provided by an embodiment of the present disclosure
  • Fig. 3 is a flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • FIG. 4 is a flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • FIG. 5 is a flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • FIG. 6 is a flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • FIG. 7 is a schematic diagram of transmission of a redundant instruction as a protection instruction provided by an embodiment of the present disclosure.
  • FIG. 8 is a schematic diagram of transmission of a repetition instruction as a protection instruction provided by an embodiment of the present disclosure
  • FIG. 9 is a structural block diagram of a data transmission device provided by an embodiment of the present disclosure.
  • Fig. 10 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • the term “comprise” and its variations are open-ended, ie “including but not limited to”.
  • the term “based on” is “based at least in part on”.
  • the term “one embodiment” means “at least one embodiment”; the term “another embodiment” means “at least one further embodiment”; the term “some embodiments” means “at least some embodiments.” Relevant definitions of other terms will be given in the description below.
  • a complete response delay chain consists of the user clicking the cloud game screen, the client uploading user instructions to the server, the server injecting instructions for game rendering, the rendered audio and video are encoded and transmitted to the client, and the client decoding the audio and video And rendering, the user's perception of the screen consists of several stages of screen and sound changes caused by clicking. Among them, the delay caused by the game rendering and encoding and decoding stages is relatively fixed, and has little impact on the degradation of cloud game service quality presented to users.
  • the instruction and audio and video transmission stages depend on the network link status between the client and the server.
  • the state of the network link may be congested at any time due to changes in the background traffic, and the audio and video data transmission delay will become longer, which will eventually lead to longer user response delays and affect the service quality of cloud games.
  • the packet loss and disorder of audio and video data in a weak network environment are the most important factors affecting the user response delay, but due to the command The high reliability of the data, its packet loss will still introduce a considerable delay to the final response delay.
  • the instruction data refers to the system instruction data generated by the user's input operation in the terminal device.
  • FIG. 1 is a schematic diagram of a cloud game architecture provided by related technologies. As shown in Figure 1, in the cloud game architecture, the instruction data is transmitted from the user side to the cloud server via the network, which is called uplink transmission, while the downlink transmission of audio and video streams or rendering instruction streams. Exemplarily, the amount of uplink data is 100kbps-1M, and the amount of downlink data is 6Mbps-30Mbps.
  • the specific instruction data includes operation instructions such as the user pressing the button, sliding the screen, releasing the button, etc., but the loss of a single instruction during the transmission process, disorder, etc., will block the update of the game logic, and the video stream will be delayed after the increase, which is very large. Reduce the user experience effect to a certain extent.
  • TCP Based on the ACK mechanism, ACK is performed packet by packet. When a packet is lost, the sender times out and retransmits.
  • SCTP Based on the SACK mechanism, when the receiving end receives an out-of-order packet, it actively initiates a SACK to notify the sending end of the packet loss status.
  • UDP&NACK Based on the NACK mechanism, the receiving end initiates a NACK at a fixed time to notify the sending end of the packet loss status.
  • TCP and TCP-based transmission protocols are all based on the timeout retransmission mechanism, and the additional delay introduced is timeout retransmission delay + instruction retransmission uplink delay.
  • SCTP is based on the SACK mechanism, and packet retransmission introduces at least one Round-Trip Time (RTT) delay.
  • RTT Round-Trip Time
  • the mechanism of UDP&NACK introduces the delay of RTT+partial NACK cycle.
  • the use of the above strategies introduces a large delay on the basis of ensuring that the instruction data is reachable. However, when the user operates, it is often the most sensitive moment to the delay. Once the user operation instruction loses packets during transmission, The increased delay will greatly degrade the user experience.
  • FEC forward error correction
  • the embodiment of the present disclosure provides a data transmission method.
  • a reliable cloud game instruction transmission channel with low packet loss hidden delay it is realized that even in the case of instruction data packet loss, it can still be transmitted. Complete packet loss concealment with less delay.
  • Fig. 2 is a flowchart of a data transmission method provided by an embodiment of the present disclosure.
  • the method can be executed by a data transmission device configured in an electronic device.
  • This embodiment is applied to the scenario of avoiding network packet loss and jitter.
  • the electronic device can be a client, such as a smart phone, an iPad, and other smart terminals capable of running cloud games.
  • the method in this embodiment includes the following steps:
  • cloud gaming is a game mode based on cloud computing, that is, game users can enter the game by following the client program, and the program can access the server running the game to play the game on the server.
  • the target cloud game refers to a game that is running on the client and the user is currently operating.
  • an operation instruction corresponding to the trigger operation is generated as an original operation instruction.
  • the trigger operation on the target cloud game refers to the click operation on the operation control configured on the display interface where the target cloud game is located.
  • the triggering operation may include: clicking a menu bar, setting a game, etc., and may also include: a user sliding a touchscreen, etc., where the operation of the user sliding a touchscreen may be completed by three triggering events.
  • the user's operation of sliding the touch screen may include the following three events: action_down, action_move, and action_up, and may also be three instructions, and these three instructions form an operation of an independent action, which is not limited.
  • action_down refers to the trigger when the first finger touches the screen for the first time
  • action_move refers to the trigger when the finger interacts on the screen, which can be triggered multiple times
  • action_up refers to the trigger when the last finger leaves the screen.
  • the original operation instruction refers to the corresponding operation instruction generated by the user's actual trigger operation on the target cloud game, that is, the original operation instruction is an instruction actually sent by the client. It should be noted that each original operation instruction corresponds to a service package. Of course, the original operation instruction can also correspond to multiple service packages, which can be configured according to the actual operation, which is not limited.
  • the instruction types may include: frequent operation instructions; infrequent operation instructions.
  • a frequent operation instruction refers to an instruction with a shorter operation interval between two instructions; an infrequent operation instruction refers to an instruction with a longer operation interval between two instructions.
  • the protection instruction can be understood as an instruction that can be used for anti-packet loss effect on the transmission of the original operation instruction.
  • the protection instruction may be a redundant instruction, a repeated instruction, or a retransmission instruction.
  • the redundant instruction refers to the copy of the sent instruction attached to the original operation instruction;
  • the repeated instruction refers to the instruction that is actively repeatedly sent;
  • the retransmission instruction refers to the instruction that is passively retransmitted in response to the NACK request.
  • the corresponding protection instruction may be configured according to the instruction type of each original operation instruction.
  • protection instructions corresponding to the original operation instructions of different instruction types are also different, and the configuration modes corresponding to the protection instructions are also different.
  • target operation instruction may include the original operation instruction and the protection instruction at the same time; it may also include only the protection instruction.
  • the client After the client determines the target operation instruction corresponding to the original operation instruction, it transmits the target operation instruction to the associated server.
  • the original operation instruction and the protection instruction can be sent to the server at the same time; the original operation instruction and the protection instruction can also be sent to the server separately, that is, the original operation instruction is sent first, and then the protection instruction is sent to the server.
  • the target operation instruction is obtained, and then the target operation instruction is transmitted to the server, and the protection instruction is added to resist network packet loss and jitter, so as to improve
  • the packet loss concealment delay is reduced, so that packet loss concealment can be completed with a relatively low delay.
  • FIG. 3 is a flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • the process of determining the instruction type of the original operation instruction and the process of determining the target operation instruction are further described.
  • the data transmission method in this embodiment includes the following steps:
  • the operation interval refers to the time interval between the current trigger and the last trigger of the trigger operation.
  • the time interval of the triggering operation may be taken as the difference between the current triggering moment and the last triggering moment of the triggering operation.
  • the trigger operation for the target cloud game is the operation of clicking the menu bar
  • the corresponding original operation instruction is the operation instruction of clicking the menu bar
  • the current trigger moment of the operation instruction of clicking the menu bar is time 1
  • the last trigger moment If it is time 2, the time interval between two adjacent clicks on the menu bar operation command is taken as the operation interval of the trigger operation, that is, the difference between time 2 and time 1 is taken as the operation interval of the click menu bar operation command.
  • the difference is a negative value
  • the absolute value of the difference can be used as the operation interval for clicking the operation instruction in the menu bar.
  • S320 Determine the instruction type of the original operation instruction according to the operation interval and the preset interval threshold.
  • the preset interval threshold refers to a pre-configured time value for distinguishing different instruction types. It can be understood that when the operation interval is smaller than the preset interval threshold, the instruction type of the original operation instruction is a frequent operation instruction; when the operation interval is greater than the preset interval threshold, the instruction type of the original operation instruction is an infrequent operation instruction.
  • the preset interval threshold may be 100ms. Of course, two different preset interval thresholds can also be used to distinguish the instruction type of the original operation instruction.
  • the instruction type of the original operation instruction whose operation interval is less than 10ms is frequent Operation instruction
  • the instruction type of the original operation instruction whose operation interval is greater than 100ms is an infrequent operation instruction.
  • the instruction type of the original operation instruction is a frequent operation instruction, perform S340-S360; if the instruction type of the original operation instruction is an infrequent operation instruction, perform S370-S3100.
  • the previous N operation instructions refer to N operation instructions before the current original operation instruction.
  • a redundant instruction refers to a copy of an original operation instruction.
  • N is a positive integer greater than or equal to 1.
  • the first N operation instructions of the original operation instruction are used as redundant instructions, and the redundant instruction and the original operation instruction are combined to obtain the corresponding target operation instruction.
  • the combination process of the original operation instruction and the redundant instruction can also be understood as the assembly process of the original operation instruction and the redundant instruction, that is, the original operation instruction and the redundant instruction are assembled into one instruction, which is recorded as the target operation instruction.
  • the target operation instruction including the redundant instruction and the original operation instruction is sent to the server, even if some transmission packets are lost during the network transmission, after a target operation instruction is transmitted to the server, the server can according to The target operation instruction can still restore the first N operation instructions of the original operation instruction, thereby achieving a better anti-packet loss effect and completing packet loss concealment with a lower delay.
  • the repeated instruction refers to the instruction repeatedly sent by the client actively.
  • the client can actively send a repeated instruction to the server, that is, the repeated instruction corresponding to the original operation instruction is used as a protection instruction.
  • the repeated instruction corresponding to the original operation instruction is directly used as the target operation instruction.
  • the client when the original operation instruction is an infrequent operation instruction, the client directly sends the original operation instruction to the server.
  • the protection instruction of the original operation instruction when the duration of sending the original operation instruction from the client reaches the first preset duration, the protection instruction of the original operation instruction, that is, the repetition instruction is repeatedly sent to the server in an adaptive cycle until the deadline is reached.
  • the deadline may be the sum of the sent duration of the original operation instruction and the minimum response time of the instruction.
  • the minimum response time of the command refers to the fastest time to receive the ACK information sent by the server. It can be understood that after the client receives the ACK information, it can send a repeat instruction (also called a repeat packet) to the server in a targeted manner.
  • the initial retransmission Period in the process of the client sending the repeated instruction corresponding to the original operation instruction to the server, in order to prevent frequent sending of repeated instructions from preempting the sending of the original operation instruction, and even cause excessive congestion, the initial retransmission Period and follow the retransmission period backoff rule to send repeated commands to the server.
  • the method of determining the initial retransmission period includes: determining the remaining bandwidth of the current network where the client is located according to the current network state; determining the initial retransmission period.
  • the retransmission packet refers to the service packet corresponding to the repeat instruction, correspondingly, the number of bits occupied by the retransmission packet is used to represent the size of a retransmission packet, and the unit is bit.
  • the client determines the remaining uplink bandwidth of the current network according to the current network state, and determines the initial retransmission period of the repeat instruction according to the remaining uplink bandwidth, the number of bits occupied by each retransmission packet, and the minimum response time of the instruction, and When a new original operation instruction is generated, actively back off and send repeated instructions, that is, stop the sending operation of repeated instructions, and send new original operation instructions, thereby preventing frequent repeated instructions from preempting the sending of original operation instructions, thereby causing network congestion phenomenon.
  • FIG. 4 is a flowchart of another data transmission method provided by an embodiment of the present disclosure.
  • a method of combining ACK and NACK is used to reliably transmit the original operation instruction.
  • the data transmission method in this embodiment includes the following steps:
  • the NACK information carries sequence numbers of all instruction packets not received.
  • all instruction packets not received refer to service packets corresponding to all instructions not received by the server.
  • the client sends the original operation command to the server, or after sending the target operation command carrying the original operation command and protection command, if the server successfully receives the corresponding command, it will feed back the corresponding ACK to the client information, so that the client can know in time that the server has successfully received the instruction.
  • the client can also determine the commands that the server has not received successfully according to the ACK information, and send NACK information carrying the serial numbers of all command packets not received by the server to the server at regular intervals, that is, the NACK information is used to represent The sequence number of the instruction packet that the server has not successfully received within a period of time. For example, assuming that the sending period of NACK information is 200ms, the client sends NACK information to the server every 200ms, and the NACK information carries the sequence numbers of service packets corresponding to all instructions not received by the server.
  • the server when the server successfully receives the instruction sent by the client, the server feeds back corresponding ACK information to the client. It can be understood that each successfully received command corresponds to one piece of ACK information.
  • the receiving time interval refers to the receiving time interval between two adjacent ACK messages.
  • the receiving time interval is determined according to the difference between the last receiving time of the ACK information and the current receiving time. Exemplarily, assuming that the current receiving time of the ACK information is time 3 and the last receiving time is time 4, the absolute value of the difference between time 4 and time 3 is used as the receiving time interval.
  • the response information includes sequence numbers of all instruction packets not received within the receiving time interval.
  • ACK is performed on the instruction packet corresponding to the current ACK message, that is, corresponding response information is generated. For example, assuming that the current receiving time of the ACK message is time 3, and the last receiving time is time 4, all the unreceived instruction packets carried in the response information refer to the All command packets received successfully. Also, the response information refers to information responding to the command packet sent at time 4 .
  • the client sends response information of sequence numbers of all instruction packets not received within the receiving time interval to the server, so that the server can know in time all instructions not successfully received within the receiving time interval.
  • S450 may be performed before S440, that is, the client knows all instructions that the server has not received successfully according to the ACK information fed back by the server.
  • the client can also know all the instructions that the server failed to receive through other methods, that is, S450 is executed after S440.
  • FIG. 5 is a flowchart of another data transmission method provided by an embodiment of the present disclosure. This embodiment is based on the foregoing embodiments, and describes congestion control during data transmission. This embodiment is applied to a scenario where the current uplink bandwidth of the network where the client is located is lower than the preset bandwidth threshold. It can be understood that the uplink bandwidth of the network where the client is located is insufficient.
  • the data transmission method in this embodiment includes the following steps:
  • the preset sending rule satisfies the following conditions: the congestion window (Congestion Window, CWND) or the rate control strategy is not followed; the number of protection instructions in the target operation instruction is reduced.
  • CWND Congestion Window
  • the CWND means that the original operation instruction is sent to the server immediately without being restricted by the CWND; or, the original operation instruction is sent to the server immediately without being restricted by the rate control policy, so Potentially reduce latency to preempt network channels.
  • the embodiments of the present disclosure achieve the effect of minimizing packet loss hidden delay by making full use of the uplink bandwidth, that is, it is necessary to detect the uplink bandwidth in the network link where the client is located, but in the case of insufficient uplink bandwidth , in order to avoid the aggravation of network congestion, it is necessary to carry out corresponding congestion control to avoid the increase of network delay, that is, to send the original operation command to the server according to the preset sending rules.
  • the preset sending rule can meet the following two conditions: the original operation instruction is not restricted by the CWND or rate control policy, that is, the original operation instruction is sent immediately, thereby reducing the delay as much as possible to preempt the network channel; When the network is congested, the sending of protection instructions is reduced, that is, the number of protection instructions in the target operation instructions is reduced.
  • FIG. 6 is a flowchart of another data transmission method provided by an embodiment of the present disclosure. This embodiment is based on the above embodiments, and describes the process of configuring the attributes of the service layer instruction corresponding to the original operation instruction. As shown in Figure 6, the data transmission method in this embodiment includes the following steps:
  • the preset attribute setting interface refers to an interface for attribute setting reserved by the transport layer for the application layer.
  • the reliability requirements of the instruction package corresponding to the original operation instruction can be specified through the preset attribute setting interface.
  • the original operation instruction may be a business layer instruction.
  • the command correlation can be used to actively supplement some missing command data, for example, the coordinate value of the missing command, thereby improving the reliability of the command.
  • the transport layer can adapt to the reliability requirements of different service data, and assist the service layer to complete active recovery of instructions and avoid retransmission.
  • the process of data transmission is described by taking the following four instructions as an example.
  • the instruction data includes: basic instruction (recorded as BasePack), the instruction that the user actually sends; Redundant instruction (recorded as RedunPack), the copy that is attached to the sent instruction in the current sending instruction packet; Repeat instruction (recorded as RepeatPack ), an instruction for actively repeating transmission; a retransmission instruction (RtransPack), an instruction for passive retransmission in response to a NACK request.
  • the basic instruction can be understood as the original operation instruction in the above embodiment; the redundant instruction or the repeated instruction is the protection instruction in the above embodiment.
  • BacePack which is mainly composed of RedunPack and RepeatPack.
  • FIG. 7 is a schematic diagram of transmission of a redundant instruction as a protection instruction provided by an embodiment of the present disclosure.
  • the previous N BasePacks are used as RedunPacks and assembled into the BasePack to form a CombiPack.
  • BasePack of the previous N times For example, it is observed that generally at most three commands action_down, action_move, and action_up form an independent action, then the three business packets are combined into one transmission packet, that is, one or two of the first and second packets are lost, and the third It can be executed immediately after the package is received.
  • RedunPack can play a very good anti-packet loss effect when users frequently send commands, and complete packet loss concealment with a low delay.
  • FIG. 8 is a schematic diagram of transmission of a repetition instruction as a protection instruction provided by an embodiment of the present disclosure.
  • RedunPack has a very good anti-packet loss effect in the case of frequent user operations.
  • the operation interval of different commands is generally greater than 100ms, and only adding RedunPack will introduce a large delay. Therefore, RepeatPack is introduced.
  • the repeated packet RepeatPack(N) of BasePack(N) is sent repeatedly in an adaptive cycle until the deadline T(BasePack(N))+RTT is reached, where RTT refers to the fastest
  • the time of ACK that is, the minimum response time of the command in the above-mentioned embodiment
  • After getting the ACK can send a targeted repeat packet (that is, the service packet corresponding to the repeat command).
  • the initial retransmission cycle of RepeatPack(N) needs to be adaptive according to the network state, and when a new BasePack is generated, it also needs to be able to actively back off the transmission to prevent frequent RepeatPack(N) from preempting the transmission of BasePack(N) and even causing network congestion .
  • the initial retransmission period and retransmission period backoff rules of RepeatPack are as follows:
  • bandwidth total -bandwidth basepack bandwidth remain , according to the current network status of the client, estimate the remaining bandwidth, size(basepack(N)) is the size of a retransmission packet, and the unit is bit.
  • bandwidth remain is used to indicate the remaining bandwidth; bandwidth total is used to indicate the total uplink bandwidth of the network where the client is currently located; bandwidth basepack is used to indicate the uplink bandwidth of the network where the client is currently located.
  • T(N) start is the theoretical maximum anti-packet loss retransmission period within a limited time limit.
  • factor can be used to adjust T(N) according to actual application scenarios to make it better adapt to the network.
  • factor can be a fixed value.
  • a combination of ACK and NACK is used to ensure the reliability of the command.
  • the information feedback mechanism is as follows:
  • the packet loss mode is detected, and a reasonable repetition packet is added (such as the repetition window is expanded to more than one RTT, and the interspersed ratio of multiple instruction repetition packets is adjusted), so as to reduce the service packet loss rate ;
  • a reasonable repetition packet is added (such as the repetition window is expanded to more than one RTT, and the interspersed ratio of multiple instruction repetition packets is adjusted), so as to reduce the service packet loss rate ;
  • the nack list is 0 for a long period of time, restore to the previous repeat packet mode.
  • the command transmission channel in the embodiment of the present disclosure minimizes packet loss hidden delay by making full use of the bandwidth, so in the embodiment, it is necessary to be able to detect the uplink bandwidth in the current network link. In extreme cases, that is, when the uplink bandwidth is insufficient, the command channel must implement corresponding congestion control, otherwise the additional protection data will aggravate network congestion and lead to increased network delay.
  • BCC is used to detect the network bandwidth, and the following two sending rules are added:
  • BasePack is not limited by CWND or pacing_rate (that is, the rate control strategy), and it is sent immediately, so as to reduce the delay as much as possible to preempt the network channel. Since the data volume of the basic instruction is small, it is expected to have little impact on congestion;
  • the transport layer reserves an attribute setting interface (ie, a preset attribute setting interface) for the application layer, and the reliability requirements of packets can be specified through the attribute interface.
  • attribute setting interface ie, a preset attribute setting interface
  • a button click action in the game will generate at least two specifications, one ACTION_DOWN, one ACTION_UP, the business layer receives two ACTION_DOWNs, combined with the transmission sequence number, it is found that there is a packet loss, and an ACTION_UP with the same coordinates as the first one can be added in between.
  • the coordinates of the MOVE instructions lost in the middle can be estimated by using the coordinates of the preceding and following MOVE instructions.
  • insufficient bandwidth generally 200k
  • TCP has the phenomenon of packet contamination. That is, it has lower packet loss concealment delay than TCP.
  • FIG. 9 is a structural block diagram of a data transmission device provided by an embodiment of the present disclosure.
  • the data transmission device in this embodiment includes: a first determination module 910 , a second determination module 920 and a transmission module 930 .
  • the first determination module 910 is configured to determine the instruction type of the original operation instruction corresponding to the trigger operation in response to the trigger operation on the target cloud game;
  • the second determination module 920 is configured to configure a corresponding protection instruction for the original operation instruction according to the instruction type to obtain the target operation instruction;
  • the transmission module 930 is configured to transmit the target operation instruction to the server.
  • the first determination module 910 includes:
  • the first determination unit is configured to determine the operation interval between two adjacent same trigger operations
  • the second determination unit is configured to determine the instruction type of the original operation instruction according to the operation interval and the preset interval threshold.
  • the second determination module when the instruction type is a frequent operation instruction, includes:
  • the first acquisition unit is configured to acquire the first N operation instructions corresponding to the original operation instructions as redundant instructions;
  • the combination unit is configured to combine the original operation instruction and the redundant instruction to obtain the corresponding target operation instruction.
  • the second determination module when the instruction type is an infrequent operation instruction, includes:
  • the second acquisition unit is configured to acquire the repeated instruction corresponding to the original operation instruction as the protection instruction
  • the third determination unit is configured to use the protection instruction as the target operation instruction.
  • the transmission module includes:
  • the first sending unit is configured to send the original operation instruction to the server
  • the second sending unit is configured to send the repeated instruction to the server according to the initial retransmission period and the backoff rule of the retransmission period when the sent duration of the original operation instruction reaches the first preset duration.
  • the manner of determining the initial retransmission period includes:
  • the initial retransmission period is determined according to the remaining bandwidth, the number of bits occupied by each retransmission packet and the minimum command response time.
  • the data transmission device applied to the client further includes:
  • the first sending module is configured to regularly send unconfirmed NACK information to the server, wherein the NACK information carries the sequence numbers of all command packets not received.
  • the data transmission device applied to the client further includes:
  • the receiving module is configured to receive the ACK information fed back by the server;
  • the second determining module is configured to determine the receiving time interval between the current receiving time of the ACK information and the last receiving time of the ACK information;
  • the generating module is configured to generate response information of the instruction packet corresponding to the ACK information when the receiving time interval reaches the second preset duration, wherein the response information includes the sequence numbers of all instruction packets not received within the receiving time interval;
  • the feedback module is configured to feed back the response information to the server.
  • the transmission module when the current uplink bandwidth of the network where the client is located is lower than the preset bandwidth threshold, is configured to: send the original operation instruction in the target operation instruction to the server according to the preset sending rule;
  • the preset sending rule satisfies the following conditions: the congestion window CWND or the rate control strategy is not followed; and the number of protection instructions in the target operation instructions is reduced.
  • the data transmission device applied to the client further includes:
  • the coordinate value of the corresponding lost instruction is supplemented to the original operation instruction by setting the interface and the instruction association relationship through the preset attribute of the application layer.
  • the above-mentioned data transmission device can execute the data transmission method applied to the client provided by any embodiment of the present invention, and has corresponding functional modules and beneficial effects for executing the method.
  • FIG. 10 is a structural block diagram of an electronic device provided by an embodiment of the present disclosure.
  • FIG. 10 it shows a schematic structural diagram of an electronic device (such as a terminal device, server or computer) 1000 suitable for implementing the embodiments of the present disclosure.
  • Computers in the embodiments of the present disclosure may include, but are not limited to, mobile phones, notebook computers, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted mobile terminals such as navigation terminals) and fixed terminals such as digital TVs, desktop computers and the like.
  • the electronic device shown in FIG. 10 is only an example, and should not limit the functions and application scope of the embodiments of the present disclosure.
  • an electronic device 1000 may include a processing device (such as a central processing unit, a graphics processing unit, etc.) 1001, which may be randomly accessed according to a program stored in a read-only memory (ROM) 1002 or loaded from a storage device 1006. Various appropriate actions and processes are executed by programs in the memory (RAM) 1003 . In the RAM 1003, various programs and data necessary for the operation of the electronic device 1000 are also stored.
  • the processing device 1001, ROM 1002, and RAM 1003 are connected to each other through a bus 1004.
  • An input/output (I/O) interface 1005 is also connected to the bus 1004 .
  • the following devices can be connected to the I/O interface 1005: input devices 1006 including, for example, a touch screen, touchpad, keyboard, mouse, camera, microphone, accelerometer, gyroscope, etc.; including, for example, a liquid crystal display (LCD), speaker, vibration an output device 1007 such as a computer; a storage device 1006 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009.
  • the communication means 1009 may allow the electronic device 1000 to perform wireless or wired communication with other devices to exchange data. While FIG. 10 shows electronic device 1000 having various means, it is to be understood that implementing or having all of the means shown is not a requirement. More or fewer means may alternatively be implemented or provided.
  • embodiments of the present disclosure include a computer program product, which includes a computer program carried on a non-transitory computer readable medium, where the computer program includes program code for executing the method shown in the flowchart.
  • the computer program may be downloaded and installed from a network via communication means 1009, or from storage means 1006, or from ROM 1002.
  • the processing device 1001 the above-mentioned functions defined in the methods of the embodiments of the present disclosure are executed.
  • the above-mentioned computer-readable medium in the present disclosure may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two.
  • a computer readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to, electrical connections with one or more wires, portable computer diskettes, hard disks, random access memory (RAM), read-only memory (ROM), erasable Programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination of the above.
  • a computer-readable storage medium may be any tangible medium that contains or stores a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
  • a computer-readable signal medium may include a data signal propagated in baseband or as part of a carrier wave carrying computer-readable program code therein. Such propagated data signals may take many forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the foregoing.
  • a computer-readable signal medium may also be any computer-readable medium other than a computer-readable storage medium, which can transmit, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device .
  • Program code embodied on a computer readable medium may be transmitted by any appropriate medium, including but not limited to wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
  • the client and the server can communicate using any currently known or future network protocols such as HTTP (HyperText Transfer Protocol, Hypertext Transfer Protocol), and can communicate with digital data in any form or medium
  • HTTP HyperText Transfer Protocol
  • the communication eg, communication network
  • Examples of communication networks include local area networks (“LANs”), wide area networks (“WANs”), internetworks (e.g., the Internet), and peer-to-peer networks (e.g., ad hoc peer-to-peer networks), as well as any currently known or future developed network of.
  • the above-mentioned computer-readable medium may be included in the above-mentioned electronic device, or may exist independently without being incorporated into the electronic device.
  • the above-mentioned computer-readable medium carries one or more programs, and when the above-mentioned one or more programs are executed by the electronic device, the electronic device: in response to a trigger operation on the target cloud game, determines the original operation instruction corresponding to the trigger operation the instruction type; according to the instruction type, configure the corresponding protection instruction for the original operation instruction to obtain the target operation instruction; transmit the target operation instruction to the server.
  • Computer program code for carrying out operations of the present disclosure may be written in one or more programming languages, or combinations thereof, including but not limited to object-oriented programming languages—such as Java, Smalltalk, C++, and Includes conventional procedural programming languages - such as the "C" language or similar programming languages.
  • the program code may execute entirely on the user's computer, partly on the user's computer, as a stand-alone software package, partly on the user's computer and partly on a remote computer or entirely on the remote computer or server.
  • the remote computer can be connected to the user computer through any kind of network, including a local area network (LAN) or a wide area network (WAN), or it can be connected to an external computer (such as through an Internet service provider). Internet connection).
  • LAN local area network
  • WAN wide area network
  • Internet service provider such as AT&T, MCI, Sprint, EarthLink, MSN, GTE, etc.
  • each block in a flowchart or block diagram may represent a module, program segment, or portion of code that contains one or more logical functions for implementing specified executable instructions.
  • the functions noted in the block may occur out of the order noted in the figures. For example, two blocks shown in succession may, in fact, be executed substantially concurrently, or they may sometimes be executed in the reverse order, depending upon the functionality involved.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented by a dedicated hardware-based system that performs the specified functions or operations , or may be implemented by a combination of dedicated hardware and computer instructions.
  • the units involved in the embodiments described in the present disclosure may be implemented by software or by hardware. Wherein, the name of the unit does not constitute a limitation of the unit itself under certain circumstances, for example, the first obtaining unit may also be described as "a unit for obtaining at least two Internet Protocol addresses".
  • FPGAs Field Programmable Gate Arrays
  • ASICs Application Specific Integrated Circuits
  • ASSPs Application Specific Standard Products
  • SOCs System on Chips
  • CPLD Complex Programmable Logical device
  • a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, apparatus, or device.
  • a machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium.
  • a machine-readable medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing.
  • machine-readable storage media would include one or more wire-based electrical connections, portable computer discs, hard drives, random access memory (RAM), read only memory (ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, compact disk read only memory (CD-ROM), optical storage, magnetic storage, or any suitable combination of the foregoing.
  • RAM random access memory
  • ROM read only memory
  • EPROM or flash memory erasable programmable read only memory
  • CD-ROM compact disk read only memory
  • magnetic storage or any suitable combination of the foregoing.
  • a data transmission method applied to a client comprising: in response to a trigger operation on a target cloud game, determining the instruction type of the original operation instruction corresponding to the trigger operation ; configuring a corresponding protection instruction for the original operation instruction according to the instruction type to obtain a target operation instruction; transmitting the target operation instruction to the server.
  • the determining the instruction type of the original operation instruction corresponding to the trigger operation includes: determining the operation interval between two adjacent same trigger operations; according to the operation interval and The preset interval threshold determines the instruction type of the original operation instruction.
  • configuring a corresponding protection instruction for the original operation instruction according to the instruction type to obtain a target operation instruction includes: Obtaining the first N operation instructions corresponding to the original operation instructions as redundant instructions; combining the original operation instructions and the redundant instructions to obtain corresponding target operation instructions.
  • configuring a corresponding protection instruction for the original operation instruction according to the instruction type to obtain a target operation instruction includes : Acquiring a repeated instruction corresponding to the original operation instruction as a protection instruction; taking the protection instruction as a target operation instruction.
  • the transmitting the target operation instruction to the server includes: sending the original operation instruction to the server; When the time is preset, repeat instructions are sent to the server according to the initial retransmission period and the retransmission period backoff rules.
  • the manner of determining the initial retransmission period includes:
  • the initial retransmission period is determined according to the remaining bandwidth, the number of bits occupied by each retransmission packet, and the minimum command response time.
  • the data transmission method applied to the client further includes:
  • NACK information Periodically send non-confirmed NACK information to the server, wherein the NACK information carries sequence numbers of all instruction packets not received.
  • the data transmission method applied to the client further includes: receiving ACK information fed back by the server;
  • the response information is fed back to the server.
  • the transmitting the target operation instruction to the server includes:
  • the preset sending rule satisfies the following conditions: the congestion window CWND or the rate control strategy is not followed; and the number of protection instructions in the target operation instruction is reduced.
  • the data transmission method applied to the client further includes: supplementing the original operation instruction with the coordinate value of the corresponding missing instruction through the preset attribute setting interface and instruction association relationship of the application layer.

Abstract

本公开公开了一种数据传输方法、装置、设备和介质。应用于客户端的数据传输方法包括:响应于对目标云游戏的触发操作,确定所述触发操作所对应原始操作指令的指令类型;根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令;将所述目标操作指令传输至服务器端。

Description

数据传输方法、装置、设备和介质
本申请要求在2021年11月8日提交中国专利局、申请号为202111313978.X的中国专利申请的优先权,该申请的全部内容通过引用结合在本申请中。
技术领域
本公开涉及数据处理领域,例如涉及一种数据传输方法、装置、设备和介质。
背景技术
在云游戏应用场景中,用户响应时延是衡量云游戏服务质量的重要指标。为了保证指令数据的可靠性,可以采用传输控制协议(Transmission Control Protocol,TCP)的确认(Acknowledge,ACK)机制(逐包进行ACK,即在丢包时,发送端超时重传)、流控制传输协议(Stream Control Transmission Protocol,SCTP)的选择确认(Selective ACK,SACK)机制(在接收端接收到乱序包时,主动发起SACK,通知发送端丢包状态)或用户数据报协议(User Datagram Protocol,UDP)的非确认(Non-Acknowledge,NACK)机制(接收端固定时间发起一次NACK,通知发送端丢包状态)进行数据传输。但使用以上策略在保证指令数据可达的基础上,都引入了较大的时延,然而在用户操作时往往是对时延最敏感的时刻,一旦用户操作指令在传输过程中发生了丢包,增大的时延将会较大降低用户体验。除了以自动重传请求(Automatic Repeat-reQuest,ARQ)(以ACK或NACK等方式反馈后计算丢包而发起重传)机制来保障数据的可靠性外,还有结合前向纠错码(Forward Error Correction,FEC)来增加冗余一定程度来保护数据,虽然相较ARQ时延更短,但FEC编码和解码增加了短暂时延,并带来额外算力消耗,且在重组恢复数据时需要等待达到恢复条件的数据包来完成FEC解码,从而进一步增加时延。
发明内容
本公开实施例提供一种数据传输方法、装置、设备和介质,实现了以较低的时延完成丢包隐藏。
第一方面,本公开实施例提供了一种数据传输方法,应用于客户端,包括:
响应于对目标云游戏的触发操作,确定所述触发操作所对应原始操作指令的指令类型;
根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令;
将所述目标操作指令传输至服务器端。
第二方面,本公开实施例还提供了一种数据传输装置,应用于客户端,包括:
第一确定模块,设置为响应于对目标云游戏的触发操作,确定所述触发操作所对应原始操作指令的指令类型;
第二确定模块,设置为根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令;
传输模块,设置为将所述目标操作指令传输至服务器端。
第三方面,本公开实施例还提供了一种电子设备,包括:
一个或多个处理器;
存储器,设置为存储一个或多个程序;
当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如上述实施例中任一项所述的数据传输方法。
第四方面,本公开实施例还提供了一种计算机存储介质,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现如上述实施例任一项所述的数据传输方法。
附图说明
贯穿附图中,相同或相似的附图标记表示相同或相似的元素。应当理解附图是示意性的,原件和元素不一定按照比例绘制。
图1是相关技术提供的一种云游戏架构示意图;
图2是本公开实施例提供的一种数据传输方法的流程图;
图3是本公开实施例提供的另一种数据传输方法的流程图;
图4是本公开实施例提供的又一种数据传输方法的流程图;
图5是本公开实施例提供的再一种数据传输方法的流程图;
图6是本公开实施例提供的再一种数据传输方法的流程图;
图7是本公开实施例提供的一种冗余指令作为保护指令的传输示意图;
图8是本公开实施例提供的一种重复指令作为保护指令的传输示意图;
图9是本公开实施例提供的一种数据传输装置的结构框图;
图10是本公开实施例提供的一种电子设备的结构框图。
具体实施方式
应当理解,本公开的方法实施方式中记载的多个步骤可以按照不同的顺序执行,和/或并行执行。此外,方法实施方式可以包括附加的步骤和/或省略执行示出的步骤。本公开的范围在此方面不受限制。
本文使用的术语“包括”及其变形是开放性包括,即“包括但不限于”。术语“基于”是“至少部分地基于”。术语“一个实施例”表示“至少一个实施例”;术语“另一实施例”表示“至少一个另外的实施例”;术语“一些实施例”表示“至少一些实施例”。其他术语的相关定义将在下文描述中给出。
需要注意,本公开中提及的“第一”、“第二”等概念仅用于对不同的装置、模块或单元进行区分,并非用于限定这些装置、模块或单元所执行的功能的顺序或者相互依存关系。
需要注意,本公开中提及的“一个”、“多个”的修饰是示意性而非限制性的,本领域技术人员应当理解,除非在上下文另有明确指出,否则应该理解为“一个或多个”。
本公开实施方式中的多个装置之间所交互的消息或者信息的名称仅用于说明性的目的,而并不是用于对这些消息或信息的范围进行限制。
在云游戏应用场景中,用户响应时延是衡量云游戏服务质量的重要指标。一个完整的响应时延链路由用户点击云游戏屏幕、客户端上传用户指令到服务端、服务端注入指令进行游戏渲染、渲染后的音视频经编码后传输到客户端、客户端解码音视频并渲染、用户感知画面由点击引起的画面和声音变化几个阶段组成。其中游戏渲染以及编解码阶段造成的时延是比较固定的,对于最终呈现给用户的云游戏服务质量劣化影响较小,指令和音视频传输阶段依赖于客户端与服务端之间网络链路状态,而网络链路的状态随时可能由于背景流量的变化而导致拥塞,音视频数据传输时延变长,最终导致用户响应时延变长,影响云游戏服务质量。固然在音视频传输阶段,由于媒体数据对于数据完整性和有序性的强依赖性,在弱网环境下音视频数据的丢包、乱序是影响用户响应时延最主要因素,但是由于指令数据的高可靠性,其丢包依然会为最后的响应时延引入不小的时延。
指令数据指用户在终端设备中的输入操作所产生的系统指令数据。图1是相关技术提供的一种云游戏架构示意图。如图1所示,在云游戏架构中,指令数据由用户侧经网络传输到云端服务器,称作上行传输,而下行传输音视流或渲染指令流。示例性地,上行数据量在100kbps-1M,下行数据量在6Mbps-30Mbps。
具体的指令数据包括用户按下按钮,滑动屏幕,松开按钮等操作指令,而在传输过程中的单条指令的丢失,乱序等,会阻塞游戏逻辑的更新,增加之后视频流延迟,很大程度降低用户体验效果。
为了保证指令数据的可靠性,目前业界采用的方案包括:
TCP:基于ACK机制,逐包进行ACK,在丢包时,发送端超时重传。
SCTP:基于SACK机制,在接收端接收到乱序包时,主动发起SACK,通知发送端丢包状态。
UDP&NACK:基于NACK机制,接收端固定时间发起一次NACK,通知发送端丢包状态。
例如,TCP,以及基于TCP的传输协议,如websocket等,都是基于超时重传的机制,引入的额外时延为超时重传时延+指令重传上行时延。SCTP基于SACK机制,数据包重传引入了至少一个往返时延(Round-Trip Time,RTT)的时延。UDP&NACK的机制引入了RTT+部分NACK周期的时延。使用以上策略在保证指令数据可达的基础上,都引入了较大的时延,然而在用户操作时往往是对时延最敏感的时刻,一旦用户操作指令在传输过程中发生了丢包,增大的时延将会较大降低用户体验。除了以ARQ(以ACK或NACK等方式反馈后计算丢包而发起重传)机制来保障数据的可靠性外,还有结合前向纠错(FEC)来增加冗余一定程度来保护数据,虽然相较ARQ时延更短,但FEC编码和解码增加了短暂时延,并带来额外算力消耗,且在重组恢复数据时需要等待达到恢复条件的数据包来完成FEC解码,从而进一步增加时延。
有鉴于此,本公开实施例提供一种数据传输方法,通过设计一种可靠且有较低丢包隐藏时延的云游戏指令传输通道,实现了即使在指令数据丢包的情况下,依然能够以较小时延完成丢包隐藏。
图2是本公开实施例提供的一种数据传输方法的流程图。该方法可以由配置于电子设备中的数据传输装置来执行。本实施例应用于避免网络丢包和抖动的场景。该电子设备可以客户端,例如可以是智能手机、iPad等可以运行云游戏的智能终端。如图2所示,本实施例中的方法包括如下步骤:
S210、响应于对目标云游戏的触发操作,确定触发操作所对应原始操作指令的指令类型。
其中,云游戏是一种基于云计算的游戏模式,即游戏用户可以通过按照客户端程序进入游戏,并且该程序可以访问运行游戏的服务器,以在服务器上进行游戏。在实施例中,目标云游戏指的是客户端上正在运行,且用户当前正在操作的游戏。在接收到游戏用户对目标云游戏的触发操作时,生成该触发操作对应的操作指令,作为原始操作指令。示例性地,对目标云游戏的触发操作指的是对目标云游戏所在显示界面上所配置操作控件的点击操作。示例性地,触发操作可以包括:点击菜单栏、游戏设置等操作,也可以包括:用户滑动触摸屏等操作,其中,用户滑动触摸屏的操作可以由三种触发事件来完成。示例性地,用户滑动触摸屏的操作可以包括下述三种事件:action_down,action_move,action_up,也可以为三个指令,并且由这三个指令组成一个独立动作的操作,对此并不进行限定。其中,action_down指的是第一个手指初次接触到屏幕时触发,action_move指的是手指在屏幕上互动时触发,即可多次触发,action_up指的是最后一个手指离开屏幕时触发。
可以理解为,原始操作指令指的是用户对目标云游戏实际的触发操作生成的对应操作指令,即原始操作指令为客户端实际发送的指令。需要说明的是,每个原始操作指令均对应一个业务包。当然,原始操作指令也可以对应多个业务包,可根据实际操作进行配置,对此并不进行限定。
由于用户可以在目标云游戏上执行多种触发操作,即不同的触发操作生成不同的原始操作指令,并确定每个原始操作指令的指令类型。示例性地,指令类型可以包括:频繁操作指令;非频繁操作指令。在实施例中,频繁操作指令指的是两个指令的操作间隔较短的指令;非频繁操作指令指的是两个指令的操作间隔较长的指令。
S220、根据指令类型对原始操作指令配置对应的保护指令,得到目标操作指令。
其中,保护指令可以理解为可以用于对原始操作指令的传输起到抗丢包效果的指令。示例性地,保护指令可以为冗余指令,也可以为重复指令,又或者是重传指令。其中,冗余指 令指的是附加在原始操作指令中已发送指令的副本;重复指令指的是主动重复发送的指令;重传指令指的是响应NACK请求被动重传的指令。在实施例中,为了便于对原始操作指令配置相匹配的保护指令,以达到较好的抗丢包效果,可以根据每个原始操作指令的指令类型配置对应的保护指令。可以理解为,不同指令类型的原始操作指令,其对应的保护指令也是不同的,并且,保护指令所对应的配置方式也是有所区别的。可以理解为,目标操作指令中可以同时包括原始操作指令和保护指令;也可以只包括保护指令。
S230、将目标操作指令传输至服务器端。
在实施例中,客户端确定原始操作指令对应的目标操作指令之后,将目标操作指令传输至所关联的服务器端。在实际传输过程中,可以将原始操作指令和保护指令同时发送至服务器端;也可以将原始操作指令和保护指令分别发送至服务器端,即先发送原始操作指令,再发送保护指令至服务器端。
本实施实例的技术方案,通过根据原始操作指令的指令类型配置对应的保护指令,得到目标操作指令,然后将目标操作指令传输至服务器端,通过增加保护指令对抗网络丢包和抖动,从而在更好利用上行大量剩余带宽的基础上,降低了丢包隐藏时延,从而能够以较低时延完成丢包隐藏。
在一实施例中,图3是本公开实施例提供的另一种数据传输方法的流程图。本实施例是在上述实施例的基础上,对原始操作指令的指令类型的确定过程,以及目标操作指令的确定过程作进一步的说明。如图3所示,本实施例中的数据传输方法包括如下步骤:
S310、响应于对目标云游戏的触发操作,确定相邻两个的同一触发操作之间的操作间隔。
其中,操作间隔指的是触发操作在当前触发与上一次触发之间的时间间隔。在实施例中,可以根据触发操作的当前触发时刻与上一次触发时刻的差值,作为该触发操作的时间间隔。示例性地,在对目标云游戏的触发操作为点击菜单栏操作时,对应的原始操作指令为点击菜单栏操作指令,并且,点击菜单栏操作指令的当前触发时刻为时刻1,上一次触发时刻为时刻2,则将相邻的两次点击菜单栏操作指令之间的时间间隔作为该触发操作的操作间隔,即将时刻2与时刻1之间的差值作为点击菜单栏操作指令的操作间隔。当然,在差值为负值时,可以将差值的绝对值作为点击菜单栏操作指令的操作间隔。
S320、根据操作间隔和预设间隔阈值确定原始操作指令的指令类型。
在实施例中,预设间隔阈值指的是预先配置的用于区分不同指令类型的时间值。可以理解为,在操作间隔小于预设间隔阈值时,原始操作指令的指令类型为频繁操作指令;在操纵间隔大于预设间隔阈值时,原始操作指令的指令类型为非频繁操作指令。示例性地,预设间隔阈值可以为100ms。当然,也可以采用两个不同的预设间隔阈值区分原始操作指令的指令类型,示例性地,假设预设间隔阈值可以为10ms,100ms,则操作间隔小于10ms的原始操作指令的指令类型为频繁操作指令,操作间隔大于100ms的原始操作指令的指令类型为非频繁操作指令。
S330、指令类型是否为频繁操作指令,基于指令类型为频繁操作指令的判断结果,执行S340;基于指令类型为非频繁操作指令的判断结果,执行S370。
在实施例中,在原始操作指令的指令类型为频繁操作指令的情况下,执行S340-S360;在原始操作指令的指令类型为非频繁操作指令的情况下,执行S370-S3100。
S340、获取原始操作指令所对应的前N次操作指令,作为冗余指令。
其中,前N次操作指令,指的是当前的原始操作指令之前的N次操作指令。在实施例中,冗余指令指的是原始操作指令的副本。N为大于或等于1的正整数。
S350、对原始操作指令和冗余指令进行组合,得到对应的目标操作指令。
在实施例中,在发送原始操作指令时,将原始操作指令的前N次操作指令作为冗余指令,将冗余指令和原始操作指令进行组合,得到对应的目标操作指令。其中,对原始操作指令和冗余指令的组合过程,也可以理解为,对原始操作指令和冗余指令的组装过程,即原始操作指令和冗余指令组装成一个指令,记为目标操作指令。
S360、将目标操作指令传输至服务器端。
在实施例中,将包含冗余指令和原始操作指令的目标操作指令发送至服务器端,即使在网络传输过程中丢失了部分传输包,在一个目标操作指令传输至服务器端之后,服务器端可以根据目标操作指令依然可以复原出原始操作指令的前N次的操作指令,从而起到了较好的抗丢包效果,并以较低的时延完成丢包隐藏。
S370、获取原始操作指令对应的重复指令,作为保护指令。
其中,重复指令指的是客户端主动重复发送的指令。在实施例中,在原始操作指令为非频繁操作指令时,由于指令的操作间隔大于预设间隔阈值,若只添加冗余指令将会导致较大时延。因此,在原始操作指令为非频繁操作指令时,客户端可以主动向服务器端发送重复指令,即将原始操作指令对应的重复指令,作为保护指令。
S380、将保护指令作为目标操作指令。
在实施例中,在原始操作指令为非频繁操作指令时,直接将原始操作指令对应的重复指令作为目标操作指令。
S390、将原始操作指令发送至服务器端。
在实施例中,在原始操作指令为非频繁操作指令时,客户端直接将原始操作指令发送至服务器端。
S3100、在原始操作指令的已发送时长达到第一预设时长时,按照初始重传周期和重传周期退避规则发送重复指令至服务器端。
在实施例中,在客户端发送原始操作指令的时长达到第一预设时长时,原始操作指令的保护指令,即重复指令以自适应周期重复发送至服务器端,直至达到截止时间。其中,截止时间可以由原始操作指令的已发送时长与指令最小响应时间的总和。其中,指令最小响应时间指的是最快可以接收到服务器端发送ACK信息的时间。可以理解为,在客户端得到ACK信息之后可以针对性地向服务器端发送重复指令(也可以称为重复包)。在实施例中,在客户端将原始操作指令对应的重复指令发送至服务器端的过程中,为了防止频繁的发送重复指令抢占原始操作指令的发送,甚至引起挽留过拥塞的现象,可以按照初始重传周期以及遵循重传周期退避规则发送重复指令至服务器端。
在一实施例中,初始重传周期的确定方式,包括:根据当前网络状态确定客户端所在当前网络的剩余带宽;根据剩余带宽、每个重传包所占用比特数和指令最小响应时间确定初始重传周期。其中,重传包指的是重复指令所对应的业务包,相应的,重传包所占用比特数用于表征一个重传包的大小,单位为比特(bit)。在实施例中,客户端根据当前网络状态确定所在当前网络的上行剩余带宽,并根据上行剩余带宽、每个重传包所占用比特数和指令最小响应时间确定重复指令的初始重传周期,并按照在新的原始操作指令生成时,主动退避发送重复指令,即停止重复指令的发送操作,而进行新的原始操作指令的发送,从而防止频繁的重复指令抢占原始操作指令的发送,进而导致网络拥塞的现象。
在一实施例中,图4是本公开实施例提供的又一种数据传输方法的流程图。本实施例是在上述实施例的基础上,采用ACK和NACK相结合的方式,对原始操作指令进行可靠性传输。如图4所示,本实施例中的数据传输方法包括如下步骤:
S410、响应于对目标云游戏的触发操作,确定触发操作所对应原始操作指令的指令类型。
S420、根据指令类型对原始操作指令配置对应的保护指令,得到目标操作指令。
S430、将目标操作指令传输至服务器端。
S440、定时向服务器端发送NACK信息。
其中,NACK信息携带未接收到的所有指令包的序号。在实施例中,未接收到的所有指令包,指的是服务器端未接收到的所有指令对应的业务包。在实际操作过程中,客户端向服务器端发送原始操作指令,或者,发送携带原始操作指令和保护指令的目标操作指令之后,若服务器端成功接收到对应的指令,则向客户端反馈对应的ACK信息,以使客户端及时了解到服务器端已成功接收到指令。相应的,客户端也可以根据ACK信息确定服务器端未成功接收 到的指令,在客户端定时向服务器端发送携带服务器端未接收到的所有指令包的序号的NACK信息,即NACK信息用于表征一段时间内服务器端未成功接收到的指令包的序号。示例性地,假设NACK信息的发送周期为200ms,则客户端每200ms向服务器端发送一次NACK信息,并在NACK信息中携带为服务器端未接收到的所有指令对应的业务包的序号。
S450、接收服务器端反馈的ACK信息。
在实施例中,在服务器端成功接收到客户端发送的指令时,服务器端向客户端反馈对应的ACK信息。可以理解为,每个成功接收到的指令均对应一个ACK信息。
S460、确定ACK信息的当前接收时间与ACK信息的上一次接收时间之间的接收时间间隔。
其中,接收时间间隔指的是相邻两次ACK信息的接收时间间隔。在实施例中,根据ACK信息的上一次接收时间与当前接收时间之间的差值确定接收时间间隔。示例性地,假设ACK信息的当前接收时间为时刻3,上一次接收时间为时刻4,则将时刻4与时刻3之间差值的绝对值作为接收时间间隔。
S470、在接收时间间隔达到第二预设时长时,生成ACK信息所对应指令包的响应信息。
其中,响应信息包括接收时间间隔内未接收到的所有指令包的序号。在实施例中,在两次ACK信息的接收时间间隔达到第二预设时长时,对当前的ACK信息所对应指令包进行ACK,即生成对应的响应信息。示例性地,假设ACK信息的当前接收时间为时刻3,上一次接收时间为时刻4,则响应信息中携带的未接收到的所有指令包,指的是时刻3至时刻4之间服务器端未成功接收到的所有指令包。并且,响应信息指的是对时刻4所发送指令包进行响应的信息。
S480、将响应信息反馈至服务器端。
在实施例中,客户端将接收时间间隔内未接收到的所有指令包的序号的响应信息发送至服务器端,以使服务器端及时了解该接收时间间隔内未成功接收到的所有指令。
需要说明的是,S450可以在S440之前执行,即客户端根据服务器端反馈的ACK信息得知服务器端未成功接收到的所有指令。当然,客户端也可以根据其他方式得知服务器端未成功接收到的所有指令,即S450在S440之后执行。
在一实施例中,图5是本公开实施例提供的再一种数据传输方法的流程图。本实施例是在上述实施例的基础上,对数据传输过程中的拥塞控制进行说明。本实施例应用于客户端所在网络的当前上行带宽低于预设带宽阈值的场景。可以理解为,客户端所在网络的上行带宽不足的情况。如图5所示,本实施例中的数据传输方法包括如下步骤:
S510、响应于对目标云游戏的触发操作,确定触发操作所对应原始操作指令的指令类型。
S520、根据指令类型对原始操作指令配置对应的保护指令,得到目标操作指令。
S530、按照预设发送规则将目标操作指令中的原始操作指令发送至服务器端。
其中,预设发送规则满足下述条件:未遵循拥塞窗口(Congestion Window,CWND)或速率控制策略;减少目标操作指令中保护指令的数量。在实施例中,未遵循CWND,指的是不受CWND的限制,立即将原始操作指令发送至服务器端;或者,不受速率控制策略的限制,立即将原始操作指令发送至服务器端,从而尽可能地减少时延抢占网络通道。需要说明的是,本公开实施例是通过充分利用上行带宽以达到最小化丢包隐藏时延的效果,即需要检测到客户端所在网络链路中的上行带宽,但在上行带宽不足的情况下,为了避免网络拥塞的加剧现象,需要进行相应的拥塞控制,避免网络时延增大,即按照预设发送规则将原始操作指令发送至服务器端。其中,预设发送规则可以满足下述两种条件:原始操作指令不受CWND或速率控制策略的限制,即立即发送原始操作指令,从而尽可能地减少时延抢占网络通道;或者,在检测到网络拥塞时,减少保护指令的发送,即减少目标操作指令中保护指令的数量。
在一实施例中,图6是本公开实施例提供的再一种数据传输方法的流程图。本实施例是在上述实施例的基础上,对原始操作指令所对应业务层指令属性记性配置的过程进行说明。如图6所示,本实施例中的数据传输方法包括如下步骤:
S610、通过应用层的预设属性设置接口和指令关联关系对原始操作指令补充所对应丢失指令的坐标值。
在实施例中,预设属性设置接口,指的是传输层为应用层预留的属性设置的接口。可以通过该预设属性设置接口指定原始操作指令所对应指令包的可靠性要求。
需要说明的是,原始操作指令可以为业务层指令。并且,业务层指令之间具有一定的关联,在实际操作过程中,可以利用指令关联主动补一些缺失的指令数据,比如,丢失指令的坐标值,从而提升了指令的可靠性。
S620、响应于对目标云游戏的触发操作,确定触发操作所对应原始操作指令的指令类型。
S630、根据指令类型对原始操作指令配置对应的保护指令,得到目标操作指令。
S640、将目标操作指令传输至服务器端。
本实施例的技术方案,在上述实施例的基础上,基于业务层指令的相关性,传输层可以适应不同业务数据对可靠性的要求,并辅助业务层完成指令的主动恢复而避免重传。
在一实施例中,以指令包括以下四种为例,对数据传输的过程进行说明。示例性地,指令数据包括:基础指令(记为BasePack),用户实际发送的指令;冗余指令(记为RedunPack),附加在当前发送指令包中已发送指令的副本;重复指令(记为RepeatPack),主动重复发送的指令;重传指令(RtransPack),响应NACK请求被动重传的指令。其中,基础指令可以理解为上述实施例中的原始操作指令;冗余指令或重复指令为上述实施例中的保护指令。
为了充分利用指令上行带宽,为BacePack增加了保护指令,保护指令主要由RedunPack和RepeatPack组成。
情况一:保护指令为RedunPack的情况
图7是本公开实施例提供的一种冗余指令作为保护指令的传输示意图。如图7所示,在BasePack发送时,将前N次的BasePack作为RedunPack,组装到BasePack中,形成一个CombiPack,这样即使网络传输中丢失了部分传输包,当一个combiPack到达时,依然能复原出前面N次的BasePack。例如,观察到一般最多三个指令action_down,action_move,action_up组成一个独立动作,那么三个业务包合成一个传输包,即第一,第二这两个包中丢了一个或两个,第三个包收到后可立刻执行。通过指令采集数据观察到,用户滑动触摸屏,频繁发送用户指令场景下,指令的操作间隔在10ms左右。RedunPack能够在用户频繁发送指令时起到很好的抗丢包效果,以较低的时延完成丢包隐藏。
情况二:保护指令为RepeatPack的情况
图8是本公开实施例提供的一种重复指令作为保护指令的传输示意图。如图8所示,虽然RedunPack在用户频繁操作的情况下,起到了很好的抗丢包效果。但是当用户非频繁触摸屏幕时,如点击菜单栏,游戏设置等情况下,不同指令的操作间隔普遍大于100ms,仅仅添加RedunPack将引入较大的时延,因此引入了RepeatPack,在指令包BasePack(N)发送后一段时间内,BasePack(N)的重复包RepeatPack(N)以自适应周期重复发送,直到达到截止时间T(BasePack(N))+RTT,其中,RTT指的是最快能得到ACK的时间(即上述实施例中的指令最小响应时间),在得到ACK后可以针对性发重复包(即重复指令所对应的业务包)。RepaetPack(N)的初始重传周期需要根据网络状态自适应,并且在新的BasePack产生时,还需要能够主动退避发送,防止频繁的RepeatPack(N)抢占BasePack(N)的发送,甚至引起网络拥塞。
在实施例中,RepeatPack的初始重传周期和重传周期退避规则如下:
RepeatPack初始重传周期:
Figure PCTCN2022128847-appb-000001
RepeatPack重传周期退避规则:
Figure PCTCN2022128847-appb-000002
其中,bandwidth total-bandwidth basepack=bandwidth remain,根据客户端当前所在网络状态,估 算剩余带宽,size(basepack(N))为一个重传包的大小,单位为bit。其中,bandwidth remain用于表示剩余带宽;bandwidth total用于表示客户端当前所在网络的上行总带宽;bandwidth basepack用于表示客户端当前所在网络已使用的上行带宽。
Figure PCTCN2022128847-appb-000003
可以得出T(N) start是在限定时限内理论上最大抗丢包重传周期。
factor可以用于根据实际应用场景调控T(N),使其更好的适应网络。示例性地,factor可以为一个定值。
在一实施例中,使用ACK和NACK结合方式,对指令可靠性兜底。在实施例中,以NACK信息的发送周期为200ms,以及接收时间间隔为20ms为例,信息的反馈机制如下:
定期200ms发送一次NACK信息,其中,NACK信息的包体payload携带所有未接收到的指令包的序号,记为nack list;
接收到一个距离上一次ACK信息的间隔超过20ms的指令包,对该指令包进行ACK,即ACK seq=P,并且,包体携带20ms内的未接收到的指令包的序号,记为nack list。
在实施例中,在遇到nack list较大时,检测丢包模式,增加合理的重复包(如重复窗口扩大到一个RTT之上,多指令重复包穿插比例调整),以减少业务包丢失率;当nack list较长一段时间为0时,恢复到前面的重复包模式。
在一实施例中,本公开实施例中的指令传输通道是通过充分利用带宽以达到最小化丢包隐藏时延,因此在实施例中需要能够探测到当前网络链路中的上行带宽。在极端情况下,即上行带宽不足的情况下,指令通道必须实现相应的拥塞控制,否则附加的保护数据将加剧网络拥塞,导致网络时延增大。在实施例中,以BCC探测网络带宽,并添加了如下两条发送规则:
BasePack,不受CWND或pacing_rate(即速率控制策略)的限制,立刻发送,这样尽可能的减少时延抢占网络通道,由于基础指令的数据量很小,预期对拥塞影响较小;
当检测到拥塞时,减少保护指令(RedunPack,RepeatPack)的发送。
在一实施例中,传输层为应用层预留了属性设置接口(即预设属性设置接口),可以通过属性接口去指定包的可靠性要求。
比如,业务层指令数据之间有一定的指令关联,利用用这种指令关联,可以主动补一些缺失的指令数据,例如,游戏中一个按钮点击动作,会产生至少两条指定,一条ACTION_DOWN,一条ACTION_UP,业务层收到两个ACTION_DOWN,结合传输序号发现有一个丢包,可以在之间补一个同第一条同坐标的ACTION_UP。
又比如,一连串的往同一方向的ACTION_MOVE指令,可以利用前后MOVE指令的坐标推测出中间丢失的MOVE指令的坐标。
本公开实施例,在带宽不足的情况下(一般为200k),依然能很好的适应网络情况,减少了保护指令的发送,调整为主要靠ACK&NACK来保证可靠性,而TCP存在沾包现象,即较TCP有更低的丢包隐藏时延。
在一实施例中,图9是本公开实施例提供的一种数据传输装置的结构框图。如图9所示,本实施例中的数据传输装置包括:第一确定模块910、第二确定模块920和传输模块930。
其中,第一确定模块910,设置为响应于对目标云游戏的触发操作,确定触发操作所对应原始操作指令的指令类型;
第二确定模块920,设置为根据指令类型对原始操作指令配置对应的保护指令,得到目标操作指令;
传输模块930,设置为将目标操作指令传输至服务器端。
在一实施例中,第一确定模块910,包括:
第一确定单元,设置为确定相邻两个的同一触发操作之间的操作间隔;
第二确定单元,设置为根据操作间隔和预设间隔阈值确定原始操作指令的指令类型。
在一实施例中,在指令类型为频繁操作指令的情况下,第二确定模块,包括:
第一获取单元,设置为获取原始操作指令所对应的前N次操作指令,作为冗余指令;
组合单元,设置为对原始操作指令和冗余指令进行组合,得到对应的目标操作指令。
在一实施例中,在指令类型为非频繁操作指令的情况下,第二确定模块,,包括:
第二获取单元,设置为获取原始操作指令对应的重复指令,作为保护指令;
第三确定单元,设置为将保护指令作为目标操作指令。
在一实施例中,传输模块,包括:
第一发送单元,设置为将原始操作指令发送至服务器端;
第二发送单元,设置为在原始操作指令的已发送时长达到第一预设时长时,按照初始重传周期和重传周期退避规则发送重复指令至服务器端。
在一实施例中,初始重传周期的确定方式,包括:
根据当前网络状态确定客户端所在当前网络的剩余带宽;
根据剩余带宽、每个重传包所占用比特数和指令最小响应时间确定初始重传周期。
在一实施例中,应用于客户端的数据传输装置,还包括:
第一发送模块,设置为定时向服务器端发送未确认NACK信息,其中,NACK信息携带未接收到的所有指令包的序号。
在一实施例中,应用于客户端的数据传输装置,还包括:
接收模块,设置为接收服务器端反馈的ACK信息;
第二确定模块,设置为确定ACK信息的当前接收时间与ACK信息的上一次接收时间之间的接收时间间隔;
生成模块,设置为在接收时间间隔达到第二预设时长时,生成ACK信息所对应指令包的响应信息,其中,响应信息包括接收时间间隔内未接收到的所有指令包的序号;
反馈模块,设置为将响应信息反馈至服务器端。
在一实施例中,在客户端所在网络的当前上行带宽低于预设带宽阈值时,传输模块,设置为:按照预设发送规则将目标操作指令中的原始操作指令发送至服务器端;
其中,预设发送规则满足下述条件:未遵循拥塞窗口CWND或速率控制策略;减少目标操作指令中保护指令的数量。
在一实施例中,应用于客户端的数据传输装置,还包括:
通过应用层的预设属性设置接口和指令关联关系对原始操作指令补充所对应丢失指令的坐标值。
上述数据传输装置可执行本发明任意实施例所提供的应用于客户端的数据传输方法,具备执行方法相应的功能模块和有益效果。
图10是本公开实施例提供的一种电子设备的结构框图。下面参考图10,其示出了适于用来实现本公开实施例的电子设备(例如终端设备、服务器或计算机)1000的结构示意图。本公开实施例中的计算机可以包括但不限于诸如移动电话、笔记本电脑、数字广播接收器、PDA(个人数字助理)、PAD(平板电脑)、PMP(便携式多媒体播放器)、车载终端(例如车载导航终端)等等的移动终端以及诸如数字TV、台式计算机等等的固定终端。图10示出的电子设备仅仅是一个示例,不应对本公开实施例的功能和使用范围带来任何限制。
如图10所示,电子设备1000可以包括处理装置(例如中央处理器、图形处理器等)1001,其可以根据存储在只读存储器(ROM)1002中的程序或者从存储装置1006加载到随机访问存储器(RAM)1003中的程序而执行多种适当的动作和处理。在RAM 1003中,还存储有电子设备1000操作所需的多种程序和数据。处理装置1001、ROM 1002以及RAM 1003通过总线1004彼此相连。输入/输出(I/O)接口1005也连接至总线1004。
通常,以下装置可以连接至I/O接口1005:包括例如触摸屏、触摸板、键盘、鼠标、摄 像头、麦克风、加速度计、陀螺仪等的输入装置1006;包括例如液晶显示器(LCD)、扬声器、振动器等的输出装置1007;包括例如磁带、硬盘等的存储装置1006;以及通信装置1009。通信装置1009可以允许电子设备1000与其他设备进行无线或有线通信以交换数据。虽然图10示出了具有多种装置的电子设备1000,但是应理解的是,并不要求实施或具备所有示出的装置。可以替代地实施或具备更多或更少的装置。
特别地,根据本公开的实施例,上文参考流程图描述的过程可以被实现为计算机软件程序。例如,本公开的实施例包括一种计算机程序产品,其包括承载在非暂态计算机可读介质上的计算机程序,该计算机程序包含用于执行流程图所示的方法的程序代码。在这样的实施例中,该计算机程序可以通过通信装置1009从网络上被下载和安装,或者从存储装置1006被安装,或者从ROM 1002被安装。在该计算机程序被处理装置1001执行时,执行本公开实施例的方法中限定的上述功能。
需要说明的是,本公开上述的计算机可读介质可以是计算机可读信号介质或者计算机可读存储介质或者是上述两者的任意组合。计算机可读存储介质例如可以是——但不限于——电、磁、光、电磁、红外线、或半导体的系统、装置或器件,或者任意以上的组合。计算机可读存储介质的更具体的例子可以包括但不限于:具有一个或多个导线的电连接、便携式计算机磁盘、硬盘、随机访问存储器(RAM)、只读存储器(ROM)、可擦式可编程只读存储器(EPROM或闪存)、光纤、便携式紧凑磁盘只读存储器(CD-ROM)、光存储器件、磁存储器件、或者上述的任意合适的组合。在本公开中,计算机可读存储介质可以是任何包含或存储程序的有形介质,该程序可以被指令执行系统、装置或者器件使用或者与其结合使用。而在本公开中,计算机可读信号介质可以包括在基带中或者作为载波一部分传播的数据信号,其中承载了计算机可读的程序代码。这种传播的数据信号可以采用多种形式,包括但不限于电磁信号、光信号或上述的任意合适的组合。计算机可读信号介质还可以是计算机可读存储介质以外的任何计算机可读介质,该计算机可读信号介质可以发送、传播或者传输用于由指令执行系统、装置或者器件使用或者与其结合使用的程序。计算机可读介质上包含的程序代码可以用任何适当的介质传输,包括但不限于:电线、光缆、RF(射频)等等,或者上述的任意合适的组合。
在一些实施方式中,客户端、服务器可以利用诸如HTTP(HyperText Transfer Protocol,超文本传输协议)之类的任何当前已知或未来研发的网络协议进行通信,并且可以与任意形式或介质的数字数据通信(例如,通信网络)互连。通信网络的示例包括局域网(“LAN”),广域网(“WAN”),网际网(例如,互联网)以及端对端网络(例如,ad hoc端对端网络),以及任何当前已知或未来研发的网络。
上述计算机可读介质可以是上述电子设备中所包含的;也可以是单独存在,而未装配入该电子设备中。
上述计算机可读介质承载有一个或者多个程序,当上述一个或者多个程序被该电子设备执行时,使得该电子设备:响应于对目标云游戏的触发操作,确定触发操作所对应原始操作指令的指令类型;根据指令类型对原始操作指令配置对应的保护指令,得到目标操作指令;将目标操作指令传输至服务器端。
可以以一种或多种程序设计语言或其组合来编写用于执行本公开的操作的计算机程序代码,上述程序设计语言包括但不限于面向对象的程序设计语言—诸如Java、Smalltalk、C++,还包括常规的过程式程序设计语言—诸如“C”语言或类似的程序设计语言。程序代码可以完全地在用户计算机上执行、部分地在用户计算机上执行、作为一个独立的软件包执行、部分在用户计算机上部分在远程计算机上执行、或者完全在远程计算机或服务器上执行。在涉及远程计算机的情形中,远程计算机可以通过任意种类的网络——包括局域网(LAN)或广域网(WAN)—连接到用户计算机,或者,可以连接到外部计算机(例如利用因特网服务提供商来通过因特网连接)。
附图中的流程图和框图,图示了按照本公开多种实施例的系统、方法和计算机程序产品 的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段、或代码的一部分,该模块、程序段、或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现中,方框中所标注的功能也可以以不同于附图中所标注的顺序发生。例如,两个接连地表示的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或操作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
描述于本公开实施例中所涉及到的单元可以通过软件的方式实现,也可以通过硬件的方式来实现。其中,单元的名称在某种情况下并不构成对该单元本身的限定,例如,第一获取单元还可以被描述为“获取至少两个网际协议地址的单元”。
本文中以上描述的功能可以至少部分地由一个或多个硬件逻辑部件来执行。例如,非限制性地,可以使用的示范类型的硬件逻辑部件包括:现场可编程门阵列(FPGA)、专用集成电路(ASIC)、专用标准产品(ASSP)、片上系统(SOC)、复杂可编程逻辑设备(CPLD)等等。
在本公开的上下文中,机器可读介质可以是有形的介质,其可以包含或存储以供指令执行系统、装置或设备使用或与指令执行系统、装置或设备结合地使用的程序。机器可读介质可以是机器可读信号介质或机器可读储存介质。机器可读介质可以包括但不限于电子的、磁性的、光学的、电磁的、红外的、或半导体系统、装置或设备,或者上述内容的任何合适组合。机器可读存储介质的更具体示例会包括基于一个或多个线的电气连接、便携式计算机盘、硬盘、随机存取存储器(RAM)、只读存储器(ROM)、可擦除可编程只读存储器(EPROM或快闪存储器)、光纤、便捷式紧凑盘只读存储器(CD-ROM)、光学储存设备、磁储存设备、或上述内容的任何合适组合。
根据本公开的一个或多个实施例,提供了一种应用于客户端的数据传输方法,该方法包括:响应于对目标云游戏的触发操作,确定所述触发操作所对应原始操作指令的指令类型;根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令;将所述目标操作指令传输至服务器端。
根据本公开的一个或多个实施例,所述确定所述触发操作所对应原始操作指令的指令类型,包括:确定相邻两个的同一触发操作之间的操作间隔;根据所述操作间隔和预设间隔阈值确定原始操作指令的指令类型。
根据本公开的一个或多个实施例,在所述指令类型为频繁操作指令的情况下,所述根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令,包括:获取所述原始操作指令所对应的前N次操作指令,作为冗余指令;对所述原始操作指令和所述冗余指令进行组合,得到对应的目标操作指令。
根据本公开的一个或多个实施例,在所述指令类型为非频繁操作指令的情况下,所述根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令,包括:获取所述原始操作指令对应的重复指令,作为保护指令;将所述保护指令作为目标操作指令。
根据本公开的一个或多个实施例,所述将所述目标操作指令传输至服务器端,包括:将所述原始操作指令发送至服务器端;在所述原始操作指令的已发送时长达到第一预设时长时,按照初始重传周期和重传周期退避规则发送重复指令至服务器端。
根据本公开的一个或多个实施例,所述初始重传周期的确定方式,包括:
根据当前网络状态确定所述客户端所在当前网络的剩余带宽;
根据所述剩余带宽、每个重传包所占用比特数和指令最小响应时间确定初始重传周期。
根据本公开的一个或多个实施例,应用于客户端的数据传输方法还包括:
定时向服务器端发送未确认NACK信息,其中,所述NACK信息携带未接收到的所有指令包的序号。
根据本公开的一个或多个实施例,应用于客户端的数据传输方法,还包括:接收服务器 端反馈的ACK信息;
确定所述ACK信息的当前接收时间与ACK信息的上一次接收时间之间的接收时间间隔;
在所述接收时间间隔达到第二预设时长时,生成所述ACK信息所对应指令包的响应信息,其中,所述响应信息包括所述接收时间间隔内未接收到的所有指令包的序号;
将所述响应信息反馈至服务器端。
根据本公开的一个或多个实施例,在所述客户端所在网络的当前上行带宽低于预设带宽阈值时,所述将所述目标操作指令传输至服务器端,包括:
按照预设发送规则将所述目标操作指令中的原始操作指令发送至服务器端;
其中,预设发送规则满足下述条件:未遵循拥塞窗口CWND或速率控制策略;减少所述目标操作指令中保护指令的数量。
根据本公开的一个或多个实施例,应用于客户端的数据传输方法,还包括:通过应用层的预设属性设置接口和指令关联关系对所述原始操作指令补充所对应丢失指令的坐标值。
此外,虽然采用特定次序描绘了多种操作,但是这不应当理解为要求这些操作以所示出的特定次序或以顺序次序执行来执行。在一定环境下,多任务和并行处理可能是有利的。同样地,虽然在上面论述中包含了若干具体实现细节,但是这些不应当被解释为对本公开的范围的限制。在单独的实施例的上下文中描述的某些特征还可以组合地实现在单个实施例中。相反地,在单个实施例的上下文中描述的多种特征也可以单独地或以任何合适的子组合的方式实现在多个实施例中。

Claims (13)

  1. 一种数据传输方法,应用于客户端,包括:
    响应于对目标云游戏的触发操作,确定所述触发操作所对应原始操作指令的指令类型;
    根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令;
    将所述目标操作指令传输至服务器端。
  2. 根据权利要求1所述的方法,其中,所述确定所述触发操作所对应原始操作指令的指令类型,包括:
    确定相邻两个同一触发操作之间的操作间隔;
    根据所述操作间隔和预设间隔阈值确定所述原始操作指令的指令类型。
  3. 根据权利要求1所述的方法,其中,响应于确定所述指令类型为频繁操作指令,所述根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令,包括:
    获取所述原始操作指令所对应的前N次操作指令,作为冗余指令;
    对所述原始操作指令和所述冗余指令进行组合,得到对应的目标操作指令;
    其中,N为大于或等于1的正整数。
  4. 根据权利要求1所述的方法,其中,响应于确定所述指令类型为非频繁操作指令,所述根据所述指令类型对所述原始操作指令配置对应的保护指令,得到目标操作指令,包括:
    获取所述原始操作指令对应的重复指令,作为保护指令;
    将所述保护指令作为目标操作指令。
  5. 根据权利要求4所述的方法,其中,所述将所述目标操作指令传输至服务器端,包括:
    将所述原始操作指令发送至服务器端;
    响应于确定所述原始操作指令的已发送时长达到第一预设时长,按照初始重传周期和重传周期退避规则发送所述重复指令至服务器端。
  6. 根据权利要求5所述的方法,其中,所述初始重传周期的确定方式,包括:
    根据当前网络状态确定所述客户端所在当前网络的剩余带宽;
    根据所述剩余带宽、每个重传包所占用比特数和指令最小响应时间确定初始重传周期。
  7. 根据权利要求1所述的方法,还包括:
    定时向所述服务器端发送未确认NACK信息,其中,所述NACK信息携带未接收到的所有指令包的序号。
  8. 根据权利要求1所述的方法,还包括:
    接收所述服务器端反馈的ACK信息;
    确定所述ACK信息的当前接收时间与所述ACK信息的上一次接收时间之间的接收时间间隔;
    响应于确定所述接收时间间隔达到第二预设时长,生成所述ACK信息所对应指令包的响应信息,其中,所述响应信息包括所述接收时间间隔内未接收到的所有指令包的序号;
    将所述响应信息反馈至服务器端。
  9. 根据权利要求1所述的方法,其中,响应于确定所述客户端所在网络的当前上行带宽低于预设带宽阈值,所述将所述目标操作指令传输至服务器端,包括:
    按照预设发送规则将所述目标操作指令中的原始操作指令发送至所述服务器端;
    其中,所述预设发送规则满足下述条件:未遵循拥塞窗口CWND或速率控制策略;减少所述目标操作指令中保护指令的数量。
  10. 根据权利要求1所述的方法,还包括:
    通过应用层的预设属性设置接口和指令关联关系对所述原始操作指令补充所对应丢失指令的坐标值。
  11. 一种数据传输装置,应用于客户端,包括:
    第一确定模块,设置为响应于对目标云游戏的触发操作,确定所述触发操作所对应原始操作指令的指令类型;
    第二确定模块,设置为根据所述指令类型对所述原始操作指令配置对应的保护指令,得 到目标操作指令;
    传输模块,设置为将所述目标操作指令传输至服务器端。
  12. 一种电子设备,包括:
    一个或多个处理器;
    存储器,设置为存储一个或多个程序;
    当所述一个或多个程序被所述一个或多个处理器执行,使得所述一个或多个处理器实现如权利要求1-10任一项所述的数据传输方法。
  13. 一种计算机存储介质,所述介质存储有计算机程序,所述计算机程序被处理器执行时实现如权利要求1-10任一项所述的数据传输方法。
PCT/CN2022/128847 2021-11-08 2022-11-01 数据传输方法、装置、设备和介质 WO2023078222A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111313978.X 2021-11-08
CN202111313978.XA CN114039702B (zh) 2021-11-08 2021-11-08 数据传输方法、装置、设备和介质

Publications (1)

Publication Number Publication Date
WO2023078222A1 true WO2023078222A1 (zh) 2023-05-11

Family

ID=80143380

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/128847 WO2023078222A1 (zh) 2021-11-08 2022-11-01 数据传输方法、装置、设备和介质

Country Status (2)

Country Link
CN (1) CN114039702B (zh)
WO (1) WO2023078222A1 (zh)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039702B (zh) * 2021-11-08 2024-03-26 北京字节跳动网络技术有限公司 数据传输方法、装置、设备和介质

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333815A (zh) * 2019-06-21 2019-10-15 腾讯科技(成都)有限公司 触控事件处理方法和装置
CN110572469A (zh) * 2019-09-18 2019-12-13 北京视博云科技有限公司 数据传输方法、输入设备、云端服务器及云游戏系统
WO2020097871A1 (zh) * 2018-11-15 2020-05-22 深圳市欢太科技有限公司 数据传输方法及相关产品
CN111818005A (zh) * 2019-12-26 2020-10-23 厦门雅基软件有限公司 数据包处理方法、装置、电子设备及可读存储介质
US20210031100A1 (en) * 2019-07-30 2021-02-04 Sony Interactive Entertainment LLC Multipath Wireless Controller
CN114039702A (zh) * 2021-11-08 2022-02-11 北京字节跳动网络技术有限公司 数据传输方法、装置、设备和介质

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8374091B2 (en) * 2009-03-26 2013-02-12 Empire Technology Development Llc TCP extension and variants for handling heterogeneous applications
CN109510690B (zh) * 2017-09-14 2020-07-28 华为技术有限公司 传输报文的方法、网络组件和计算机可读存储介质
US10659190B1 (en) * 2019-02-25 2020-05-19 At&T Intellectual Property I, L.P. Optimizing delay-sensitive network-based communications with latency guidance
CN111803940B (zh) * 2020-01-14 2022-05-31 厦门雅基软件有限公司 游戏的处理方法、装置、电子设备及计算机可读存储介质
CN112807678A (zh) * 2021-02-23 2021-05-18 北京字节跳动网络技术有限公司 一种云游戏的实现方法、装置、系统、设备及介质

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2020097871A1 (zh) * 2018-11-15 2020-05-22 深圳市欢太科技有限公司 数据传输方法及相关产品
CN110333815A (zh) * 2019-06-21 2019-10-15 腾讯科技(成都)有限公司 触控事件处理方法和装置
US20210031100A1 (en) * 2019-07-30 2021-02-04 Sony Interactive Entertainment LLC Multipath Wireless Controller
CN110572469A (zh) * 2019-09-18 2019-12-13 北京视博云科技有限公司 数据传输方法、输入设备、云端服务器及云游戏系统
CN111818005A (zh) * 2019-12-26 2020-10-23 厦门雅基软件有限公司 数据包处理方法、装置、电子设备及可读存储介质
CN114039702A (zh) * 2021-11-08 2022-02-11 北京字节跳动网络技术有限公司 数据传输方法、装置、设备和介质

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114039702B (zh) * 2021-11-08 2024-03-26 北京字节跳动网络技术有限公司 数据传输方法、装置、设备和介质

Also Published As

Publication number Publication date
CN114039702B (zh) 2024-03-26
CN114039702A (zh) 2022-02-11

Similar Documents

Publication Publication Date Title
US10009259B2 (en) Multi-path data transfer using network coding
US10630749B2 (en) Timely delivery of real-time media problem when TCP must be used
CN109327288B (zh) 数据传输加速方法、装置及系统
JP2007089174A (ja) 無線通信システムにおける信号の伝送速度を改善する方法及び装置
CN109194450B (zh) 天地一体化网络通信的snack-p应答系统及方法、无线通信系统
WO2023093879A1 (zh) 数据传输方法、装置、设备和介质
KR102046792B1 (ko) 송신 노드로부터 목적지 노드로의 데이터 전송 방법
EP2719132A1 (en) System and method for reliable virtual bi-directional data stream communications with single socket point-to-multipoint capability
WO2019128964A1 (zh) 一种实现丢包检测的方法、装置和系统
US9197373B2 (en) Method, apparatus, and system for retransmitting data packet in quick path interconnect system
US20230071243A1 (en) Conserving network resources during transmission of packets of interactive services
WO2023078222A1 (zh) 数据传输方法、装置、设备和介质
WO2018014552A1 (zh) 用于数据传输的方法和装置
CN108234089B (zh) 用于低时延通信的方法和系统
JP6064593B2 (ja) プログラム、情報処理装置、及び通信方法
US9906331B2 (en) Communication method, information processing apparatus and recording medium
US9294409B2 (en) Reducing round-trip times for TCP communications
CN113242318B (zh) 数据传输方法和电子设备
US20220368765A1 (en) Universal Transport Framework For Heterogeneous Data Streams
US10742561B2 (en) Prevention of network retransmission timeout
US11811877B2 (en) Universal transport framework for heterogeneous data streams
CN117118569A (zh) 数据重传的方法、装置、计算机设备及存储介质
JP2005167352A (ja) 送信装置およびプログラム
Arefin et al. Modified SACK-TCP and some application level techniques to support real-time application
CN111698510A (zh) 一种数据处理的方法、装置及电子设备

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22889247

Country of ref document: EP

Kind code of ref document: A1