Data transmission method, device and system based on cloud game
By collecting and transmitting status data and force feedback data from the input devices in cloud gaming, and utilizing a difference data comparison and priority sending mechanism, the problem of poor user experience in cloud gaming has been solved, user engagement and retention rates have been improved, and data transmission efficiency has been optimized.
Patent Information
- Application Number
- CN202211466173.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2025-11-18
- Estimated Expiration
- 2042-11-22
AI Technical Summary
Existing cloud gaming suffers from poor user experience and low user retention rates.
The first device collects the status data of the cloud gaming operation input device through its browser and transmits it to the second device. The second device generates force feedback data based on the status data and sends it back to the first device to control the input device to generate force feedback. A difference data comparison and priority sending mechanism is used to dynamically adjust the data transmission frequency.
It enhances user engagement and experience in cloud gaming, increases user retention, optimizes data transmission efficiency, and reduces resource consumption and latency.
Smart Images

Figure CN115845361B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of data transmission technology, specifically to a data transmission method, device, and system based on cloud gaming. Background Technology
[0002] Cloud gaming is a gaming service based on cloud computing. In existing technologies, cloud gaming involves a server-side cloud computing process that transmits game audio and video from the server to the client online. Users can participate in the game using cloud gaming input devices such as game controllers, and the client then sends the status data of the cloud gaming input device to the server. However, this existing approach results in a poor user experience and low user retention rates for cloud gaming. Summary of the Invention
[0003] In view of the technical problems of poor user experience and low user retention rate in cloud gaming in the prior art, the present invention proposes an embodiment to provide a data transmission method, device and system based on cloud gaming that overcomes or at least partially solves the above problems.
[0004] According to a first aspect of the present invention, a data transmission method based on cloud gaming is provided, the method comprising: a browser of a first device collecting status data of a cloud gaming operation input device in the first device and transmitting the status data to a second device; the second device generating force feedback data based on the status data and transmitting the force feedback data to the browser of the first device; and the first device controlling the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0005] Optionally, the status data includes the status value of at least one operation key in the cloud gaming operation input device; and / or, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device.
[0006] Optionally, the browser of the first device collects the status data of the cloud gaming operation input device in the first device and transmits the status data to the second device, including: the browser of the first device periodically collects the status data; after collecting the first status data at a first time, it acquires the second status data that has been collected at a second time; the second time is the status data collection time that is earlier than the first time and closest to the first time; it compares the first status data and the second status data to determine the difference data that is different from the second status data; it determines the sending priority of the difference data and the sending frequency corresponding to the sending priority; and it sends the data packets corresponding to the difference data according to the sending frequency.
[0007] Optionally, comparing the first state data and the second state data to determine the difference data that differs from the second state data includes: comparing the state value of the operation key in the first state data with the state value of the operation key in the second state data to determine the target operation key, using the state value of the target operation key in the first state data as the difference data, and the state value of the target operation key in the first state data being different from the state value of the target operation key in the second state data.
[0008] Optionally, transmitting force feedback data to the browser of the first device includes: periodically collecting force feedback data; after collecting the first force feedback data at a third time, acquiring the second force feedback data already collected at a fourth time; the fourth time being the force feedback data collection time earlier than the third time and closest to the third time; comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second force feedback data from the first force feedback data; determining the transmission priority of the difference data and determining the transmission frequency corresponding to the transmission priority; and transmitting the data packets corresponding to the difference data according to the transmission frequency.
[0009] Optionally, comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second force feedback data includes: comparing the force feedback value of the operation key in the first force feedback data with the force feedback value of the operation key in the second force feedback data to determine the target operation key, using the force feedback value of the target operation key in the first force feedback data as the difference data, and the force feedback value of the target operation key in the first force feedback data being different from the force feedback value of the target operation key in the second force feedback data.
[0010] Optionally, determining the sending priority of the difference data includes: determining each target operation key corresponding to the difference data; and determining the sending priority of the difference data based on the operation key type of each target operation key.
[0011] Optionally, determining the transmission priority of the differential data based on the operation key type of the target operation key further includes: if at least one of the target operation keys is a digital signal operation key, then the transmission priority of the differential data is determined to be the highest priority; if all the target operation keys are analog signal operation keys, then the transmission priority corresponding to any target operation key is determined based on the status value or force feedback value of any target operation key, and the transmission priority of the differential data is determined based on the transmission priorities corresponding to each target operation key.
[0012] Optionally, determining the transmission priority corresponding to any target operation key based on its status value or force feedback value further includes: for any target operation key, calculating the difference between the status value of the target operation key in the first status data and the status value in the second status data, and determining the transmission priority corresponding to the target operation key based on the difference; or, for any target operation key, calculating the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data, and determining the transmission priority corresponding to the target operation key based on the difference.
[0013] Optionally, determining the transmission priority corresponding to the target operation key based on the difference includes: if the difference is greater than a first threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than a second threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0014] Optionally, determining the transmission priority corresponding to any target operation key based on the status value or force feedback value of any target operation key further includes: for any target operation key, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data; or, for any target operation key, determining the transmission priority corresponding to the target operation key based on the force feedback value of the target operation key in the first force feedback data.
[0015] Optionally, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data includes: if the status value is greater than a third threshold, the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than a fourth threshold, the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the fourth threshold and less than or equal to the third threshold, the transmission priority corresponding to the target operation key is determined to be the intermediate priority. Determining the transmission priority corresponding to the target operation key based on the force feedback value of the target operation key in the first force feedback data includes: if the force feedback value is greater than a fifth threshold, the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than a sixth threshold, the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the sixth threshold and less than or equal to the fifth threshold, the transmission priority corresponding to the target operation key is determined to be the intermediate priority.
[0016] Optionally, determining the transmission frequency corresponding to the transmission priority includes: if the transmission priority is the highest priority, then the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is the lowest priority, then the transmission frequency corresponding to the transmission priority is a second preset transmission frequency; the second preset transmission frequency is lower than the first preset transmission frequency; if the transmission priority is an intermediate priority, then each target operation key corresponding to the difference data is determined, and the transmission frequency corresponding to the transmission priority is determined according to the status value or force feedback value of each target operation key; wherein, the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0017] Optionally, according to the transmission frequency, transmitting the data packet corresponding to the difference data further includes: obtaining the transmission time of the last transmitted data packet; calculating the transmission interval corresponding to the difference data based on the transmission frequency; and transmitting the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0018] Optionally, before sending the data packet corresponding to the difference data, the method further includes: assigning a packet sequence number to the data packet corresponding to the difference data; before the first device controls the cloud gaming operation input device to generate force feedback based on the force feedback data, the method further includes: the first device receiving the data packet of force feedback data and parsing the data packet to obtain the packet sequence number of the data packet; and / or, before the second device generates force feedback data based on the status data, the method further includes: the second device receiving the data packet of status data and parsing the data packet to obtain the packet sequence number of the data packet.
[0019] Optionally, after the first device receives the force feedback data packet and parses the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the previously received force feedback data packet; if yes, retain the data packet; if no, discard the data packet; and / or, after the second device receives the status data packet and parses the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the previously received status data packet; if yes, retain the data packet; if no, discard the data packet.
[0020] Optionally, the first device includes a first buffer, which stores at least one historically received force feedback data packet; after the first device receives the force feedback data packet and parses the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet in the first buffer; if so, storing the data packet in the first buffer and selecting the data packet with the smallest packet sequence number in the first buffer as the data packet to be sent; if not, using the data packet as the data packet to be sent; if the packet sequence number of the data packet to be sent is greater than the packet sequence number of the data packet already sent to the browser, sending the data packet to be sent to the browser; if the packet sequence number of the data packet to be sent is less than the packet sequence number of the data packet already sent to the browser, discarding the data packet to be sent; and / or Alternatively, the second device includes a second buffer that stores at least one historically received status data packet. After receiving the status data packet and parsing it to obtain the packet sequence number, the second device further includes: determining whether the packet sequence number of the packet is greater than the packet sequence number of the packet in the second buffer; if so, storing the packet in the second buffer and using the packet with the smallest packet sequence number in the second buffer as the packet to be sent; if not, using the packet as the packet to be sent; if the packet sequence number of the packet to be sent is greater than the packet sequence number of the packet already sent to the processing module, sending the packet to be sent to the processing module; if the packet sequence number of the packet to be sent is less than the packet sequence number of the packet already sent to the processing module, discarding the packet to be sent.
[0021] According to a second aspect of the present invention, a data transmission method based on cloud gaming is provided. The method is executed on a first device side, and the method includes: a browser collecting status data of a cloud gaming operation input device in the first device; the browser transmitting the status data to a second device so that the second device can generate force feedback data based on the status data; and the browser receiving the force feedback data sent by the second device so that the cloud gaming operation input device can be controlled to generate force feedback based on the force feedback data.
[0022] Optionally, the status data includes the status value of at least one operation key in the cloud gaming operation input device.
[0023] Optionally, the browser's collection of status data from the cloud gaming operation input device in the first device includes: the browser periodically collecting status data; the browser transmitting the status data to the second device includes: after collecting the first status data at a first time, acquiring the second status data that has already been collected at a second time; wherein, the second time is the status data collection time that is earlier than the first time and closest to the first time; comparing the first status data and the second status data to determine the difference data that is different from the second status data from the first status data; determining the sending priority of the difference data and determining the sending frequency corresponding to the sending priority; and sending the data packets corresponding to the difference data according to the sending frequency.
[0024] Optionally, comparing the first state data and the second state data to determine the difference data that differs from the second state data includes: comparing the state value of the operation key in the first state data with the state value of the operation key in the second state data to determine the target operation key, and using the state value of the target operation key in the first state data as the difference data; the state value of the target operation key in the first state data is different from the state value of the target operation key in the second state data.
[0025] Optionally, determining the sending priority of the difference data includes: determining each target operation key corresponding to the difference data; and determining the sending priority of the difference data based on the operation key type of each target operation key.
[0026] Optionally, determining the transmission priority of the difference data based on the operation key type of the target operation key includes: if at least one of the target operation keys is a digital signal operation key, the transmission priority of the difference data is determined to be the highest priority; if all the target operation keys are analog signal operation keys, the transmission priority corresponding to any target operation key is determined based on the state value of that target operation key, and the transmission priority of the difference data is determined based on the transmission priorities corresponding to each target operation key.
[0027] Optionally, determining the transmission priority corresponding to any target operation key based on the state value of any target operation key includes: for any target operation key, calculating the difference between the state value of the target operation key in the first state data and the state value in the second state data, and determining the transmission priority corresponding to the target operation key based on the difference.
[0028] Optionally, determining the transmission priority corresponding to the target operation key based on the difference includes: if the difference is greater than a first threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than a second threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0029] Optionally, determining the transmission priority corresponding to any target operation key based on the status value of any target operation key includes: for any target operation key, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data.
[0030] Optionally, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data includes: if the status value is greater than a third threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than a fourth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the fourth threshold and less than or equal to the third threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0031] Optionally, the transmission frequency corresponding to the specified transmission priority includes: if the transmission priority is the highest priority, then the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is the lowest priority, then the transmission frequency corresponding to the transmission priority is a second preset transmission frequency; the second preset transmission frequency is lower than the first preset transmission frequency; if the transmission priority is an intermediate priority, then each target operation key corresponding to the difference data is determined, and the transmission frequency corresponding to the transmission priority is determined according to the state value of each target operation key; wherein, the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0032] Optionally, according to the transmission frequency, the data packet corresponding to the difference data is transmitted includes: obtaining the transmission time of the last transmitted data packet; calculating the transmission interval corresponding to the difference data based on the transmission frequency; and transmitting the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0033] Optionally, before sending the data packet corresponding to the difference data, the method further includes: assigning a packet sequence number to the data packet corresponding to the difference data; before controlling the cloud gaming operation input device to generate force feedback based on the force feedback data, the method further includes: receiving the data packet of force feedback data and parsing the data packet to obtain the packet sequence number of the data packet.
[0034] Optionally, after receiving the force feedback data packet and parsing the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the previously received force feedback data packet; if so, retaining the data packet; if not, discarding the data packet.
[0035] Optionally, the first device includes a first buffer, which stores at least one historically received force feedback data packet. After receiving the force feedback data packet and parsing it to obtain its sequence number, the method further includes: determining whether the sequence number of the received data packet is greater than the sequence number of the data packet in the first buffer; if so, storing the data packet in the first buffer and using the data packet with the smallest sequence number in the first buffer as the data packet to be sent; if not, using the received data packet as the data packet to be sent; if the sequence number of the data packet to be sent is greater than the sequence number of the data packet already sent to the browser, sending the data packet to be sent to the browser; if the sequence number of the data packet to be sent is less than the sequence number of the data packet already sent to the browser, discarding the data packet to be sent.
[0036] According to a third aspect of the present invention, a data transmission method based on cloud gaming is provided. The method is executed on a second device side. The method includes: receiving status data of a cloud gaming operation input device in a first device sent by a browser of a first device; generating force feedback data based on the status data; and transmitting the force feedback data to the browser of the first device, so that the first device can control the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0037] Optionally, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device.
[0038] Optionally, transmitting force feedback data to the browser of the first device includes: periodically collecting force feedback data; after collecting the first force feedback data at a third time, acquiring the second force feedback data already collected at a fourth time; the fourth time being the force feedback data collection time earlier than the third time and closest to the third time; comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second state data from the first state data; determining the transmission priority of the difference data and the transmission frequency corresponding to the transmission priority; and transmitting the data packets corresponding to the difference data according to the transmission frequency.
[0039] Optionally, comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second state data from the first state data further includes: comparing the force feedback value of the operation key in the first force feedback data with the force feedback value of the operation key in the second force feedback data to determine the target operation key, and using the force feedback value of the target operation key in the first force feedback data as the difference data; the force feedback value of the target operation key in the first force feedback data is different from the force feedback value of the target operation key in the second force feedback data.
[0040] Optionally, determining the sending priority of the difference data includes: determining each target operation key corresponding to the difference data; and determining the sending priority of the difference data based on the operation key type of each target operation key.
[0041] Optionally, determining the transmission priority of the differential data based on the operation key type of the target operation key further includes: if at least one of the target operation keys is a digital signal operation key, then the transmission priority of the differential data is determined to be the highest priority; if the operation key type of each target operation key is an analog signal operation key, then the transmission priority corresponding to that target operation key is determined based on the force feedback value of any target operation key, and the transmission priority of the differential data is determined based on the transmission priorities corresponding to each target operation key.
[0042] Optionally, determining the transmission priority corresponding to any target operation key based on the force feedback value of any target operation key further includes: for any target operation key, calculating the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data, and determining the transmission priority corresponding to the target operation key based on the difference.
[0043] Optionally, determining the transmission priority corresponding to the target operation key based on the difference includes: if the difference is greater than a first threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than a second threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0044] Optionally, determining the transmission priority corresponding to any target operation key based on the force feedback value of any target operation key further includes: for any target operation key, determining the transmission priority corresponding to the target operation key based on the force feedback value of the target operation key in the first force feedback data.
[0045] Optionally, determining the transmission priority corresponding to the target operation key based on the force feedback value in the first force feedback data includes: if the force feedback value is greater than the fifth threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than the sixth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the sixth threshold and the status value is less than or equal to the fifth threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0046] Optionally, determining the transmission frequency corresponding to the transmission priority further includes: if the transmission priority is the highest priority, then the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is the lowest priority, then the transmission frequency corresponding to the transmission priority is a second preset transmission frequency; the second preset transmission frequency is lower than the first preset transmission frequency; if the transmission priority is an intermediate priority, then each target operation key corresponding to the difference data is determined, and the transmission frequency corresponding to the transmission priority is determined based on the force feedback value of each target operation key; wherein, the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0047] Optionally, according to the transmission frequency, transmitting the data packet corresponding to the difference data further includes: obtaining the transmission time of the last transmitted data packet; calculating the transmission interval corresponding to the difference data based on the transmission frequency; and transmitting the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0048] Optionally, before sending the data packet corresponding to the difference data, the method further includes: assigning a packet sequence number to the data packet corresponding to the difference data; before generating force feedback data based on the state data, the method further includes: receiving the data packet of the state data and parsing the data packet to obtain the packet sequence number of the data packet.
[0049] Optionally, after receiving the data packet containing the status data and parsing the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the previously received status data data packet; if so, retaining the data packet; if not, discarding the data packet.
[0050] The optional second device includes a second buffer, which stores at least one historically received status data packet. After receiving the status data packet and parsing it to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the received packet is greater than the packet sequence number of the packet in the second buffer; if so, storing the packet in the second buffer and using the packet with the smallest sequence number in the second buffer as the packet to be sent; if not, using the received packet as the packet to be sent; if the packet sequence number of the packet to be sent is greater than the packet sequence number of the packet already sent to the processing module, sending the packet to be sent to the processing module; if the packet sequence number of the packet to be sent is less than the packet sequence number of the packet already sent to the processing module, discarding the packet to be sent.
[0051] According to a fourth aspect of the present invention, a first device is provided, the first device comprising: a browser, configured to collect status data of a cloud gaming operation input device in the first device and transmit the status data to a second device, so that the second device can generate force feedback data based on the status data; and the browser receiving the force feedback data sent by the second device; and a cloud gaming operation input device, configured to generate force feedback based on the force feedback data.
[0052] Optionally, the status data includes the status value of at least one operation key in the cloud gaming operation input device.
[0053] Optionally, the browser is used to: periodically collect state data; after collecting first state data at a first time, acquire second state data that has already been collected at a second time; the second time is the state data collection time that is earlier than the first time and closest to the first time; compare the first state data and the second state data to determine the difference data that is different from the second state data from the first state data; determine the sending priority of the difference data and determine the sending frequency corresponding to the sending priority; and send the data packets corresponding to the difference data according to the sending frequency.
[0054] Optionally, the browser is used to: compare the state value of the operation key in the first state data with the state value of the operation key in the second state data to determine the target operation key, and use the state value of the target operation key in the first state data as the difference data; the state value of the target operation key in the first state data is different from the state value of the target operation key in the second state data.
[0055] Optionally, the browser is used to: determine each target operation key corresponding to the difference data; and determine the sending priority of the difference data according to the operation key type of each target operation key.
[0056] Optionally, the browser is used to: if at least one of the target operation keys is a digital signal operation key, then determine the transmission priority of the difference data as the highest priority; if the operation key type of each target operation key is an analog signal operation key, then determine the transmission priority corresponding to that target operation key based on the state value of any target operation key, and determine the transmission priority of the difference data based on the transmission priorities corresponding to each target operation key.
[0057] Optionally, the browser is used to: for any target operation key, calculate the difference between the state value of the target operation key in the first state data and the state value in the second state data, and determine the sending priority corresponding to the target operation key based on the difference.
[0058] Optionally, the browser is configured to: if the difference is greater than a first threshold, determine that the sending priority corresponding to the target operation key is the highest priority; if the difference is less than a second threshold, determine that the sending priority corresponding to the target operation key is the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, determine that the sending priority corresponding to the target operation key is the middle priority.
[0059] Optionally, the browser is used to: for any target operation key, determine the sending priority corresponding to the target operation key based on the status value of the target operation key in the first status data.
[0060] Optionally, the browser is configured to: if the status value is greater than the third threshold, determine that the sending priority corresponding to the target operation key is the highest priority; if the status value is less than the fourth threshold, determine that the sending priority corresponding to the target operation key is the lowest priority; if the status value is greater than or equal to the fourth threshold and less than or equal to the third threshold, determine that the sending priority corresponding to the target operation key is the middle priority.
[0061] Optionally, the browser may: if the sending priority is the highest priority, then the sending frequency corresponding to the sending priority is the first preset sending frequency; if the sending priority is the lowest priority, then the sending frequency corresponding to the sending priority is the second preset sending frequency; the second preset sending frequency is lower than the first preset sending frequency; if the sending priority is the middle priority, then each target operation key corresponding to the difference data is determined, and the sending frequency corresponding to the sending priority is determined according to the status value of each target operation key; the sending frequency corresponding to the sending priority is greater than the second preset sending frequency and less than the first preset sending frequency.
[0062] Optionally, the browser is used to: obtain the sending time of the last data packet; calculate the sending interval corresponding to the difference data based on the sending frequency; and send the data packet corresponding to the difference data when the interval between the current time and the sending time reaches the sending interval.
[0063] Optionally, the browser is used to: assign packet sequence numbers to the data packets corresponding to the difference data; receive data packets of force feedback data; and parse the data packets to obtain the packet sequence numbers of the data packets.
[0064] Optionally, the browser is used to: determine whether the sequence number of the data packet is greater than the sequence number of the data packets of the previously received force feedback data; if so, retain the data packet; if not, discard the data packet.
[0065] Optionally, the first device includes a first buffer and a receiving control module. The first buffer stores at least one historically received force feedback data packet. The receiving control module is configured to: after receiving the force feedback data packet and parsing the data packet to obtain the packet sequence number, determine whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet in the first buffer; if so, store the data packet in the first buffer and take the data packet with the smallest packet sequence number in the first buffer as the data packet to be sent; if not, take the data packet as the data packet to be sent; if the packet sequence number of the data packet to be sent is greater than the packet sequence number of the data packet already sent to the browser, send the data packet to be sent to the browser; if the packet sequence number of the data packet to be sent is less than the packet sequence number of the data packet already sent to the browser, discard the data packet to be sent.
[0066] According to a fifth aspect of the present invention, a second device is provided, the second device comprising: a transmission module, configured to receive status data of a cloud gaming operation input device in the first device sent by a browser of a first device; and to transmit force feedback data to the browser of the first device, so that the first device controls the cloud gaming operation input device to generate force feedback based on the force feedback data; and a processing module, configured to generate force feedback data based on the status data.
[0067] Optionally, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device.
[0068] Optionally, the transmission module is used to: periodically collect force feedback data; after collecting the first force feedback data at the third time, acquire the second force feedback data that has already been collected at the fourth time; the fourth time is the force feedback data collection time that is earlier than the third time and closest to the third time; compare the first force feedback data and the second force feedback data to determine the difference data that is different from the second state data from the first state data; determine the transmission priority of the difference data and determine the transmission frequency corresponding to the transmission priority; and transmit the data packets corresponding to the difference data according to the transmission frequency.
[0069] Optionally, the transmission module is used to: compare the force feedback value of the operation key in the first force feedback data with the force feedback value of the operation key in the second force feedback data to determine the target operation key, and use the force feedback value of the target operation key in the first force feedback data as the difference data; wherein the force feedback value of the target operation key in the first force feedback data is different from the force feedback value of the target operation key in the second force feedback data.
[0070] Optionally, the transmission module is used to: determine each target operation key corresponding to the difference data; and determine the transmission priority of the difference data according to the operation key type of each target operation key.
[0071] Optionally, the transmission module is configured to: if at least one of the target operation keys is a digital signal operation key, then determine the transmission priority of the difference data as the highest priority; if all the target operation keys are analog signal operation keys, then determine the transmission priority corresponding to the target operation key based on the force feedback value of any target operation key, and determine the transmission priority of the difference data based on the transmission priorities corresponding to each target operation key.
[0072] Optionally, the transmission module is used to: for any target operation key, calculate the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data, and determine the transmission priority corresponding to the target operation key based on the difference.
[0073] Optionally, the transmission module is configured to: if the difference is greater than a first threshold, determine that the transmission priority corresponding to the target operation key is the highest priority; if the difference is less than a second threshold, determine that the transmission priority corresponding to the target operation key is the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, determine that the transmission priority corresponding to the target operation key is the middle priority.
[0074] Optionally, the transmission module is used to: for any target operation key, determine the transmission priority corresponding to the target operation key based on the force feedback value of the target operation key in the first force feedback data.
[0075] Optionally, the transmission module is configured to: if the force feedback value is greater than the fifth threshold, determine that the transmission priority corresponding to the target operation key is the highest priority; if the status value is less than the sixth threshold, determine that the transmission priority corresponding to the target operation key is the lowest priority; if the status value is greater than or equal to the sixth threshold and the status value is less than or equal to the fifth threshold, determine that the transmission priority corresponding to the target operation key is the middle priority.
[0076] Optionally, the transmission module is configured to: if the sending priority is the highest priority, the sending frequency corresponding to the sending priority is a first preset sending frequency; if the sending priority is the lowest priority, the sending frequency corresponding to the sending priority is a second preset sending frequency; the second preset sending frequency is lower than the first preset sending frequency; if the sending priority is an intermediate priority, determine each target operation key corresponding to the difference data, and determine the sending frequency corresponding to the sending priority based on the force feedback value of each target operation key; the sending frequency corresponding to the sending priority is greater than the second preset sending frequency and less than the first preset sending frequency.
[0077] Optionally, the transmission module is configured to: obtain the transmission time of the last transmitted data packet; calculate the transmission interval corresponding to the difference data according to the transmission frequency; and transmit the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0078] Optionally, the transmission module is configured to: assign a packet sequence number to the data packet corresponding to the difference data; receive the data packet of the status data; and parse the data packet to obtain the packet sequence number of the data packet.
[0079] Optionally, the transmission module is configured to: after receiving the data packet containing the status data and parsing the data packet to obtain the sequence number of the data packet, determine whether the sequence number of the data packet is greater than the sequence number of the data packet containing the previously received status data; if so, retain the data packet; if not, discard the data packet.
[0080] Optionally, the second device includes a second buffer, which stores at least one data packet of historically received status data. The transmission module is configured to: upon receiving a data packet of status data, parse the data packet to obtain its sequence number, and then determine whether the sequence number of the data packet is greater than the sequence number of the data packet in the second buffer; if so, store the data packet in the second buffer and use the data packet with the smallest sequence number in the second buffer as the data packet to be sent; if not, use the data packet as the data packet to be sent; if the sequence number of the data packet to be sent is greater than the sequence number of the data packet already sent to the processing module, send the data packet to be sent to the processing module; if the sequence number of the data packet to be sent is less than the sequence number of the data packet already sent to the processing module, discard the data packet to be sent.
[0081] According to a sixth aspect of the present invention, a cloud gaming-based data transmission system is provided, including the first device and the second device described above.
[0082] According to a seventh aspect of the present invention, a computing device is provided, comprising: a processor, a memory, a communication interface, and a communication bus, wherein the processor, the memory, and the communication interface communicate with each other via the communication bus; the memory is used to store at least one executable instruction, wherein the executable instruction causes the processor to perform the operation corresponding to the above-described cloud gaming-based data transmission method.
[0083] According to an eighth aspect of the present invention, a computer storage medium is provided, wherein at least one executable instruction is stored therein, the executable instruction causing a processor to perform an operation corresponding to a cloud gaming-based data transmission method.
[0084] The embodiments of the present invention enable the browser of the first device to receive force feedback data generated by the second device, thereby generating force feedback in the cloud gaming operation input device of the first device, realizing force feedback in the cloud gaming web page, enhancing the user's sense of immersion and gaming experience in cloud gaming, and improving the retention rate of cloud gaming.
[0085] In this embodiment of the invention, the status data includes the status value of at least one operation key in the cloud gaming operation input device; and / or, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device. This enables fine-grained data transmission.
[0086] In this embodiment of the invention, status data or force feedback data from the cloud gaming operation input device in the first device are periodically collected. After collecting the status data or force feedback data, the data collected this time is compared with the data collected previously to determine the differences. The transmission frequency of the differences is determined according to the transmission priority of the differences. Therefore, a data packet containing the differences is only sent when there are differences between two adjacent data collections, thereby reducing the data transmission frequency, saving transmission resources, and reducing data congestion. Moreover, in this embodiment of the invention, the data transmission frequency is dynamically determined based on the differences, thus ensuring that the transmission frequency matches the importance of the differences and reducing data latency.
[0087] In this embodiment of the invention, the state value of the operation key in the first state data is compared with the state value of the operation key in the second state data to determine the target operation key, and the state value of the target operation key in the first state data is used as the difference data; or, the force feedback value of the operation key in the first state data is compared with the force feedback value of the operation key in the second state data to determine the target operation key, and the force feedback value of the target operation key in the first state data is used as the difference data, thereby accurately determining the difference data.
[0088] In this embodiment of the invention, each target operation key corresponding to the difference data is determined, and the sending priority of the difference data is determined according to the operation key type of each target operation key, so that the sending priority or sending frequency can be adapted to the importance of the difference data.
[0089] In this embodiment of the invention, when at least one of the target operation keys is a digital signal operation key, the transmission priority of the difference data is determined to be the highest priority, thereby enabling operations that significantly cause differences in user perception to be transmitted at a faster speed and reducing data latency.
[0090] In this embodiment of the invention, the transmission priority corresponding to the target operation key is determined based on the difference between the state value or force feedback. This enables the transmission priority to be adapted to the degree of change in state or force feedback, thereby improving the accuracy of data transmission frequency.
[0091] In this embodiment of the invention, the corresponding sending priority is determined according to different ranges of the difference, thereby improving the accuracy of the data sending frequency.
[0092] In this embodiment of the invention, the transmission priority corresponding to the target operation key is determined based on the state value or force feedback value of the target operation key in the first state data, thereby enabling the data transmission frequency to be adapted to the current state or force feedback and improving the accuracy of the data transmission frequency.
[0093] This invention divides the data into intervals based on the current state value or force feedback value, thereby accurately determining the corresponding transmission priority and improving the accuracy of transmission priority determination.
[0094] In this embodiment of the invention, a mapping relationship between transmission priority and transmission frequency is established, which can quickly determine the transmission frequency corresponding to the differential data.
[0095] In this embodiment of the invention, the sending time of the last data packet is obtained, the sending interval corresponding to the difference data is calculated based on the sending frequency, and when the interval between the current time and the sending time reaches the sending interval, the data packet corresponding to the difference data is sent, thereby ensuring that the sending of the data packet is consistent with its corresponding sending frequency and improving the execution accuracy of this embodiment of the invention.
[0096] In this embodiment of the invention, packet sequence numbers are assigned to data packets corresponding to the differential data to enable accurate data processing.
[0097] This invention parses data packets to obtain their sequence numbers, and then determines whether the sequence number of the data packet is greater than the sequence numbers of previously received data packets. If so, the data packet is retained; otherwise, it is discarded. This process effectively removes expired data and ensures data processing accuracy.
[0098] The first or second device in this embodiment of the invention includes a buffer, and stores data packets with large sequence numbers in the buffer, which helps to reduce packet loss rate and improve the orderliness of data packets.
[0099] The above description is merely an overview of the technical solutions of the embodiments of the present invention. In order to better understand the technical means of the embodiments of the present invention and to implement them in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the embodiments of the present invention more obvious and understandable, specific implementation methods of the embodiments of the present invention are described below. Attached Figure Description
[0100] Various other advantages and benefits will become apparent to those skilled in the art upon reading the following detailed description of preferred embodiments. The accompanying drawings are for illustrative purposes only and are not intended to limit the scope of the invention. Furthermore, the same reference numerals denote the same parts throughout the drawings. In the drawings:
[0101] Figure 1 A schematic flowchart of a data transmission method based on cloud gaming provided by an embodiment of the present invention is shown;
[0102] Figure 2 A schematic flowchart of a state data transmission method provided by an embodiment of the present invention is shown;
[0103] Figure 3 This diagram illustrates a transmission priority division for a joystick according to an embodiment of the present invention.
[0104] Figure 4 This diagram illustrates the division of transmission priorities corresponding to a linear trigger according to an embodiment of the present invention.
[0105] Figure 5 This diagram illustrates a data packet transmission time according to an embodiment of the present invention.
[0106] Figure 6 This diagram illustrates a data transmission method according to an embodiment of the present invention.
[0107] Figure 7 A flowchart illustrating a force feedback data transmission method provided by an embodiment of the present invention is shown.
[0108] Figure 8 A flowchart illustrating another data transmission method based on cloud gaming provided by an embodiment of the present invention is shown.
[0109] Figure 9 A schematic flowchart of another data transmission method based on cloud gaming provided by an embodiment of the present invention is shown;
[0110] Figure 10 This diagram illustrates the structure of a first device according to an embodiment of the present invention.
[0111] Figure 11 This diagram illustrates the structure of a second device according to an embodiment of the present invention.
[0112] Figure 12 A schematic diagram of the structure of a data transmission system based on cloud gaming provided by an embodiment of the present invention is shown;
[0113] Figure 13 A schematic diagram of the structure of a computing device provided in an embodiment of the present invention is shown. Detailed Implementation
[0114] Exemplary embodiments of the present invention will now be described in more detail with reference to the accompanying drawings. While exemplary embodiments of the present invention are shown in the drawings, it should be understood that the embodiments of the present invention may be implemented in various forms and should not be limited to the embodiments set forth herein. Rather, these embodiments are provided so that this understanding of the embodiments of the present invention will be thorough and complete, and will fully convey the scope of the embodiments of the present invention to those skilled in the art.
[0115] Figure 1 This diagram illustrates a flowchart of a data transmission method for cloud gaming according to an embodiment of the present invention. Specifically, this embodiment can be executed by a data transmission system for cloud gaming. Specifically, as... Figure 1 As shown, the method includes the following steps:
[0116] Step S110: The browser of the first device collects the status data of the cloud gaming operation input device in the first device.
[0117] The cloud gaming service architecture in this embodiment of the invention includes: a second device that performs cloud computing and sends cloud game audio-visual data, and a second device that receives and displays the cloud game audio-visual data. The first device is specifically a user terminal containing a browser, and the second device can be a server or a user terminal with cloud computing capabilities and running a cloud game client. Specifically, the cloud game audio-visual data refers to the cloud game screen data and / or audio data generated during the operation of the cloud game.
[0118] In a specific cloud gaming service architecture, the server performs cloud computing and sends cloud gaming audio-visual data to the user terminal, which is the first device, and the server is the second device. The user terminal then displays the cloud gaming audio-visual data sent by the server on a browser page; this browser page displaying the cloud gaming audio-visual data can also be called the cloud gaming web page.
[0119] In another specific cloud gaming service architecture, a second user terminal with cloud computing capabilities runs a cloud gaming client located on that terminal. This client collects the audio-visual data of the cloud game during operation and sends this data to a browser on the first user terminal. The browser then displays the cloud game audio-visual data. In this case, the first user terminal is the first device, the second user terminal is the second device, and the browser page displaying the cloud game audio-visual data can be called the cloud gaming web page. A communication connection can be established between the second user terminal and the browser on the first user terminal based on WebRTC (Web Real-Time Communication).
[0120] The browser of the first device collects status data of the cloud gaming input device in the first device. The cloud gaming input device in the first device refers to the device used by the user to control the cloud game. For example, the cloud gaming input device can be a physical game controller, a virtual game controller on a touch screen, a keyboard, and / or a mouse, etc.
[0121] Optionally, the status data of the cloud gaming input device includes the status value of at least one operation key in the cloud gaming input device. This status value specifically reflects the state of the operation key. For example, 0 or 1 can represent the pressed state of a button on a game controller, any value from 0 to 255 can represent the operation state of a linear trigger on a game controller, any value from 0 to 65535 can represent the operation state of a joystick on a game controller, and so on.
[0122] Optionally, the browser of the first device collects the status data of the cloud gaming operation input device in the first device. Specifically, the status data of the cloud gaming operation input device in the first device is collected periodically according to the corresponding data collection cycle, that is, the status data can be collected once every preset time interval.
[0123] Optionally, to accurately collect status data and avoid wasting system resources due to excessively high collection frequency and missing data due to excessively low collection frequency, this embodiment of the invention obtains the polling rate of the cloud gaming operation input device in the first device, generates a data collection cycle based on the polling rate, and then periodically collects the status data of the cloud gaming operation input device in the first device according to the data collection cycle. The polling rate, also known as the refresh rate, represents the frequency at which the cloud gaming operation input device sends data to the connected host. For example, a polling rate of 500Hz means that the cloud gaming operation input device sends status data to the host of the first device every 2 milliseconds. Therefore, the data collection cycle in this embodiment can be matched with the polling rate of the cloud gaming operation input device; for example, if the polling rate is 500Hz, status data is collected every 2 milliseconds. Furthermore, if the polling rate of the cloud gaming operation input device cannot be obtained, a common data collection cycle, such as 240Hz, can be used to periodically collect the status data of the cloud gaming operation input device in the first device.
[0124] In step S120, the browser of the first device transmits the status data to the second device.
[0125] In existing technologies, cloud gaming clients send status data to the server at a fixed frequency, and the server controls the operation of the cloud game. However, when sending status data at a fixed frequency, if the frequency is high, data is sent to the server frequently, which can easily cause data transmission congestion and low data transmission efficiency; if the frequency is low, new status data cannot be sent in a timely manner, resulting in high data latency. Therefore, this invention further improves the status data sending method to reduce the transmission latency of status data and reduce the occurrence of data congestion. The specific implementation process is as follows: Figure 2 The steps S121-S125 are shown below:
[0126] S121: After acquiring the first state data at the first time, acquire the second state data that has been acquired at the second time.
[0127] The second time is the state data acquisition time that is earlier than and closest to the first time. Specifically, the state data acquisition time is the time when the state data of the cloud gaming operation input device in the first device is acquired. The first time can be the latest state data acquisition time, and the second time is earlier than the first time. Furthermore, the second time is the closest acquisition time to the first time among all acquisition times earlier than the first time; that is, the second time is the previous state data acquisition time of the first time. For example, if the data acquisition period is 2 milliseconds, the first time is the current time T, and the second time is T-2 milliseconds. The state data of the cloud gaming operation input device in the first device acquired at the first time is the first state data, and the state data of the cloud gaming operation input device in the first device acquired at the second time is the second state data. Specifically, the first state data can be the currently acquired state data, while the second state data is the previously acquired state data. Therefore, in this embodiment of the invention, state data is acquired after the data acquisition period is reached, and the previously acquired state data is then obtained after the acquired state data is acquired.
[0128] S122, compare the first state data and the second state data to identify the difference data that is different from the second state data in the first state data.
[0129] The difference data is obtained from the first state data, and it is distinct from any data in the second state data. Therefore, in this embodiment of the invention, after collecting state data, the portion that differs from the previously collected state data is selected. Optionally, during the data comparison process, the state values of the operation keys in the first state data are compared with the state values of the operation keys in the second state data to determine the target operation key, and the state value of the target operation key in the first state data is used as the difference data. Specifically, the state value of the target operation key in the first state data differs from the state value of the target operation key in the second state data. For example, if the state value of the linear trigger is 20 and the state value of the jump key is 0 in the first state data, and the state value of the linear trigger is 10 and the state value of the jump key is 0 in the second state data, then the linear trigger is determined to be the target operation key, and the difference data is "the state value of the linear trigger is 20".
[0130] S123, determine the priority for sending differential data.
[0131] In this embodiment, the sending priority of the differential data is determined based on its importance. The higher the importance of the differential data, the higher the sending priority; conversely, the lower the importance of the differential data, the lower the sending priority. Specifically, each target operation key corresponding to the differential data can be identified, and the sending priority of the differential data is determined based on the operation key type of each target operation key. There can be one or more target operation keys corresponding to the differential data. Since different operation key types have different levels of importance for cloud gaming control, this embodiment of the invention determines the priority of differential data based on operation key type, which improves the accuracy of the sending priority determination.
[0132] If at least one of the target operation keys is a digital signal operation key, then the transmission priority of the difference data is determined to be the highest priority. Digital signal operation keys are keys with only two state values, 0 and 1, such as the jump key. Because digital signal operation keys can significantly alter the game's audio and visuals, or control the main progress of the cloud game, or have a high usage frequency, the transmission priority of the difference data is determined to be the highest priority when at least one of the target operation keys is determined to be a digital signal operation key. Therefore, if the state value of one or more digital signal operation keys in the currently collected state data differs from the state value of the previously collected state data, then the difference data in the currently collected state data is determined to have the highest transmission priority.
[0133] If all target operation keys are analog signal operation keys, the transmission priority of each target operation key is determined based on its state value. Then, the transmission priority of the differential data is determined based on the transmission priorities of each target operation key. Analog signal operation keys are those implemented using a programmer, potentiometer, or Hall sensor, such as linear triggers or joysticks. Analog signal operation keys can have multiple state values. For example, the state value of a linear trigger can be any value between 0 and 255, and the state value of a joystick can be any value between 0 and 65535.
[0134] Optionally, the transmission priority corresponding to any target operation key can be determined based on the status value of any target operation key using one or more of the following methods.
[0135] Priority determination method 1: For any target operation key, calculate the difference between the state value of the target operation key in the first state data and the state value in the second state data, and determine the transmission priority corresponding to the target operation key based on the difference. The difference represents the degree of change of the state value of the target operation key in the first time and the target operation key in the second time.
[0136] Furthermore, if the difference is greater than the first threshold, the sending priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than the second threshold, the sending priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, the sending priority corresponding to the target operation key is determined to be the middle priority, where the first threshold is greater than the second threshold.
[0137] For example, if the difference between the status values is greater than the first threshold, it indicates that the status value of the target operation key has changed significantly, and the transmission priority of the target operation key is the highest priority; if the difference between the status values is less than the first threshold, it indicates that the status value of the target operation key has changed slightly, and the transmission priority of the target operation key is the lowest priority; if the difference between the status values is greater than or equal to the second threshold, and the difference is less than or equal to the first threshold, it indicates that the status value of the target operation key has changed moderately, and the transmission priority of the target operation key is the middle priority.
[0138] Method one determines the sending priority based on the degree of change in the target operation key's state value. Larger changes will cause noticeable differences in the user's perception, or significantly impact the cloud gaming process, resulting in a clear effect in the game; therefore, the corresponding sending priority is high. Conversely, smaller changes will not cause noticeable differences in the user's perception, or have little impact on the cloud gaming process, resulting in no noticeable effect in the game; therefore, the corresponding sending priority is low. This allows for accurate determination of the sending priority corresponding to the target operation key.
[0139] Priority Determination Method Two: For any target operation key, the transmission priority of the target operation key is determined based on its state value in the first state data. Specifically, if the state value of the target operation key in the first state data is greater than the third threshold, the transmission priority corresponding to the target operation key is determined to be the highest priority; if the state value is less than the fourth threshold, the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the state value is greater than or equal to the fourth threshold and less than or equal to the third threshold, the transmission priority corresponding to the target operation key is determined to be the middle priority. Specifically, when the state value is large, such as rapid walking, rapid view movement, shooting, rapid steering wheel turning, or sudden acceleration, it can cause significant sensory changes for the user and / or significantly advance the game progress, thus the transmission priority is high in this case; when the state value is small, it usually contains analog circuit noise, thus the transmission priority is low in this case; when the state value is in the middle, the corresponding transmission priority is in the middle.
[0140] Optionally, the third and fourth thresholds can be different depending on the target operation key. Figure 3 and Figure 4 For example, when the target operation key is a joystick, its corresponding third threshold is P3 and its corresponding fourth threshold is P4; when the target operation key is a linear trigger, its corresponding third threshold is Q3 and its corresponding fourth threshold is Q4. Specifically, the joystick's state value from 0 to P4 corresponds to the lowest priority, from P4 to P3 to P4 to P3 to P3 to P3 to P4 ...
[0141] After determining the transmission priority of each target operation key using the above-described determination method one and / or determination method two, the transmission priority of the difference data is determined based on the transmission priority of each target operation key. Specifically, the transmission priority with the highest transmission priority among all target operation keys is taken as the transmission priority of the difference data. For example, if the target operation keys corresponding to the difference data are a linear trigger and a joystick, and the transmission priority of the linear trigger is determined to be the lowest priority and the transmission priority of the joystick is determined to be the middle priority using the above-described determination method one or determination method two, then the final transmission priority of the difference data is the middle priority.
[0142] S124, determine the transmission frequency corresponding to this transmission priority.
[0143] Different transmission priorities have corresponding transmission frequencies, with higher transmission priorities resulting in higher transmission frequencies. Therefore, in this embodiment, the transmission frequency of data packets is dynamically changed, determined based on the transmission priorities of the different data.
[0144] Optionally, if the transmission priority is the highest, the corresponding transmission frequency is a first preset transmission frequency, such as 120Hz, which can be matched with the data acquisition cycle. If the transmission priority is the lowest, the corresponding transmission frequency is a second preset transmission frequency, such as 10Hz. The second preset transmission frequency is lower than the first preset transmission frequency; that is, the transmission frequency is positively correlated with the transmission priority. A higher transmission priority corresponds to a higher transmission frequency, and a lower transmission priority corresponds to a lower transmission frequency.
[0145] If the sending priority is intermediate, one or more of the following two methods can be used to determine it:
[0146] In the first method of determining the transmission frequency, the transmission frequency corresponding to the transmission priority is the third preset transmission frequency, which is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0147] Method two for determining the transmission frequency involves identifying each target operation key corresponding to the difference data, and determining the transmission frequency corresponding to the transmission priority based on the state value of each target operation key. The transmission frequency corresponding to this transmission priority is greater than a second preset transmission frequency and less than a first preset transmission frequency. Specifically, if the transmission priority of the difference data is determined to be an intermediate priority, a pre-generated functional relationship between the transmission frequency and the state value difference or the state value is obtained. Thus, when the transmission priority of the difference data is determined to be an intermediate priority, the target operation key with the intermediate priority in the difference data is identified. Then, the difference between the state value of the target operation key in the first state data and the state value in the second state data is obtained, and the corresponding transmission frequency is determined based on the functional relationship between the transmission frequency and the state value difference; or, the state value of the target operation key in the first state data is obtained, and the corresponding transmission frequency is determined based on the functional relationship between the transmission frequency and the state value. This functional relationship can specifically be a non-linear functional relationship, etc. In short, this embodiment of the invention does not limit the specific functional relationship, and those skilled in the art can select the appropriate functional relationship based on the actual situation.
[0148] S125, according to the transmission frequency, send the data packets corresponding to the difference data.
[0149] Specifically, the transmission time of the last data packet containing status data in the first device is obtained. The transmission interval corresponding to the difference data is calculated based on the transmission frequency. When the interval between the current time and the transmission time of the last data packet reaches the transmission interval corresponding to the difference data, the data packet corresponding to the difference data is transmitted. For example, if the transmission frequency corresponding to the difference data is 240Hz, then the transmission interval is 1 / 240 second. If the time interval between the current time and the transmission time of the last data packet containing status data is less than 1 / 240 second, the process waits until the time interval between the current time and the transmission time of the last data packet containing status data is equal to 1 / 240 second before transmitting the data packet containing the difference data. If the time interval between the current time and the transmission time of the last data packet containing status data is greater than or equal to 1 / 240 second, the data packet containing the difference data is transmitted directly.
[0150] Optionally, the data packets corresponding to the difference data are specifically encapsulated into data packets according to the corresponding data encapsulation format, and each data packet is assigned a corresponding sequence number and packet type. In this step, the packet type is specifically a status data type. When assigning the packet sequence number, the sequence number is incremented according to the order in which the data packets are sent. For example, the sequence number of the first sent status data type data packet is 1, the sequence number of the second sent status data type data packet is 2, and so on.
[0151] Optionally, a data transmission channel is established between the first and second devices. This data transmission channel is based on the UDP (User Datagram Protocol) protocol, and data packets corresponding to the different data are sent through this data transmission channel. A data transmission channel based on the UDP protocol is an out-of-order data transmission channel; data packets transmitted through this channel can arrive in any order, and it has a high transmission rate and low data latency. This data transmission channel can be constructed based on WebRTC or WebTransport's out-of-order mode, etc.
[0152] by Figure 5For example, a user presses button A at 3.500ms, holds it for 25ms, and then releases button A at 28.500ms. This solution collects input device data at a data acquisition cycle of 240Hz (i.e., an interval of 4.147ms). Thus, a state value of A=1 (button A pressed) is acquired at 4.167ms, another state value of A=1 is acquired at 8.333ms, and so on, until a state value of A=0 is acquired at 29.167ms. This solution uses a dynamic transmission frequency of 10-120Hz, with the lowest priority corresponding to a 10Hz transmission frequency and the highest priority corresponding to a 120Hz transmission frequency. After acquiring A=1 at 4.167ms, this solution determines that A=0 at 0ms, indicating a different state value for button A. Therefore, button A is the target operation key, and A=1 represents the difference data. Since button A is a digital signal operation key, it corresponds to the highest priority, with a transmission frequency of 120Hz and a transmission interval of 1000 / 120ms. Because no data was transmitted between 4.167ms and 1000 / 120ms, this solution will send a data packet indicating A=1 at 4.167ms, i.e., the data packet indicating button A was pressed. Therefore, the response time is 4.167ms - 3.500ms = 0.667ms. Then, A=1 is acquired at 8.333ms. Since the A=1 acquired at 8.333ms is the same as the A=1 acquired at 4.167ms, this solution will not send the status value of button A at 8.333ms. The system detects A=0 at 29.167ms, which differs from A=1 detected at 25ms. Therefore, it determines that key A is the target key at 29.167ms, and A=0 represents the difference. A data packet with A=0 is sent at 29.167ms, indicating that key A has been released. This response time is 29.167ms - 28.500ms = 0.667ms. However, if a fixed transmission frequency of 120Hz is used, A=0 will be sent at 0ms, A=1 at 8.334ms, A=1 at 16.667ms, A=1 at 25ms, and A=0 at 33.334ms. Specifically, sending A=1 at 8.333ms (indicating button A is pressed) has a response time of 8.334ms - 3.500ms = 4.834ms; sending A=0 at 33.334ms (indicating button A is released) has a response time of 33.334ms - 28.500ms = 4.834ms. This demonstrates that this scheme reduces the number of data packets sent, improves response speed, and lowers latency.
[0153] S130, the second device generates force feedback data based on the status data.
[0154] First, the second device receives status data transmitted by the first device. Specifically, the second device receives the status data packets and parses them to obtain the packet sequence number. After parsing, the status data can be obtained through one or more of the following methods.
[0155] Method 1: Determine if the sequence number of the data packet is greater than the sequence number of the previously received status data packets; if so, retain the data packet; otherwise, discard the data packet. This process of retaining new data packets and discarding expired data packets improves transmission efficiency.
[0156] Method 2: The second device includes a second buffer that stores at least one historically received status data packet. After parsing, it is determined whether the sequence number of the received data packet is greater than the sequence number of the data packets in the second buffer. If so, the data packet is stored in the second buffer, and the data packet with the smallest sequence number in the second buffer is selected as the data packet to be sent. If not, the data packet is selected as the data packet to be sent. Further, it is determined whether the sequence number of the data packet to be sent is less than the sequence number of the data packets already sent to the processing module. If the sequence number of the data packet to be sent is less than the sequence number of the data packets already sent to the processing module, the data packet to be sent is discarded. If the sequence number of the data packet to be sent is greater than the sequence number of the data packets already sent to the processing module, the data packet to be sent is sent to the processing module. Thus, by comparing the sequence numbers of the received status data packets with those stored in the second buffer each time, the data packet with the smallest sequence number and a sequence number greater than that of the data packets already sent to the processing module is sent to the processing module, thereby allowing for a certain sorting of the data packets. In the case where the second device is a server, the processing module is the module that processes cloud gaming data; in the case where the second device is a user terminal running a cloud gaming client, the processing module is specifically the cloud gaming client.
[0157] by Figure 6 For example, the sender sends data packets with sequence numbers 1, 2, 3, 4, 5, 6, 7, and 8. Since the transmission channel is based on the UDP protocol, these data packets can arrive in any order during transmission. However, the data packet with sequence number 5 is lost after network transmission. Furthermore, the transmission order of the data packets is 1, 3, 4, 2, 6, 8, and 7.
[0158] With buffering disabled, the receiving control module receives data packets numbered 1, 3, and 4 sequentially. When it receives data packet number 2, it does not send the data packet number 2 to the receiving processing module because the sequence number 2 is less than the sequence number of the already received data packets. Similarly, when the receiving control module receives data packet number 7, it does not send the data packet number 7 to the receiving processing module because the sequence number 7 is less than the sequence number of the already received data packets. Finally, the receiving processing module receives the five data packets numbered 1, 3, 4, 6, and 8 sequentially.
[0159] With one frame buffered (i.e., one data packet stored in the buffer), the receiving control module stores the data packet with sequence number 1 in the buffer after receiving it. Upon receiving the data packet with sequence number 3, since sequence number 3 is greater than sequence number 1, the receiving control module sends the data packet with sequence number 1 to the receiving processing module and stores the data packet with sequence number 3 in the buffer. This continues until the receiving control module receives the data packet with sequence number 2, which is currently in the buffer and contains the data packet with sequence number 4. Since sequence number 2 is less than the sequence number of the already sent data packet (data packet with sequence number 3), the data packet with sequence number 2 is discarded, and so on. Ultimately, the receiving processing module receives seven data packets with sequence numbers 1, 3, 4, 6, 7, and 8 in sequence.
[0160] With two frames buffered (i.e., storing two data packets in the buffer), the receiving control module stores the data packet with sequence number 1 in the buffer after receiving it; the receiving control module stores the data packet with sequence number 3 in the buffer after receiving it; after receiving the data packet with sequence number 4, the receiving control module checks if the sequence number of the smallest data packet (i.e., the data packet with sequence number 1) is greater than the sequence number of a previously sent data packet. Since no data packet with a sequence number greater than 1 has been sent yet, the receiving control module sends the data packet with sequence number 1 to the receiving end processing module; and so on, until the receiving end processing module finally receives seven data packets with sequence numbers 1, 2, 3, 4, 6, 7, and 8 in sequence. This demonstrates that adding a buffer effectively reduces packet loss and improves the effectiveness of data packets.
[0161] Furthermore, the second device generates force feedback data based on the state data. Force feedback data represents a reaction force exhibited by the cloud gaming input device. For example, if the cloud game is a racing game, when a user turns the steering wheel of a physical game controller to the left, the physical game controller will exhibit a certain resistance within the steering wheel, making the user intuitively feel that turning to the left is more difficult, thus increasing the user's immersion. Optionally, the force feedback data of the cloud gaming input device includes the force feedback value of at least one operation key on the cloud gaming input device. For example, if the cloud gaming input device is a physical game controller, the state data includes the force feedback value of the operation key with force feedback function on the physical game controller, and this force feedback value is used to represent the magnitude of the reaction force.
[0162] In step S140, the second device transmits force feedback data to the browser of the first device.
[0163] Specifically, the second device periodically collects force feedback data. The collection period can be determined using the same method as in step S120, and will not be elaborated here. Optionally, to avoid data congestion during transmission and to reduce data latency, a [further details can be provided]. Figure 7 Steps S141-S145 are used to transmit force feedback data:
[0164] S141: After collecting the first force feedback data at the third time, acquire the second force feedback data that has already been collected at the fourth time.
[0165] The fourth time is the force feedback data acquisition time that is earlier than the third time and closest to the third time. Specifically, the force feedback data acquisition time is the time when force feedback data is acquired. The third time can be the latest force feedback data acquisition time. The fourth time is earlier than the third time, and it is the force feedback data acquisition time closest to the third time among all force feedback data acquisition times earlier than the third time; that is, the fourth time is the force feedback data acquisition time preceding the third time. For example, if the data acquisition period is 2 milliseconds, the third time is the current time T, and the fourth time is T-2 milliseconds. The force feedback data acquired at the third time is the first force feedback data, and the force feedback data acquired at the fourth time is the second force feedback data. Specifically, the first force feedback data can be the currently acquired force feedback data, while the second force feedback data is the previously acquired force feedback data. Therefore, in this embodiment of the invention, force feedback data is acquired after the data acquisition period is reached, and after acquiring the acquired force feedback data, the previously acquired force feedback data is then obtained.
[0166] S142, compare the first force feedback data and the second force feedback data to identify the difference data that differs from the second force feedback data in the first force feedback data.
[0167] The difference data is obtained from the first force feedback data, and this difference data is no different from any data in the second force feedback data. Therefore, in this embodiment of the invention, after acquiring force feedback data, the portion that differs from the previously acquired force feedback data is selected. Optionally, during the data comparison process, the force feedback values of the operation keys in the first force feedback data are compared with the force feedback values of the operation keys in the second force feedback data to determine the target operation key, and the force feedback value of the target operation key in the first force feedback data is taken as the difference data. Specifically, the force feedback value of the target operation key in the first force feedback data is different from the force feedback value of the target operation key in the second force feedback data.
[0168] S143, determine the priority for sending differential data.
[0169] The specific method for determining this sending priority can be found in [reference]. Figure 2 The details of the relevant steps are omitted here. If all target operation keys are analog signal operation keys, the transmission priority of each target operation key is determined based on its force feedback value. This determination can be achieved using one or more of the following methods based on the force feedback value of each target operation key.
[0170] Priority determination method 1: For any target operation key, calculate the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data. Determine the transmission priority corresponding to the target operation key based on the difference. This difference represents the degree of change in the force feedback value of the target operation key in the third time and the target operation key in the fourth time.
[0171] Further, if the difference is greater than the first threshold, the sending priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than the second threshold, the sending priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, the sending priority corresponding to the target operation key is determined to be the middle priority, where the first threshold is greater than the second threshold. If the difference corresponding to the force feedback value is greater than the first threshold, it indicates that the force feedback value of the target operation key changes significantly, and the sending priority corresponding to the target operation key is the highest priority; if the difference corresponding to the force feedback value is less than the first threshold, it indicates that the force feedback value of the target operation key changes slightly, and the sending priority corresponding to the target operation key is the lowest priority; if the difference corresponding to the force feedback value is greater than or equal to the second threshold and less than or equal to the first threshold, it indicates that the force feedback value of the target operation key changes moderately, and the sending priority corresponding to the target operation key is the middle priority. The first threshold corresponding to the force feedback value can be the same as or different from the first threshold corresponding to the state value; correspondingly, the second threshold corresponding to the force feedback value can be the same as or different from the second threshold corresponding to the state value. Method one determines the transmission priority based on the degree of change in the force feedback value of the target operation key. A larger change will cause a noticeable difference in the user's perception, thus corresponding to a higher transmission priority; conversely, a smaller change will not cause a noticeable difference in the user's perception, thus corresponding to a lower transmission priority. This allows for accurate determination of the transmission priority corresponding to the target operation key.
[0172] Priority Determination Method Two: For any target operation key, the transmission priority corresponding to the target operation key is determined based on the force feedback value in the first force feedback data. Specifically, if the force feedback value is greater than the fifth threshold, the transmission priority corresponding to the target operation key is determined to be the highest priority; if the state value is less than the sixth threshold, the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the state value is greater than or equal to the sixth threshold and less than or equal to the fifth threshold, the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0173] S144, determine the transmission frequency corresponding to this transmission priority.
[0174] The implementation process of this step can be referred to the description in step S124, and will not be repeated here. Unlike S124, if the transmission priority is intermediate priority, the frequency determination method two specifically involves: determining each target operation key corresponding to the difference data, and determining the transmission frequency corresponding to the transmission priority based on the force feedback value of each target operation key. Specifically, if the transmission priority of the difference data is determined to be intermediate priority, the difference between the pre-generated transmission frequency and the force feedback value, or the functional relationship between the force feedback value, is obtained. Thus, when the transmission priority of the difference data is determined to be intermediate priority, the target operation key with the intermediate priority corresponding to the difference data is determined. Then, the difference between the force feedback value of the target operation key in the first force feedback value data and the force feedback value in the second force feedback value data is obtained, and the corresponding transmission frequency is determined based on the functional relationship between the transmission frequency and the force feedback difference; or, the force feedback value of the target operation key in the first force feedback data is obtained, and the corresponding transmission frequency is determined based on the functional relationship between the transmission frequency and the force feedback value.
[0175] S145, according to the transmission frequency, send the data packets corresponding to the difference data.
[0176] In step S150, the browser of the first device controls the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0177] First, the first device receives force feedback data transmitted by the second device. Specifically, the first device receives the force feedback data packets and parses them to obtain the packet sequence number. After parsing, the force feedback data can be acquired through one or more of the following methods.
[0178] Method 1: Determine if the sequence number of the data packet is greater than the sequence number of the data packets of the previously received force feedback data; if so, retain the data packet; if not, discard the data packet. This process of retaining new data packets and discarding expired data packets improves transmission efficiency.
[0179] Method 2: The first device includes a first buffer that stores at least one historically received force feedback data packet. After parsing, it is determined whether the sequence number of the data packet is greater than the sequence number of the data packets in the first buffer. If so, the data packet is stored in the first buffer, and the data packet with the smallest sequence number in the first buffer is selected as the data packet to be sent. If not, the data packet is selected as the data packet to be sent. Further, it is determined whether the sequence number of the data packet to be sent is less than the sequence number of the data packets already sent to the browser. If the sequence number of the data packet to be sent is less than the sequence number of the data packets already sent to the browser, the data packet to be sent is discarded. If the sequence number of the data packet to be sent is greater than the sequence number of the data packets already sent to the browser, the data packet to be sent is sent to the browser.
[0180] After receiving force feedback data, the browser generates force feedback commands for the cloud gaming input device, which then executes these commands to generate force feedback. For example, the force feedback can be vibration or resistance.
[0181] Therefore, the embodiments of the present invention can receive force feedback data generated by the second device from the browser of the first device, thereby generating force feedback in the cloud gaming operation input device of the first device, realizing game force feedback on the cloud gaming web page, enhancing the user's sense of immersion and gaming experience in cloud gaming, and improving the retention rate of cloud gaming.
[0182] Figure 8 This illustration shows a flowchart of another data transmission method based on cloud gaming provided by an embodiment of the present invention. Specifically, this embodiment of the present invention can be executed by a first device. Specifically, as... Figure 8 As shown, the method includes the following steps:
[0183] Step S810: The browser collects the status data of the cloud gaming operation input device in the first device.
[0184] In step S820, the browser transmits the status data to the second device so that the second device can generate force feedback data based on the status data.
[0185] In step S830, the browser receives the force feedback data sent by the second device and controls the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0186] Optionally, the status data includes the status value of at least one operation key in the cloud gaming operation input device.
[0187] Optionally, the browser's collection of status data from the cloud gaming operation input device in the first device includes: the browser periodically collecting status data; the browser transmitting status data to the second device includes: after collecting first status data at a first time, acquiring second status data that has already been collected at a second time; wherein, the second time is the status data collection time that is earlier than the first time and closest to the first time; comparing the first status data and the second status data to determine the difference data that differs from the second status data from the first status data; determining the sending priority of the difference data and determining the sending frequency corresponding to the sending priority; and sending the data packets corresponding to the difference data according to the sending frequency.
[0188] Optionally, comparing the first state data and the second state data to determine the difference data that differs from the second state data further includes: comparing the state value of the operation key in the first state data with the state value of the operation key in the second state data to determine the target operation key, and using the state value of the target operation key in the first state data as the difference data; the state value of the target operation key in the first state data is different from the state value of the target operation key in the second state data.
[0189] Optionally, determining the sending priority of the difference data includes: determining each target operation key corresponding to the difference data; and determining the sending priority of the difference data according to the operation key type of each target operation key.
[0190] Optionally, determining the transmission priority of the difference data based on the operation key type of the target operation key includes: if at least one of the target operation keys is a digital signal operation key, then the transmission priority of the difference data is determined to be the highest priority; if all the target operation keys are analog signal operation keys, then the transmission priority corresponding to any target operation key is determined based on the state value of that target operation key, and the transmission priority of the difference data is determined based on the transmission priorities corresponding to each target operation key.
[0191] Optionally, determining the transmission priority corresponding to any target operation key based on the state value of any target operation key further includes: for any target operation key, calculating the difference between the state value of the target operation key in the first state data and the state value in the second state data, and determining the transmission priority corresponding to the target operation key based on the difference.
[0192] Optionally, determining the transmission priority corresponding to the target operation key based on the difference further includes: if the difference is greater than a first threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than a second threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0193] Optionally, determining the transmission priority corresponding to any target operation key based on the status value of any target operation key further includes: for any target operation key, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data.
[0194] Optionally, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data includes: if the status value is greater than a third threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than a fourth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the fourth threshold and less than or equal to the third threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0195] Optionally, determining the transmission frequency corresponding to the transmission priority includes: if the transmission priority is the highest priority, then the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is the lowest priority, then the transmission frequency corresponding to the transmission priority is a second preset transmission frequency; the second preset transmission frequency is lower than the first preset transmission frequency; if the transmission priority is an intermediate priority, then each target operation key corresponding to the difference data is determined, and the transmission frequency corresponding to the transmission priority is determined according to the status value of each target operation key; the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0196] Optionally, according to the transmission frequency, transmitting the data packet corresponding to the difference data further includes: obtaining the transmission time of the last transmitted data packet; calculating the transmission interval corresponding to the difference data according to the transmission frequency; and transmitting the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0197] Optionally, before sending the data packet corresponding to the difference data, the method further includes: assigning a packet sequence number to the data packet corresponding to the difference data; before controlling the cloud gaming operation input device to generate force feedback based on the force feedback data, the method further includes: receiving the data packet of the force feedback data and parsing the data packet to obtain the packet sequence number of the data packet.
[0198] Optionally, after receiving the force feedback data packet and parsing the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the previously received force feedback data packet; if so, retaining the data packet; if not, discarding the data packet.
[0199] Optionally, the first device includes a first buffer, which stores at least one historically received force feedback data packet. After receiving the force feedback data packet and parsing it to obtain its sequence number, the method further includes: determining whether the sequence number of the received data packet is greater than the sequence number of the data packets in the first buffer; if so, storing the data packet in the first buffer and using the data packet with the smallest sequence number in the first buffer as the data packet to be sent; if not, using the received data packet as the data packet to be sent; if the sequence number of the data packet to be sent is greater than the sequence number of the data packet already sent to the browser, sending the data packet to be sent to the browser; if the sequence number of the data packet to be sent is less than the sequence number of the data packet already sent to the browser, discarding the data packet to be sent.
[0200] Therefore, the embodiments of the present invention can receive force feedback data generated by the second device from the browser of the first device, thereby generating force feedback in the cloud gaming operation input device of the first device, realizing game force feedback on the cloud gaming web page, enhancing the user's sense of immersion and gaming experience in cloud gaming, and improving the retention rate of cloud gaming.
[0201] Figure 9 This illustration shows a flowchart of another data transmission method based on cloud gaming provided by an embodiment of the present invention. Specifically, this embodiment of the present invention can be executed by a second device. Specifically, as... Figure 9 As shown, the method includes the following steps:
[0202] Step S910: Receive status data of the cloud gaming operation input device in the first device sent by the browser of the first device.
[0203] Step S920: Generate force feedback data based on the state data.
[0204] In step S930, the force feedback data is transmitted to the browser of the first device so that the first device can control the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0205] Optionally, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device.
[0206] Optionally, the browser transmitting force feedback data to the first device includes: periodically collecting force feedback data; after collecting the first force feedback data at a third time, acquiring the second force feedback data already collected at a fourth time; wherein the fourth time is the force feedback data collection time earlier than the third time and closest to the third time; comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second state data from the first state data; determining the transmission priority of the difference data and determining the transmission frequency corresponding to the transmission priority; and transmitting the data packets corresponding to the difference data according to the transmission frequency.
[0207] Optionally, comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second state data from the first state data includes: comparing the force feedback value of the operation key in the first force feedback data with the force feedback value of the operation key in the second force feedback data to determine the target operation key, and using the force feedback value of the target operation key in the first force feedback data as the difference data; wherein the force feedback value of the target operation key in the first force feedback data is different from the force feedback value of the target operation key in the second force feedback data.
[0208] Optionally, determining the sending priority of the difference data includes: determining each target operation key corresponding to the difference data; and determining the sending priority of the difference data according to the operation key type of each target operation key.
[0209] Optionally, determining the transmission priority of the differential data based on the operation key type of the target operation key includes: if at least one of the target operation keys is a digital signal operation key, then the transmission priority of the differential data is determined to be the highest priority; if all the target operation keys are analog signal operation keys, then the transmission priority corresponding to any target operation key is determined based on the force feedback value of any target operation key, and the transmission priority of the differential data is determined based on the transmission priorities corresponding to each target operation key.
[0210] Optionally, determining the transmission priority corresponding to any target operation key based on the force feedback value of any target operation key further includes: for any target operation key, calculating the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data, and determining the transmission priority corresponding to the target operation key based on the difference.
[0211] Optionally, determining the transmission priority corresponding to the target operation key based on the difference further includes: if the difference is greater than a first threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the difference is less than a second threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0212] Optionally, determining the transmission priority corresponding to any target operation key based on the force feedback value of any target operation key includes: for any target operation key, determining the transmission priority corresponding to the target operation key based on the force feedback value of the target operation key in the first force feedback data.
[0213] Optionally, determining the transmission priority corresponding to the target operation key based on the force feedback value in the first force feedback data includes: if the force feedback value is greater than the fifth threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the state value is less than the sixth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the state value is greater than or equal to the sixth threshold and less than or equal to the fifth threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0214] Optionally, determining the transmission frequency corresponding to the transmission priority includes: if the transmission priority is the highest priority, then the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is the lowest priority, then the transmission frequency corresponding to the transmission priority is a second preset transmission frequency; the second preset transmission frequency is lower than the first preset transmission frequency; if the transmission priority is an intermediate priority, then each target operation key corresponding to the difference data is determined, and the transmission frequency corresponding to the transmission priority is determined based on the force feedback value of each target operation key; wherein, the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0215] Optionally, according to the transmission frequency, transmitting the data packet corresponding to the difference data further includes: obtaining the transmission time of the last transmitted data packet; calculating the transmission interval corresponding to the difference data based on the transmission frequency; and transmitting the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0216] Optionally, before sending the data packet corresponding to the difference data, the method further includes: assigning a packet sequence number to the data packet corresponding to the difference data; before generating force feedback data based on the state data, the method further includes: receiving the data packet of the state data and parsing the data packet to obtain the packet sequence number of the data packet.
[0217] Optionally, after receiving the data packet of the status data and parsing the data packet to obtain the sequence number of the data packet, the method further includes: determining whether the sequence number of the data packet is greater than the sequence number of the data packet of the previously received status data; if so, retaining the data packet; if not, discarding the data packet.
[0218] Optionally, the second device includes a second buffer that stores at least one historically received status data packet. After receiving the status data packet and parsing it to obtain its sequence number, the process further includes: determining whether the sequence number of the received data packet is greater than the sequence number of the data packets in the second buffer; if so, storing the data packet in the second buffer and using the data packet with the smallest sequence number in the second buffer as the data packet to be sent; if not, using the received data packet as the data packet to be sent; if the sequence number of the data packet to be sent is greater than the sequence number of the data packets already sent to the processing module, sending the data packet to be sent to the processing module; if the sequence number of the data packet to be sent is less than the sequence number of the data packets already sent to the processing module, discarding the data packet to be sent.
[0219] Therefore, the embodiments of the present invention can receive force feedback data generated by the second device from the browser of the first device, thereby generating force feedback in the cloud gaming operation input device of the first device, realizing game force feedback on the cloud gaming web page, enhancing the user's sense of immersion and gaming experience in cloud gaming, and improving the retention rate of cloud gaming.
[0220] Figure 10 A schematic diagram of the structure of a first device provided in an embodiment of the present invention is shown. Figure 10 As shown, the first device 1000 includes a browser 1010 and a cloud gaming operation input device 1020. The browser 1010 is used to collect the status data of the cloud gaming operation input device in the first device and transmit the status data to the second device so that the second device can generate force feedback data based on the status data; and the browser receives the force feedback data sent by the second device; the cloud gaming operation input device 1020 is used to generate force feedback based on the force feedback data.
[0221] Optionally, the status data includes the status value of at least one operation key in the cloud gaming operation input device.
[0222] Optionally, the browser is used to: periodically collect the status data; after collecting the first status data at a first time, acquire the second status data that has been collected at a second time; the second time is the status data collection time that is earlier than the first time and closest to the first time; compare the first status data and the second status data to determine the difference data that is different from the second status data from the first status data; determine the sending priority of the difference data and determine the sending frequency corresponding to the sending priority; and send the data packets corresponding to the difference data according to the sending frequency.
[0223] Optionally, the browser is used to: compare the state value of the operation key in the first state data with the state value of the operation key in the second state data to determine the target operation key, and use the state value of the target operation key in the first state data as the difference data; the state value of the target operation key in the first state data is different from the state value of the target operation key in the second state data.
[0224] Optionally, the browser is used to: determine each target operation key corresponding to the difference data; and determine the sending priority of the difference data according to the operation key type of each target operation key.
[0225] Optionally, the browser is configured to: if the operation key type of at least one of the target operation keys is a digital signal operation key, then determine that the transmission priority of the difference data is the highest priority;
[0226] If the operation key type of each target operation key is an analog signal operation key, then the transmission priority corresponding to the target operation key is determined according to the state value of any target operation key, and the transmission priority of the difference data is determined according to the transmission priority corresponding to each target operation key.
[0227] Optionally, the browser is used to: for any target operation key, calculate the difference between the state value of the target operation key in the first state data and the state value in the second state data, and determine the sending priority corresponding to the target operation key based on the difference.
[0228] Optionally, the browser is configured to: if the difference is greater than a first threshold, determine that the sending priority corresponding to the target operation key is the highest priority; if the difference is less than a second threshold, determine that the sending priority corresponding to the target operation key is the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, determine that the sending priority corresponding to the target operation key is the middle priority.
[0229] Optionally, the browser is used to: for any target operation key, determine the sending priority corresponding to the target operation key based on the status value of the target operation key in the first status data.
[0230] Optionally, determining the transmission priority corresponding to the target operation key based on the status value of the target operation key in the first status data includes: if the status value is greater than a third threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than a fourth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the fourth threshold and less than or equal to the third threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
[0231] Optionally, the browser is configured to: if the sending priority is the highest priority, then the sending frequency corresponding to the sending priority is the first preset sending frequency; if the sending priority is the lowest priority, then the sending frequency corresponding to the sending priority is the second preset sending frequency; the second preset sending frequency is lower than the first preset sending frequency; if the sending priority is the middle priority, determine each target operation key corresponding to the difference data, and determine the sending frequency corresponding to the sending priority based on the status value of each target operation key; the sending frequency corresponding to the sending priority is greater than the second preset sending frequency and less than the first preset sending frequency.
[0232] Optionally, the browser is used to: obtain the sending time of the last data packet; calculate the sending interval corresponding to the difference data according to the sending frequency; and send the data packet corresponding to the difference data when the interval between the current time and the sending time reaches the sending interval.
[0233] Optionally, the browser is used to: assign packet sequence numbers to the data packets corresponding to the difference data; receive the data packets of the force feedback data; and parse the data packets to obtain the packet sequence numbers of the data packets.
[0234] Optionally, the browser is configured to: determine whether the sequence number of the data packet is greater than the sequence number of the data packets of the previously received force feedback data; if so, retain the data packet; if not, discard the data packet.
[0235] Optionally, the first device includes a first buffer and a receiving control module. The first buffer stores at least one historically received force feedback data packet. The receiving control module is configured to: after receiving the force feedback data packet and parsing the data packet to obtain the packet sequence number, determine whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet in the first buffer; if so, store the data packet in the first buffer and take the data packet with the smallest packet sequence number in the first buffer as the data packet to be sent; if not, take the data packet as the data packet to be sent; if the packet sequence number of the data packet to be sent is greater than the packet sequence number of the data packet already sent to the browser, send the data packet to be sent to the browser; if the packet sequence number of the data packet to be sent is less than the packet sequence number of the data packet already sent to the browser, discard the data packet to be sent.
[0236] Therefore, the embodiments of the present invention can receive force feedback data generated by the second device from the browser of the first device, thereby generating force feedback in the cloud gaming operation input device of the first device, realizing game force feedback on the cloud gaming web page, enhancing the user's sense of immersion and gaming experience in cloud gaming, and improving the retention rate of cloud gaming.
[0237] Figure 11 A schematic diagram of the structure of a second device provided in an embodiment of the present invention is shown. Figure 11 As shown, the second device 1100 includes a transmission module 1110 and a processing module 1120. The transmission module 1110 is used to receive status data of the cloud gaming operation input device in the first device sent by the browser of the first device; and to transmit force feedback data to the browser of the first device, so that the first device can control the cloud gaming operation input device to generate force feedback based on the force feedback data; the processing module 1120 is used to generate force feedback data based on the status data.
[0238] Optionally, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device.
[0239] Optionally, the transmission module is used to: periodically collect force feedback data; after collecting the first force feedback data at a third time, acquire the second force feedback data collected at a fourth time; wherein the fourth time is the force feedback data collection time that is earlier than the third time and closest to the third time; compare the first force feedback data and the second force feedback data to determine the difference data that is different from the second state data from the first state data; determine the transmission priority of the difference data and determine the transmission frequency corresponding to the transmission priority; and transmit the data packets corresponding to the difference data according to the transmission frequency.
[0240] Optionally, the transmission module is used to: compare the force feedback value of the operation key in the first force feedback data with the force feedback value of the operation key in the second force feedback data to determine the target operation key, and use the force feedback value of the target operation key in the first force feedback data as the difference data; the force feedback value of the target operation key in the first force feedback data is different from the force feedback value of the target operation key in the second force feedback data.
[0241] Optionally, the transmission module is used to: determine each target operation key corresponding to the difference data; and determine the transmission priority of the difference data according to the operation key type of each target operation key.
[0242] Optionally, the transmission module is configured to: if at least one of the target operation keys is a digital signal operation key, then determine the transmission priority of the difference data as the highest priority; if all the target operation keys are analog signal operation keys, then determine the transmission priority corresponding to the target operation key based on the force feedback value of any target operation key, and determine the transmission priority of the difference data based on the transmission priorities corresponding to each target operation key.
[0243] Optionally, the transmission module is used to: for any target operation key, calculate the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data, and determine the transmission priority corresponding to the target operation key based on the difference.
[0244] Optionally, the transmission module is configured to: if the difference is greater than a first threshold, determine that the transmission priority corresponding to the target operation key is the highest priority; if the difference is less than a second threshold, determine that the transmission priority corresponding to the target operation key is the lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, determine that the transmission priority corresponding to the target operation key is the middle priority.
[0245] Optionally, the transmission module is used to: for any target operation key, determine the transmission priority corresponding to the target operation key based on the force feedback value of the target operation key in the first force feedback data.
[0246] Optionally, the transmission module is configured to: if the force feedback value is greater than the fifth threshold, determine that the transmission priority corresponding to the target operation key is the highest priority; if the status value is less than the sixth threshold, determine that the transmission priority corresponding to the target operation key is the lowest priority; if the status value is greater than or equal to the sixth threshold and the status value is less than or equal to the fifth threshold, determine that the transmission priority corresponding to the target operation key is the middle priority.
[0247] Optionally, the transmission module is configured to: if the transmission priority is the highest priority, the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is the lowest priority, the transmission frequency corresponding to the transmission priority is a second preset transmission frequency; the second preset transmission frequency is lower than the first preset transmission frequency; if the transmission priority is an intermediate priority, then determine each target operation key corresponding to the difference data, and determine the transmission frequency corresponding to the transmission priority based on the force feedback value of each target operation key; the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0248] Optionally, the transmission module is configured to: obtain the transmission time of the last transmitted data packet; calculate the transmission interval corresponding to the difference data according to the transmission frequency; and transmit the data packet corresponding to the difference data when the interval between the current time and the transmission time reaches the transmission interval.
[0249] Optionally, the transmission module is configured to: assign a packet sequence number to the data packet corresponding to the difference data; receive the data packet of the status data; and parse the data packet to obtain the packet sequence number of the data packet.
[0250] Optionally, the transmission module is configured to: after receiving the data packet containing the status data and parsing the data packet to obtain the sequence number of the data packet, determine whether the sequence number of the data packet is greater than the sequence number of the data packet containing the previously received status data; if so, retain the data packet; if not, discard the data packet.
[0251] Optionally, the second device includes a second buffer, which stores at least one historically received status data packet. The transmission module is configured to: upon receiving a status data packet, parse the data packet to obtain its sequence number, and then determine whether the sequence number of the received data packet is greater than the sequence number of the data packet in the second buffer; if so, store the data packet in the second buffer and use the data packet with the smallest sequence number in the second buffer as the data packet to be sent; if not, use the received data packet as the data packet to be sent; if the sequence number of the data packet to be sent is greater than the sequence number of the data packet already sent to the processing module, send the data packet to be sent to the processing module; if the sequence number of the data packet to be sent is less than the sequence number of the data packet already sent to the processing module, discard the data packet to be sent.
[0252] Therefore, the embodiments of the present invention can receive force feedback data generated by the second device from the browser of the first device, thereby generating force feedback in the cloud gaming operation input device of the first device, realizing game force feedback on the cloud gaming web page, enhancing the user's sense of immersion and gaming experience in cloud gaming, and improving the retention rate of cloud gaming.
[0253] Figure 12 A schematic diagram of a data transmission system based on cloud gaming, provided by an embodiment of the present invention, is shown. Figure 12 As shown, the system 1200 includes: Figure 10 The first device 1000 shown and as follows Figure 11 The second device 1100 shown.
[0254] Figure 13 This diagram illustrates the structure of a computing device according to an embodiment of the present invention. The specific embodiments of the present invention do not limit the specific implementation of the computing device. Figure 13As shown, the computing device may include: a processor 1302, a communication interface 1304, a memory 1306, and a communication bus 1308. The processor 1302, communication interface 1304, and memory 1306 communicate with each other via the communication bus 1308. The communication interface 1304 is used to communicate with other network elements such as clients or other servers. The processor 1302 is used to execute program 1310, specifically performing the relevant steps in the above-described embodiment of the data transmission method for cloud gaming. Specifically, program 1310 may include program code, which includes computer operation instructions. The processor 1302 may be a central processing unit (CPU), an application-specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present invention. The computing device includes one or more processors, which may be of the same type, such as one or more CPUs; or they may be of different types, such as one or more CPUs and one or more ASICs. The memory 1306 is used to store program 1310. Memory 1306 may include high-speed RAM, and may also include non-volatile memory, such as at least one disk storage device. Specifically, program 1310 may be used to cause processor 1302 to execute the methods in any of the above method embodiments.
[0255] This invention provides a non-volatile computer storage medium storing at least one executable instruction that can execute the cloud gaming-based data transmission method in any of the above method embodiments.
[0256] The algorithms or displays provided herein are not inherently related to any particular computer, virtual system, or other device. Various general-purpose systems can also be used in conjunction with the teachings herein. The required structure for constructing such systems is readily apparent from the above description. Furthermore, the embodiments of the invention are not directed to any particular programming language. It should be understood that the embodiments of the invention described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of the embodiments of the invention. Numerous specific details are set forth in the specification provided herein. However, it is to be understood that embodiments of the invention can be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification. Similarly, it should be understood that, in order to streamline the embodiments of the invention and aid in understanding one or more of the various inventive aspects, various features of the embodiments of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the above description of exemplary embodiments of the invention. However, this method of disclosure should not be construed as reflecting an intention that the claimed embodiments of the invention require more features than are expressly recited in each claim. Rather, as reflected in the following claims, inventive aspects lie in fewer than all features of a single foregoing disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into the detailed description, wherein each claim itself is a separate embodiment of the invention. Those skilled in the art will understand that modules in the apparatus of the embodiments can be adaptively changed and placed in one or more devices different from that embodiment. Modules, units, or components in the embodiments can be combined into a single module, unit, or component, and further, they can be divided into multiple sub-modules, sub-units, or sub-components. Except where at least some of such features and / or processes or units are mutually exclusive, any combination can be used to combine all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus so disclosed. Unless expressly stated otherwise, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0257] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are meant to be within the scope of the embodiments of the invention and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination. Various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some or all of the components according to the embodiments of the present invention. The embodiments of the present invention can also be implemented as device or apparatus programs (e.g., computer programs and computer program products) for performing part or all of the methods described herein. Such programs implementing the embodiments of the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form. It should be noted that the above embodiments are illustrative of the embodiments of the present invention and not limiting of the embodiments of the present invention, and those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. Embodiments of the invention can be implemented by means of hardware comprising a plurality of different elements and by means of a suitably programmed computer. In the unit claims enumerating a plurality of means, a plurality of such means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names. The steps in the above embodiments, unless otherwise specified, should not be construed as limiting the order of execution.
Claims
1. A data transmission method based on cloud gaming, characterized in that, The method includes: The browser of the first device periodically collects the status data of the cloud gaming operation input device in the first device. After collecting the first status data at the first time, it obtains the second status data that has been collected at the second time. It identifies the difference data that is different from the second status data from the first status data. It determines the sending priority of the difference data and the sending frequency corresponding to the sending priority. It assigns a packet sequence number to the data packet corresponding to the difference data. According to the sending frequency, it sends the data packet corresponding to the difference data and transmits the data packet of status data to the second device. The second device generates force feedback data based on the data packet of the state data, and transmits the force feedback data to the browser of the first device; The browser of the first device controls the cloud gaming input device to generate force feedback based on the force feedback data.
2. The method according to claim 1, characterized in that, The status data includes the status value of at least one operation key in the cloud gaming operation input device. And / or, the force feedback data includes the force feedback value of at least one operation key in the cloud gaming operation input device.
3. The method according to claim 1, characterized in that, The second time is the state data collection time that is earlier than the first time and closest to the first time.
4. The method according to claim 1, characterized in that, The step of determining the difference data from the first state data that differs from the second state data further includes: The state values of the operation keys in the first state data are compared with the state values of the operation keys in the second state data to determine the target operation key, and the state value of the target operation key in the first state data is used as the difference data; wherein the state value of the target operation key in the first state data is different from the state value of the target operation key in the second state data.
5. The method according to claim 1, characterized in that, The browser that transmits the force feedback data to the first device further includes: The force feedback data is collected periodically; After acquiring the first force feedback data at the third time, the second force feedback data, which has already been acquired at the fourth time, is obtained; wherein, the fourth time is the force feedback data acquisition time that is earlier than the third time and closest to the third time. The first force feedback data and the second force feedback data are compared to identify the differences between the first force feedback data and the second force feedback data. Determine the transmission priority of the differential data, and determine the transmission frequency corresponding to the transmission priority; The data packets corresponding to the difference data are sent according to the stated sending frequency.
6. The method according to claim 5, characterized in that, The step of comparing the first force feedback data and the second force feedback data to determine the difference data that differs from the second force feedback data further includes: The force feedback value of the operation key in the first force feedback data is compared with the force feedback value of the operation key in the second force feedback data to determine the target operation key, and the force feedback value of the target operation key in the first force feedback data is used as the difference data; wherein the force feedback value of the target operation key in the first force feedback data is different from the force feedback value of the target operation key in the second force feedback data.
7. The method according to any one of claims 1-6, characterized in that, The step of determining the transmission priority of the difference data further includes: Determine the target operation keys corresponding to the difference data; The sending priority of the difference data is determined based on the operation key type of each target operation key.
8. The method according to claim 7, characterized in that, The step of determining the sending priority of the difference data based on the operation key type of the target operation key further includes: If at least one of the target operation keys is a digital signal operation key, then the transmission priority of the difference data is determined to be the highest priority. If the operation key type of each target operation key is an analog signal operation key, then the transmission priority corresponding to the target operation key is determined according to the state value or force feedback value of any target operation key, and the transmission priority of the difference data is determined according to the transmission priority corresponding to each target operation key.
9. The method according to claim 8, characterized in that, The step of determining the transmission priority corresponding to any target operation key based on the status value or force feedback value of any target operation key further includes: For any target operation key, calculate the difference between the state value of the target operation key in the first state data and the state value in the second state data, and determine the transmission priority corresponding to the target operation key based on the difference; Alternatively, for any target operation key, calculate the difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value in the second force feedback data, and determine the transmission priority corresponding to the target operation key based on the difference.
10. The method according to claim 9, characterized in that, The step of determining the transmission priority corresponding to the target operation key based on the difference further includes: If the difference is greater than the first threshold, then the sending priority corresponding to the target operation key is determined to be the highest priority; If the difference is less than the second threshold, then the sending priority corresponding to the target operation key is determined to be the lowest priority; If the difference is greater than or equal to the second threshold and less than or equal to the first threshold, then the sending priority corresponding to the target operation key is determined to be the middle priority.
11. The method according to claim 8, characterized in that, The step of determining the transmission priority corresponding to any target operation key based on the status value or force feedback value of any target operation key further includes: For any target operation key, the transmission priority corresponding to the target operation key is determined based on the status value of the target operation key in the first status data; Alternatively, for any target operation key, the transmission priority corresponding to the target operation key can be determined based on the force feedback value of the target operation key in the first force feedback data.
12. The method according to claim 11, characterized in that, The step of determining the transmission priority corresponding to the target operation key based on the status value in the first status data further includes: if the status value is greater than a third threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the status value is less than a fourth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the status value is greater than or equal to the fourth threshold and the status value is less than or equal to the third threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority. The step of determining the transmission priority corresponding to the target operation key based on the force feedback value in the first force feedback data further includes: if the force feedback value is greater than a fifth threshold, then the transmission priority corresponding to the target operation key is determined to be the highest priority; if the state value is less than a sixth threshold, then the transmission priority corresponding to the target operation key is determined to be the lowest priority; if the state value is greater than or equal to the sixth threshold and less than or equal to the fifth threshold, then the transmission priority corresponding to the target operation key is determined to be the middle priority.
13. The method according to any one of claims 1-6, characterized in that, The step of determining the transmission frequency corresponding to the transmission priority further includes: If the sending priority is the highest priority, then the sending frequency corresponding to the sending priority is the first preset sending frequency; If the sending priority is the lowest priority, then the sending frequency corresponding to the sending priority is the second preset sending frequency; the second preset sending frequency is lower than the first preset sending frequency. If the sending priority is intermediate priority, then each target operation key corresponding to the difference data is determined, and the sending frequency corresponding to the sending priority is determined according to the status value or force feedback value of each target operation key; wherein, the sending frequency corresponding to the sending priority is greater than the second preset sending frequency and less than the first preset sending frequency.
14. The method according to any one of claims 1-6, characterized in that, The step of sending data packets corresponding to the difference data according to the sending frequency further includes: Get the sending time of the last data packet; Calculate the transmission interval corresponding to the difference data based on the transmission frequency; When the interval between the current time and the sending time reaches the sending interval, the data packet corresponding to the difference data is sent.
15. The method according to any one of claims 1-6, characterized in that, Before the browser of the first device controls the cloud gaming operation input device to generate force feedback based on the force feedback data, the method further includes: the first device receiving a data packet of the force feedback data and parsing the data packet to obtain the packet sequence number of the data packet; And / or, before the second device generates force feedback data based on the data packet of the status data, the method further includes: the second device receiving the data packet of the status data and parsing the data packet to obtain the packet sequence number of the data packet.
16. The method according to claim 15, characterized in that, After the first device receives the force feedback data packet and parses the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the previously received force feedback data packet; if so, retaining the data packet; if not, discarding the data packet. And / or, after the second device receives the data packet of the status data and parses the data packet to obtain the sequence number of the data packet, the method further includes: determining whether the sequence number of the data packet is greater than the sequence number of the data packet of the previously received status data; if so, retaining the data packet; if not, discarding the data packet.
17. The method according to claim 15, characterized in that, The first device includes a first buffer, which stores at least one historically received force feedback data packet. After the first device receives the force feedback data packet and parses it to obtain its sequence number, the method further includes: determining whether the sequence number of the data packet is greater than the sequence number of the data packets in the first buffer; if so, storing the data packet in the first buffer and using the data packet with the smallest sequence number in the first buffer as the data packet to be sent; if not, using the data packet as the data packet to be sent; if the sequence number of the data packet to be sent is greater than the sequence number of the data packet already sent to the browser, sending the data packet to be sent to the browser; if the sequence number of the data packet to be sent is less than the sequence number of the data packet already sent to the browser, discarding the data packet to be sent. And / or, the second device includes a second buffer, which stores at least one data packet of historically received status data; then, after the second device receives the data packet of the status data and parses the data packet to obtain the packet sequence number, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet in the second buffer; if so, storing the data packet in the second buffer and using the data packet with the smallest packet sequence number in the second buffer as the data packet to be sent; if not, using the data packet as the data packet to be sent; if the packet sequence number of the data packet to be sent is greater than the packet sequence number of the data packet already sent to the processing module, sending the data packet to be sent to the processing module; if the packet sequence number of the data packet to be sent is less than the packet sequence number of the data packet already sent to the processing module, discarding the data packet to be sent.
18. A data transmission method based on cloud gaming, characterized in that, The method is executed on the first device side, and the method includes: The browser periodically collects status data of the cloud gaming operation input device in the first device; After the browser collects the first state data in the first instant, it obtains the second state data that has been collected in the second instant; it identifies the difference data that is different from the second state data from the first state data; it determines the sending priority of the difference data and the sending frequency corresponding to the sending priority; it assigns a packet sequence number to the data packet corresponding to the difference data; it sends the data packet corresponding to the difference data according to the sending frequency, and transmits the state data to the second device, so that the second device can generate force feedback data based on the data packet of the state data; The browser receives force feedback data sent by the second device and controls the cloud gaming operation input device to generate force feedback based on the force feedback data.
19. A data transmission method based on cloud gaming, characterized in that, The method is executed on the second device side, and the method includes: The system receives data packets containing status data of the cloud gaming operation input device in the first device, sent by the browser of the first device. The browser periodically collects the status data of the cloud gaming operation input device in the first device. After collecting the first status data at a first time, it acquires the second status data already collected at a second time. It identifies difference data from the first status data that differs from the second status data; determines the sending priority of the difference data and the sending frequency corresponding to the sending priority; assigns a packet sequence number to the data packets corresponding to the difference data; and sends the data packets corresponding to the difference data according to the sending frequency. Force feedback data is generated based on the data packets containing the aforementioned state data. The force feedback data is transmitted to the browser of the first device, so that the browser of the first device can control the cloud gaming operation input device to generate force feedback based on the force feedback data.
20. A first device, characterized in that, The first device includes: The browser is used to periodically collect status data of the cloud gaming operation input device in the first device. After collecting the first status data at a first time, it acquires the second status data that has been collected at a second time. It identifies the difference data that is different from the second status data from the first status data. It determines the sending priority of the difference data and the sending frequency corresponding to the sending priority. It assigns a packet sequence number to the data packet corresponding to the difference data. It sends the data packet corresponding to the difference data according to the sending frequency and transmits the data packet of status data to the second device so that the second device can generate force feedback data based on the data packet of status data. The browser receives the force feedback data sent by the second device. A cloud gaming input device for generating force feedback based on the force feedback data.
21. A second device, characterized in that, The second device includes: A transmission module is configured to receive data packets containing status data of a cloud gaming operation input device in a first device, sent by the browser of the first device; and to transmit force feedback data to the browser of the first device, so that the first device can control the cloud gaming operation input device to generate force feedback based on the force feedback data; wherein, the browser of the first device periodically collects status data of the cloud gaming operation input device in the first device, and after collecting first status data at a first time, acquires second status data that has been collected at a second time; determines difference data that differs from the second status data from the first status data; determines the transmission priority of the difference data and the transmission frequency corresponding to the transmission priority; assigns a packet sequence number to the data packet corresponding to the difference data; and transmits the data packet corresponding to the difference data according to the transmission frequency; The processing module is used to generate force feedback data based on the state data.
22. A data transmission system based on cloud gaming, characterized in that, It includes the first device as described in claim 20 and the second device as described in claim 21.
23. A computing device, characterized in that, include: The processor, memory, communication interface, and communication bus are provided, wherein the processor, memory, and communication interface communicate with each other via the communication bus. The memory is used to store at least one executable instruction, which causes the processor to perform the operation corresponding to the cloud gaming-based data transmission method as described in any one of claims 1-19.
24. A computer storage medium, characterized in that, The storage medium stores at least one executable instruction, which causes the processor to perform the operation corresponding to the cloud gaming-based data transmission method as described in any one of claims 1-19.
25. A computer program product, characterized in that, The computer program product is used to perform the operations corresponding to the data transmission method based on cloud gaming as described in any one of claims 1-19.
Citation Information
Patent Citations
Remote tactile sensor and sensing method thereof
CN101034307A
Tactile feedback method, tactile feedback device, electronic device and stylus
CN103902030A
Video processing method and device and electronic equipment
CN115297223A