Disclosure of Invention
The embodiment of the invention provides an anti-interference method and device in a scene of multiple VR/AR devices, a storage medium and a computer program, which aim to solve the problem of interference caused by the same frequency of multiple VR/AR devices in the same large space.
In order to achieve the purpose, the embodiment of the invention adopts the following technical scheme:
in a first aspect, an embodiment of the present invention provides an anti-interference method in a scenario with multiple VR/AR devices, where the method includes the following steps:
s1: when a VR/AR device is added into the positioning device, a frequency point is selected from a set frequency range to start signal transmission.
S2: the signal-to-noise ratio of the transmitted signal is detected.
S3: judging whether the signal-to-noise ratio is greater than or equal to a set signal-to-noise ratio threshold value, if so, continuing to transmit signals; if not, the flow proceeds to step S4.
S4: judging whether there are frequency points which have not been tried in the set frequency range, if yes, selecting a frequency point which has not been tried to start signal transmission, and returning to the step S2; if not, selecting the frequency point with the highest signal-to-noise ratio and not used currently from the tried frequency points to transmit signals.
Wherein, the frequency points which are not tried refers to the frequency points which are not tried to transmit signals; the tried frequency points refer to frequency points for which signal transmission has been tried.
Compared with the prior art, the technical scheme is that after the frequency point is selected for the VR/AR equipment added into the positioning equipment to carry out signal transmission, whether the signal-to-noise ratio of the transmitted signal reaches the threshold value is judged. If the interference is less when the current frequency point is used for signal transmission, and no same-frequency VR/AR equipment exists, the signal transmission can be continued to be carried out at the current frequency point. If the signal is not reached, the interference of signal transmission by the current frequency point is larger, and the VR/AR equipment with the same frequency may exist, at this time, the current frequency point is skipped, and the frequency point with the signal-to-noise ratio reaching the threshold value is selected by judging the signal-to-noise ratio again, or the frequency point with the highest signal-to-noise ratio and unused is selected by the signal-to-noise ratio not reaching the threshold value. Therefore, the same frequency of a plurality of VR/AR devices in the same large space is avoided, and the problem of interference caused by the same frequency is solved; and each VR/AR equipment added into the positioning equipment in the large space can always transmit signals at a frequency point with relatively high signal-to-noise ratio, so that interference is reduced.
In a second aspect, an embodiment of the present invention provides an anti-interference method in a scenario of multiple VR/AR devices, where the method includes the following steps: at the VR/AR equipment end, modulating an original signal to be transmitted by utilizing a pseudo-random code to form a broadband signal and transmitting the broadband signal, wherein the bandwidth of the pseudo-random code is greater than that of the original signal; and demodulating the broadband signal by using the same pseudo-random code at a positioning equipment end to obtain the original signal.
Compared with the prior art, the technical scheme realizes communication between the VR/AR equipment and the positioning equipment by modulating and demodulating the original signal by using the pseudo-random code with the bandwidth larger than that of the original signal to be transmitted. Because both sides can realize communication only under the condition that the frequency response codes are consistent and countless frequency sequence codes exist, frequency point repetition is difficult to occur among multiple VR/AR devices, thereby solving the problem of interference caused by the same frequency of the multiple VR/AR devices in the same large space.
In a third aspect, an embodiment of the present invention provides an apparatus for anti-interference in a scene of multiple VR/AR devices, where the apparatus includes: the frequency selection module is used for selecting a frequency point within a set frequency range when VR/AR equipment is added into the positioning equipment; when determining that the frequency points which are not tried exist in the set frequency range, selecting the frequency points which are not tried; and when it is determined that there are no frequency points that have not been tried within the set frequency range, selecting a frequency point that has the highest signal-to-noise ratio and is not currently used from the frequency points that have been tried. And the detection module is used for detecting the signal-to-noise ratio of the signal transmitted by the current VR/AR equipment. The judging module is used for judging whether the signal-to-noise ratio is greater than or equal to a set signal-to-noise ratio threshold value; and determining whether there are frequency points within the set frequency range that have not been tried. Wherein, the frequency points which are not tried refers to the frequency points which are not tried to transmit signals; the tried frequency points refer to frequency points for which signal transmission has been tried.
The beneficial effects of the above anti-interference device can be seen in the beneficial effects of the anti-interference method provided in the first aspect.
In a fourth aspect, embodiments of the present invention provide a storage medium storing instruction code for executing the method according to the first aspect or the second aspect.
The above-mentioned storage medium has the advantages that the method for resisting disturbance provided by the first aspect has.
In a fifth aspect, embodiments of the present invention provide a computer program comprising instruction code for performing the method according to the first or second aspect.
The beneficial effects of the above computer program can be seen in the beneficial effects of the method for resisting disturbance provided by the first aspect.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
As known in the prior art, when multiple persons play games in the same large space by using multiple VR/AR devices, the VR/AR devices with the same signal frequency interfere with each other. Based on this situation, the inventors of the present invention propose: when a VR/AR device is added into the positioning device, a frequency point is selected to transmit signals, and then whether the interference of signal transmission performed by the current frequency point is large is determined by judging whether the signal-to-noise ratio of the signals reaches a threshold value, so that whether the same-frequency VR/AR device exists is judged. And if the signal-to-noise ratio reaches the threshold value, the interference is small, no VR/AR equipment with the same frequency exists, and the signal transmission is continued by using the current frequency point. And if the signal-to-noise ratio does not reach the threshold value, indicating that the interference is large and the same-frequency VR/AR equipment exists, skipping the current frequency point, and selecting a frequency point with higher signal-to-noise ratio for signal transmission. Therefore, mutual interference caused by the same frequency of a plurality of VR/AR devices in the same large space can be effectively avoided by judging the signal-to-noise ratio and combining the frequency hopping process.
Based on the above inventive concept, the following describes the technical solution of the embodiment of the present invention in detail.
The embodiment of the invention provides an anti-interference method in a scene of multiple VR/AR devices, and as shown in FIG. 1, the method comprises the following steps:
s1: when a VR/AR device is added into the positioning device, a frequency point is selected from a set frequency range to start signal transmission.
S2: the signal-to-noise ratio of the transmitted signal is detected.
S3: judging whether the signal-to-noise ratio is greater than or equal to a set signal-to-noise ratio threshold value, if so, continuing to transmit signals; if not, the flow proceeds to step S4.
S4: judging whether there are frequency points which have not been tried in the set frequency range, if yes, selecting a frequency point which has not been tried to start signal transmission, and returning to the step S2; if not, selecting the frequency point with the highest signal-to-noise ratio and not used currently from the tried frequency points to transmit signals.
Here, the "frequency point not tried" refers to a frequency point not tried to transmit a signal; by "tried frequency points" is meant frequency points for which signal transmission has been tried.
The above method can be applied to various scenarios, and three scenarios are given below by way of example.
Scene one: as shown in FIG. 2, only one set of positioning devices is arranged in a large space, and a plurality of persons play games in the positioning devices by using a plurality of VR/AR devices. By adopting the method, two or more VR/AR devices can be prevented from using the same frequency point, so that mutual interference between the VR/AR devices is avoided; and interaction of multiple VR/AR devices in the same positioning system for multiple people can be realized, and user experience is improved.
Scene two: as shown in FIG. 3, two sets of positioning devices are adjacently arranged in a large space, two persons play games in the two sets of positioning devices respectively by using one VR/AR device, and the two VR/AR devices do not interact with each other. Although two VR/AR devices do not know the existence of each other, the method can avoid that two or more VR/AR devices use the same frequency point without interaction in different positioning devices because the method determines whether to hop frequency by judging the signal-to-noise ratio, the signal-to-noise ratio is related to interference factors in the surrounding environment and is not related to whether the VR/AR devices interact with each other.
Scene three: as shown in fig. 4, two sets of positioning devices are adjacently arranged in a large space, and multiple persons in each set of positioning device play games by using multiple VR/AR devices, interaction is required between VR/AR devices in the same set of positioning device, and interaction does not exist between VR/AR devices in different sets of positioning devices, which is equivalent to mixing of a scene one and a scene two. As can be known from the above description of the first scene and the second scene, the same frequency point can be automatically avoided by adopting the above method no matter the positioning devices are positioned between VR/AR devices which are interactive with each other or positioned between VR/AR devices which are not interactive with each other and are positioned between different sets of positioning devices, so that the interference is reduced.
It should be noted that the above three scenarios are only exemplary illustrations of applicable scenarios of the method provided in this embodiment, and those skilled in the art can learn that the method in this embodiment is also applicable to other scenarios with the above technical problem, for example, three or more sets of positioning devices are arranged in the same large space, and each set of positioning device has at least one VR/AR device.
In the above method, the specific operation of step S1 is different for whether the VR/AR device joining the positioning device is the first one.
When the first VR/AR device joins the positioning device, step S1 specifically includes: and selecting a frequency point from all frequency points in the set frequency range to start signal transmission. It should be noted that, since the added VR/AR device is the first one, all frequency points in the set frequency range are not tried to perform signal transmission, and these frequency points can be selected, and no VR/AR device with the same frequency point appears in the current positioning device.
When the Nth VR/AR equipment is added into the positioning equipment, N is more than or equal to 2, and the step S1 specifically comprises the following steps: judging whether an untried frequency point exists in a set frequency range or not, and if so, selecting an untried frequency point to start signal transmission; if not, selecting the frequency point with the highest signal-to-noise ratio and not used currently from the tried frequency points to start signal transmission. It should be noted that, because the added VR/AR device is not the first one, that is, since a VR/AR device has been added to the current positioning device before the adding, all frequency points in the set frequency range may be partially or completely tried to perform signal transmission, in order to avoid the VR/AR device having the same frequency point in the current positioning device, it is necessary to first determine whether there are frequency points in the set frequency range for which signal transmission has not been tried before selecting the frequency point, and then correspondingly select the frequency point according to the determination result.
For the method provided in this embodiment, if there are the action of "selecting a frequency point" in step S1 and the action of "selecting an untried frequency point" in step S4, the selection strategy used in the foregoing actions may be as follows as a possible solution: randomly selecting; or selecting from small to large; or selecting from big to small; or combining with past interference records, intelligently selecting frequencies with less interference possibility, namely preferentially selecting frequency points with relatively less interference possibility; and so on.
It should be noted that the selected frequency points should be within a set frequency range, and the set frequency range is to follow the open frequency band of the radio in the world, such as the common 2.4GHz frequency band, 5.8GHz frequency band, and so on.
In step S3, when it is determined that the snr of the signal transmitted at the current frequency point is greater than or equal to the set snr threshold, the signal transmission at the current frequency point is continued, and in the process, the loop returns to step S2 at set time intervals. Because the surrounding environment of the VR/AR equipment is constantly changed, the signal-to-noise ratio of the signal is constantly changed, the interference of the frequency point at the current moment is small, and the interference does not represent the interference at the next moment, for example, when a new VR/AR equipment is added, or a microwave oven and other serious interference sources are started, the signal-to-noise ratio is likely to change, so that the signal-to-noise ratio is judged once at a certain time interval, whether the signal-to-noise ratio of the signal transmitted in each time period meets the set signal-to-noise ratio threshold value can be determined, and then the frequency point of which the signal-to-noise ratio does not meet the set signal-to-noise ratio threshold value can be skipped.
It should be noted that, on the premise of ensuring the signal transmission speed, the specific value for setting the signal-to-noise ratio threshold may be set according to different requirements of different scenes on the signal-to-noise ratio threshold. The set time interval for looping back to step S2 may also be set according to the requirements of different scenarios, and if the signal transmission quality requirement of a scenario is high, the set time interval may be set to be shorter, for example, to loop once every 0.1S, and if the signal transmission quality requirement of a scenario is not high, the set time interval may be set to be longer, for example, to loop once every 1S to 2S.
Based on the scheme of step S3, in step S4, when it is determined that there are no frequency points that have not been tried in the set frequency range, a frequency point that has the highest signal-to-noise ratio and is not currently used is selected from the frequency points that have been tried to transmit a signal, and in this process, the process may also be cycled back to step S2 at set time intervals, so as to achieve the purpose of reducing interference during signal transmission. The setting of the time interval can be referred to the related description in the above step S3.
In order to facilitate extraction of the related information of the "tried frequency points" and the "untried frequency points", the related information may be recorded. As a possible solution, a blank list is established in advance before step S1, and the blank list is used to record the unique identification code, the frequency point and the signal-to-noise ratio of the VR/AR device. When a VR/AR device is added to the positioning device, a frequency point is selected for it, and after the signal-to-noise ratio is detected, the unique identification code, frequency point, and signal-to-noise ratio of the VR/AR device may be recorded in the established list. The list may be as shown in table 1 below.
TABLE 1
It can be known that all the frequency points recorded in the list are tried frequency points, and all the frequency points in the set frequency range that are not recorded in the list are not tried frequency points. By recording the information of the tried frequency points and the VR/AR equipment and the signal-to-noise ratio related to the tried frequency points in the list, it can be known clearly which frequency points have been tried to transmit signals, which VR/AR equipment is trying to transmit, what the signal-to-noise ratio is trying to transmit, so that when the frequency points which are not tried are selected, and when the frequency points which have the highest signal-to-noise ratio and are not used currently are selected from the tried frequency points, the processing speed can be improved according to the recorded information in the list.
Based on this, as a possible scheme, the information of the frequency points which are not in use in the list can be periodically cleared, and the advantage of doing so is that: because the surrounding environment changes in real time, the signal-to-noise ratio of the frequency points recorded in the list also changes continuously, so that the information of the frequency points which are not in use in the list is periodically cleared, and then the frequency points which are repeated before and after the information can be skipped again, and new signal-to-noise ratio data can be obtained, thereby improving the utilization rate of the frequency points in the set frequency range, more frequency points which can be selected for signal transmission by selecting the frequency points for the VR/AR equipment can be selected, and more frequency points with higher signal-to-noise ratio can be selected.
Based on the technical scheme, when a blank list is pre-established for a scene with a plurality of sets of positioning equipment in a large space, a blank list can be established for each set of positioning equipment in the scene, so that each set of positioning equipment maintains one list, and each list is not divided into a master list and a slave list and is not required to be synchronized, thereby being beneficial to simplifying a mechanism for selecting a proper frequency point.
With reference to the above technical solutions, a possible implementation process of the method provided in this embodiment is described in detail below.
Step S1': positioning equipment in a scene is started, and a blank list is established for each set of positioning equipment.
Step S2': when a first VR/AR device is added into a set of positioning device, a frequency point is selected to start signal transmission within a set frequency range according to a set frequency selection strategy. Because the first VR/AR device is adopted, all frequency points in the set frequency range are not tried, and the frequency points can be directly selected from all frequency points in the set frequency range.
Step S3': and detecting the signal-to-noise ratio of the transmitted signal, and recording the unique identification code, the frequency point and the signal-to-noise ratio of the current VR/AR equipment in a pre-established blank list.
Step S4': judging whether the signal-to-noise ratio is larger than or equal to a set signal-to-noise ratio threshold value, if so, continuing to transmit signals, and circularly returning to the step 3' at set time intervals; if not, the flow proceeds to step S5'.
Step S5': judging whether an unrecorded frequency point exists in the set frequency range, if so, selecting an unrecorded frequency point to start signal transmission, and returning to the step S3'; if not, selecting the frequency point with the highest signal-to-noise ratio and not used currently from the recorded frequency points to transmit signals, and circularly returning to the step 3' at set time intervals.
Step S6': when the Nth (N is more than or equal to 2) VR/AR equipment is added into the same set of positioning equipment, judging whether an unrecorded frequency point exists in the set frequency range, if so, selecting an unrecorded frequency point to start signal transmission, and returning to the step S3'; if not, the frequency point with the highest signal-to-noise ratio and not used currently is selected from the recorded frequency points to start signal transmission, and the process returns to step S3'.
Step S7': the list is periodically cleared of information for unused frequency points.
Based on the method for resisting interference in the scene of the multi-VR/AR device, the embodiment further provides an apparatus for resisting interference in the scene of the multi-VR/AR device, where the apparatus includes: the device comprises a frequency selection module, a detection module and a judgment module. The frequency selection module is used for selecting an untried frequency point for the VR/AR equipment added into the positioning equipment within a set frequency range; and when no frequency point which is not tried is in the set frequency range, selecting the frequency point which has the highest signal-to-noise ratio and is not used currently for the VR/AR equipment. The detection module is used for detecting the signal-to-noise ratio of the signal transmitted by the current VR/AR equipment. The judging module is used for judging whether the signal-to-noise ratio is greater than or equal to a set signal-to-noise ratio threshold value; and determine whether there are frequency points in the set frequency range that have not been tried.
By the anti-interference device in the scene of the multiple VR/AR devices, when the VR/AR devices are added into the positioning device, a frequency point is selected to transmit signals, whether the signal-to-noise ratio of the signals reaches a threshold value is judged, if the signal-to-noise ratio reaches the threshold value, the interference is small, no same-frequency VR/AR devices exist, and the signals are transmitted by the current frequency point continuously. And if the signal-to-noise ratio does not reach the threshold value, indicating that the interference is large and the same-frequency VR/AR equipment exists, skipping the current frequency point, and selecting a frequency point with higher signal-to-noise ratio for signal transmission. Therefore, mutual interference caused by the fact that multiple VR/AR devices in the same large space have the same frequency is effectively avoided by judging and combining the signal-to-noise ratio and the frequency hopping process.
Moreover, the frequency of multiple VR/AR devices can be prevented from being the same, so that when the device is applied to a scene where multiple people play games with multiple VR/AR devices in the same set of positioning equipment, interaction among the multiple VR/AR devices can be realized, and the user experience is improved.
In order to facilitate the extraction of the frequency point which is tried to perform signal transmission, and the unique identification code and the signal-to-noise ratio information of the VR/AR equipment related to the frequency point, and further facilitate the judgment of the signal-to-noise ratio and the selection of the frequency point, a storage module is additionally arranged in the device and used for establishing and storing a list, and the list is recorded with the unique identification code, the frequency point and the signal-to-noise ratio information of the VR/AR equipment.
In addition to the method and apparatus for anti-interference in a multi-VR/AR device scenario, this embodiment also provides another method for anti-interference in a multi-VR/AR device scenario, which is specifically as follows:
at the VR/AR equipment end, modulating an original signal to be transmitted by using a pseudo-random code to form a broadband signal and transmitting the broadband signal; wherein the bandwidth of the pseudo random code is greater than the bandwidth of the original signal.
And demodulating the broadband signal by using the same pseudo-random code at a positioning equipment end to obtain the original signal.
In the above method, at the end of the VR/AR device (i.e. the transmitting end), the original signal to be transmitted is a narrow-band signal, and after the narrow-band signal is modulated by a pseudo random code with a bandwidth much larger than that of the narrow-band signal, the bandwidth of the narrow-band signal is spread, and then the narrow-band signal can be modulated by a carrier and transmitted. The same pseudo random code is used at the positioning equipment end (namely, the receiving end) to demodulate the received broadband signal and convert the broadband signal into a narrow-band signal containing original information data, thereby realizing information communication.
The frequency matching and the corresponding communication of the transmitting end and the receiving end are carried out by adopting the mode, only the receiving end with consistent frequency response codes can intercept signals, and due to countless frequency sequence codes, the repetition is difficult to occur, so that the problem of interference caused by the same frequency of a plurality of VR/AR devices in the same large space is solved.
Based on the two anti-interference methods in the scene of the multi-VR/AR device provided in this embodiment, this embodiment further provides a storage medium, where instruction codes are stored in the storage medium, and the instruction codes are used to execute one of the two anti-interference methods described in this embodiment. The beneficial effect that the storage medium can bring is the same as that of the anti-interference method provided by the embodiment, and details are not repeated here.
The present embodiment also provides a computer program comprising instruction codes for performing one of the two tamper-resistant methods according to the present embodiment. The beneficial effect that the computer program can bring is the same as that of the anti-interference method provided by the embodiment, and is not described herein again.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.