Method and system for switching data transmission modes
Technical Field
The present invention relates to wireless local area network processing technologies, and in particular, to a method and a system for switching data transmission modes.
Background
With the continuous popularization of electronic devices, network-based wireless communication technologies are also on the way of becoming mature, in many scenes, a large number of STA mobile terminals are associated with one AP to simultaneously receive multicast, for example, in the prior art, in one classroom, all students receive data of the AP in a multicast mode when receiving video courses with pads, but in this way, the multicast mode is not always adopted regardless of the distance between the STA and the AP and the propagation rate, so that STA devices which originally can have better propagation quality can reduce the transmission quality because of receiving data with other STAs in a multicast mode.
To solve the above technical problems, chinese patent No. discloses a wireless body area network security access method [ application No.: 2014105578959], which is provided with two interaction modes: the network coordinator initiates a handshake and the sensor nodes initiate a handshake so as to realize that when a certain part is injured and the blood pressure rises suddenly, a certain or some sensor nodes initiate a handshake process actively, so that a patient is rescued in time. The scheme adopts enhanced four-step handshake to realize dynamic negotiation of user keys, reduces handshake information, sets two access modes of unicast and multicast through encryption of all information, and solves the problem of remote access by adopting a multi-hop mode.
In addition, the chinese patent network also discloses a multicast data transceiving method [ application number: 201710193835.3], comprising the steps of: a step of transmitting a request frame for requesting to provide multicast data to the network when a multicast service start is recognized by an upper layer identifier (upper layer) of a mobile terminal, and a step of receiving a response frame for the request frame from the network: and receiving multicast data from the network. The invention can effectively manage wireless network multicast group in multicast service network; providing a multicast group management method for maximally saving terminal consumption; providing a multicast group management method capable of effectively managing radio resources when a terminal moves; a multicast group management method is provided for changing the multicast data transmission/reception scheme according to the number of terminals to be served on a network.
The two schemes both improve the quality of data transmission to a certain extent, but the former selects a multicast or unicast transmission mode according to the number of sensors, thereby reducing network congestion and improving transmission efficiency and transmission quality; the latter utilizes radio resources by a multicast group management method to improve transmission efficiency. However, there is no method to individually select a transmission mode according to the specific connection situation between each AP and STA so as to improve the transmission quality.
Disclosure of Invention
The object of the present invention is to provide a method for switching data transmission mode to improve the transmission quality;
another object of the present invention is to provide a system for switching data transmission modes in response to the above problems.
In order to achieve the purpose, the invention adopts the following technical scheme:
the method for switching the data transmission mode comprises the following steps:
s1: after the AP associates at least one STA, judging whether the STA with the AP, the distance of which is less than the critical distance, exists;
s2: if there are STAs with a distance from the AP less than the threshold distance,
the data transmission mode between the STA and the AP is changed from a multicast transmission mode to a unicast transmission mode, and the data transmission modes between the other STAs and the AP are kept as the multicast transmission mode;
otherwise, go to step S3;
s3: the data transmission scheme between all STAs and the AP is maintained as a multicast transmission scheme.
In the method for switching data transmission method, in step S1 or step S2, the selection of the threshold distance or the transmission method is determined by comparing the multicast score obtained by the multicast scoring method with the unicast score obtained by the unicast scoring method.
In the method for switching data transmission modes, the method for comparing and judging the critical distance according to the multicast score value and the unicast score value comprises the following steps: and searching the STA with the unicast score value equal to the multicast score value, determining the distance between the STA and the AP, and determining the distance value as a critical distance value.
In the method for switching data transmission modes, the distance between the STA and the AP is determined by a positioning system built in the STA and the AP and/or by network properties and a data transmission rate between the STA and the AP.
In the method for switching data transmission modes, the method for selecting the transmission mode according to the comparison and judgment between the multicast score value and the unicast score value comprises the following steps: and searching the STA with the unicast score value smaller than the multicast score value, defaulting that the distance between the STA and the AP is smaller than a critical distance value, determining to select a unicast transmission mode, and selecting a multicast transmission mode by the other STAs.
In the method for switching data transmission modes, the method for obtaining the multicast score value by using the multicast score mode includes formula ①:
score1=1/V①
score 1: multicast score value
V is multicast transmission rate;
the method for obtaining the unicast score value by using the unicast scoring method comprises a formula ②:
score 2: unicast score values;
n: represents n STAs;
and Vi: the direct average connection rate between each STA and the AP over a period of time is V1, V2.. Vn, respectively;
in the method for switching the data transmission method, the period of time required to obtain the average connection rate is any one period of time between 0s and 5 s.
In the above method for switching data transmission method, the multicast transmission method is configured by the user and/or determined by the system.
In the above method for switching a data transmission method, the switching of the data transmission method is determined at the beginning of a service, and once the data transmission method is determined, the data transmission method is not changed until the service is ended.
A system for switching data transmission modes by using a method for switching data transmission modes.
Compared with the prior art, the method has the advantages of pertinence in selection of the transmission method, high transmission efficiency and the like.
Drawings
Fig. 1 is a flow chart of a process of selecting a delivery method of the present invention.
Detailed Description
The following are preferred embodiments of the present invention and are further described with reference to the accompanying drawings, but the present invention is not limited to these embodiments.
Example one
The intelligent database execution method comprises the following steps:
s1: after the AP associates at least one STA, judging whether the STA with the AP, the distance of which is less than the critical distance, exists;
s2: if there are STAs with a distance from the AP less than the threshold distance,
the data transmission mode between the STA and the AP is changed from a multicast transmission mode to a unicast transmission mode, and the data transmission modes between the other STAs and the AP are kept as the multicast transmission mode;
otherwise, go to step S3;
s3: the data transmission scheme between all STAs and the AP is maintained as a multicast transmission scheme.
In step S1 or step S2, the data transmission method is directly determined by the threshold distance, and the threshold distance is determined by comparing the multicast score obtained by the multicast scoring method with the unicast score obtained by the unicast scoring method.
Further, the method for comparing and judging the critical distance according to the multicast score value and the unicast score value comprises the following steps: the AP searches for STAs with unicast credit values equal to multicast credit values among all STAs connected to the AP, determines a distance between the STA and the AP, and determines that the distance is a critical distance value, wherein the distance between the STA and the AP in the embodiment is determined by a positioning system built in the STA and the AP.
In this embodiment, it is assumed that there is no other influence factor in the wireless connection between all STAs and the AP, so that the distance may be determined simply by the positioning system, that is, when the distance is the only influence factor, the obtained distances between the STAs and the AP, whose unicast score values are equal to the multicast score values, are approximate values, and it can be said that all the approximate values slightly fluctuate around an intermediate value, that is, a determined approximate distance value, that is, the intermediate value, may be taken according to the approximate values, the AP automatically determines the STAs whose distances are greater than or equal to the intermediate value, and keeps the STAs as the multicast transmission mode, while the STAs whose distances are smaller than the intermediate value are converted into the unicast transmission mode.
According to the scheme, the unicast score value of each ATP is not required to be compared with the multicast score value, only the distance value is required, and then other distance values are compared with the distance value, so that the calculation process is simplified.
Further, the method for obtaining the multicast score value by using the multicast score method includes formula ①:
score1=1/V①
score 1: multicast score value
V is multicast transmission rate;
similar to the method for obtaining the multicast score value, the method for obtaining the unicast score value by using the unicast score method includes formula ②:
score 2: unicast score values;
n: represents n STAs;
and Vi: the direct average connection rate between each STA and the AP over a period of time is V1, V2.. Vn, respectively;
the period of time required to obtain the average connection rate is any one of the time periods between 0s and 5s, for example, the direct average connection rate between each STA and the AP within a period of time between 0s and 0.1s, of course, a plurality of time periods such as a 3 s to 5s period or a 0s to 5s period may be used, but the switching of the transmission mode may briefly affect the continuity of data transmission, so in order to ensure the transmission quality of data, it is preferable to obtain the average connection rate within the initial period of time and a sufficient period of time to switch the data transmission mode as soon as possible and accurately.
Similarly, for stability during data transfer, the switching of the transmission mode is determined at the beginning of the service, and once the transmission mode is determined, no change occurs until the service is ended, i.e. even if the score1 and score1 values and their relationships and conditions are reversed and do not comply with the initial decision while the data transfer service is in progress, the invention does not switch the transmission mode, as exemplified below with a specific scenario: if a group of users watch multicast video, the transmission mode is selected only at the beginning of the video, and once the selection is made, the transmission mode is not switched in the whole video watching process.
The multicast in this embodiment is a conventional multicast mode, and the rate of multicast may be configured by a user and/or determined by a system, where the system determines that a 2.4G network generally uses an 11Mbps rate, and a 5G network generally uses a 6Mbps rate.
Example two
The present embodiment is similar to the present embodiment, and is different from the present embodiment in that the present embodiment is a system for switching a data transmission method by using a method for switching a data transmission method, and since a transmission method simply using unicast and a transmission method simply using multicast have respective advantages, but have respective disadvantages, which are specifically expressed as follows:
the unicast has the advantages that:
1. the server responds to the request of the client in time;
2. the server sends different data according to different requests of each client, and personalized service is easy to realize.
The disadvantages of unicast:
1. the server is overwhelmed in streaming media application with large number of clients and large flow of each client;
2. the existing network bandwidth is a pyramid structure, and if a unicast protocol is completely used, a network backbone is overwhelmed;
multicast: the "one-to-one group" communication mode between hosts means that hosts joining the same group can receive all data in the group, and switches and routers in the network copy and forward only the data required by the hosts to the demander.
The multicast has the advantages that:
1. the clients needing the same data stream join the same group to share one data stream, so that the load of the server is saved. Has the advantages of broadcasting.
2. Since the multicast protocol is to copy and forward the data stream according to the needs of the receiver, the total service bandwidth of the server is not limited by the bandwidth of the client access terminal. The services it provides can be very rich.
3. This protocol allows transmission over the Internet broadband network as does the unicast protocol.
The disadvantages of multicast are:
1. compared with a unicast protocol, the method has no error correction mechanism, is difficult to make up after packet loss and packet error occur, and can carry out transmission in a unicast transmission mode;
2. although the existing networks support multicast transmission, the existing networks need to be perfected in the aspects of client authentication, QOS and the like.
Therefore, the best state can not be achieved by adopting a simple multicast transmission mode and a unicast transmission mode, and the best state is that the system can select a proper transmission mode for each STA according to the needs, so that the transmission efficiency and the transmission quality are improved to the maximum extent.
EXAMPLE III
The present embodiment is similar to the embodiment, except that the critical distance of the present embodiment is determined by the network property and the data transmission rate between the STA and the AP, and in an open field, along with the increase of the distance, in the same network environment, the transmission rate is affected more or less, and the effect is more obvious when the distance changes, that is, the property of the network is adopted in the present embodiment, and the critical distance is determined by the change of the transmission rate, which is specifically represented as: for example, in a 5G network, under the condition of an open field, the transmission rate is generally configured to be 6Mbps, and the ATP with the reception rate attenuated to 5Mbps all have a certain fixed distance from the AP, and of course, the distance has a slight error, but the error range is within an acceptable range.
Example four
The present embodiment is similar to the embodiment, except that the distance of the present embodiment is determined by the positioning system built in the STA and the AP, and the network property and the data transmission rate between the STA and the AP. In this embodiment, the influence factors of the obstacle are also taken into consideration, the actual distance between each ATP and the AP is determined by the positioning system, and the network property and the attenuation rule of the data transmission rate in the open environment under the network property are combined with the positioning distance of the positioning system to determine whether there is an obstacle between the corresponding ATP and the AP, and when the distances obtained by the network property and the data transmission rate in the open environment are consistent, it indicates that there is no obstacle, the distance value obtained by the ATP that satisfies the equal relationship between the unicast score and the multicast score can be used as the critical distance to select the remaining ATP-free transmission modes, and the remaining ATP that satisfies the requirement of being less than the critical distance in distance but has an obstacle needs to consider the specific situation of its transmission rate, in this embodiment, the ATP processing mode that satisfies the requirement of being less than the critical distance in distance but has an obstacle is the same as the ATP processing mode, comparing the unicast score values of the ATP with the multicast score values independently, adopting a unicast transmission mode when the unicast score values are smaller than the multicast score values, or adopting a multicast transmission mode. According to the scheme, the unicast score value of each ATP is not required to be obtained, the unicast score value of each ATP is not required to be compared with the multicast score value, and only the required ATP, namely the ATP which meets the requirement of being smaller than the critical distance in distance but has obstacles, is required to be calculated independently.
EXAMPLE five
The present embodiment is similar to the first, third, or fourth embodiment, except that the critical distance in the present embodiment is not a specific numerical value, but is only a representative distance, and the transmission manner at this time is directly obtained by comparing and determining the multicast score value and the unicast score value, and the method specifically includes the following steps: firstly, all the STAs with unicast score values smaller than the multicast score value are searched, the distance between the STA with the default unicast score value smaller than the multicast score value and the AP is smaller than a critical distance value, the unicast transmission mode is determined to be selected, and the rest STAs select the multicast transmission mode.
The transmission method between each STA and the AP is selected in the manner of this embodiment, so that the selection of the transmission method for each STA is based on the specific unicast credit value, and has no absolute relation with the actual distance, that is, the STA determines separately, and selects separately, for example, the STA at the same distance as the AP may be partly selected as the multicast transmission method and partly selected as the unicast transmission method.
The scheme of the embodiment can select the optimal transmission mode for each ATP, and has stronger pertinence compared with the fourth embodiment.
The specific embodiments described herein are merely illustrative of the spirit of the invention. Various modifications or additions may be made to the described embodiments or alternatives may be employed by those skilled in the art without departing from the spirit or ambit of the invention as defined in the appended claims.
Although the terms script set, flag, execution plan project, etc. are used more often herein, the possibility of using other terms is not excluded. These terms are used merely to more conveniently describe and explain the nature of the present invention; they are to be construed as being without limitation to any additional limitations that may be imposed by the spirit of the present invention.