Data transmission method, equipment and system based on cloud game
By periodically collecting and analyzing the status data of cloud gaming operation input devices, dynamically adjusting the frequency and priority of data packet transmission, and generating force feedback data, the problems of poor user experience and low retention rate in cloud gaming are solved, thereby improving user engagement and gaming experience.
Patent Information
- Application Number
- CN202511707505.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-22
- Publication Date
- 2026-02-13
AI Technical Summary
Existing cloud gaming suffers from poor user experience and low user retention rates.
By periodically collecting status data from cloud gaming input devices, identifying discrepancies and assigning packet numbers, dynamically adjusting the frequency and priority of data packet transmission, and generating force feedback data, user engagement and gaming experience can be enhanced.
It improves user engagement and retention rates in cloud gaming, reduces data transmission latency and congestion, and saves transmission resources.
Smart Images

Figure CN121513440A_ABST
Abstract
Description
[0001] This application is a divisional application of the invention patent application with the application date of November 22, 2022, the application number of 202211466173.3, and the name of "Data transmission method, device and system based on cloud game". TECHNICAL FIELD
[0002] Embodiments of the present application relate to the technical field of data transmission, in particular to a data transmission method, device and system based on cloud game. BACKGROUND
[0003] Cloud game is a game service based on cloud computing. In the prior art, cloud game is performed by a server for cloud computing, and game audio and video are sent from the server to a client online, so that a user can participate in the game by operating a gamepad or other cloud game operation input device, and then the client sends state data of the cloud game operation input device to the server. However, in this way, the user experience of participating in the cloud game is poor, and the user retention rate of the cloud game is low. SUMMARY
[0004] In view of the technical problems of poor user experience and low user retention rate of cloud game in the prior art, the embodiments of the present application are proposed to provide a data transmission method, device and system based on cloud game to overcome the above problems or at least partially solve the above problems.
[0005] According to a first aspect of the embodiments of the present application, a data transmission method based on cloud game is provided, the method comprising: periodically collecting, by a browser of a first device, state data of a cloud game operation input device in the first device, after collecting first state data at a first time, obtaining second state data that has been collected at a second time; determining, from the first state data, difference data that is different from the second state data; assigning a packet serial number to a data packet corresponding to the difference data; sending the data packet corresponding to the difference data, and transmitting the data packet to a second device; generating, by the second device, force feedback data based on the data packet, and transmitting the force feedback data to the browser of the first device; and controlling, by the browser of the first device, the cloud game operation input device to generate force feedback based on the force feedback data.
[0006] According to a second aspect of the embodiments of the present application, a data transmission method based on cloud gaming is provided, which is executed on a first device side, and the method comprises: periodically collecting, by a browser, state data of a cloud gaming operation input device in the first device; after the browser collects the first state data at a first time, obtaining second state data collected at a second time; determining, from the first state data, difference data different from the second state data; assigning a packet serial number to a data packet corresponding to the difference data; sending the data packet corresponding to the difference data, and transmitting the data packet to a second device, so that the second device generates force feedback data based on the data packet; receiving, by the browser, the force feedback data sent by the second device, and controlling the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0007] According to a third aspect of the embodiments of the present application, a data transmission method based on cloud gaming is provided, which is executed on a second device side, and the method comprises: receiving, by the second device, a data packet of state data of a cloud gaming operation input device in a first device sent by a browser of the first device; wherein the browser of the first device periodically collects the state data of the cloud gaming operation input device in the first device, and after collecting the first state data at a first time, obtains second state data collected at a second time; determines, from the first state data, difference data different from the second state data; assigns a packet serial number to a data packet corresponding to the difference data; sends the data packet corresponding to the difference data; generates force feedback data based on the data packet; and transmits the force feedback data to the browser of the first device, so that the browser of the first device controls the cloud gaming operation input device to generate force feedback based on the force feedback data.
[0008] According to a fourth aspect of the embodiments of the present application, a first device is provided, which comprises: a browser configured to periodically collect state data of a cloud gaming operation input device in the first device, and after collecting the first state data at a first time, obtain second state data collected at a second time; determine, from the first state data, difference data different from the second state data; assign a packet serial number to a data packet corresponding to the difference data; send the data packet corresponding to the difference data, and transmit the data packet to a second device, so that the second device generates force feedback data based on the data packet; and the browser receives force feedback data sent by the second device; a cloud gaming operation input device configured to generate force feedback based on the force feedback data.
[0009] According to a fifth aspect of the embodiments of the present application, a second device is provided, which comprises: The transmission module is configured to receive a data packet of state data of the cloud game operation input device in the first device sent by the browser of the first device, and transmit force feedback data to the browser of the first device, so that the browser of the first device controls the cloud game operation input device to generate force feedback based on the force feedback data; wherein the browser of the first device periodically collects state data of the cloud game operation input device, acquires second state data collected at a second time after collecting first state data at a first time, determines difference data different from the second state data from the first state data, allocates a packet serial number to a data packet corresponding to the difference data, sends the data packet corresponding to the difference data, and the processing module is configured to generate force feedback data based on the data packet.
[0010] According to a sixth aspect of the embodiments of the present application, a cloud game-based data transmission system is provided, which comprises the first device and the second device.
[0011] According to a seventh aspect of the embodiments of the present application, a computing device is provided, which comprises a processor, a memory, a communication interface and a communication bus, the processor, the memory and the communication interface complete communication with each other through the communication bus; the memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the cloud game-based data transmission method.
[0012] According to an eighth aspect of the embodiments of the present application, a computer storage medium is provided, and the storage medium stores at least one executable instruction, and the executable instruction causes a processor to perform operations corresponding to the cloud game-based data transmission method.
[0013] The embodiments of the present application can receive force feedback data generated by the second device by the browser of the first device, so as to generate force feedback in the cloud game operation input device of the first device, realize game force feedback of the cloud game web page end, improve the sense of immersion and game experience of users participating in the cloud game, and improve the retention rate of the cloud game.
[0014] In the embodiments of the present application, the state data comprises state values of at least one operation key of the cloud game operation input device, and / or the force feedback data comprises force feedback values of at least one operation key of the cloud game operation input device, so that data transmission can be performed in a fine-grained manner.
[0015] The embodiment of the application periodically collects state data or force feedback data of a cloud game operation input device in the first device, compares the collected data with previously collected data to determine difference data, and determines the transmission frequency of the difference data according to the transmission priority of the difference data. Thus, in the case that there is difference data between the data collected in adjacent two times, the data packet of the difference data is transmitted, so that the data transmission frequency can be reduced, transmission resources can be saved, and data congestion can be reduced. Moreover, the data transmission frequency is dynamically determined according to the difference data, so that the transmission frequency can be adapted to the importance of the difference data, and data delay can be reduced.
[0016] In the embodiment of the application, 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 taken as the difference data. Alternatively, 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 taken as the difference data, so that the difference data can be accurately determined.
[0017] In the embodiment of the application, the difference data corresponding to each target operation key is determined, and the transmission priority of the difference data is determined according to the operation key type of each target operation key, so that the transmission priority or transmission frequency can be adapted to the importance of the difference data.
[0018] In the embodiment of the application, when the operation key type of at least one target operation key in each target operation key is a digital signal operation key, the transmission priority of the difference data is determined to be the highest priority, so that the operation that obviously causes the sensory difference of the user can be transmitted at a faster speed, and data delay can be reduced.
[0019] In the embodiment of the application, the transmission priority corresponding to the target operation key is determined according to the difference value of the state value or the force feedback, so that the transmission priority can be adapted to the change degree of the state or the force feedback, and the accuracy of the data transmission frequency can be improved.
[0020] In the embodiment of the application, the corresponding transmission priority is determined according to different ranges of the difference value, and the accuracy of the data transmission frequency can be improved.
[0021] In the embodiment of the application, the transmission priority corresponding to the target operation key is determined according to the state value or the force feedback value of the target operation key in the first state data, so that the data transmission frequency can be adapted to the current state or force feedback, and the accuracy of the data transmission frequency can be improved.
[0022] The embodiment of the application divides intervals according to the value of the current state value or the force feedback value, so that the corresponding sending priority can be accurately determined, and the determination accuracy of the sending priority is improved.
[0023] The embodiment of the application establishes a mapping relationship between the sending priority and the sending frequency, so that the sending frequency corresponding to the difference data can be quickly determined.
[0024] The embodiment of the application obtains the sending time of the last sent data packet, calculates the sending interval corresponding to the difference data according to the sending frequency, and sends the data packet corresponding to the difference data when the interval between the current time and the sending time reaches the sending interval, so that the sending of the data packet is consistent with the corresponding sending frequency, and the execution accuracy of the embodiment of the application is improved.
[0025] The embodiment of the application assigns a packet sequence number to the data packet corresponding to the difference data, so that accurate data processing can be performed.
[0026] The embodiment of the application parses the data packet to obtain the packet sequence number of the data packet, judges whether the packet sequence number of the data packet is greater than the packet sequence number of the historically received data packet, and if yes, the data packet is retained; if not, the data packet is discarded. Therefore, expired data can be eliminated, and the data processing accuracy is guaranteed. The first device or the second device in the embodiment of the application includes a buffer area, and the data packet with a large sequence number is stored in the buffer area, so as to reduce the packet loss rate and improve the orderliness of the data packet.
[0027] The above description is only a summary of the technical solutions of the embodiments of the application, in order to more clearly understand the technical means of the embodiments of the application, and the embodiments of the application can be implemented according to the content of the specification, and in order to make the above and other purposes, characteristics and advantages of the embodiments of the application more obvious and easy to understand, the specific embodiments of the embodiments of the application are described below. BRIEF DESCRIPTION OF DRAWINGS
[0028] Various other advantages and benefits will become apparent to those of ordinary skill in the art, upon reading the following detailed description of the preferred embodiments. The accompanying drawings are included to provide a description of the preferred embodiments, and are not meant to limit the embodiments of the application. Moreover, the same reference numerals are used throughout the accompanying drawings to refer to the same or like parts. In the drawings: Figure 1 A flowchart of a data transmission method based on cloud game provided by the embodiment of the application is shown; Figure 2 A flowchart of a state data transmission method provided by the embodiment of the application is shown; Figure 3 A diagram showing the division of the sending priority corresponding to the joystick provided by the embodiment of the application is shown; Figure 4 A linear trigger corresponding to the sending priority provided by the embodiment of the application is shown in the division schematic diagram. Figure 5 A data packet sending time schematic diagram provided by the embodiment of the application is shown. Figure 6 A data transmission schematic diagram provided by the embodiment of the application is shown. Figure 7 A flowchart of a force feedback data transmission method provided by the embodiment of the application is shown. Figure 8 A flowchart of another cloud game-based data transmission method provided by the embodiment of the application is shown. Figure 9 A flowchart of still another cloud game-based data transmission method provided by the embodiment of the application is shown. Figure 10 A structure schematic diagram of a first device provided by the embodiment of the application is shown. Figure 11 A structure schematic diagram of a second device provided by the embodiment of the application is shown. Figure 12 A structure schematic diagram of a cloud game-based data transmission system provided by the embodiment of the application is shown. Figure 13 A structure schematic diagram of a computing device provided by the embodiment of the application is shown. DETAILED DESCRIPTION
[0029] Exemplary embodiments of the embodiments of the application will be described hereinafter with reference to the accompanying drawings. Although exemplary embodiments of the embodiments of the application are shown in the drawings, it should be understood that the embodiments of the application can be implemented in various forms and should not be limited by the embodiments set forth herein. On the contrary, these embodiments are provided so that the embodiments of the application can be more thoroughly and completely conveyed to those skilled in the art, and the scope of the embodiments of the application can be fully conveyed to those skilled in the art.
[0030] Figure 1 A flowchart of a cloud game-based data transmission method provided by the embodiment of the application is shown. Specifically, the embodiment of the application can be executed by a cloud game-based data transmission system. Specifically, as shown in the figure, the method comprises the following steps: Figure 1 Step S110: The browser of the first device collects state data of the cloud game operation input device in the first device.
[0031] 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.
[0032] 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.
[0033] 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 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).
[0034] 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.
[0035] 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.
[0036] Optionally, the browser of the first device collects the state data of the cloud game operation input device in the first device, specifically, periodically collects the state data of the cloud game operation input device in the first device according to a corresponding data collection period, that is, the state data can be collected once every preset time length.
[0037] Further optionally, in order to accurately collect the state data, avoid system resource waste caused by too high collection frequency, and avoid data missing caused by too low collection frequency, the return rate of the cloud game operation input device in the first device is obtained in the embodiment of the application, the data collection period is generated according to the return rate, and then the state data of the cloud game operation input device in the first device is periodically collected according to the data collection period. The return rate can also be called polling rate or refresh rate, which represents the frequency of the cloud game operation input device sending data to the connection subject. For example, the return rate is 500Hz, which means that the cloud game operation input device sends state data to the host of the first device once every 2 milliseconds. Therefore, the data collection period in the embodiment of the application can match the return rate of the cloud game operation input device, for example, if the return rate is 500Hz, the state data is collected once every 2 milliseconds. In addition, if the return rate of the cloud game operation input device cannot be obtained, a general data collection period can be used to periodically collect the state data of the cloud game operation input device in the first device, such as 240Hz and the like.
[0038] Step S120, the browser of the first device transmits the state data to the second device.
[0039] In the prior art, the cloud game client sends state data to the server at a fixed frequency, and the server controls the running of the cloud game. However, when sending state data at a fixed frequency, when the fixed frequency is high, data is frequently sent to the server, which can easily cause data transmission congestion and low data transmission efficiency; when the fixed frequency is low, new state data cannot be sent in time, and the data delay is high. In view of this, the embodiment of the application further improves the sending mode of the state data to reduce the transmission delay of the state data and reduce the occurrence of data congestion. The specific implementation process is as shown in steps S121-S125 in the embodiment of the application: Figure 2 S121, after collecting the first state data at the first time, the second state data collected at the second time is obtained.
[0040] The second time is a state data collection time earlier than the first time and closest to the first time. The state data collection time is specifically a time of collecting state data of the cloud game operation input device in the first device. The first time can be a current latest state data collection time. The second time is earlier than the first time, and the second time is a collection time closest to the first time among all collection times earlier than the first time, that is, the second time is a previous state data collection time of the first time. For example, the data collection period is 2 milliseconds, the first time is a current time T, and the second time is T-2 milliseconds. The state data of the cloud game operation input device in the first device collected at the first time is first state data, and the state data of the cloud game operation input device in the first device collected at the second time is second state data. The first state data can be specifically current collected state data, and the second state data is previous collected state data. Therefore, the embodiment of the application collects state data after reaching the data collection period, and then obtains the previous collected state data after collecting the state data.
[0041] In S122, the first state data and the second state data are compared to determine difference data different from the second state data from the first state data.
[0042] The difference data is obtained from the first state data, and the difference data is not different from any data in the second state data. Therefore, the embodiment of the application screens a part different from the previous collected state data from the collected state data. Optionally, in the data comparison process, the state value of the operation key in the first state data and the state value of the operation key in the second state data are compared to determine a target operation key, and the state value of the target operation key in the first state data is taken 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. For example, the state value of the operation key-linear trigger in the first state data is 20, the state value of the operation key-jump key is 0, the state value of the operation key-linear trigger in the second state data is 10, and the state value of the operation key-jump key is 0. It is determined that the linear trigger is the target operation key, and the difference data is "the state value of the linear trigger is 20".
[0043] In S123, a sending priority of the difference data is determined.
[0044] In this embodiment, the transmission priority of the difference data is determined according to the importance of the difference data. The higher the importance of the difference data, the higher the transmission priority; otherwise, the lower the importance of the difference data, the lower the transmission priority. Specifically, the transmission priority of the difference data can be determined according to the operation key type of each target operation key corresponding to the difference data. The target operation key corresponding to the difference data can be one or more. Since the operation keys of different operation key types have different importance for cloud game control, the priority of the difference data is determined according to the operation key type in this embodiment, which can improve the accuracy of determining the transmission priority.
[0045] If the operation key type of at least one target operation key in each target operation key is a digital signal operation key, the transmission priority of the difference data is determined as the highest priority. The digital signal operation key is a key with only two state values of 0 and 1, such as a jump key and the like. Since the digital signal operation key can obviously cause changes in game sound and picture, or the digital signal operation key can control the main progress of the cloud game, or the use frequency of the digital signal operation key is high, the transmission priority of the difference data is determined as the highest priority when it is determined that the operation key type of at least one target operation key in each target operation key is a digital signal operation key. Thus, if the state value of one or more digital signal operation keys in the current collected state data is different from the state value of the last collected state data, the difference data in the current collected state data is determined as the highest transmission priority.
[0046] If the operation key type of each target operation key is an analog signal operation key, the transmission priority of any target operation key is determined according to the state value of the target operation key, and the transmission priority of the difference data is determined according to the transmission priority of each target operation key. The analog signal operation key is an operation key realized by a programmer, a potentiometer or a Hall sensor, such as a linear trigger or a joystick, and the state value of the analog signal operation key can be multiple. For example, the state value of the linear trigger can be any value in 0-255, and the state value of the joystick can be any value in 0-65535.
[0047] Optionally, the transmission priority of any target operation key can be determined according to the state value of the target operation key by one or more of the following determination methods.
[0048] Priority determination method one: for any target operation key, the difference between the state value of the target operation key in the first state data and the state value of the target operation key in the second state data is calculated, and the transmission priority of the target operation key is determined according to the difference, which represents the degree of change of the state value of the target operation key at the first time and the target operation key at the second time.
[0049] Further, if the difference is greater than a first threshold, it is determined that the sending priority corresponding to the target operation key is a highest priority; if the difference is less than a second threshold, it is determined that the sending priority corresponding to the target operation key is a lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, it is determined that the sending priority corresponding to the target operation key is an intermediate priority, the first threshold being greater than the second threshold.
[0050] For example, if the difference corresponding to the state value is greater than a first threshold, it indicates that the state value of the target operation key changes greatly, and the sending priority corresponding to the target operation key is a highest priority; if the difference corresponding to the state value is less than the first threshold, it indicates that the state value of the target operation key changes slightly, and the sending priority corresponding to the target operation key is a lowest priority; if the difference corresponding to the state value is greater than or equal to a second threshold and less than or equal to the first threshold, it indicates that the state value of the target operation key changes moderately, and the sending priority corresponding to the target operation key is an intermediate priority.
[0051] In the first determination manner, the sending priority is determined according to the change degree of the state value of the target operation key. When the change degree is great, it will cause a significant sensory difference of the user, or when the change degree is great, it will greatly promote the cloud game process, and there will be a significant performance in the game, so the corresponding sending priority is high; on the contrary, when the change degree is small, it will not cause a significant sensory difference of the user, or when the change degree is small, it will not greatly promote the cloud game process, and there will be no significant performance in the game, so the corresponding sending priority is low. Thus, the sending priority corresponding to the target operation key can be accurately determined.
[0052] In the second determination manner, for any target operation key, the sending priority corresponding to the target operation key is determined according to the state value of the target operation key in the first state data. Specifically, if the state value of the target operation key in the first state data is greater than a third threshold, it is determined that the sending priority corresponding to the target operation key is a highest priority; if the state value is less than a fourth threshold, it is determined that the sending priority corresponding to the target operation key is a lowest priority; if the state value is greater than or equal to the fourth threshold and less than or equal to the third threshold, it is determined that the sending priority corresponding to the target operation key is an intermediate priority. In the case of a large state value, such as fast walking, fast moving of the view angle, shooting, fast steering, hard pressing of the accelerator, etc., it can cause a significant sensory change of the user and / or significantly promote the game process, so the sending priority in this case is high; in the case of a small state value, it usually contains analog circuit noise, so the sending priority in this case is low; when the state value is moderate, the corresponding sending priority is moderate.
[0053] Optionally, the third threshold and the fourth threshold corresponding to different target operation keys can be different. For example, the third threshold and the fourth threshold corresponding to the first target operation key are different from the third threshold and the fourth threshold corresponding to the second target operation key. Figure 3 andFigure 4 For example, when the target operation key is a joystick, the corresponding third threshold value is P3, and the corresponding fourth threshold value is P4; when the target operation key is a linear trigger, the corresponding third threshold value is Q3, and the corresponding fourth threshold value is Q4. Among them, the state value of the joystick corresponds to the lowest priority when 0~P4, the state value of the joystick corresponds to the intermediate priority when P4~P3, and the state value of the joystick corresponds to the highest priority when P3~65535; the state value of the linear trigger corresponds to the lowest priority when 0~Q4, the state value of the linear trigger corresponds to the intermediate priority when Q4~Q3, and the state value of the linear trigger corresponds to the highest priority when Q3~255. Among them, since the accuracy of the linear trigger is lower than that of the joystick, the linear trigger is less likely to have analog circuit noise compared to the joystick, so the proportion of the lowest priority interval in the linear trigger is lower than that in the joystick.
[0054] After determining the sending priority of each target operation key through the above-mentioned determination method one and / or determination method two, the sending priority of the difference data is determined according to the sending priority of each target operation key. Specifically, the sending priority with the highest sending priority among the sending priorities corresponding to each target operation key is taken as the sending priority of the difference data. For example, if the target operation key corresponding to the difference data is a linear trigger and a joystick, and the sending priority of the linear trigger is determined to be the lowest priority and the sending priority of the joystick is determined to be the intermediate priority through the above-mentioned determination method one or determination method two, then the final sending priority of the difference data is the intermediate priority.
[0055] In S124, the sending frequency corresponding to the sending priority is determined.
[0056] Different sending priorities have matching sending frequencies, and the higher the sending priority, the higher the sending frequency. Therefore, in this embodiment, the sending frequency of the data packet is dynamically changed, which is dynamically determined according to the sending priority of the difference data.
[0057] Optionally, if the sending priority is the highest priority, the sending frequency corresponding to the sending priority is a first preset sending frequency, for example, the first preset sending frequency can be 120Hz, etc., which can match the data acquisition period. If the sending priority is the lowest priority, the sending frequency corresponding to the sending priority is a second preset sending frequency, which can be 10Hz, etc. Among them, the second preset sending frequency is lower than the first preset sending frequency, that is, the sending frequency is positively correlated with the sending priority, the higher the sending priority, the higher the sending frequency; the lower the sending priority, the lower the sending frequency.
[0058] If the sending priority is the intermediate priority, one or more of the following two determination methods can be used: The sending frequency corresponding to the sending priority is the third preset sending frequency, which is greater than the second preset sending frequency and less than the first preset sending frequency.
[0059] The sending frequency corresponding to the sending priority is the third preset sending frequency, which is greater than the second preset sending frequency and less than the first preset sending frequency. Specifically, if the sending priority of the difference data is the intermediate priority, a function relationship between the sending frequency and the state value difference or the state value is obtained in advance. Thus, in the case that the sending priority of the difference data is the intermediate priority, the target operation key corresponding to the intermediate priority in the difference data is determined. 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 sending frequency is determined according to the function relationship between the sending 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 sending frequency is determined according to the function relationship between the sending frequency and the state value. The function relationship can be a nonlinear function relationship, and the specific function relationship is not limited in the embodiment of the application.
[0060] S125, the data packet corresponding to the difference data is sent according to the sending frequency.
[0061] Specifically, the sending time of the data packet of the last sent state data in the first device is obtained, the sending interval corresponding to the difference data is calculated according to the sending frequency, and the data packet corresponding to the difference data is sent when the interval between the current time and the sending time of the last sent data packet reaches the sending interval corresponding to the difference data. For example, if the sending frequency corresponding to the difference data is 240 Hz, the sending interval is 1 / 240 seconds, if the time interval between the current time and the sending time of the last sent data packet is less than 1 / 240 seconds, the difference data packet is sent until the time interval between the current time and the sending time of the last sent data packet is equal to 1 / 240 seconds; if the time interval between the current time and the sending time of the last sent data packet is greater than or equal to 1 / 240 seconds, the difference data packet is directly sent.
[0062] Optionally, the data packet corresponding to the difference data is specifically encapsulated into a data packet according to a corresponding data encapsulation format, and a corresponding packet sequence number and a packet type are assigned to the data packet, and the packet type in this step is specifically a state data type. When assigning the packet sequence number, the packet sequence number is incremented according to the sending order of the data packet, for example, the packet sequence number of the data packet of the state data type sent for the first time is 1, the packet sequence number of the data packet of the state data type sent for the second time is 2, and so on.
[0063] Optionally, a data transmission channel between the first device and the second device is established, and the data transmission channel is established based on a UDP (User Datagram Protocol, abbreviated as UDP; User Datagram Protocol) protocol, so that the data packet corresponding to the difference data is sent based on the data transmission channel. The data transmission channel established based on the UDP protocol is a disorderly data transmission channel, the data packets transmitted through the data transmission channel can arrive in any order, have a high transmission rate, and have a low data delay. The data transmission channel can be constructed based on a disorderly mode of WebRTC or WebTransport, etc.
[0064] In this way, the data packet corresponding to the difference data is encapsulated into a data packet according to a corresponding data encapsulation format, and a corresponding packet sequence number and a packet type are assigned to the data packet, and the packet type in this step is specifically a state data type. Figure 5For example, the user presses the key A at 3.500 ms and holds it for 25 ms, and then lifts the key A at 28.500 ms. The scheme collects the input device data according to a data collection period of 240 Hz (i.e. an interval of 4.147 ms). Thus, the state value A = 1 (the key A is pressed) is collected at 4.167 ms, the state value A = 1 is collected at 8.333 ms,..., and the state value A = 0 is collected at 29.167 ms. The scheme adopts a dynamic sending frequency of 10-120 Hz, i.e. the lowest priority corresponds to a sending frequency of 10 Hz, and the highest priority corresponds to a sending frequency of 120 Hz. After the scheme acquires A = 1 at 4.167 ms, it determines that A = 0 at 0 ms, which indicates that the state value of the key A is different, so the key A is the target operation key, and A = 1 is the differential data. Since the key A is a digital signal operation key, it corresponds to the highest priority, and the sending frequency corresponding to the highest priority is 120 Hz, and the sending interval is 1000 / 120 ms. Since no data has been sent between 4.167 ms-1000 / 120 ms to 4.167 ms, the scheme will send the data packet of A = 1 at 4.167 ms, i.e. send the data packet of pressing the key A. The response speed is 4.167 ms-3.500 ms = 0.667 ms. Then A = 1 is collected at 8.333 ms, and since the A = 1 collected at 8.333 ms is the same as the A = 1 collected at 4.167 ms, the scheme does not send the state value of the key A at 8.333 ms. Until A = 0 is collected at 29.167 ms, which is different from A = 1 collected at 25 ms, so the key A is determined to be the target operation key at 29.167 ms, and A = 0 is the differential data, and the data packet of A = 0 is sent at 29.167 ms, i.e. the data packet of lifting the key A is sent, and the response speed is 29.167 ms-28.500 ms = 0.667 ms. If the fixed sending frequency of 120 Hz is used for sending, A = 0 will be sent at 0 ms, A = 1 will be sent at 8.334 ms, A = 1 will be sent at 16.667 ms, A = 1 will be sent at 25 ms, and A = 0 will be sent at 33.334 ms. Among them, A = 1 is sent at 8.333 ms, i.e. the key A is pressed, and the response speed is 8.334 ms-3.500 ms = 4.834 ms; A = 0 is sent at 33.334 ms, i.e. the key A is lifted, and the response speed is 33.334 ms-28.500 ms = 4.834 ms. As can be seen, the scheme can reduce the number of sent data packets, improve the response speed, and reduce the delay.
[0065] S130, the second device generates force feedback data based on the state data.
[0066] 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.
[0067] 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.
[0068] 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.
[0069] 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.
[0070] In the case of closing the buffer, the receiving control module receives the data packets with serial numbers 1, 3 and 4 in turn, and when the data packet with serial number 2 is received, since the serial number 2 is smaller than the serial numbers of the data packets already received, the data packet with serial number 2 is not sent to the receiving end processing module; correspondingly, when the data packet with serial number 7 is received, since the serial number 7 is smaller than the serial numbers of the data packets already received, the data packet with serial number 7 is not sent to the receiving end processing module, and finally the receiving end processing module receives the data packets with serial numbers 1, 3, 4, 6 and 8 in turn.
[0071] In the case of buffering one frame in the buffer, i.e. the buffer stores one data packet, after the data packet with serial number 1 is received, the receiving control module stores the data packet in the buffer; after the data packet with serial number 3 is received, since the serial number 3 is larger than the serial number 1, the data packet with serial number 1 is sent to the receiving end processing module, and the data packet with serial number 3 is stored in the buffer; after the data packet with serial number 2 is received, the data packet with serial number 4 is stored in the buffer, since the serial number 2 is smaller than the serial number of the data packet already sent (the data packet with serial number 3), the data packet with serial number 2 is discarded, and the same is true for the subsequent data packets. Finally, the receiving end processing module receives the data packets with serial numbers 1, 3, 4, 6, 7 and 8 in turn.
[0072] In the case of buffering two frames in the buffer, i.e. the buffer stores two data packets, after the data packet with serial number 1 is received, the receiving control module stores the data packet in the buffer; after the data packet with serial number 3 is received, the receiving control module stores the data packet in the buffer; after the data packet with serial number 4 is received, it is judged whether the serial number of the data packet with the smallest serial number (i.e. the data packet with serial number 1) is larger than the serial number of the data packet already sent, since the data packet with serial number larger than 1 has not been sent yet, the data packet with serial number 1 is sent to the receiving end processing module; the same is true for the subsequent data packets, and finally the receiving end processing module receives the data packets with serial numbers 1, 2, 3, 4, 6, 7 and 8 in turn. It can be seen from the above that the increase of the buffer can effectively reduce the packet loss rate and improve the effectiveness of the data packets.
[0073] Further, the second device generates force feedback data based on the state data. The force feedback data is a kind of counterforce exhibited by the cloud game operation input device. For example, if the cloud game is a racing game, when the user turns the steering wheel of the physical game handle to the left, the physical game handle will exhibit a certain resistance in the steering wheel, so that the user intuitively feels that it is more difficult to turn to the left, thereby increasing the user's sense of immersion. Optionally, the force feedback data of the cloud game operation input device includes a force feedback value of at least one operation key of the cloud game operation input device. For example, if the cloud game operation input device is a physical game handle, the state data includes a force feedback value of an operation key of the physical game handle having a force feedback function, and the force feedback value is used to indicate the size of the counterforce.
[0074] In step S140, the second device transmits the force feedback data to the browser of the first device.
[0075] Specifically, the second device periodically collects the force feedback data. The collection period can refer to the determination method of the collection period in step S120, and will not be repeated here. Optionally, in order to avoid the force feedback data from being blocked in the transmission process and reduce the data delay, the transmission of the force feedback data can be realized by steps S141-S145: Figure 7 S141, after collecting the first force feedback data at the third time, the second force feedback data collected at the fourth time is obtained.
[0076] The fourth time is the force feedback data collection time closest to the third time and earlier than the third time. The force feedback data collection time is specifically the time of collecting the force feedback data. The third time can be the current latest force feedback data collection time, the fourth time is earlier than the third time, and the fourth time is the force feedback data collection time closest to the third time among all the force feedback data collection times earlier than the third time, that is, the fourth time is the last force feedback data collection time of the third time. For example, the data collection period is 2 milliseconds, the third time is the current time T, and the fourth time is T-2 milliseconds. The force feedback data collected at the third time is the first force feedback data, and the force feedback data collected at the fourth time is the second force feedback data. The first force feedback data can be the current collected force feedback data, and the second force feedback data is the last collected force feedback data. Thus, the embodiment of the application collects the force feedback data after reaching the data collection period, and then obtains the last collected force feedback data after collecting the force feedback data.
[0077] S142, data comparison is performed on the first force feedback data and the second force feedback data to determine difference data different from the second force feedback data from the first force feedback data.
[0078] The difference data is obtained from the first force feedback data, and the difference data is not different from any of the second force feedback data. Thus, the embodiment of the present application is to filter the part of the force feedback data which is different from the last collected force feedback data from the force feedback data after collecting the force feedback data. Optionally, in the data comparison process, specifically, 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 taken 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.
[0079] S143, determining the sending priority of the difference data.
[0080] The specific determination method of the sending priority can refer to Figure 2 The description of related steps is not repeated here. Wherein, if the operation key type of each target operation key is an analog signal operation key, the sending priority corresponding to the target operation key is determined according to the force feedback value of any target operation key. The sending priority corresponding to the target operation key can be determined according to the force feedback value of any target operation key by one or more of the following determination methods.
[0081] Priority determination method one: for any target operation key, 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 is calculated, and the sending priority corresponding to the target operation key is determined according to the difference, which represents the change degree of the force feedback value of the target operation key at the third time and the fourth time.
[0082] Further, if the difference is greater than a first threshold, it is determined that the sending priority corresponding to the target operation key is a highest priority; if the difference is less than a second threshold, it is determined that the sending priority corresponding to the target operation key is a lowest priority; if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, it is determined that the sending priority corresponding to the target operation key is an intermediate priority, the first threshold being 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 greatly, 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 intermediate 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. In the first determination mode, the sending priority is determined according to the change degree of the force feedback value of the target operation key, and a greater change degree will cause a significant sensory difference of the user, and thus the corresponding sending priority is high; otherwise, a smaller change degree will not cause a significant sensory difference of the user, and thus the corresponding sending priority is low. Thus, the sending priority corresponding to the target operation key can be accurately determined.
[0083] The second priority determination mode: for any target operation key, the sending priority corresponding to the target operation key is determined according to the force feedback value of the target operation key in the first force feedback data. Specifically, if the force feedback value is greater than a fifth threshold, it is determined that the sending priority corresponding to the target operation key is a highest priority; if the force feedback value is less than a sixth threshold, it is determined that the sending priority corresponding to the target operation key is a lowest priority; if the force feedback value is greater than or equal to the sixth threshold and less than or equal to the fifth threshold, it is determined that the sending priority corresponding to the target operation key is an intermediate priority.
[0084] S144, determining a sending frequency corresponding to the sending priority.
[0085] The implementation process of this step can refer to the description in step S124, which will not be repeated here. Different from S124, if the transmission priority is the intermediate priority, the frequency determination mode two is specifically: determining each target operation key corresponding to the differential data, and determining the transmission frequency corresponding to the transmission priority according to the force feedback value of each target operation key. Specifically, if the transmission priority of the differential data is the intermediate priority, the function relationship between the transmission frequency and the force feedback value or the difference value of the force feedback value is obtained in advance. Thus, in the case where the transmission priority of the differential data is the intermediate priority, the target operation key corresponding to the intermediate priority in the differential data is determined. Then, the difference value between the force feedback value in the first force feedback value data and the force feedback value in the second force feedback value data of the target operation key is obtained, and the corresponding transmission frequency is determined according to the function relationship between the transmission frequency and the force feedback difference value; 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 according to the function relationship between the transmission frequency and the force feedback value.
[0086] S145, according to the transmission frequency, transmitting the data packet corresponding to the differential data.
[0087] Step S150, the browser of the first device controls the cloud game operation input device to generate force feedback based on the force feedback data.
[0088] Firstly, the first device receives the force feedback data transmitted by the second device. Specifically, the first device receives the data packet of the force feedback data, and parses the data packet to obtain the packet sequence number of the data packet. After parsing, the force feedback data can be obtained by one or more of the following ways.
[0089] Method one: judging whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet of the historical received force feedback data; if yes, retaining the data packet; if no, discarding the data packet, thereby retaining the new data packet and discarding the expired data packet each time, thereby improving the transmission efficiency.
[0090] Method two: the first device contains a first buffer area, and the first buffer area stores at least one data packet of the historical received force feedback data. After parsing, it is judged whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet in the first buffer area; if yes, storing the data packet in the first buffer area, and taking the data packet with the smallest packet sequence number in the first buffer area as the to-be-sent data packet; if no, taking the data packet as the to-be-sent data packet. It is further judged whether the packet sequence number of the to-be-sent data packet is less than the packet sequence number of the data packet that has been sent to the browser; if the packet sequence number of the to-be-sent data packet is less than the packet sequence number of the data packet that has been sent to the browser, discarding the to-be-sent data packet; if the packet sequence number of the to-be-sent data packet is greater than the packet sequence number of the data packet that has been sent to the browser, sending the to-be-sent data packet to the browser.
[0091] The browser generates force feedback instructions of the cloud game operation input device after receiving the force feedback data, and then the force feedback instructions are executed by the cloud game operation input device to generate force feedback. For example, the force feedback can be vibration or resistance, etc.
[0092] Therefore, the embodiment of the present application can receive the force feedback data generated by the second device by the browser of the first device, so as to generate force feedback in the cloud game operation input device of the first device, realize the force feedback of the cloud game web page, improve the sense of participation and game experience of the user in the cloud game, and improve the retention rate of the cloud game.
[0093] Figure 8 A flowchart of another data transmission method based on cloud game provided by the embodiment of the present application is shown. Specifically, the embodiment of the present application can be executed by the first device. Specifically, as shown in the figure, the method comprises the following steps: Figure 8 Step S810: The browser collects state data of the cloud game operation input device in the first device.
[0094] Step S820: The browser transmits the state data to the second device, so that the second device generates force feedback data based on the state data.
[0095] Step S830: The browser receives the force feedback data sent by the second device, and controls the cloud game operation input device to generate force feedback based on the force feedback data.
[0096] Optionally, the state data contains state values of at least one operation key in the cloud game operation input device.
[0097] Optionally, the browser collecting the state data of the cloud game operation input device in the first device comprises: the browser periodically collects the state data; the browser transmitting the state data to the second device comprises: after collecting the first state data at the first time, the second state data collected at the second time is obtained; wherein the second time is the state data collection time closest to the first time and earlier than the first time; the first state data and the second state data are compared to determine the difference data different from the second state data from the first state data; the sending priority of the difference data is determined, and the sending frequency corresponding to the sending priority is determined; and the data packet corresponding to the difference data is sent according to the sending frequency.
[0098] Optionally, the data comparison between the first state data and the second state data to determine the difference data different from the second state data from the first state data further comprises: comparing the state values of the operation keys in the first state data with the state values of the operation keys in the second state data to determine the target operation keys, and taking the state values of the target operation keys in the first state data as the difference data; and the state values of the target operation keys in the first state data are different from the state values of the target operation keys in the second state data.
[0099] Optionally, the determining of the sending priority of the difference data comprises: determining the target operation keys corresponding to the difference data; and determining the sending priority of the difference data according to the operation key types of the target operation keys.
[0100] Optionally, the determining of the sending priority of the difference data according to the operation key types of the target operation keys comprises: if the operation key type of at least one of the target operation keys is a digital signal operation key, determining the sending priority of the difference data as the highest priority; and if the operation key types of all the target operation keys are analog signal operation keys, determining the sending priority of the difference data according to the state values of the target operation keys.
[0101] Optionally, the determining of the sending priority of the target operation key according to the state value of the target operation key further comprises: 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 of the target operation key in the second state data, and determining the sending priority of the target operation key according to the difference.
[0102] Optionally, the determining of the sending priority of the target operation key according to the difference further comprises: if the difference is greater than a first threshold value, determining the sending priority of the target operation key as the highest priority; if the difference is less than a second threshold value, determining the sending priority of the target operation key as the lowest priority; and if the difference is greater than or equal to the second threshold value and less than or equal to the first threshold value, determining the sending priority of the target operation key as the intermediate priority.
[0103] Optionally, the determining of the sending priority of the target operation key according to the state value of the target operation key further comprises: for any target operation key, determining the sending priority of the target operation key according to the state value of the target operation key in the first state data.
[0104] Optionally, the determining the sending priority corresponding to the target operation key according to the state value of the target operation key in the first state data comprises: if the state value is greater than a third threshold value, determining that the sending priority corresponding to the target operation key is a highest priority; if the state value is less than a fourth threshold value, determining that the sending priority corresponding to the target operation key is a lowest priority; and if the state value is greater than or equal to the fourth threshold value and less than or equal to the third threshold value, determining that the sending priority corresponding to the target operation key is an intermediate priority.
[0105] Optionally, the determining the sending frequency corresponding to the sending priority comprises: 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; and if the sending priority is the intermediate priority, determining the target operation key corresponding to the difference data, and determining the sending frequency corresponding to the sending priority according to the state value of the 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.
[0106] Optionally, the sending the data packet corresponding to the difference data according to the sending frequency further comprises: obtaining a sending time of a last sent data packet; calculating a sending interval of the difference data according to the sending frequency; and sending the data packet corresponding to the difference data when an interval between a current time and the sending time reaches the sending interval.
[0107] Optionally, the method further comprises: assigning a packet sequence number to the data packet corresponding to the difference data; and before the force feedback data is used to control the cloud game operation input device to generate force feedback, the method further comprises: receiving a data packet of the force feedback data, and analyzing the data packet to obtain a packet sequence number of the data packet.
[0108] Optionally, the method further comprises: after the data packet of the force feedback data is received and analyzed to obtain the packet sequence number of the data packet, determining whether the packet sequence number of the data packet is greater than a packet sequence number of a data packet of the force feedback data received in the past; if yes, retaining the data packet; and if no, discarding the data packet.
[0109] Optionally, the first device comprises a first buffer, and the first buffer stores at least one historical received force feedback data packet; after receiving the force feedback data packet, the method further comprises: 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 yes, storing the data packet in the first buffer, and taking the data packet with the smallest packet sequence number in the first buffer as a to-be-sent data packet; if no, taking the data packet as the to-be-sent data packet; if the packet sequence number of the to-be-sent data packet is greater than the packet sequence number of the data packet that has been sent to the browser, sending the to-be-sent data packet to the browser; and if the packet sequence number of the to-be-sent data packet is less than the packet sequence number of the data packet that has been sent to the browser, discarding the to-be-sent data packet.
[0110] Therefore, the embodiment of the present application can receive the force feedback data generated by the second device by the browser of the first device, so as to generate force feedback in the cloud game operation input device of the first device, realize the force feedback of the cloud game web page, improve the sense of participation and the game experience of the user in the cloud game, and improve the retention rate of the cloud game.
[0111] Figure 9 Another flowchart of a data transmission method based on cloud game provided by the embodiment of the present application is shown. Specifically, the embodiment of the present application can be executed by the second device. Specifically, as shown in the figure, Figure 9 the method comprises the following steps: Step S910: receiving the state data of the cloud game operation input device in the first device sent by the browser of the first device.
[0112] Step S920: generating force feedback data based on the state data.
[0113] Step S930: transmitting the force feedback data to the browser of the first device, so that the first device controls the cloud game operation input device to generate force feedback based on the force feedback data.
[0114] Optionally, the force feedback data comprises a force feedback value of at least one operation key in the cloud game operation input device.
[0115] Optionally, the transmitting the force feedback data to the browser of the first device comprises: periodically collecting the force feedback data; after collecting the first force feedback data at a third time, obtaining second force feedback data that has been collected at a fourth time; wherein the fourth time is a force feedback data collection time that is earlier than the third time and closest to the third time; performing data comparison on the first force feedback data and the second force feedback data to determine difference data that is different from the second force feedback data from the first force feedback data; determining a sending priority of the difference data and a sending frequency corresponding to the sending priority; and sending a data packet corresponding to the difference data according to the sending frequency.
[0116] Optionally, the performing data comparison on the first force feedback data and the second force feedback data to determine difference data that is different from the second force feedback data from the first force feedback data comprises: performing data comparison on force feedback values of the operation keys in the first force feedback data and force feedback values of the operation keys in the second force feedback data to determine a target operation key, and taking 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.
[0117] Optionally, the determining the sending priority of the difference data comprises: determining respective target operation keys corresponding to the difference data; and determining the sending priority of the difference data according to operation key types of the respective target operation keys.
[0118] Optionally, the determining the sending priority of the difference data according to the operation key types of the target operation keys comprises: if an operation key type of at least one of the respective target operation keys is a digital signal operation key, determining a highest priority as the sending priority of the difference data; if the operation key types of the respective target operation keys are all analog signal operation keys, determining a sending priority corresponding to any target operation key according to a force feedback value of the target operation key, and determining the sending priority of the difference data according to the sending priorities corresponding to the respective target operation keys.
[0119] Optionally, the determining the sending priority corresponding to any target operation key according to the force feedback value of the target operation key further comprises: for any target operation key, calculating a difference between the force feedback value of the target operation key in the first force feedback data and the force feedback value of the target operation key in the second force feedback data, and determining the sending priority corresponding to the target operation key according to the difference.
[0120] Optionally, determining the transmission priority corresponding to the target operation key further comprises: if the difference is greater than a first threshold, determining that the transmission priority corresponding to the target operation key is a highest priority; if the difference is less than a second threshold, determining that the transmission priority corresponding to the target operation key is a lowest priority; and if the difference is greater than or equal to the second threshold and less than or equal to the first threshold, determining that the transmission priority corresponding to the target operation key is an intermediate priority.
[0121] Optionally, determining the transmission priority corresponding to the target operation key according to the force feedback value of any target operation key comprises: for any target operation key, determining the transmission priority corresponding to the target operation key according to the force feedback value of the target operation key in the first force feedback data.
[0122] Optionally, determining the transmission priority corresponding to the target operation key according to the force feedback value of the target operation key in the first force feedback data comprises: if the force feedback value is greater than a fifth threshold, determining that the transmission priority corresponding to the target operation key is a highest priority; if the force feedback value is less than a sixth threshold, determining that the transmission priority corresponding to the target operation key is a lowest priority; and if the force feedback value is greater than or equal to the sixth threshold and less than or equal to the fifth threshold, determining that the transmission priority corresponding to the target operation key is an intermediate priority.
[0123] Optionally, determining the transmission frequency corresponding to the transmission priority comprises: if the transmission priority is a highest priority, the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is a 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, determining the transmission frequency corresponding to the transmission priority according to the force feedback value of each target operation key corresponding to the difference data; 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.
[0124] Optionally, transmitting the data packet corresponding to the difference data according to the transmission frequency further comprises: obtaining a transmission time of a last transmitted data packet; calculating a transmission interval of the difference data according to the transmission frequency; and transmitting the data packet corresponding to the difference data when an interval between a current time and the transmission time reaches the transmission interval.
[0125] Optionally, before transmitting the data packet corresponding to the difference data, the method further comprises: assigning a packet sequence number to the data packet corresponding to the difference data; and before generating the force feedback data based on the state data, the method further comprises: receiving a data packet of the state data, and parsing the data packet to obtain a packet sequence number of the data packet.
[0126] Optionally, after receiving the data packet of the state data, parsing the data packet to obtain the packet sequence number of the data packet, the method further comprises: judging whether the packet sequence number of the data packet is greater than the packet sequence number of the data packet of the state data received historically; if yes, retaining the data packet; if not, discarding the data packet.
[0127] Optionally, the second device comprises a second buffer, and the second buffer stores at least one data packet of the state data received historically; after receiving the data packet of the state data, parsing the data packet to obtain the packet sequence number of the data packet, the method further comprises: judging 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 yes, storing the data packet in the second buffer, and taking the data packet with the smallest packet sequence number in the second buffer as the to-be-sent data packet; if not, taking the data packet as the to-be-sent data packet; if the packet sequence number of the to-be-sent data packet is greater than the packet sequence number of the data packet sent to the processing module, sending the to-be-sent data packet to the processing module; if the packet sequence number of the to-be-sent data packet is smaller than the packet sequence number of the data packet sent to the processing module, discarding the to-be-sent data packet.
[0128] Therefore, the embodiment of the application can receive the force feedback data generated by the second device by the browser of the first device, thereby generating force feedback in the cloud game operation input device of the first device, realizing force feedback of the cloud game web page, improving the sense of immersion and game experience of users participating in the cloud game, and improving the retention rate of the cloud game.
[0129] Figure 10 A structural schematic diagram of a first device is shown. As shown in the figure, Figure 10 The first device 1000 comprises a browser 1010 and a cloud game operation input device 1020. The browser 1010 is configured to collect state data of the cloud game operation input device in the first device, and transmit the state data to a second device, so that the second device generates force feedback data based on the state data; and the browser receives the force feedback data sent by the second device; and the cloud game operation input device 1020 is configured to generate force feedback based on the force feedback data.
[0130] Optionally, the state data comprises a state value of at least one operation key of the cloud game operation input device.
[0131] Optionally, the browser is configured to periodically collect the state data, obtain second state data collected at a second time after first state data is collected at a first time, the second time being the closest state data collection time to the first time, perform data comparison between the first state data and the second state data to determine difference data different from the second state data from the first state data, determine a sending priority of the difference data and a sending frequency corresponding to the sending priority, and send a data packet corresponding to the difference data according to the sending frequency.
[0132] Optionally, the browser is configured to perform data comparison between a state value of an operation key in the first state data and a state value of the operation key in the second state data to determine a target operation key, and determine 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 being different from the state value of the target operation key in the second state data.
[0133] Optionally, the browser is configured to determine each target operation key corresponding to the difference data, and determine the sending priority of the difference data according to an operation key type of each target operation key.
[0134] Optionally, the browser is configured to determine the sending priority of the difference data as a highest priority if the operation key type of at least one target operation key among the target operation keys is a digital signal operation key. Optionally, the browser is configured to determine the sending priority of the difference data according to the sending priority of any target operation key if the operation key type of each target operation key is an analog signal operation key.
[0135] Optionally, the browser is configured to calculate a difference value between the state value of any target operation key in the first state data and the state value of the target operation key in the second state data, and determine the sending priority of the target operation key according to the difference value.
[0136] Optionally, the browser is configured to determine the sending priority of the target operation key as a highest priority if the difference value is greater than a first threshold value, determine the sending priority of the target operation key as a lowest priority if the difference value is less than a second threshold value, and determine the sending priority of the target operation key as an intermediate priority if the difference value is greater than or equal to the second threshold value and less than or equal to the first threshold value.
[0137] Optionally, the browser is configured to determine the sending priority of any target operation key according to the state value of the target operation key in the first state data.
[0138] Optionally, the determining the sending priority corresponding to the target operation key according to the state value of the target operation key in the first state data comprises: if the state value is greater than a third threshold value, determining that the sending priority corresponding to the target operation key is a highest priority; if the state value is less than a fourth threshold value, determining that the sending priority corresponding to the target operation key is a lowest priority; and if the state value is greater than or equal to the fourth threshold value and less than or equal to the third threshold value, determining that the sending priority corresponding to the target operation key is an intermediate priority.
[0139] Optionally, the browser 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 the intermediate priority, determining each target operation key corresponding to the difference data, and determining the sending frequency corresponding to the sending priority according to the state value of each target operation key; and the sending frequency corresponding to the sending priority is greater than the second preset sending frequency and less than the first preset sending frequency.
[0140] Optionally, the browser is configured to: acquire a sending time of a last sent data packet; calculate a sending interval of the difference data according to the sending frequency; and send the data packet corresponding to the difference data when an interval between a current time and the sending time reaches the sending interval.
[0141] Optionally, the browser is configured to: assign a packet serial number to the data packet corresponding to the difference data; receive the data packet of the force feedback data, and parse the data packet to acquire the packet serial number of the data packet.
[0142] Optionally, the browser is configured to: determine whether the packet serial number of the data packet is greater than a packet serial number of a last received data packet of the force feedback data; if yes, retain the data packet; and if no, discard the data packet.
[0143] Optionally, the first device comprises a first buffer and a receiving control module, and the first buffer stores at least one data packet of the last received force feedback data; the receiving control module is configured to: after receiving the data packet of the force feedback data and parsing the data packet to acquire the packet serial number of the data packet, determine whether the packet serial number of the data packet is greater than the packet serial number of the data packet in the first buffer; if yes, store the data packet in the first buffer, and take the data packet with the smallest packet serial number in the first buffer as a to-be-sent data packet; if no, take the data packet as the to-be-sent data packet; if the packet serial number of the to-be-sent data packet is greater than the packet serial number of a data packet that has been sent to the browser, send the to-be-sent data packet to the browser; and if the packet serial number of the to-be-sent data packet is less than the packet serial number of the data packet that has been sent to the browser, discard the to-be-sent data packet.
[0144] Therefore, the embodiment of the present application can receive the force feedback data generated by the second device by the browser of the first device, so as to generate force feedback in the cloud game operation input device of the first device, realize the force feedback of the cloud game web page, improve the sense of immersion and the game experience of the user participating in the cloud game, and improve the retention rate of the cloud game.
[0145] Figure 11 A structure diagram of a second device is shown. As shown in the figure, the second device 1100 includes a transmission module 1110 and a processing module 1120. The transmission module 1110 is configured to receive state data of a cloud game operation input device in a first device sent by a browser of the first device, and transmit force feedback data to the browser of the first device, so that the first device controls the cloud game operation input device to generate force feedback based on the force feedback data. The processing module 1120 is configured to generate force feedback data based on the state data. Figure 11
[0146] Optionally, the force feedback data includes force feedback values of at least one operation key in the cloud game operation input device.
[0147] Optionally, the transmission module is configured to periodically collect force feedback data, acquire second force feedback data collected at a fourth time after collecting first force feedback data at a third time, wherein the fourth time is a force feedback data collection time closest to the third time and earlier than the third time, perform data comparison on the first force feedback data and the second force feedback data to determine difference data different from the second state data from the first state data, determine a sending priority of the difference data and a sending frequency corresponding to the sending priority, and send a data packet corresponding to the difference data according to the sending frequency.
[0148] Optionally, the transmission module is configured to perform data comparison on force feedback values of operation keys in the first force feedback data and force feedback values of operation keys in the second force feedback data to determine a target operation key, and take 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.
[0149] Optionally, the transmission module is configured to determine each target operation key corresponding to the difference data, and determine the sending priority of the difference data according to operation key types of the each target operation key.
[0150] Optionally, the transmission module is configured to: if the operation key type of at least one of the target operation keys is a digital signal operation key, determine that the transmission priority of the difference data is a highest priority; if the operation key type of each of the target operation keys is an analog signal operation key, determine the transmission priority corresponding to any target operation key according to the force feedback value of the target operation key, and determine the transmission priority of the difference data according to the transmission priorities corresponding to the target operation keys.
[0151] Optionally, the transmission module is configured to: for any target operation key, calculate a difference value between the force feedback value of the target operation key in the first force feedback data and the force feedback value of the target operation key in the second force feedback data, and determine the transmission priority corresponding to the target operation key according to the difference value.
[0152] Optionally, the transmission module is configured to: if the difference value is greater than a first threshold value, determine that the transmission priority corresponding to the target operation key is a highest priority; if the difference value is less than a second threshold value, determine that the transmission priority corresponding to the target operation key is a lowest priority; and if the difference value is greater than or equal to the second threshold value and the difference value is less than or equal to the first threshold value, determine that the transmission priority corresponding to the target operation key is an intermediate priority.
[0153] Optionally, the transmission module is configured to: for any target operation key, determine the transmission priority corresponding to the target operation key according to the force feedback value of the target operation key in the first force feedback data.
[0154] Optionally, the transmission module is configured to: if the force feedback value is greater than a fifth threshold value, determine that the transmission priority corresponding to the target operation key is a highest priority; if the force feedback value is less than a sixth threshold value, determine that the transmission priority corresponding to the target operation key is a lowest priority; and if the force feedback value is greater than or equal to the sixth threshold value and the force feedback value is less than or equal to the fifth threshold value, determine that the transmission priority corresponding to the target operation key is an intermediate priority.
[0155] Optionally, the transmission module is configured to: if the transmission priority is a highest priority, the transmission frequency corresponding to the transmission priority is a first preset transmission frequency; if the transmission priority is a 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; and if the transmission priority is an intermediate priority, determine the transmission frequency corresponding to the transmission priority according to the force feedback values of the target operation keys corresponding to the difference data; the transmission frequency corresponding to the transmission priority is greater than the second preset transmission frequency and less than the first preset transmission frequency.
[0156] Optionally, the transmission module is configured to: acquire a sending time of a last sent data packet; calculate a sending interval corresponding to the difference data according to the sending frequency; and send the data packet corresponding to the difference data when an interval between a current time and the sending time reaches the sending interval.
[0157] Optionally, the transmission module is configured to: assign a packet sequence number to the data packet corresponding to the difference data; and receive the data packet of the state data, and parse the data packet to acquire the packet sequence number of the data packet.
[0158] Optionally, the transmission module is configured to: after receiving the data packet of the state data and parsing the data packet to acquire the packet sequence number of the data packet, determine whether the packet sequence number of the data packet is greater than a packet sequence number of a last received data packet of the state data; if yes, retain the data packet; and if no, discard the data packet.
[0159] Optionally, the second device comprises a second buffer, and the second buffer stores at least one data packet of the state data that is last received; and the transmission module is configured to: after receiving the data packet of the state data and parsing the data packet to acquire the packet sequence number of the data packet, determine whether the packet sequence number of the data packet is greater than a packet sequence number of a data packet in the second buffer; if yes, store the data packet in the second buffer, and take a data packet with a smallest packet sequence number in the second buffer as a to-be-sent data packet; and if no, take the data packet as the to-be-sent data packet; if the packet sequence number of the to-be-sent data packet is greater than a packet sequence number of a data packet that has been sent to the processing module, send the to-be-sent data packet to the processing module; and if the packet sequence number of the to-be-sent data packet is smaller than the packet sequence number of the data packet that has been sent to the processing module, discard the to-be-sent data packet.
[0160] It can be seen that, by the embodiment of the application, the force feedback data generated by the second device can be received by the browser of the first device, so that force feedback is generated in the cloud game operation input device of the first device, the force feedback of the cloud game web page end is realized, the sense of immersion and the game experience of the user participating in the cloud game are improved, and the retention rate of the cloud game is improved.
[0161] Figure 12 A structure schematic diagram of a data transmission system based on cloud game provided by an embodiment of the application is shown. As shown in Figure 12 the system 1200 comprises a first device 1000 as shown in Figure 10 and a second device 1100 as shown in Figure 11 .
[0162] Figure 13 A structure schematic diagram of a computing device provided by an embodiment of the application is shown. The embodiment of the application does not limit the specific implementation of the computing device. As shown in Figure 13As shown, the computing device can include a processor 1302, a communication interface 1304, a memory 1306, and a communication bus 1308. The processor 1302, the communication interface 1304, and the memory 1306 can communicate with each other through the communication bus 1308. The communication interface 1304 is configured to communicate with network elements such as clients or other servers. The processor 1302 is configured to execute a program 1310, and specifically can execute the steps in the above-described embodiments of the method for cloud game-based data transmission. Specifically, the program 1310 can include program code including computer operation instructions. The processor 1302 can be a central processing unit CPU, or an application specific integrated circuit ASIC, or one or more integrated circuits configured to implement embodiments of the present application. The one or more processors included in the computing device can be processors of the same type, such as one or more CPUs; or can be processors of different types, such as one or more CPUs and one or more ASICs. The memory 1306 is configured to store the program 1310. The memory 1306 can include a high-speed RAM memory, and can also include a non-volatile memory such as at least one disk memory. The program 1310 can specifically be configured to cause the processor 1302 to execute the method in any of the above-described method embodiments.
[0163] The embodiments of the present application provide a non-volatile computer storage medium, which stores at least one executable instruction, and the computer executable instruction can execute the cloud game-based data transmission method in any of the above-described method embodiments.
[0164] 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.
[0165] Furthermore, those skilled in the art will recognize that, although some embodiments which incorporate certain features can not be explicitly described or claimed as embodiments, combinations of these preferred embodiments are also included within the scope of embodiments of the present application and form different embodiments. For example, in the following claims, any of the claimed embodiments can be used in any combination. Various components of embodiments of the present application can be implemented in hardware, or as software modules running in one or more processors, or combinations thereof. Those skilled in the art will recognize that a microprocessor or digital signal processor (DSP) can be used in practice to implement some or all of the functionality of some or all of the components according to embodiments of the present application. Embodiments of the present application can also be implemented as a program of instructions for performing part or all of the methods described herein, e.g., a computer program and a computer program product. Such program of instructions of embodiments of the present application 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, or provided on a carrier, or in any other form. It should be noted that the above-mentioned embodiments illustrate rather than limit the embodiments of the present application, and that changes can be made by those skilled in the art without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The application can be implemented by means of both hardware and software, and any combinations thereof. In a unit claim, several devices can be listed with a conjunction like "or", but it is to be understood that any of these devices can be used individually. The use of the words first, second, and third, does not indicate any order. These words can be understood to be names. The steps of those methods recited in the description are not to be understood as being necessarily limited to the chronological order in which they are recited.
Claims
1. A data transmission method based on cloud gaming, characterized in that, The method comprises: The browser of the first device periodically collects state data of a cloud game operation input device in the first device, after collecting first state data at a first time, second state data collected at a second time is obtained; difference data different from the second state data is determined from the first state data; a packet number is assigned to a data packet corresponding to the difference data; the data packet corresponding to the difference data is sent, and the data packet is transmitted to the browser of the second device; The second device generates force feedback data based on the data packet, and transmits the force feedback data to the browser of the first device; The browser of the first device controls the cloud game operation input device to generate force feedback based on the force feedback data.
2. The method of claim 1, wherein, The state data contains state values of at least one operation key of the cloud game operation input device; And / or, the force feedback data contains force feedback values of at least one operation key of the cloud game operation input device.
3. The method of claim 1, wherein, The second time is the state data collection time closest to the first time and earlier than the first time; The sending of the data packet corresponding to the difference data further comprises: determining the sending priority of the difference data, and determining the sending frequency corresponding to the sending priority; According to the sending frequency, the data packet corresponding to the difference data is sent.
4. The method of claim 1, wherein, The determination of the difference data different from the second state data from the first state data further comprises: Data comparison is performed between the state values of the operation keys in the first state data and the state values of the operation keys in the second state data to determine a target operation key, and the state value of the target operation key in the first state data is taken 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 of claim 1, wherein, The transmission of the force feedback data to the browser of the first device further comprises: Periodically collecting the force feedback data; After collecting first force feedback data at a third time, second force feedback data collected at a fourth time is obtained; wherein the fourth time is the force feedback data collection time closest to the third time and earlier than the third time; Data comparison is performed between the first force feedback data and the second force feedback data to determine difference data different from the second force feedback data from the first force feedback data; The sending of the data packet corresponding to the difference data further comprises: Data comparison is performed between the force feedback values of the operation keys in the first force feedback data and the force feedback values of the operation keys in the second force feedback data to determine a 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; 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.
6. The method of claim 5, wherein, The determination of the sending priority of the difference data further comprises: 7. The method according to claim 3 or 5, characterized in that, determining each target operation key corresponding to the difference data; determining a sending priority of the difference data according to an operation key type of each target operation key.
8. The method of claim 7, wherein, The determining a sending priority of the difference data according to an operation key type of each target operation key further includes: if the operation key type of at least one target operation key among the target operation keys is a digital signal operation key, determining that the sending priority of the difference data is a highest priority; if the operation key type of each target operation key is an analog signal operation key, determining a sending priority corresponding to any target operation key according to a state value or a force feedback value of the target operation key, and determining the sending priority of the difference data according to the sending priority corresponding to each target operation key.
9. The method of claim 8, wherein, The determining a sending priority corresponding to any target operation key according to a state value or a force feedback value of the target operation key further includes: for any target operation key, calculating a difference value between a state value in the first state data and a state value in the second state data of the target operation key, and determining the sending priority corresponding to the target operation key according to the difference value; or, for any target operation key, calculating a difference value between a force feedback value in the first force feedback data and a force feedback value in the second force feedback data of the target operation key, and determining the sending priority corresponding to the target operation key according to the difference value.
10. The method of claim 9, wherein, The determining the sending priority corresponding to the target operation key according to the difference value further includes: if the difference value is greater than a first threshold value, determining that the sending priority corresponding to the target operation key is a highest priority; if the difference value is less than a second threshold value, determining that the sending priority corresponding to the target operation key is a lowest priority; if the difference value is greater than or equal to the second threshold value and the difference value is less than or equal to the first threshold value, determining that the sending priority corresponding to the target operation key is an intermediate priority.
11. The method of claim 8, wherein, The determining the sending priority corresponding to any target operation key according to a state value or a force feedback value of the target operation key further includes: for any target operation key, determining the sending priority corresponding to the target operation key according to a state value in the first state data of the target operation key; or, for any target operation key, determining the sending priority corresponding to the target operation key according to a force feedback value in the first force feedback data of the target operation key.
12. The method of claim 11, wherein The determining the sending priority corresponding to the target operation key according to the state value in the first state data of the target operation key further includes: if the state value is greater than a third threshold value, determining that the sending priority corresponding to the target operation key is a highest priority; if the state value is less than a fourth threshold value, determining that the sending priority corresponding to the target operation key is a lowest priority; if the state value is greater than or equal to the fourth threshold value and the state value is less than or equal to the third threshold value, determining that the sending priority corresponding to the target operation key is an intermediate priority. The determining of the transmission priority corresponding to the transmission frequency further includes:
13. The method of claim 3 or 5, wherein, 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 the intermediate priority, the method further includes: determining each target operation key corresponding to the difference data, and determining the transmission frequency corresponding to the transmission priority according to the state value or 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. The sending of the data packet corresponding to the difference data according to the transmission frequency further includes:
14. The method of claim 3 or 5, wherein, acquiring the sending time of the last sent data packet; calculating the sending interval of the difference data according to the transmission frequency; sending the data packet corresponding to the difference data when the interval between the current time and the sending time reaches the sending interval. Before the browser of the first device controls the cloud game operation input device to generate force feedback based on the force feedback data, the method further includes: the first device receives a data packet of the force feedback data, and analyzes the data packet to obtain the packet sequence number of the data packet.
15. The method of any one of claims 1-6, wherein, And / or, before the second device generates force feedback data based on the data packet, the method further includes: the second device receives a data packet of the state data, and analyzes the data packet to obtain the packet sequence number of the data packet.
16. The method of claim 15, wherein, after the first device receives a data packet of the force feedback data, and analyzes the data packet to obtain the packet sequence number of the data packet, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the last received data packet of the force feedback data; if yes, retaining the data packet; if no, discarding the data packet. And / or, after the second device receives a data packet of the state data, and analyzes the data packet to obtain the packet sequence number of the data packet, the method further includes: determining whether the packet sequence number of the data packet is greater than the packet sequence number of the last received data packet of the state data; if yes, retaining the data packet; if no, discarding the data packet.
17. The method of claim 15, wherein, The first device comprises a first buffer, and the first buffer stores at least one data packet of historical received force feedback data; after the first device receives the data packet of the force feedback data and analyzes the data packet to obtain the packet sequence number of the data packet, the method further comprises: 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 yes, storing the data packet in the first buffer, and taking the data packet with the smallest packet sequence number in the first buffer as a to-be-sent data packet; if no, taking the data packet as the to-be-sent data packet; if the packet sequence number of the to-be-sent data packet is greater than the packet sequence number of the data packet that has been sent to the browser, sending the to-be-sent data packet to the browser; if the packet sequence number of the to-be-sent data packet is less than the packet sequence number of the data packet that has been sent to the browser, discarding the to-be-sent data packet. And / or, the second device comprises a second buffer, and the second buffer stores at least one data packet of historical received state data; after the second device receives the data packet of the state data and analyzes the data packet to obtain the packet sequence number of the data packet, the method further comprises: 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 yes, storing the data packet in the second buffer, and taking the data packet with the smallest packet sequence number in the second buffer as a to-be-sent data packet; if no, taking the data packet as the to-be-sent data packet; if the packet sequence number of the to-be-sent data packet is greater than the packet sequence number of the data packet that has been sent to the processing module, sending the to-be-sent data packet to the processing module; if the packet sequence number of the to-be-sent data packet is less than the packet sequence number of the data packet that has been sent to the processing module, discarding the to-be-sent data packet.
18. A data transmission method based on cloud gaming, characterized in that, The method is executed on the first device side, and the method comprises: The browser periodically collects state data of a cloud game operation input device in the first device; After the browser collects first state data at a first time, the browser obtains second state data that has been collected at a second time; determines difference data that is different from the second state data from the first state data; assigns a packet sequence number to a data packet corresponding to the difference data; sends the data packet corresponding to the difference data, and transmits the data packet to the second device, so that the second device generates force feedback data based on the data packet; The browser receives the force feedback data sent by the second device, and controls the cloud game 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 comprises: Receiving a data packet of state data of a cloud game operation input device in the first device sent by a browser of the first device; wherein the browser of the first device periodically collects state data of the cloud game operation input device in the first device, collects first state data at a first time, obtains second state data that has been collected at a second time, determines difference data that is different from the second state data from the first state data, and assigns a packet sequence number to a data packet corresponding to the difference data; and sends the data packet corresponding to the difference data. generating force feedback data based on the data packet; transmitting the force feedback data to the browser of the first device, so that the browser of the first device controls the cloud game operation input device to generate force feedback based on the force feedback data.
20. A first device, comprising: The first device comprises: a browser configured to periodically collect state data of the cloud game operation input device in the first device, obtain second state data collected at a second time after collecting first state data at a first time, determine difference data different from the second state data from the first state data, assign a packet serial number to a data packet corresponding to the difference data, send the data packet corresponding to the difference data, and transmit the data packet to the second device, so that the second device generates force feedback data based on the data packet; and the browser receives the force feedback data sent by the second device; a cloud game operation input device configured to generate force feedback based on the force feedback data.
21. A second device, comprising: The second device comprises: a transmission module configured to receive a data packet of state data of the cloud game operation input device in the first device sent by the browser of the first device, and transmit force feedback data to the browser of the first device, so that the first device controls the cloud game operation input device to generate force feedback based on the force feedback data; wherein the browser of the first device periodically collects state data of the cloud game operation input device in the first device, obtains second state data collected at a second time after collecting first state data at a first time, determines difference data different from the second state data from the first state data, assigns a packet serial number to a data packet corresponding to the difference data, and sends the data packet corresponding to the difference data; a processing module configured to generate force feedback data based on the data packet.
22. A cloud gaming based data transmission system, characterized by, The first device comprises the first device of claim 20, and the second device comprises the second device of claim 21.
23. A computing device, comprising: comprise: a processor, a memory, a communication interface, and a communication bus, the processor, the memory, and the communication interface being in communication with each other through the communication bus; the memory is configured to store at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the cloud game-based data transmission method in any one of claims 1-19.
24. A computer storage medium, comprising, The storage medium stores at least one executable instruction, and the executable instruction causes the processor to perform operations corresponding to the cloud game-based data transmission method in any one of claims 1-19.
25. A computer program product, characterised in that, The computer program product is configured to perform operations corresponding to the cloud game-based data transmission method in any one of claims 1-19. The computer program product is configured to perform operations corresponding to the cloud game-based data transmission method in any one of claims 1-19.