CN115242891A - Data transmission method, system and related device - Google Patents

Data transmission method, system and related device Download PDF

Info

Publication number
CN115242891A
CN115242891A CN202110443219.9A CN202110443219A CN115242891A CN 115242891 A CN115242891 A CN 115242891A CN 202110443219 A CN202110443219 A CN 202110443219A CN 115242891 A CN115242891 A CN 115242891A
Authority
CN
China
Prior art keywords
data
electronic device
protocol
sending
transmission
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202110443219.9A
Other languages
Chinese (zh)
Inventor
施小龙
曹振
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Petal Cloud Technology Co Ltd
Original Assignee
Petal Cloud Technology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Petal Cloud Technology Co Ltd filed Critical Petal Cloud Technology Co Ltd
Priority to CN202110443219.9A priority Critical patent/CN115242891A/en
Publication of CN115242891A publication Critical patent/CN115242891A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/16Implementation or adaptation of Internet protocol [IP], of transmission control protocol [TCP] or of user datagram protocol [UDP]
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L1/00Arrangements for detecting or preventing errors in the information received
    • H04L1/0001Systems modifying transmission characteristics according to link quality, e.g. power backoff
    • H04L1/0006Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format
    • H04L1/0007Systems modifying transmission characteristics according to link quality, e.g. power backoff by adapting the transmission format by modifying the frame length
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L65/00Network arrangements, protocols or services for supporting real-time applications in data packet communication
    • H04L65/80Responding to QoS
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/18Multiprotocol handlers, e.g. single devices capable of handling multiple protocols
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L69/00Network arrangements, protocols or services independent of the application payload and not provided for in the other groups of this subclass
    • H04L69/24Negotiation of communication capabilities

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Computer Security & Cryptography (AREA)
  • Multimedia (AREA)
  • Quality & Reliability (AREA)
  • Information Transfer Between Computers (AREA)

Abstract

The application discloses a data transmission method, which can be applied to a communication system comprising a sending end and a receiving end, wherein the sending end can be a server/electronic equipment, the receiving end can be an electronic equipment/server, in the process of transmitting data to the electronic equipment by the server, the server can adopt a transmission layer protocol in a corresponding protocol stack to carry out data transmission according to the data type, and different transmission layer protocols can support the reliability requirements of different types of data.

Description

Data transmission method, system and related device
Technical Field
The present application relates to the field of communications technologies, and in particular, to a method, a system, and a related apparatus for data transmission.
Background
With the rapid development of communication technology, more and more application scenarios involve the real-time transmission of various types of data. For example, application scenarios such as cloud games, high-definition real-time audio and video, e.g., live webcast, multiple Virtual Reality (VR) device VR/Augmented Reality (AR) device interactions, and the like, include transmission of audio and video data and control data, as well as other types of data. How to guarantee the reliability requirements of different types of data transmission to meet the completeness and fluency of user experience is a problem needing to be researched.
Disclosure of Invention
The application provides a data transmission method, a system and a related device, which can meet the reliability requirements of different types of data in the data transmission process.
In a first aspect, the present application provides a data transmission method, where the method is applied to a sending end, and the sending end may determine a first protocol according to a first data type to which first data belongs; the process of transmitting data by adopting the first protocol meets the requirement of a user on the reliability of the data belonging to the first data type; the first data type is determined according to content provided by the first data and user experience of the content; the sending end sends the first data to a receiving end by adopting the first protocol.
By implementing the method provided by the first aspect, the sending end can send data by adopting a protocol matched with the reliability requirement according to the transmission reliability requirement of the user on different types of data, so that the user requirement is met, and the user experience is improved.
With reference to the first aspect, in an embodiment, the method may further include: the sending end determines a second protocol according to a second data type to which the second data belongs; the process of transmitting data by adopting the second protocol meets the requirement of a user on the reliability of the data belonging to the second data type; the second data type is determined according to content provided by the second data and user experience of the content; the first data type and the second data type are different; and the sending end sends the second data to the receiving end by adopting the second protocol.
Therefore, when the sending end has a plurality of data to be sent, different protocols can be adopted to send the data according to different types of data, and different protocols can support the transmission of the data with different reliability requirements, so that the user requirements are met, and the user experience is improved.
With reference to the first aspect, in one embodiment, the first data type is any one of: control class data, key audio and video class data, non-key audio and video class data and advertisement class data.
Therefore, the sending end can divide the data into a plurality of types according to the content provided by the user to the data and the experience of the user to the content, different types have different reliability requirements, and the personalized requirements of the user are further met.
With reference to the first aspect, in an implementation manner, before the sending end sends the first data to the receiving end by using the first protocol, the method further includes: the sending end puts the first data into a first sending queue according to a first data type to which the first data belongs; when the first data type is control type data, the length of the first sending queue is the first value.
Therefore, the sending end can adopt a sending queue with shorter length for the control data according to the influence of the reliability degree of the user on the control data in the transmission process on the user experience, thereby reducing the queuing time delay of the control data, improving the transmission real-time property and further meeting the personalized requirements of the user.
With reference to the first aspect, in an implementation manner, before the sending end sends the first data to the receiving end by using the first protocol, the method further includes: the sending end puts the first data into a second sending queue according to the data volume of the first data; when the data volume of the first data is smaller than a second value, the length of the second sending queue is a third value; when the data amount of the first data is larger than the second value, the length of the second sending queue is a fourth value; the fourth value is greater than the third value, which is greater than the first value.
Therefore, the transmission delay of the data with small data volume is short, and the transmission delay of the data with large data volume is long, so that the queuing delay of the data can be reduced by placing the data in the sending queue corresponding to the data volume, the real-time property of data transmission is met, and the user experience is improved.
With reference to the first aspect, in an implementation manner, before the sending end sends the first data to the receiving end by using the first protocol, the method further includes: the sending end inputs the first data to the first sending queue according to the first priority of the first data; the first priority is associated with the first order such that the higher the first priority, the higher the first order.
Therefore, the data with high real-time requirement can be set to have high priority according to the real-time requirement of the user on different data, and then the data are sequentially input into the sending queue from high to low according to the priority, so that the high-priority data occupy the sending queue, the real-time requirement of the user on different data is further met, and the user experience is improved.
With reference to the first aspect, in an implementation manner, before the sending end sends the first data to the receiving end by using the first protocol, the method further includes: the method specifically comprises the following steps: the sending end outputs the first data in the first sending queue from the first sending queue according to the second priority of the first sending queue; the second priority is associated with the second order such that the higher the second priority, the higher the second order.
Therefore, the priority of the sending queue with high real-time requirement can be set to be high according to the real-time requirement of the user on different data, and then the data are sequentially output from the sending queue according to the sequence from high to low of the priority, so that the data in the sending queue with high priority are preferentially sent, the real-time requirement of the user on different data is further met, and the user experience is improved.
With reference to the first aspect, in an implementation manner, the first data is multiple types of data related to the sending end providing the real-time audio and video service for the receiving end, where the real-time audio and video service includes: cloud game service, live webcast service, or VR/AR service.
Therefore, in a scene related to real-time transmission of various types of data, the heatstroke prevention of data transmission provided by the system can be adopted, and the user experience is improved.
In a second aspect, the present application provides a data transmission method, which is applied to a communication system including a sending end and a receiving end, where the sending end may be an electronic device/server, and the receiving end may be a server/electronic device. In the method, a sending end can determine a first protocol according to a first data type to which first data belongs; the receiving end can monitor the protocol used by the sending end to send the first number; the process of transmitting data by adopting the first protocol meets the reliability requirement of a user on the data belonging to the first data type; the first data type is determined according to content provided by the first data and user experience of the content; the sending end sends the first data to a receiving end by adopting the first protocol.
By implementing the method provided by the second aspect, the sending end can send data by adopting a protocol matched with the reliability requirement according to the transmission reliability requirement of the user on different types of data, and the receiving end can receive data by adopting a protocol equivalent to the sending end, so that the user requirement is met, and the user experience is improved.
With reference to the second aspect, in one embodiment, the method may further include: the sending end determines a second protocol according to a second data type to which the second data belongs; the process of transmitting data by adopting the second protocol meets the requirement of a user on the reliability of the data belonging to the second data type; the second data type is determined according to content provided by the second data and user experience of the content; the first data type and the second data type are different; and the sending end sends the second data to the receiving end by adopting the second protocol.
Therefore, when the sending end has a plurality of data to be sent, different protocols can be adopted to send the data according to different types of data, and the different protocols can support the transmission of the data with different reliability requirements, so that the user requirements are met, and the user experience is improved.
With reference to the second aspect, in one embodiment, the first data type is any one of: control class data, key audio and video class data, non-key audio and video class data and advertisement class data.
Therefore, the sending end can divide the data into a plurality of types according to the content provided by the user to the data and the experience of the user to the content, different types have different reliability requirements, and the personalized requirements of the user are further met.
With reference to the second aspect, in an embodiment, before the sending end sends the first data to the receiving end by using the first protocol, the method further includes: the sending end puts the first data into a first sending queue according to a first data type to which the first data belongs; when the first data type is control type data, the length of the first sending queue is the first value.
Therefore, the sending end can adopt a sending queue with shorter length for the control type data according to the influence of the reliability degree of the user on the control type data in the transmission process on the user experience, thereby reducing the queuing time delay of the control type data, improving the real-time transmission and further meeting the personalized requirements of the user.
With reference to the second aspect, in an embodiment, before the sending end sends the first data to the receiving end using the first protocol, the method further includes: the sending end puts the first data into a second sending queue according to the data volume of the first data; when the data volume of the first data is smaller than a second value, the length of the second sending queue is a third value; when the data amount of the first data is larger than the second value, the length of the second sending queue is a fourth value; the fourth value is greater than the third value, which is greater than the first value.
Therefore, the transmission delay of the data with small data volume is short, and the transmission delay of the data with large data volume is long, so that the queuing delay of the data can be reduced by placing the data in the sending queue corresponding to the data volume, the real-time property of data transmission is met, and the user experience is improved.
With reference to the second aspect, in an embodiment, before the sending end sends the first data to the receiving end using the first protocol, the method further includes: the sending end inputs the first data to the first sending queue according to the first priority of the first data; the first priority is associated with the first order such that the higher the first priority, the higher the first order.
Therefore, the data with high real-time requirement can be set to have high priority according to the real-time requirement of the user on different data, and then the data are sequentially input into the sending queue from high to low according to the priority, so that the high-priority data occupy the sending queue, the real-time requirement of the user on different data is further met, and the user experience is improved.
With reference to the second aspect, in an embodiment, before the sending end sends the first data to the receiving end using the first protocol, the method further includes: the method specifically comprises the following steps: the sending end outputs the first data in the first sending queue from the first sending queue according to the second priority of the first sending queue; the second priority is associated with the second order such that the higher the second priority, the higher the second order.
Therefore, the priority of the sending queue with high real-time requirement can be set to be high according to the real-time requirement of the user on different data, and then the data are sequentially output from the sending queue according to the sequence from high to low of the priority, so that the data in the sending queue with high priority are preferentially sent, the real-time requirement of the user on different data is further met, and the user experience is improved.
With reference to the second aspect, in an implementation manner, the first data is multiple types of data related to the sending end providing the real-time audio and video service for the receiving end, where the real-time audio and video service includes: cloud game service, live webcast service, or VR/AR service.
Therefore, in a scene related to real-time transmission of various types of data, the heatstroke prevention of data transmission provided by the system can be adopted, and the user experience is improved.
In a third aspect, the present application provides an electronic device comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors, the one or more memories being configured to store computer program code comprising computer instructions which, when executed by the one or more processors, cause the electronic device to perform the method as described in the embodiments of the first aspect above.
In a fourth aspect, the present application provides a computer program product, which, when run on an electronic device, causes the electronic device to perform the method as described in the embodiments of the first aspect.
In a fifth aspect, the present application provides a computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method as described in the embodiments of the first aspect.
In a sixth aspect, the present application provides a communication system, which includes a sending end and a receiving end, and when the sending end runs on an electronic device, the electronic device is caused to perform the method described in the foregoing first aspect embodiment.
Drawings
Fig. 1 is a schematic diagram of a communication system 10 according to an embodiment of the present application;
fig. 2 is a schematic diagram of a hardware structure of a server according to an embodiment of the present disclosure;
fig. 3 is a schematic diagram of a hardware structure of an electronic device according to an embodiment of the present disclosure;
fig. 4 is a schematic diagram of a software structure of an electronic device according to an embodiment of the present application;
fig. 5 is a flowchart of a data transmission method according to an embodiment of the present application;
fig. 6 is a schematic diagram of a data transmission strategy according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be described in detail and clearly with reference to the accompanying drawings. Wherein in the description of the embodiments of the present application, "/" indicates an inclusive meaning, for example, a/B may indicate a or B; "and/or" in the text is only an association relationship describing an association object, and means that three relationships may exist, for example, a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone.
In the following, the terms "first", "second" are used for descriptive purposes only and are not to be understood as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of embodiments of this application, a "plurality" means two or more unless indicated otherwise.
Reference in the specification to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the specification. The appearances of the phrase in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. It is explicitly and implicitly understood by a person skilled in the art that the embodiments described herein can be combined with other embodiments.
The term "User Interface (UI)" in the following embodiments of the present application is a media interface for interaction and information exchange between an application program or an operating system and a user, and implements conversion between an internal form of information and a form acceptable to the user. The user interface is source code written by java, extensible markup language (XML) and other specific computer languages, and the interface source code is analyzed and rendered on the electronic equipment and finally presented as content which can be identified by a user. A commonly used presentation form of the user interface is a Graphical User Interface (GUI), which refers to a user interface related to computer operations and displayed in a graphical manner. It may be a visual interface element such as text, an icon, a button, a menu, a tab, a text box, a dialog box, a status bar, a navigation bar, a Widget, etc. displayed in a display of the electronic device. The terminology used in the description of the embodiments herein is for the purpose of describing particular embodiments herein only and is not intended to be limiting of the application.
At present, in an application scenario of real-time audio/video transmission, various types of data transmission are involved, for example, in an application scenario of a cloud game, live webcasting, interaction between multiple Virtual Reality (VR) devices and Augmented Reality (AR) devices, etc., in an interaction process between a server and an electronic device, various types of data transmission are involved, and different types of data have different reliability requirements in the transmission process. For example, the control data must be transmitted reliably, that is, the control data cannot be mistaken or lost during transmission, so that the normal and orderly operation of the program at the electronic device end can be ensured. As another example, the audio-video type data includes: key audio and video class data and non-key audio and video class data. The key audio and video data needs to be reliably transmitted, that is, the key audio and video data cannot be mistaken or lost in the transmission process, so that the integrity of user experience is ensured. The non-key audio and video data can support semi-reliable transmission, namely the non-key audio and video data are allowed to be lost or go wrong to a certain degree, so that the fluency of user experience can be guaranteed without affecting the integrity of the user experience. As another example, advertising type data may support unreliable transmission, that is, non-critical audio-video type data may be allowed to be lost or corrupted.
For the above different types of data, how to meet different reliability requirements is a problem to be solved at present.
In some embodiments, the communication field sends data by using a protocol stack, such as a TCP/IP protocol stack (TCP/IP traffic series) or a Real-time audio-video data transmission standard protocol (RTP) stack. A Protocol stack may include protocols used by each layer in the network model, for example, a TCP/IP Protocol stack may include a HyperText Transfer Protocol (HTTP) Protocol or a File Transfer Protocol (FTP) Protocol commonly used by an application layer, a Transmission Control Protocol (TCP) or a User Datagram Protocol (UDP) Protocol commonly used by a transport layer, an Internet Protocol (IP) Protocol commonly used by a network layer, and the like.
When the server provides a certain service for the electronic device, such as the cloud game, the live webcast and the multi-VR/AR device interaction described above, the same protocol is fixedly used for transmission in each layer during the transmission process of all data related to the service. For example, in the transport layer, data can only use TCP or UDP in the TCP/IP protocol stack, or RTP in the RTP protocol stack. However, the types of all data involved in the above services include a plurality of types, and the transmission reliability requirements of different types of data are different. Therefore, only using any one of the transport layer protocols of TCP, UDP or RTP to transmit data has the following disadvantages:
the above TCP, UDP or RTP can only support a reliable level of data transmission, the TCP can only support a reliable transmission, the UDP can only support an unreliable transmission, and the RTP can only support an unreliable transmission. Therefore, the use of TCP, UDP or RTP in the transport layer has the following drawbacks:
1. the reliability requirements of different types of data cannot be guaranteed.
Since the above-mentioned TCP, UDP or RTP can only support a reliable data transmission, specifically, the TCP can only support a reliable transmission, the UDP can only support an unreliable transmission, and the RTP can only support an unreliable transmission. When any one of the protocols is used to transmit data, only one degree of reliability of data transmission can be achieved. In the data transmission process, various data types such as control data, key audio and video data, non-key audio and video data, advertisement data and the like are involved, and users have different reliability requirements on the transmission of different types of data, so that a TCP/IP protocol stack or an RTP protocol stack which only adopts a protocol cannot guarantee the reliability requirements of different types of data.
2. The real-time performance of data transmission cannot be guaranteed.
When the server sends data to the electronic device, the server needs to put the data into a sending queue first, then output the data from the sending queue, and send the data to the electronic device. When the TCP, UDP or RTP is adopted to transmit data, the transmission queue is one or more queues with fixed length, and all data are sequentially transmitted to the electronic equipment according to the first-in first-out sequence in the transmission queue. When all the sending queues have no residual cache data volume, if the server has a new data request to send, the new data needs to be queued to enter the sending queue, and the queuing time delay is the same no matter which sending queue is queued to wait, so that the real-time performance of data transmission cannot be ensured.
In order to solve the defects of the data transmission method, embodiments of the present application provide a data transmission method, which may be applied to a communication system including a sending end and a receiving end, where the sending end may be a server/an electronic device, and the receiving end may be an electronic device/a server. The method is introduced by taking a server as a sending end and an electronic device as a receiving end as an example.
In the method, in the process of transmitting data to the electronic device by the server, the server can adopt the transport layer protocol in the corresponding protocol stack to transmit the data according to the data type, and different transport layer protocols can support the reliability requirements of different types of data.
Further, the server may determine different sending queues used when data transmission is performed by using different protocol stacks according to the data type and/or the data amount, where the different sending queues have different lengths and different queuing delays, so as to ensure real-time performance of data transmission of different data types and/or data amounts.
The terms and expressions referred to in the embodiments of the present application are explained as follows:
in the embodiment of the present application, the data types may include: control class data, key audio and video class data, non-key audio and video class data and advertisement class data. The control data is data for specifying an execution order, an operation flow, and the like for executing each function in the program execution. The audio-video data refers to data for providing audio-video content for a user. The key audio and video data refers to that the audio and video content provided by the data is the content which is focused by the user, and the audio and video content provided by the non-key audio and video data is the content which is not focused by the user. The advertisement data refers to data provided by an advertiser for promoting a certain brand and a certain service to improve the popularity of the brand and the service, and the data is generally contents which are not interested by the user. The above data types are only examples, and in specific implementations, the embodiments of the present application may further include more data types.
In the embodiment of the application, the user has different transmission reliability requirements for different types of data. For example, the reliability requirements for different types of data refer to:
the user hopes that the reliability requirements of the control data and the key audio and video data are high; the reliability requirements of non-key audio and video data are medium; the reliability requirement of the advertisement data is low. This is determined according to the degree of influence of the reliability of different types of data during transmission on the user experience. For example, the reliability requirement of the control type data in the transmission process has a large influence on the user experience because when the transmission reliability of the control type data is low, if the data is lost or goes wrong, the user obviously senses that the currently running program is abnormal at the electronic device end, for example, the user operation cannot be responded, and further, the user experience is greatly influenced. For another example, if the key audio and video data is lost or has an error, the user can obviously perceive that the audio and video being watched is jammed and has an error at the electronic device, and the user experience is greatly influenced. For another example, the non-key audio and video data is lost or is in error, even if the non-key audio and video content watched by the user is jammed or cannot be watched, the influence on the experience of the user is small. For another example, the advertisement data is lost or corrupted, even if the advertisement viewed by the user is stuck or cannot be viewed, it has no impact on the user's experience.
In an embodiment of the present application, the transport layer protocol may include a plurality of protocols supporting different reliabilities. For example, the protocol supporting different reliabilities may include: a reliable transport protocol supporting reliable transport in protocol stack 1, a semi-reliable transport protocol supporting semi-reliable transport in protocol stack 2, and an unreliable transport protocol 3 supporting unreliable transport in protocol stack 3, etc. The principle that the 3 protocol stacks support different reliability requirements is specifically as follows:
in the protocol stack 1, a reliable transport protocol, that is, a protocol for reliable transport implemented by TCP used in a transport layer. In particular, TCP itself provides a mechanism for reliable transmission, since TCP achieves reliable transmission mainly through methods such as checksum, sequence number/acknowledgement, timeout retransmission, maximum message size, sliding window control, and the like.
Therefore, the quality of control data transmission can be ensured, and the application program can normally and orderly provide application experience for the user; the quality of key audio and video data transmission can be ensured, so that the application program can correctly play key audio and video contents, and the user experience is ensured.
In the protocol stack 2, a semi-reliable transport protocol, i.e. a protocol for which a transport layer implements semi-reliable transport by using UDP in combination with a semi-reliable mechanism. Specifically, UDP does not provide any reliable transmission mechanism by itself, but may be combined with a semi-reliable transmission mechanism to implement semi-reliable transmission. Semi-reliable transport mechanisms may include, for example, but are not limited to: serial number/acknowledgement, timed-out retransmission, etc. The sequence number/Acknowledgement (ACK) refers to that the sending end, such as the server 100, sends data to the receiving end, such as the application program of the electronic device 200, and after the receiving end receives/does not receive the data, the receiving end returns an ACK packet to the sending end, where the ACK packet is used to indicate whether the receiving end receives the data. For example. When the sending end sends data containing the sequence numbers of 1-500, if the receiving end only receives the data with the sequence numbers of 1-400, the receiving end returns an ACK packet to the sending end, and the ACK packet is used for reminding the sending end to resend the data with the sequence numbers of 401-500. The time-out retransmission refers to that when the sending end does not receive the ACK packet for more than the threshold time, the data is retransmitted. In the embodiment of the present application, the protocol stack 2 may preset the number of times of data retransmission, so as to implement semi-reliable transmission. That is, when the number of retransmissions of a certain data is less than a specified threshold, the retransmission is performed; however, when the retransmission times of certain data exceed the threshold, the data are directly lost and are not retransmitted.
Therefore, by adopting a semi-reliable transmission protocol for regulating retransmission times, the transmission quality of non-key audio and video data is ensured to a certain extent, and the situation that other transmission data is delayed due to continuous retransmission when the non-key data is lost can be avoided.
In the protocol stack 3, the unreliable transport protocol, i.e. UDP, does not provide any reliable transport mechanism, if the transmitted data is lost or has errors, the transmitting end does not retransmit, and the receiving end does not perform error correction, thereby implementing unreliable transport.
Because the advertisement data is lost and the user experience is hardly influenced, the unreliable transmission protocol is adopted to transmit the advertisement data, the condition that other transmitted data is delayed due to the retransmission of the advertisement data does not exist, and the flow of the user experience can be effectively ensured.
In some embodiments, the transmission layer protocols in each protocol stack respectively correspond to a transmission queue, and the transmission queue corresponding to the transmission layer protocol in one protocol stack may include: one or more transmit queues, different transmit queues having different lengths. For example, the types of transmit queues may include, but are not limited to: low latency queues, high throughput queues, and other queues. The length of the low-delay queue is the minimum, and the low-delay queue is the other queues and the high-throughput queue in turn from small to large. The other queues in the embodiments of the present application are just terms, and have no other meaning, and may also be referred to as non-low latency and non-high throughput queues.
In an embodiment of the present application, the low-latency queue may be referred to as a first queue, and the high-throughput queue and the other queues may be referred to as a second queue.
In the embodiment of the present application, the transmission delay includes: queuing delay and delay of data transmission in the communication link. The queuing delay refers to the time taken by data from buffering to transmission in a transmission queue, and may also be referred to as processing delay. For example, when the bandwidth =10Mbps and the transmission queue can cache a maximum amount of data of 4 Megabytes (MB) bytes, if audio/video data of 4MB, that is, 32 megabits (mbits), is already cached at this time, the queuing delay is: 32Mbit/10Mbps =3.2s.
After the data transmission method provided by the embodiment of the application is implemented, the following technical problems can be solved:
in the data transmission process, the sending end can adopt a transmission layer protocol in a protocol stack matched with the reliability requirement of the data type to perform data transmission according to the data type, so that the reliability requirements of different types of data are met.
Furthermore, according to the data type/data volume, the sending queues corresponding to the data type/data volume can be adopted to send data, and the queuing time delays of different sending queues are different, so that the real-time performance of the data of different data types/data volumes is met, and the user experience is met.
The data transmission method provided by the embodiment of the application can be applied to all scenes related to real-time transmission of various different types of data, such as cloud games, live webcasts, multi-VR/AR device interaction and the like, and a few typical application scenes in which the data transmission method can be applied are introduced firstly as follows:
1. the cloud game is that all games are run at a server side, and the server side compresses rendered game contents and transmits the compressed game contents to the electronic equipment through a network. Specifically, firstly, a user starts a cloud game application program at an electronic device end, a game which the user wants to experience is selected, and then the electronic device can be connected with a server which provides game service for the selected game. At this time, a large amount of data is transmitted between the server and the electronic device, and the data mainly includes control data and audio/video data, wherein the control data is responsible for sending control signals for controlling the normal and orderly operation of the cloud game application program, and the audio/video data provides audio/video content for the cloud game application program. It should be noted that the data types include not only audio-video data related to the game, but also advertisement-like audio-video data delivered by the advertiser on the cloud game platform.
2. The live network broadcast means that after audio and video data are collected by the signal collecting device, the audio and video data are sent to the server, a user can open a live network broadcast platform in the electronic device, select live broadcast content, establish connection with the server providing the live broadcast content, and then watch the live broadcast content. Taking the process that a user establishes connection with a server through electronic equipment and watches live content of a network as an example, the process relates to the transmission of various types of data, and specifically comprises audio and video data, control data and advertisement data. The audio and video data are acquired by the server from the signal acquisition equipment, and the control data can include normal and ordered operation of a network live broadcast platform for the electronic equipment.
3. The interaction of multiple VR/AR devices means that, taking two VR/AR devices as an example, communication connection can be established between the two VR/AR devices through a server providing VR/AR services for the two VR/AR devices. The two VR/AR devices can mutually transmit the operation instruction input by the end user of each VR/AR device and provide audio and video data of VR/AR game content based on the communication connection, so that a plurality of people can experience the VR/AR game together. In the process, various types of data are involved for transmission, specifically including audio and video data and control data. The control data is responsible for sending control signals and used for controlling the normal and orderly operation of VR/AR equipment application programs, and the audio and video data is used for providing game contents for the VR/AR equipment.
Therefore, the following embodiments of the present application only take the service process of providing a cloud game, live webcast, or VR/AR game for an electronic device by a server as an example to describe the data transmission method provided by the embodiments of the present application. However, the data transmission method provided by the embodiment of the present application is not limited to the above-mentioned scenario, and the data transmission method may be applied to other scenarios including multiple types of data transmission.
In order to describe the prompting method provided in the embodiment of the present application more clearly and in detail, the communication system 10 provided in the embodiment of the present application is described first.
Referring to fig. 1, fig. 1 illustrates a communication system 10 provided by an embodiment of the present application.
As shown in fig. 1, the communication system 10 includes a server 100 and an electronic device 200.
The server 100 refers to providing computing or application services to other clients, such as the electronic device 200. In this embodiment, the server 100 may be a cloud game server storing game content and running the game, and the server 100 may transmit the running game content to the electronic device 200 in real time. Alternatively, the server 100 may also be a server for storing live content sent by a signal acquisition device, and the server 100 may send the live content to an electronic device playing the live content in real time. Alternatively, the server 100 may be a server providing services for the VR/AR device, and the server 100 may store VR/AR content and transmit it to the electronic device 200. The server 100 described above may be provided by a game, a live platform opener, a vendor, or the like. The number of the servers 100 may be one or more.
The electronic device 200 may be mounted thereon
Figure BDA0003035784420000091
Figure BDA0003035784420000092
Or other operating system. Such as a cell phone, a television, a tablet computer, a desktop computer, a laptop computer, a handheld computer, a notebook computer, an ultra-mobile personal computer (UMPC), a netbook, and a cellular phone, a Personal Digital Assistant (PDA), an Augmented Reality (AR) device, a Virtual Reality (VR) device, an Artificial Intelligence (AI) device, a wearable device, a vehicle-mounted device, a smart home device, and/or a smart city device, embodiments of the present application are not particularly limited as to the specific type of electronic device.
In this embodiment, the server 100 may establish a communication connection with the electronic device 200 and perform data transmission based on the communication connection. Specifically, both the server 100 and the electronic device 200 are deployed with dynamic configuration modules, and taking the electronic device 200 as an example, the dynamic configuration modules may be deployed in a user mode and are independent of an operating system kernel. Taking the server 100 as a sending end and the electronic device 200 as a receiving end as an example, when the server 100 transmits data to the electronic device 200, the dynamic configuration module in the server 100 may determine a protocol stack adopted in the transmission process according to the data transmission policy stored in the dynamic configuration module, and meanwhile, the electronic device 200 may monitor the protocol stack adopted by the server 100, call the dynamic configuration module in the electronic device 200, and receive data by using a peer-to-peer protocol stack.
Fig. 2 illustrates a hardware structure of the server 100 according to an embodiment of the present application.
As shown in fig. 2, the server 100 may include: one or more processors 301, memory 302, communication interface 303, transmitter 305, receiver 306, coupler 307, and antenna 308. These components may be connected by a bus 304 or otherwise, which fig. 2 illustrates by way of example. Wherein:
the processor 301 may be used to read and execute computer readable instructions. In particular, the processor 301 may be used to invoke programs stored in the memory 302. In this embodiment, the processor 301 may be configured to invoke a method stored in the memory 302, send the data to be transmitted to the electronic device 200 by using a protocol stack matched with the data, implement a program on the server 100 side, and execute instructions included in the program.
A memory 302 is coupled to the processor 301 for storing various software programs and/or sets of instructions. In particular, the memory 302 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. The memory 302 may store an operating system (hereinafter referred to as a system), such as an embedded operating system (os) like uCOS, vxWorks, and RTLinux. The memory 302 may also store network communication programs that may be used to communicate with the electronic device 200 and the like. In this embodiment, the memory 302 may store a data transmission policy, so that the dynamic configuration module in the server 100 performs data transmission by using a protocol stack matched with the data to be transmitted according to the data transmission policy.
The communication interface 303 may be used for the server 100 to communicate with other communication devices, such as the electronic device 200. Specifically, the communication interface 303 may be a 3G communication interface, a Long Term Evolution (LTE) (4G) communication interface, a 5G communication interface, a WLAN communication interface, a WAN communication interface, or the like. Not limited to a wireless communication interface, the server 100 may also be configured with a wired communication interface 303 to support wired communication. In the embodiment of the present application, the server 100 may establish a communication connection with the electronic device 200 through the communication interface 203, and perform data transmission based on the communication connection.
In some embodiments of the present application, the transmitter 305 and the receiver 306 may be considered as one wireless modem. The transmitter 305 may be used to transmit the signal output by the processor 301. Receiver 306 may be used to receive signals. In the server 100, the number of the transmitters 305 and the receivers 306 may be one or more. Antenna 308 may be used to convert electromagnetic energy in transmission line to electromagnetic wave in free space or vice versa. Coupler 307 may be used to multiplex the mobile communications signal for distribution to a plurality of receivers 306. It can be appreciated that the antenna 308 of the network device can be implemented as a massive antenna array.
It should be noted that the server 100 shown in fig. 2 is only one implementation manner of the embodiment of the present application, and in practical applications, the server 100 may further include more or less components, which is not limited herein.
Fig. 3 shows a hardware configuration diagram of the electronic device 200.
The electronic device 200 may include a processor 110, an external memory interface 120, an internal memory 121, a Universal Serial Bus (USB) interface 130, a charging management module 140, a power management module 141, a battery 142, an antenna 1, an antenna 2, a mobile communication module 150, a wireless communication module 160, an audio module 170, a speaker 170A, a receiver 170B, a microphone 170C, an earphone interface 170D, a sensor module 180, a button 190, a motor 191, an indicator 192, a camera 193, a display screen 194, a Subscriber Identity Module (SIM) card interface 195, and the like. The sensor module 180 may include a pressure sensor 180A, a gyroscope sensor 180B, an air pressure sensor 180C, a magnetic sensor 180D, an acceleration sensor 180E, a distance sensor 180F, a proximity light sensor 180G, a fingerprint sensor 180H, a temperature sensor 180J, a touch sensor 180K, an ambient light sensor 180L, a bone conduction sensor 180M, and the like.
It is to be understood that the illustrated structure of the embodiment of the present invention does not specifically limit the electronic device 200. In other embodiments of the present application, the electronic device 200 may include more or fewer components than shown, or combine certain components, or split certain components, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
Processor 110 may include one or more processing units, such as: the processor 110 may include an Application Processor (AP), a modem processor, a Graphics Processing Unit (GPU), an Image Signal Processor (ISP), a controller, a video codec, a Digital Signal Processor (DSP), a baseband processor, and/or a neural-Network Processing Unit (NPU), etc. Wherein, the different processing units may be independent devices or may be integrated in one or more processors. The controller can generate an operation control signal according to the instruction operation code and the time sequence signal to finish the control of instruction fetching and instruction execution.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that have just been used or recycled by the processor 110. If the processor 110 needs to use the instruction or data again, it can be called directly from the memory. Avoiding repeated accesses reduces the latency of the processor 110, thereby increasing the efficiency of the system.
In some embodiments, processor 110 may include one or more interfaces. The interface may include an integrated circuit (I2C) interface, an integrated circuit built-in audio (I2S) interface, a Pulse Code Modulation (PCM) interface, a universal asynchronous receiver/transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a general-purpose input/output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and/or a Universal Serial Bus (USB) interface, etc.
In this embodiment, the processor 110 may invoke the tracking application to obtain the area information that the user has arrived and the retention time in the area, and after the tracking application receives the area information that the target user has arrived and the retention time in the area, which are sent by the server 300, the processor 110 may compare the received area information and the retention time with the area information that the user has arrived and the retention time that are obtained by the processor, to determine the contact result between the user and the target user, and invoke the display screen 194 to display the prompt information corresponding to the contact result. For details, reference may be made to the following description of method embodiments and UI embodiments, which are not repeated herein.
The I2C interface is a bidirectional synchronous serial bus comprising a serial data line (SDA) and a Serial Clock Line (SCL). In some embodiments, processor 110 may include multiple sets of I2C buses. The processor 110 may be coupled to the touch sensor 180K, a charger, a flash, a camera 193, etc. through different I2C bus interfaces, respectively. For example: the processor 110 may be coupled to the touch sensor 180K through an I2C interface, so that the processor 110 and the touch sensor 180K communicate through an I2C bus interface to implement a touch function of the electronic device 200.
The I2S interface may be used for audio communication. In some embodiments, processor 110 may include multiple sets of I2S buses. The processor 110 may be coupled to the audio module 170 through an I2S bus to enable communication between the processor 110 and the audio module 170. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through the I2S interface, so as to implement a function of receiving a call through a bluetooth headset.
The PCM interface may also be used for audio communication, sampling, quantizing and encoding analog signals. In some embodiments, audio module 170 and wireless communication module 160 may be coupled by a PCM bus interface. In some embodiments, the audio module 170 may also transmit audio signals to the wireless communication module 160 through the PCM interface, so as to implement a function of answering a call through a bluetooth headset. Both the I2S interface and the PCM interface may be used for audio communication.
The UART interface is a universal serial data bus used for asynchronous communications. The bus may be a bidirectional communication bus. It converts the data to be transmitted between serial communication and parallel communication. In some embodiments, a UART interface is generally used to connect the processor 110 and the wireless communication module 160. For example: the processor 110 communicates with a bluetooth module in the wireless communication module 160 through a UART interface to implement a bluetooth function. In some embodiments, the audio module 170 may transmit the audio signal to the wireless communication module 160 through a UART interface, so as to realize the function of playing music through a bluetooth headset.
MIPI interfaces may be used to connect processor 110 with peripheral devices such as display screen 194, camera 193, and the like. The MIPI interface includes a Camera Serial Interface (CSI), a Display Serial Interface (DSI), and the like. In some embodiments, processor 110 and camera 193 communicate through a CSI interface to implement the capture functionality of electronic device 200. The processor 110 and the display screen 194 communicate through the DSI interface to implement the display function of the electronic device 200.
The GPIO interface may be configured by software. The GPIO interface may be configured as a control signal and may also be configured as a data signal. In some embodiments, a GPIO interface may be used to connect the processor 110 with the camera 193, the display 194, the wireless communication module 160, the audio module 170, the sensor module 180, and the like. The GPIO interface may also be configured as an I2C interface, I2S interface, UART interface, MIPI interface, and the like.
The USB interface 130 is an interface conforming to the USB standard specification, and may specifically be a Mini USB interface, a Micro USB interface, a USB Type C interface, or the like. The USB interface 130 may be used to connect a charger to charge the electronic device 200, and may also be used to transmit data between the electronic device 200 and a peripheral device. And the earphone can also be used for connecting an earphone and playing audio through the earphone. The interface may also be used to connect other electronic devices, such as AR devices and the like.
It should be understood that the interfacing relationship between the modules illustrated in the embodiments of the present application is only an illustration, and does not limit the structure of the electronic device 200. In other embodiments of the present application, the electronic device 200 may also adopt different interface connection manners or a combination of multiple interface connection manners in the above embodiments.
In this embodiment, the processor 110 may invoke a dynamic configuration module in the electronic device 200 to receive data using a protocol stack that is peer to the protocol stack used by the server 100 when sending data.
The external memory interface 120 may be used to connect an external nonvolatile memory, so as to expand the storage capability of the electronic device 200. The external non-volatile memory communicates with the processor 110 through the external memory interface 120 to implement data storage functions. For example, files such as music, video, etc. are saved in an external nonvolatile memory.
The internal memory 121 may include one or more Random Access Memories (RAMs) and one or more non-volatile memories (NVMs).
The random access memory may include static random-access memory (SRAM), dynamic random-access memory (DRAM), synchronous dynamic random-access memory (SDRAM), double data rate synchronous dynamic random-access memory (DDR SDRAM), such as fifth generation DDR SDRAM generally referred to as DDR5 SDRAM, and the like;
the nonvolatile memory may include a magnetic disk storage device, flash memory (flash memory).
The random access memory may be read and written directly by the processor 110, may be used to store executable programs (e.g., machine instructions) of an operating system or other programs in operation, and may also be used to store data of users and applications, etc.
The nonvolatile memory may also store executable programs, data of users and application programs, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
In the embodiment of the present application, the internal memory 121 may be used to store a program, for example, an implementation program of the data transmission method provided in the embodiment of the present application on the electronic device 200 side. The internal memory 121 may further store a data transmission policy, where the data transmission policy may be preset in advance, or may be configured through a cloud, and then is issued to a dynamic configuration module in the electronic device 200. For specific description of the data transmission policy, reference may be made to the following description of the method embodiments, and details are not repeated here.
The charging management module 140 is configured to receive a charging input from a charger. The charger may be a wireless charger or a wired charger. In some wired charging embodiments, the charging management module 140 may receive charging input from a wired charger via the USB interface 130. In some wireless charging embodiments, the charging management module 140 may receive a wireless charging input through a wireless charging coil of the electronic device 200. The charging management module 140 may also supply power to the electronic device through the power management module 141 while charging the battery 142.
The power management module 141 is used to connect the battery 142, the charging management module 140 and the processor 110. The power management module 141 receives input from the battery 142 and/or the charge management module 140 and provides power to the processor 110, the internal memory 121, the external memory, the display 194, the camera 193, the wireless communication module 160, and the like. The power management module 141 may also be used to monitor parameters such as battery capacity, battery cycle count, battery state of health (leakage, impedance), etc. In some other embodiments, the power management module 141 may also be disposed in the processor 110. In other embodiments, the power management module 141 and the charging management module 140 may be disposed in the same device.
The wireless communication function of the electronic device 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 150, the wireless communication module 160, a modem processor, a baseband processor, and the like.
The antennas 1 and 2 are used for transmitting and receiving electromagnetic wave signals. Each antenna in the electronic device 200 may be used to cover a single or multiple communication bands. Different antennas can also be multiplexed to improve the utilization of the antennas. For example: the antenna 1 may be multiplexed as a diversity antenna of a wireless local area network. In other embodiments, the antenna may be used in conjunction with a tuning switch.
The mobile communication module 150 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the electronic device 200. The mobile communication module 150 may include at least one filter, a switch, a power amplifier, a Low Noise Amplifier (LNA), and the like. The mobile communication module 150 may receive the electromagnetic wave from the antenna 1, filter, amplify, etc. the received electromagnetic wave, and transmit the electromagnetic wave to the modem processor for demodulation. The mobile communication module 150 may also amplify the signal modulated by the modem processor, and convert the signal into electromagnetic wave through the antenna 1 to radiate the electromagnetic wave. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the processor 110. In some embodiments, at least some of the functional modules of the mobile communication module 150 may be disposed in the same device as at least some of the modules of the processor 110.
The modem processor may include a modulator and a demodulator. The modulator is used for modulating a low-frequency baseband signal to be transmitted into a medium-high frequency signal. The demodulator is used for demodulating the received electromagnetic wave signal into a low-frequency baseband signal. The demodulator then passes the demodulated low frequency baseband signal to a baseband processor for processing. The low frequency baseband signal is processed by the baseband processor and then transferred to the application processor. The application processor outputs a sound signal through an audio device (not limited to the speaker 170A, the receiver 170B, etc.) or displays an image or video through the display screen 194. In some embodiments, the modem processor may be a stand-alone device. In other embodiments, the modem processor may be provided in the same device as the mobile communication module 150 or other functional modules, independent of the processor 110.
The wireless communication module 160 may provide a solution for wireless communication applied to the electronic device 200, including Wireless Local Area Networks (WLANs) (e.g., wireless fidelity (Wi-Fi) networks), bluetooth (bluetooth, BT), global Navigation Satellite System (GNSS), frequency Modulation (FM), near Field Communication (NFC), infrared (IR), and the like. The wireless communication module 160 may be one or more devices integrating at least one communication processing module. The wireless communication module 160 receives electromagnetic waves via the antenna 2, performs frequency modulation and filtering on electromagnetic wave signals, and transmits the processed signals to the processor 110. The wireless communication module 160 may also receive a signal to be transmitted from the processor 110, perform frequency modulation and amplification on the signal, and convert the signal into electromagnetic waves via the antenna 2 to radiate the electromagnetic waves.
In some embodiments, antenna 1 of electronic device 200 is coupled to mobile communication module 150 and antenna 2 is coupled to wireless communication module 160 so that electronic device 200 can communicate with networks and other devices through wireless communication techniques. The wireless communication technology may include global system for mobile communications (GSM), general Packet Radio Service (GPRS), code division multiple access (code division multiple access, CDMA), wideband Code Division Multiple Access (WCDMA), time-division code division multiple access (time-division code division multiple access, TD-SCDMA), long Term Evolution (LTE), BT, GNSS, WLAN, NFC, FM, and/or IR technologies, etc. The GNSS may include a Global Positioning System (GPS), a global navigation satellite system (GLONASS), a beidou navigation satellite system (BDS), a quasi-zenith satellite system (QZSS), and/or a Satellite Based Augmentation System (SBAS).
In this embodiment, the electronic device 200 may establish a communication connection with the server 100 through the mobile communication module 150 or the wireless communication module 160, negotiate a protocol stack used for data transmission according to the communication connection, and receive data through the protocol stack used for data transmission with the server 100. For a specific implementation method of data transmission, reference may be made to the following detailed description of method embodiments, which is not repeated herein.
The electronic device 200 implements display functions through the GPU, the display screen 194, and the application processor. The GPU is a microprocessor for image processing, connected to the display screen 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. The processor 110 may include one or more GPUs that execute program instructions to generate or alter display information.
The display screen 194 is used to display images, video, and the like. The display screen 194 includes a display panel. The display panel may be a Liquid Crystal Display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode (active-matrix organic light-emitting diode, AMOLED), a flexible light-emitting diode (FLED), a miniature, a Micro-oeld, a quantum dot light-emitting diode (QLED), or the like. In some embodiments, the electronic device 200 may include 1 or N display screens 194, N being a positive integer greater than 1.
In an embodiment of the present application, the display screen 194 may be used to display a provided page of an application that provides services such as cloud gaming, live webcasting, VR/AR, and the like. The page may include some video content.
The electronic device 200 may implement a photographing function through the ISP, the camera 193, the video codec, the GPU, the display screen 194, the application processor, and the like.
The ISP is used to process the data fed back by the camera 193. For example, when a user takes a picture, the shutter is opened, light is transmitted to the camera photosensitive element through the lens, an optical signal is converted into an electric signal, and the camera photosensitive element transmits the electric signal to the ISP for processing and converting into an image visible to the naked eye. The ISP can also carry out algorithm optimization on the noise, brightness and skin color of the image. The ISP can also optimize parameters such as exposure, color temperature and the like of a shooting scene. In some embodiments, the ISP may be provided in camera 193.
The camera 193 is used to capture still images or video. The object generates an optical image through the lens and projects the optical image to the photosensitive element. The photosensitive element may be a Charge Coupled Device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The light sensing element converts the optical signal into an electrical signal, which is then passed to the ISP where it is converted into a digital image signal. And the ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV and other formats. In some embodiments, the electronic device 200 may include 1 or N cameras 193, N being a positive integer greater than 1.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the electronic device 200 selects a frequency bin, the digital signal processor is used to perform fourier transform or the like on the frequency bin energy.
Video codecs are used to compress or decompress digital video. The electronic device 200 may support one or more video codecs. In this way, the electronic device 200 may play or record video in a variety of encoding formats, such as: moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, MPEG4, and the like.
The NPU is a neural-network (NN) computing processor that processes input information quickly by using a biological neural network structure, for example, by using a transfer mode between neurons of a human brain, and can also learn by itself continuously. Applications such as intelligent cognition of the electronic device 200 can be realized through the NPU, for example: image recognition, face recognition, speech recognition, text understanding, and the like.
The electronic device 200 may implement audio functions via the audio module 170, the speaker 170A, the receiver 170B, the microphone 170C, the headphone interface 170D, and the application processor. Such as music playing, recording, etc.
The audio module 170 is used to convert digital audio information into analog audio signals for output, and also used to convert analog audio inputs into digital audio signals. The audio module 170 may also be used to encode and decode audio signals. In some embodiments, the audio module 170 may be disposed in the processor 110, or some functional modules of the audio module 170 may be disposed in the processor 110.
The speaker 170A, also called a "horn", is used to convert the audio electrical signal into an acoustic signal. The electronic apparatus 200 can listen to music through the speaker 170A or listen to a handsfree call.
The receiver 170B, also called "earpiece", is used to convert the electrical audio signal into an acoustic signal. When the electronic apparatus 200 receives a call or voice information, it is possible to receive a voice by placing the receiver 170B close to the human ear.
The microphone 170C, also referred to as a "microphone," is used to convert sound signals into electrical signals. When making a call or transmitting voice information, the user can input a voice signal to the microphone 170C by speaking near the microphone 170C through the mouth. The electronic device 200 may be provided with at least one microphone 170C. In other embodiments, the electronic device 200 may be provided with two microphones 170C to achieve a noise reduction function in addition to collecting sound signals. In other embodiments, the electronic device 200 may further include three, four or more microphones 170C to collect sound signals, reduce noise, identify sound sources, and perform directional recording.
The earphone interface 170D is used to connect a wired earphone. The headset interface 170D may be the USB interface 130, or may be a 3.5mm open mobile electronic device platform (OMTP) standard interface, a cellular telecommunications industry association (cellular telecommunications industry association of the USA, CTIA) standard interface.
The pressure sensor 180A is used for sensing a pressure signal, and can convert the pressure signal into an electrical signal. In some embodiments, the pressure sensor 180A may be disposed on the display screen 194. The pressure sensor 180A can be of a variety of types, such as a resistive pressure sensor, an inductive pressure sensor, a capacitive pressure sensor, and the like. The capacitive pressure sensor may be a sensor comprising at least two parallel plates having an electrically conductive material. When a force acts on the pressure sensor 180A, the capacitance between the electrodes changes. The electronic device 200 determines the intensity of the pressure from the change in capacitance. When a touch operation is applied to the display screen 194, the electronic device 200 detects the intensity of the touch operation according to the pressure sensor 180A. The electronic apparatus 200 may also calculate the touched position from the detection signal of the pressure sensor 180A. In some embodiments, the touch operations that are applied to the same touch position but different touch operation intensities may correspond to different operation instructions. For example: and when the touch operation with the touch operation intensity smaller than the first pressure threshold value acts on the short message application icon, executing an instruction for viewing the short message. And when the touch operation with the touch operation intensity larger than or equal to the first pressure threshold value acts on the short message application icon, executing an instruction of newly building the short message.
The gyro sensor 180B may be used to determine the motion attitude of the electronic device 200. In some embodiments, the angular velocity of electronic device 200 about three axes (i.e., x, y, and z axes) may be determined by gyroscope sensor 180B. The gyro sensor 180B may be used for photographing anti-shake. Illustratively, when the shutter is pressed, the gyro sensor 180B detects a shake angle of the electronic device 200, calculates a distance to be compensated for by the lens module according to the shake angle, and allows the lens to counteract the shake of the electronic device 200 through a reverse movement, thereby achieving anti-shake. The gyroscope sensor 180B may also be used for navigation, somatosensory gaming scenes.
The air pressure sensor 180C is used to measure air pressure. In some embodiments, the electronic device 200 calculates altitude from the barometric pressure measured by the barometric pressure sensor 180C to assist in positioning and navigation.
The magnetic sensor 180D includes a hall sensor. The electronic device 200 may detect the opening and closing of the flip holster using the magnetic sensor 180D. In some embodiments, when the electronic device 200 is a flip, the electronic device 200 may detect the opening and closing of the flip according to the magnetic sensor 180D. And then according to the opening and closing state of the leather sheath or the opening and closing state of the flip cover, the automatic unlocking of the flip cover is set.
The acceleration sensor 180E may detect the magnitude of acceleration of the electronic device 200 in various directions (typically three axes). The magnitude and direction of gravity can be detected when the electronic device 200 is stationary. The method can also be used for recognizing the posture of the electronic equipment, and is applied to horizontal and vertical screen switching, pedometers and other applications.
A distance sensor 180F for measuring a distance. The electronic device 200 may measure the distance by infrared or laser. In some embodiments, taking a scene, the electronic device 200 may utilize the distance sensor 180F to range to achieve fast focus.
The proximity light sensor 180G may include, for example, a Light Emitting Diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic apparatus 200 emits infrared light to the outside through the light emitting diode. The electronic device 200 detects infrared reflected light from nearby objects using a photodiode. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device 200. When insufficient reflected light is detected, the electronic device 200 may determine that there are no objects near the electronic device 200. The electronic device 200 can utilize the proximity sensor 180G to detect that the user holds the electronic device 200 close to the ear for talking, so as to automatically turn off the screen to save power. The proximity light sensor 180G may also be used in a holster mode, a pocket mode automatically unlocks and locks the screen.
The ambient light sensor 180L is used to sense the ambient light level. The electronic device 200 may adaptively adjust the brightness of the display screen 194 based on the perceived ambient light level. The ambient light sensor 180L may also be used to automatically adjust the white balance when taking a picture. The ambient light sensor 180L may also cooperate with the proximity light sensor 180G to detect whether the electronic device 200 is in a pocket to prevent accidental touches.
The fingerprint sensor 180H is used to collect a fingerprint. The electronic device 200 can utilize the collected fingerprint characteristics to unlock the fingerprint, access the application lock, photograph the fingerprint, answer an incoming call with the fingerprint, and the like.
The temperature sensor 180J is used to detect temperature. In some embodiments, the electronic device 200 implements a temperature processing strategy using the temperature detected by the temperature sensor 180J. For example, when the temperature reported by the temperature sensor 180J exceeds a threshold, the electronic device 200 performs a reduction in performance of a processor located near the temperature sensor 180J, so as to reduce power consumption and implement thermal protection. In other embodiments, the electronic device 200 heats the battery 142 when the temperature is below another threshold to avoid the low temperature causing the electronic device 200 to shut down abnormally. In other embodiments, the electronic device 200 performs boosting of the output voltage of the battery 142 when the temperature is below a further threshold value to avoid abnormal shutdown due to low temperature.
The touch sensor 180K is also referred to as a "touch panel". The touch sensor 180K may be disposed on the display screen 194, and the touch sensor 180K and the display screen 194 form a touch screen, which is also called a "touch screen". The touch sensor 180K is used to detect a touch operation acting thereon or nearby. The touch sensor may communicate the detected touch operation to the application processor to determine the touch event type. Visual output associated with the touch operation may be provided via the display screen 194. In other embodiments, the touch sensor 180K may be disposed on the surface of the electronic device 200 at a different position than the display screen 194.
The bone conduction sensor 180M may acquire a vibration signal. In some embodiments, the bone conduction sensor 180M may acquire a vibration signal of the human voice vibrating a bone mass. The bone conduction sensor 180M may also contact the human body pulse to receive the blood pressure pulsation signal. In some embodiments, bone conduction sensor 180M may also be provided in a headset, integrated into a bone conduction headset. The audio module 170 may analyze a voice signal based on the vibration signal of the bone mass vibrated by the sound part acquired by the bone conduction sensor 180M, so as to implement a voice function. The application processor can analyze heart rate information based on the blood pressure beating signal acquired by the bone conduction sensor 180M, so as to realize the heart rate detection function.
The keys 190 include a power-on key, a volume key, and the like. The keys 190 may be mechanical keys. Or may be touch keys. The electronic apparatus 200 may receive a key input, and generate a key signal input related to user setting and function control of the electronic apparatus 200.
The motor 191 may generate a vibration cue. The motor 191 may be used for incoming call vibration cues, as well as for touch vibration feedback. For example, touch operations applied to different applications (e.g., photographing, audio playing, etc.) may correspond to different vibration feedback effects. The motor 191 may also respond to different vibration feedback effects for touch operations in different areas of the display screen 194. Different application scenes (such as time reminding, receiving information, alarm clock, game and the like) can also correspond to different vibration feedback effects. The touch vibration feedback effect may also support customization.
Indicator 192 may be an indicator light that may be used to indicate a state of charge, a change in charge, or a message, missed call, notification, etc.
The SIM card interface 195 is used to connect a SIM card. The SIM card can be brought into and out of contact with the electronic apparatus 200 by being inserted into the SIM card interface 195 or being pulled out of the SIM card interface 195. The electronic device 200 may support 1 or N SIM card interfaces, N being a positive integer greater than 1. The SIM card interface 195 may support a Nano SIM card, a Micro SIM card, a SIM card, etc. The same SIM card interface 195 can be inserted with multiple cards at the same time. The types of the plurality of cards can be the same or different. The SIM card interface 195 may also be compatible with different types of SIM cards. The SIM card interface 195 may also be compatible with external memory cards. The electronic device 200 interacts with the network through the SIM card to implement functions such as communication and data communication. In some embodiments, the electronic device 200 employs esims, namely: an embedded SIM card. The eSIM card may be embedded in the electronic device 200 and cannot be separated from the electronic device 200.
The software system of the electronic device 200 may employ a hierarchical architecture, an event-driven architecture, a micro-core architecture, a micro-service architecture, or a cloud architecture. The embodiment of the invention adopts a layered architecture
Figure BDA0003035784420000171
The system is an example illustrating a software structure of the electronic device 200.
Fig. 4 is a block diagram of a software configuration of the electronic apparatus 200 according to the embodiment of the present invention.
The layered architecture divides the software into several layers, each layer having a clear role and division of labor. The layers communicate with each other through a software interface. In some embodiments, the method will comprise
Figure BDA0003035784420000172
The system is divided into four layers, namely an application program layer, an application program framework layer and an android runtime from top to bottom
Figure BDA0003035784420000173
And system libraries, and kernel layers.
The application layer may include a series of application packages.
As shown in fig. 4, the application packages may include cameras, gallery, calendar, phone calls, maps, navigation, WLAN, bluetooth, music, video, short messages, and cloud gaming, webcast, VR/AR type applications.
For the functions of the cloud game, the live webcast application, and the VR/AR application, reference may be made to the above detailed description, which is not repeated herein.
The application framework layer provides an Application Programming Interface (API) and a programming framework for the application program of the application layer. The application framework layer includes a number of predefined functions.
As shown in FIG. 4, the application framework layers may include a window manager, content provider, view system, phone manager, resource manager, notification manager, and the like.
The window manager is used for managing window programs. The window manager can obtain the size of the display screen, judge whether a status bar exists, lock the screen, intercept the screen and the like.
The content provider is used to store and retrieve data and make it accessible to applications. The data may include video, images, audio, calls made and answered, browsing history and bookmarks, phone books, etc.
The view system includes visual controls such as controls to display text, controls to display pictures, and the like. The view system may be used to build applications. The display interface may be composed of one or more views. For example, the display interface including the short message notification icon may include a view for displaying text and a view for displaying pictures.
The phone manager is used to provide communication functions of the electronic device 200. Such as management of call status (including on, off, etc.).
The resource manager provides various resources for the application, such as localized strings, icons, pictures, layout files, video files, and the like.
The notification manager enables the application to display notification information in the status bar, can be used to convey notification-type messages, can disappear automatically after a short dwell, and does not require user interaction. Such as a notification manager used to inform download completion, message alerts, etc. The notification manager may also be a notification that appears in the form of a chart or scroll bar text at the top status bar of the system, such as a notification of a background running application, or a notification that appears on the screen in the form of a dialog window. For example, prompting text information in the status bar, sounding a prompt tone, vibrating the electronic device, flashing an indicator light, etc.
Figure BDA0003035784420000174
The Runtime comprises a core library and a virtual machine.
Figure BDA0003035784420000175
runtime is responsible for the scheduling and management of the android system.
The core library comprises two parts: one part is a function which needs to be called by java language, and the other part is a core library of android.
The application layer and the application framework layer run in a virtual machine. The virtual machine executes java files of the application layer and the application framework layer as binary files. The virtual machine is used for performing the functions of object life cycle management, stack management, thread management, safety and exception management, garbage collection and the like.
The system library may include a plurality of functional modules. For example: surface managers (surface managers), media Libraries (Media Libraries), three-dimensional graphics processing Libraries (e.g., openGL ES), 2D graphics engines (e.g., SGL), and the like.
The surface manager is used to manage the display subsystem and provide a fusion of the 2D and 3D layers for multiple applications.
The media library supports a variety of commonly used audio, video format playback and recording, and still image files, among others. The media library may support a variety of audio-video encoding formats, such as MPEG4, h.264, MP3, AAC, AMR, JPG, PNG, and the like.
The three-dimensional graphic processing library is used for realizing three-dimensional graphic drawing, image rendering, synthesis, layer processing and the like.
The 2D graphics engine is a drawing engine for 2D drawing.
The kernel layer is a layer between hardware and software. The inner core layer at least comprises a display driver, a camera driver, an audio driver and a sensor driver.
The following describes exemplary workflow of the software and hardware of the electronic device 200 in connection with capturing a photo scene.
When the touch sensor 180K receives a touch operation, a corresponding hardware interrupt is issued to the kernel layer. The kernel layer processes the touch operation into an original input event (including touch coordinates, a time stamp of the touch operation, and other information). The raw input events are stored at the kernel layer. And the application program framework layer acquires the original input event from the kernel layer and identifies the control corresponding to the input event. Taking the touch operation as a touch click operation, and taking a control corresponding to the click operation as a control of a camera application icon as an example, the camera application calls an interface of an application framework layer, starts the camera application, further starts a camera drive by calling a kernel layer, and captures a still image or a video through the camera 193.
Fig. 5 exemplarily shows a flow of a data transmission method provided by the embodiment of the present application. Next, a data transmission method provided in an embodiment of the present application is described in detail with reference to fig. 5.
It can be understood that, in the data transmission process in the cloud game, live webcast and multi-VR/AR interactive scenes, a server generally sends a large amount of audio/video data and control data to a client, so as to provide an application service for the client, so the following embodiments of the present application describe the data transmission method by taking the server 100 as a sending end and the electronic device 200 as a receiving end as an example.
In some other embodiments, the server 100 may also serve as the receiving end, and the electronic device 200 may also serve as the sending end. For example, in a preamble process of a user watching a webcast, a signal acquisition device needs to acquire audio and video content and transmit the audio and video content to a server, and in this process, the signal acquisition device, that is, the electronic device 200, may be regarded as a sending end, and the server 100 may be regarded as a receiving end. The flow of the method for the electronic device 200 to transmit data to the server 100 at this time is the same as the flow of the method for the server 100 to transmit data to the electronic device 200, and specific reference is made to the detailed description below.
S101, the electronic device 200 detects an operation of starting an application by a user.
Specifically, the electronic device 200 may detect that the user starts an application, for example, a cloud game, a live webcast, or a VR/AR application.
It can be understood that, without being limited to the above-mentioned cloud game, live webcast, and VR/AR application, the electronic device may detect that the user starts another application that needs to provide multiple types of data real-time transmission with another device, such as a server, and this is not limited in this embodiment of the present application.
S102, the server 100 establishes a communication connection with the electronic device 200.
Specifically, the server 100 may establish a communication connection with the electronic device 200 in response to a user initiating an operation of an application on the electronic device 200. The communication connection here means an upper layer communication connection established between the server 100 and the electronic device 200 and above a transport layer.
In this embodiment, the communication standard for data transmission between the server 100 and the electronic device 200 may be based on an Open System Interconnection (OSI) model, or an OSI-evolved five-layer network model or a four-layer network model, which is not limited in this embodiment. Taking a five-layer network model or a four-layer network model as an example, the communication connection may be an application layer connection between the electronic device 200 and the network based on a Hypertext transfer protocol (HTTP), a File Transfer Protocol (FTP), or the like.
S103, the electronic device 200 listens to a protocol used by the server 100 to transmit data.
Specifically, after the server 100 and the electronic device 200 establish the communication connection described in S102 above, the electronic device 200 may open a corresponding port to continuously listen to a protocol used by the server 100 to send data, where the protocol refers to a transport layer protocol, and then the electronic device 200 may invoke a dynamic configuration module of the local terminal to receive data by using a peer-to-peer protocol, which is specifically referred to step S108 below.
S104, the server 100 determines a protocol used by the data to be sent.
Specifically, the server 100 may call an API interface of the dynamic configuration module, and send data to be sent to the application program on the electronic device 200 to the dynamic configuration module in the server 100, where the sent data may be one or more data blocks with different data amounts. Then, the dynamic configuration module may determine, according to the data transmission policy, a protocol used by the data to be sent.
In the embodiment of the present application, the first data and the second data refer to data to be transmitted, but the reliability requirements of the first data and the second data are different.
Referring to fig. 6, fig. 6 illustrates a schematic diagram of a data transmission policy. The data transmission strategy comprises the following steps: the corresponding relation between the data type and the protocol stack, and the corresponding relation between the data type/data volume and the sending queue. Specifically, the control data and the key audio and video data adopt a reliable transmission protocol in a protocol stack 1, the non-key audio and video data adopt a semi-reliable transmission protocol in a protocol stack 2, and the advertisement data adopt an unreliable transmission protocol in a protocol stack 3. For the corresponding relationship between the data type/data amount and the sending queue, reference may be made to the detailed description of step S105, which will not be repeated herein.
It should be understood that the schematic diagram of the data transmission policy shown in fig. 6 is only an example, in this embodiment of the application, the data transmission policy may include a plurality of other protocol stacks besides the three protocol stacks shown in fig. 6, different protocol stacks may support different reliability of data transmission, when different protocol stacks are used for data transmission, the types of the transmission queues used in the data transmission are not limited to the three types shown in fig. 6, and the types and the number of the transmission queues corresponding to the different protocol stacks may be the same or different.
In this embodiment, the first protocol may be any one of the above-mentioned reliable transmission protocol, semi-reliable transmission protocol, or unreliable transmission protocol, and the first protocol may also be any one of the above-mentioned reliable transmission protocol, semi-reliable transmission protocol, or unreliable transmission protocol, but it should be noted that the first protocol and the second protocol are different.
The step of determining the protocol used by the data to be sent by the dynamic configuration module of the server 100 specifically includes the following steps:
1. the dynamic configuration module determines the data type.
The server 100 may directly specify the type of data to be sent. For example, an identifier may be added to the data, the identifier being used to distinguish the type of data. When the dynamic configuration module receives the data, the data type can be identified through identification. In the embodiment of the present application, the data types may include, but are not limited to: control class data, key audio video class data, non-key audio video class data, advertising class data, and the like. The control data is used for determining the operation executed by the application program, the order of the operation and the like, the key audio-video data and the non-key audio-video data are used for displaying and playing the audio-video content in the application program, and the advertisement data are used for displaying and playing the advertisement in the application program. In some embodiments, the data types may also include more or fewer types, which may be determined according to the application service provided by the server 100, and this is not limited by this embodiment.
2. And the dynamic configuration module determines a protocol adopted by the data to be sent according to the data type.
Specifically, because the reliability requirements of different types of data on data transmission are different, the dynamic configuration module may determine, according to the data type, a protocol stack that is used for data transmission and can support different reliability requirements.
The embodiment of the application provides 3 protocol stacks capable of supporting different reliability requirements: a reliable transport protocol supporting reliable transport, a semi-reliable transport protocol supporting semi-reliable transport, and an unreliable transport protocol supporting unreliable transport. Therefore, the dynamic configuration module can determine that the control data and the key audio and video data can adopt a reliable transmission protocol for data transmission according to the data type; the non-key audio and video data can adopt a semi-reliable transmission protocol for data transmission; and the advertisement data can be transmitted by adopting an unreliable transmission protocol of unreliable transmission.
For the principle that the above 3 protocol stacks support different reliability requirements, the above detailed description may be specifically referred to, and details are not repeated herein.
Optionally, in some embodiments of the present application, in addition to determining a protocol stack used in data transmission according to a data type, the server 100 may also determine a protocol stack required in different data transmissions in other manners, for example, the server 100 may evaluate a quality of experience (QoE) requirement of data to be sent, and the server 100 may configure a QoE threshold in advance. When QoE is larger than QoE threshold, the dynamic configuration module adopts reliable transmission protocol to transmit the data; when the QoE is smaller than the QoE threshold value, the dynamic configuration module adopts a protocol stack 3 to transmit the data; when the QoE is equal to the QoE threshold, the dynamic configuration module transmits the data by adopting a semi-reliable transmission protocol. The QoE is a subjective feeling of the user according to the service provided by the server 100 in the interaction process between the application program of the electronic device 200 and the server 100, and one comprehensive evaluation parameter may include, for example, a reliability requirement of data transmission.
Therefore, the protocol stack meeting the reliability requirements can be adopted for data transmission according to the reliability requirements of different types of data, so that the requirements of users are met, and the user experience is improved.
S105, the server 100 determines a sending queue corresponding to a protocol used by the data to be sent.
Specifically, the dynamic configuration module of the server 100 may determine, according to the data transmission policy, a corresponding transmission queue in a protocol used for data to be transmitted.
The correspondence between the data type/data amount and the transmission queue in the data transmission policy includes: the control class data corresponds to a low-delay queue in a reliable transmission protocol, and the length of the low-delay queue is a first value; the key audio and video data with the data volume smaller than the second value correspond to other queues in the reliable transmission protocol, the lengths of the other queues are a third value, the key audio and video data with the data volume larger than the second value correspond to a high throughput queue in the reliable transmission protocol, and the length of the high throughput queue is a fourth value. The data transmission policy may be preset in the dynamic configuration modules in the server 100 and the electronic device 200, or may be formulated by the cloud and sent to the electronic device 200.
The step of determining, by the dynamic configuration module of the server 100, the sending queue used for data transmission according to the data transmission policy specifically includes the following steps:
1. the dynamic configuration module determines the data type and/or the data amount of the data to be transmitted.
Since the data to be transmitted may include multiple data blocks, and the data amount of different data blocks is different, and the transmission delay is different, the dynamic configuration module may calculate the data amount of the data to be transmitted, and then determine, according to the data amount, the transmission queue used in the protocol stack for data transmission. It should be noted that, when the data to be transmitted is control-class data, the dynamic configuration module does not calculate the data amount of the control-class data.
2. And the dynamic configuration module determines different sending queues adopted when different protocol stacks are adopted for data transmission according to the data type and/or the data quantity.
Firstly, the dynamic configuration module may set in advance different types of sending queues used when different protocol stacks are used for data transmission. For example, the type of transmit queue may include one or more of: low latency queues, high throughput queues, and other queues. Different types of send queues may have different sizes of the maximum amount of data that can be buffered, the length of the low latency queue may be set to a first value, e.g., 4 Kilobytes (KB), the length of the other queues may be set to a third value, e.g., 400KB, and the length of the high throughput queue may be set to a fourth value, e.g., 4MB. The size of the maximum cacheable data volume of the different types of sending queues may be, the dynamic configuration module may set the size of the maximum cacheable data volume of the different types of sending queues in advance according to the data volume which often occurs in the data transmission process, and the number of the different types of sending queues may be one or more.
When the dynamic configuration module determines that a reliable transmission protocol is adopted to transmit the control type data and the key audio and video type data, the control type data is transmitted by adopting a low-delay queue, the key audio and video type data with the data volume larger than or equal to a second value, such as 1MB, is transmitted by adopting a high-throughput queue, and the key audio and video type data with the data volume smaller than the second value, such as 1MB, is transmitted by adopting other queues. It should be noted that, when the server 100 transmits data by using a reliable transmission protocol, since the control data and the key audio/video data are both transmitted by using the reliable transmission protocol, the dynamic configuration module may directly default that the control data uses a low-delay queue, and the key audio/video data needs to use a corresponding transmission queue according to the measured data size.
When the dynamic configuration module determines that a semi-reliable transmission protocol is adopted to transmit non-key audio and video data, data with the data volume smaller than a second value, for example 1MB, is transmitted by adopting a low-delay queue, and data with the data volume larger than or equal to the second value, for example 1MB, is transmitted by adopting a high-throughput queue.
When the dynamic configuration module determines that the advertisement data is transmitted by adopting an unreliable transmission protocol, data with the data volume smaller than a second value, such as 1MB, is transmitted by adopting a low-delay queue, and data with the data volume larger than or equal to the second value, such as 1MB, is transmitted by adopting a high-throughput queue.
Optionally, in other embodiments of the present application, the dynamic configuration module may dynamically set the transmission queues of different sizes according to a real-time requirement of data to be transmitted. For example, when the bandwidth is 20Mbps, if the real-time requirement of the data to be sent is 10ms, the dynamic configuration module may set the size of the transmission queue to 200Kbit, and if the real-time requirement of the data to be sent is 100ms, the size of the queue is 2Mbit.
Thus, the dynamic configuration module of the server 100 may determine, according to the transmission delay requirement of the data, that the data with different data amounts adopts the sending queue most matched with the delay requirement thereof, so as to meet the user requirement.
When the network is congested, the transmission queue is already used for caching data, at this time, if there is audio and video data or control data with a data volume smaller than the second value to request transmission, the key audio and video data or control data with a data volume smaller than the second value can be queued to wait for a corresponding transmission queue, that is, the control data is queued to wait for a low-delay queue, and the key audio and video data with a data volume smaller than the second value is queued to wait for other queues. Compared with the traditional TCP (transmission control protocol) which is provided with a fixed 4MB length sending queue for being used for carrying out the detailed motion, the method reduces the queuing time delay of the control data and the key audio and video data of which the data quantity is smaller than the second value.
Take a specific scenario as an example: when the bandwidth =10Mbps, the transmission queue of the conventional TCP protocol can cache 4MB of data at most, and if the key audio/video data of 4MB, that is, 32Mbit, is already cached, the queuing delay is: 32Mbit/10Mbps =3.2s. For the user, the queuing delay is too long, which not only causes the transmission delay of the key audio and video data in the sending queue to be too long, but also causes the queuing delay of other control data and audio and video data with small data quantity which are queued to wait to enter the sending queue to be too long. However, by using the various sending queues with different lengths provided by the embodiment of the present application, the queuing delay can be reduced, for example, when the low-delay queue is full of control-class data and the length of the low-delay queue is 4KB, the queuing delay of the new control-class data is: 0.032Mbit/10Mbps =0.0032s, obviously, the data transmission method adopting the sending queues with different lengths can effectively meet the requirements on transmission real-time performance of control data and audio and video data with small data quantity, and improve the fluency of user experience.
S106, the server 100 inputs the data to be sent into the sending queue.
Specifically, when data is input from the sending queue, the dynamic configuration module of the server 100 may sequentially cache the data to be sent into the corresponding sending queue according to the data priority from high to low.
In this embodiment, the priority of data to be sent may be referred to as a first priority, and the order in which data to be sent enters the sending queue may be referred to as a first order.
In this embodiment, the server 100 may prioritize the data in advance, for example: when a reliable transmission protocol is adopted to transmit data, the priority of control class data is highest, and key audio and video class data with the data volume smaller than a second value and key audio and video class data with the data volume larger than or equal to the second value are sequentially arranged from top to bottom; when a semi-reliable transmission protocol is adopted to transmit data, the priority of non-key audio and video data with the data volume smaller than a second value is high, and the priority of non-key audio and video data with the data volume larger than or equal to the second value is low; when the protocol stack 3 is adopted to transmit data, the advertisement class data with the data volume smaller than the second value has high priority, and the advertisement class data with the data volume larger than or equal to the second value has low priority.
The data prioritization principle may be that the data with a larger influence on the user experience is prioritized according to influence degrees of different types of data on the user experience. For example, a user is sensitive to the real-time performance of control data transmission, and if the control data transmission delay is too long, the user can obviously perceive the situations that some operations are delayed and cannot respond, so that the influence degree of the control data transmission on the user experience is the greatest, and then the control data transmission is key audio and video data, non-key audio and video data and advertisement data.
Therefore, the data with high priority can be preferentially processed, the fluency of user operation and the fluency of key audio and video data presentation are ensured, even if part of non-key audio and video data or advertisement data is processed in a delayed mode, the game experience of a user is not influenced, the data transmission efficiency is improved on the whole, and the user experience is improved.
S107, the server 100 transmits the data in the transmission queue to the electronic device 200 by using the determined protocol.
Specifically, when data is output from the transmission queue, the demultiplexer of the server 100 may sequentially transmit the data in the corresponding transmission queue to the electronic device 200 in the order from high to low according to the priority of the transmission queue.
In this embodiment, the priority of the transmission queue may be referred to as a second priority, and the order in which data to be transmitted is output from the transmission queue may be referred to as a second order.
The sending queue priority specifically refers to: the low latency queue has the highest priority and the high throughput queue has the lowest priority. The data amount of the data buffered by the low-delay queue is small, the corresponding transmission delay is small, the data amount of the data buffered by the high-throughput queue is large, and the corresponding transmission delay is large, so that the data with the small data amount is preferentially sent to the greatest extent, and the efficiency of overall data transmission is improved.
It should be noted that when a reliable transmission protocol is used for transmission, there may be other queues besides the low-latency queue and the high-throughput queue, and in this case, the queue priorities are, in order from high to low, the low-latency queue, the other queues and the high-throughput queue. This is because, in the process of providing the game application service to the electronic device 200 by the server 100, the control-type data always needs to be processed preferentially to ensure the normal experience of the user; secondly, the key audio and video data with small data volume also needs to be transmitted to the electronic device 200 as soon as possible; and finally, the key audio and video data with large data volume can be sent finally, because the transmission delay of the data with small data volume is small, and the transmission delay of the data with large data volume is large, the data with small data volume is ensured to be sent preferentially to the greatest extent, so that the transmission efficiency is improved.
In other embodiments, a special service request may occur, and the demultiplexer may temporarily adjust the priority of the transmission queue according to the special service request, thereby changing the output order of the data in the transmission queue. For example, the special service request may be: the game levels corresponding to different audio and video data blocks are different, that is, the display order of the audio and video data at different game levels at the electronic device 200 end may be different, so the multi-path distributor may set the priority of the transmission queue with a higher buffer game level to be the highest, and it is ensured that the data with a higher game level may be preferentially output from the transmission queue.
In this way, by defining the priority of the transmission queue, or the multi-way distributor may preferentially output the data buffered in the transmission queue with a higher priority to the electronic device 200 from the transmission queue in a special service scenario. In this way, it is further ensured that the data in the high priority queue can be preferentially transmitted to the application program in the electronic device 200.
Optionally, in some embodiments, when the data to be sent is output from the sending queues, if each sending queue corresponds to one multi-way distributor, it represents that the data to be sent in all the sending queues can be sent to the electronic device 200 in parallel, that is, the multi-way distributor does not need to determine the output order of the data in the sending queues according to the priorities of the sending queues.
S108, the dynamic configuration module of the electronic device 200 parses the data using the protocol stack that is peer to peer with the server 100.
Specifically, the server 100 may invoke a dynamic configuration module in the electronic device 200 to analyze the received data according to the protocol stack used by the server 100 to send data, which is monitored by the electronic device 200 in step S103.
It can be seen that, in the data transmission method provided in the embodiment of the present application, the data transmission method is defined in a personalized manner through multiple dimensions, such as the reliability requirement and the real-time requirement of the data, and multiple priorities, such as the priority of the data entering the sending queue and the priority of the data outputting the sending queue. After the data transmission method provided by the embodiment of the application is implemented, different data can be transmitted individually by adopting different transmission methods, so that the reliability requirements of the different data can be met, and the real-time requirements of the different data can also be met. And further improves the user experience.
It can be understood that, when the sending end is the electronic device 200 and the receiving end is the server 100, the step of sending data by the electronic device 200 may refer to the process of sending data from the server 100 to the electronic device 200 described in S101 to S108 above, which is not described herein again for the moment.
The embodiments of the present application can be combined arbitrarily to achieve different technical effects.
In the above embodiments, the implementation may be wholly or partially realized by software, hardware, firmware, or any combination thereof. When implemented in software, it may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, the procedures or functions described in accordance with the present application are generated, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a network of computers, or other programmable device. The computer instructions may be stored in a computer readable storage medium or transmitted from one computer readable storage medium to another, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by wire (e.g., coaxial cable, fiber optic, digital subscriber line) or wirelessly (e.g., infrared, wireless, microwave, etc.). The computer-readable storage medium can be any available medium that can be accessed by a computer or a data storage device, such as a server, a data center, etc., that incorporates one or more of the available media. The usable medium may be a magnetic medium (e.g., floppy Disk, hard Disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid State Disk), among others.
One of ordinary skill in the art will appreciate that all or part of the processes in the methods of the above embodiments may be implemented by hardware related to instructions of a computer program, which may be stored in a computer-readable storage medium, and when executed, may include the processes of the above method embodiments. And the aforementioned storage medium includes: various media capable of storing program codes, such as ROM or RAM, magnetic or optical disks, etc.
In short, the above description is only an example of the technical solution of the present invention, and is not intended to limit the scope of the present invention. Any modifications, equivalents, improvements and the like made in accordance with the disclosure of the present invention are intended to be included within the scope of the present invention.

Claims (11)

1. A data transmission method, which is applied in a sending end, characterized in that the method comprises:
the sending end determines a first protocol according to a first data type to which the first data belongs; the process of transmitting data by adopting the first protocol meets the requirement of a user on the reliability of the data belonging to the first data type; the first data type is determined according to content provided by the first data and experience of a user on the content;
and the sending end sends the first data to a receiving end by adopting the first protocol.
2. The method of claim 1, further comprising:
the sending end determines a second protocol according to a second data type to which the second data belongs; the process of transmitting data by adopting the second protocol meets the requirement of a user on the reliability of the data belonging to the second data type; the second data type is determined according to content provided by the second data and experience of a user on the content; the first data type and the second data type are different;
and the sending end sends the second data to a receiving end by adopting the second protocol.
3. The method according to claim 1 or 2, wherein the first data type is any one of: control class data, key audio and video class data, non-key audio and video class data and advertisement class data.
4. The method according to any of claims 1-3, wherein before the sending end sends the first data to a receiving end using the first protocol, the method further comprises:
the sending end puts the first data into a first sending queue according to a first data type to which the first data belongs;
when the first data type is control type data, the length of the first sending queue is the first value.
5. The method according to any of claims 1-4, wherein before the sending end sends the first data to a receiving end using the first protocol, the method further comprises:
the sending end puts the first data into a second sending queue according to the data volume of the first data;
when the data volume of the first data is smaller than a second value, the length of the second sending queue is a third value;
when the data volume of the first data is larger than the second value, the length of the second sending queue is a fourth value; the fourth value is greater than the third value, which is greater than the first value.
6. The method according to any of claims 1-5, wherein before the sending end sends the first data to a receiving end using the first protocol, the method further comprises:
the sending end inputs the first data to the first sending queue according to the first priority of the first data according to a first sequence;
the correspondence between the first priority and the first order is such that the higher the first priority is, the higher the first order is.
7. The method according to any of claims 1-6, wherein before the sending end sends the first data to a receiving end using the first protocol, the method further comprises: the method specifically comprises the following steps:
the sending end outputs the first data in the first sending queue from the first sending queue according to the second priority of the first sending queue;
the correspondence between the second priority and the second order is such that the higher the second priority, the higher the second order.
8. The method according to any one of claims 1 to 7, wherein the first data are multiple types of data related to the sending end providing the receiving end with real-time audio and video services, and the real-time audio and video services include: cloud game service, live webcast service, or VR/AR service.
9. An electronic device, comprising one or more processors and one or more memories; wherein the one or more memories are coupled to the one or more processors for storing computer program code comprising computer instructions that, when executed by the one or more processors, cause the electronic device to perform the method of any of claims 1-8.
10. A computer program product comprising instructions for causing an electronic device to perform the method according to any of claims 1-8 when the computer program product is run on the electronic device.
11. A computer-readable storage medium comprising instructions that, when executed on an electronic device, cause the electronic device to perform the method of any of claims 1-8.
CN202110443219.9A 2021-04-23 2021-04-23 Data transmission method, system and related device Pending CN115242891A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202110443219.9A CN115242891A (en) 2021-04-23 2021-04-23 Data transmission method, system and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202110443219.9A CN115242891A (en) 2021-04-23 2021-04-23 Data transmission method, system and related device

Publications (1)

Publication Number Publication Date
CN115242891A true CN115242891A (en) 2022-10-25

Family

ID=83666309

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202110443219.9A Pending CN115242891A (en) 2021-04-23 2021-04-23 Data transmission method, system and related device

Country Status (1)

Country Link
CN (1) CN115242891A (en)

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741497A (en) * 2004-08-29 2006-03-01 华为技术有限公司 Priority service method for wireless chain protocol module multi-example data business
CN101834879A (en) * 2010-02-09 2010-09-15 北京中科大洋科技发展股份有限公司 Intelligent efficient video/audio data transmission method adapted to different network environments
CN102594774A (en) * 2011-01-11 2012-07-18 中兴通讯股份有限公司 Streaming media transmission method and system

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1741497A (en) * 2004-08-29 2006-03-01 华为技术有限公司 Priority service method for wireless chain protocol module multi-example data business
CN101834879A (en) * 2010-02-09 2010-09-15 北京中科大洋科技发展股份有限公司 Intelligent efficient video/audio data transmission method adapted to different network environments
CN102594774A (en) * 2011-01-11 2012-07-18 中兴通讯股份有限公司 Streaming media transmission method and system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
CSDN博客: "游戏服务器:到底使用UDP还是TCP", Retrieved from the Internet <URL:https://blog.csdn.net/qq_21949217/article/details/42550947> *
陈静;何加铭;闻建芬;: "一种适用于移动通信网的流媒体传输策略", 杭州电子科技大学学报, no. 05 *

Similar Documents

Publication Publication Date Title
WO2021017889A1 (en) Display method of video call appliced to electronic device and related apparatus
CN111316598B (en) Multi-screen interaction method and equipment
WO2022257977A1 (en) Screen projection method for electronic device, and electronic device
CN111416794B (en) Data transmission method and electronic equipment
AU2020229917B2 (en) Recording frame rate control method and related apparatus
WO2021175300A1 (en) Data transmission method and apparatus, electronic device, and readable storage medium
CN113961157B (en) Display interaction system, display method and equipment
KR102491006B1 (en) Data Transmission Methods and Electronic Devices
CN110636554B (en) Data transmission method and device
WO2021082815A1 (en) Display element display method and electronic device
CN111372329B (en) Connection establishing method and terminal equipment
EP4293997A1 (en) Display method, electronic device, and system
CN115242891A (en) Data transmission method, system and related device
CN114827098A (en) Method and device for close shooting, electronic equipment and readable storage medium
CN113678481A (en) Wireless audio system, audio communication method and equipment
CN113271577B (en) Media data playing system, method and related device
CN116684036B (en) Data processing method and related device
CN114979021B (en) Data processing method and electronic equipment
WO2023093778A1 (en) Screenshot capture method and related apparatus
WO2023280160A1 (en) Channel switching method and apparatus
WO2022267917A1 (en) Bluetooth communication method and system
CN116996900A (en) Data transmission method and electronic equipment
CN115048193A (en) Multi-device distributed scheduling method and related devices
CN115460445A (en) Screen projection method of electronic equipment and electronic equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination