Communication channel switching method and device, equipment, storage medium and program product

By judging and switching to the target device based on the communication distance between the terminal device and the visible light device in visible light communication, the problems of low switching accuracy and communication interruption caused by unstable channel environment in the prior art are solved, and higher switching accuracy is achieved and stable communication.

CN119483788APending Publication Date: 2025-02-18NO 63921 UNIT OF PLA
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411584634.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-11-07
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In prior art In visible light communication, the channel environment is unstable, resulting in low handover accuracy, and communication interruption is prone to problems.

Method used

Through the communication distance between the terminal device and the current visible light device, the target visible light device is determined, and the time slot switching request carrying the new time slot is sent to the target device through the old time slot, and the time slot switching operation is performed to ensure that the terminal device and the target visible light device is located between the terminal device and the target visible light device. Communication according to new time slots.

Benefits of technology

The accuracy of communication channel switching is improved, the problem of communication interruption is avoided, and stable communication between the terminal device and the visible light device is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119483788A_ABST
    Figure CN119483788A_ABST
Patent Text Reader

Abstract

The embodiment of the invention provides a communication channel switching method and device, equipment, a storage medium and a program product. The method comprises the following steps: when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, determining a target visible light device, and sending a time slot switching request carrying a new time slot to the target visible light device through an old time slot; after the reply information is received, the switching operation of the time slot is executed, the problem of communication interruption in the communication channel switching process can be avoided through the mode that the time slot change confirmation information is sent to the target visible light equipment through the new time slot, and meanwhile when the communication distance between the terminal equipment and the current visible light equipment is larger than a preset distance threshold value, the time slot change confirmation information is sent to the target visible light equipment. The mode of switching the visible light equipment can improve the switching accuracy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of visible light communication technology, and in particular to a communication channel switching method, device, equipment, storage medium and program product. Background Art

[0002] In the field of visible light communication technology, when a user's terminal device moves from the current light-emitting diode (LED) lamp coverage to another LED lamp coverage, during this movement process, due to various types of obstructions or when the terminal device is at the edge of the current lamp coverage, the quality of the received optical signal may be poor or even the communication may be interrupted. Therefore, it is necessary to trigger the switch to manage the communication channel of the terminal device.

[0003] In the prior art, a horizontal switching method is commonly used for switching communication channels, that is, based on the signal-to-noise ratio of the signal received by the terminal device at the LED lamp end, the signal-to-noise ratio is compared with a set threshold to determine whether to trigger switching.

[0004] However, in practical applications, the horizontal switching of the prior art is easily affected by the channel environment, that is, when the received signal is unstable, the switching accuracy is low and the communication is interrupted. Summary of the invention

[0005] The present invention provides a communication channel switching method, device, equipment, storage medium and program product, which can improve the switching accuracy and avoid communication interruption.

[0006] In a first aspect, an embodiment of the present disclosure provides a method for switching a communication channel, which is applied to a terminal device, comprising: when a communication distance between the terminal device and a current visible light device is greater than a preset distance threshold, determining a target visible light device based on location information of a plurality of visible light devices and location information of the terminal device; sending a time slot switching request carrying a new time slot to the target visible light device through an old time slot; based on reply information received in response to the time slot switching request, performing a time slot switching operation to switch from the old time slot to the new time slot; the reply information includes an identifier of the new time slot; and sending a time slot change confirmation information to the target visible light device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0007] In the second aspect, the embodiment of the present disclosure also provides a method for switching a communication channel, which is applied to a target visible light device, including: receiving a time slot switching request carrying a new time slot sent by a terminal device through an old time slot; registering the new time slot according to the identifier of the terminal device to obtain a registration result; if the registration result is that the registration is passed, then sending a reply message of the time slot switching request to the terminal device based on the old time slot, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; the reply message includes the identifier of the new time slot; receiving a time slot change confirmation message sent by the terminal device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0008] In the third aspect, the embodiment of the present disclosure also provides a communication channel switching device, which is applied to a terminal device, including: a target visible light device determination module, which is used to determine the target visible light device based on the location information of multiple visible light devices and the location information of the terminal device when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold; a time slot switching request sending module, which is used to send a time slot switching request carrying a new time slot to the target visible light device through the old time slot; a time slot switching execution module, which is used to execute a time slot switching operation based on the reply information of the received time slot switching request to switch from the old time slot to the new time slot; the reply information includes the identifier of the new time slot; a time slot change confirmation information sending module, which is used to send a time slot change confirmation information to the target visible light device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0009] In a fourth aspect, an embodiment of the present disclosure further provides a communication channel switching device, which is applied to a target visible light device, and includes: a time slot switching request receiving module, which is used to receive a time slot switching request carrying a new time slot sent by a terminal device through an old time slot; a new time slot registration module, which is used to register the new time slot according to the identifier of the terminal device to obtain a registration result; a reply information sending module, which is used to send a reply message of the time slot switching request to the terminal device based on the old time slot if the registration result is that the registration is passed, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; the reply information includes the identifier of the new time slot; a time slot change confirmation information receiving module, which is used to receive the time slot change confirmation message sent by the terminal device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0010] In a fifth aspect, an embodiment of the present disclosure further provides an electronic device, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the communication channel switching method as described in the embodiment of the present disclosure.

[0011] In a sixth aspect, an embodiment of the present disclosure further provides a storage medium comprising computer executable instructions, which, when executed by a computer processor, are used to execute the communication channel switching method as described in the embodiment of the present disclosure.

[0012] In a seventh aspect, an embodiment of the present disclosure further provides a computer program product, including a computer program, which, when executed by a processor, implements the communication channel switching method as described in the embodiment of the present disclosure.

[0013] The technical solution of the embodiment of the present disclosure is as follows: when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, a target visible light device is determined, and a time slot switching request carrying a new time slot is sent to the target visible light device through an old time slot; after receiving a reply message, a time slot switching operation is performed, and a time slot change confirmation message is sent to the target visible light device through the new time slot. This can avoid the problem of communication interruption during the communication channel switching process. At the same time, when the communication distance between the terminal device and the current visible light device is greater than the preset distance threshold, the visible light device is switched to improve the accuracy of the switching. BRIEF DESCRIPTION OF THE DRAWINGS

[0014] The above and other features, advantages and aspects of the embodiments of the present disclosure will become more apparent with reference to the following detailed description in conjunction with the accompanying drawings. Throughout the accompanying drawings, the same or similar reference numerals represent the same or similar elements. It should be understood that the drawings are schematic and the originals and elements are not necessarily drawn to scale.

[0015] Figure 1 A schematic flow chart of a communication channel switching method provided by an embodiment of the present invention;

[0016] Figure 2 A schematic flow chart of a communication channel switching method provided by an embodiment of the present invention;

[0017] Figure 3 A schematic diagram of the structure of a switching device for a communication channel provided in an embodiment of the present disclosure;

[0018] Figure 4 A schematic diagram of the structure of a switching device for a communication channel provided in an embodiment of the present disclosure;

[0019] Figure 5The present invention is a schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0020] Embodiments of the present disclosure will be described in more detail below with reference to the accompanying drawings. Although certain embodiments of the present disclosure are shown in the accompanying drawings, it should be understood that the present disclosure can be implemented in various forms and should not be construed as being limited to the embodiments described herein, which are instead provided for a more thorough and complete understanding of the present disclosure. It should be understood that the drawings and embodiments of the present disclosure are only for exemplary purposes and are not intended to limit the scope of protection of the present disclosure.

[0021] It should be understood that the various steps recorded in the method implementation of the present disclosure can be performed in different orders and / or in parallel. In addition, the method implementation may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect. The term "including" and its variations used herein are open inclusions, that is, "including but not limited to". It should be noted that the concepts of "first", "second", etc. mentioned in the present disclosure are only used to distinguish different devices, modules or units, and are not used to limit the order or interdependence of the functions performed by these devices, modules or units. It should be noted that the modifications of "one" and "multiple" mentioned in the present disclosure are illustrative and not restrictive, and those skilled in the art should understand that unless otherwise clearly stated in the context, it should be understood as "one or more". It is understandable that the data involved in the present technical solution (including but not limited to the data itself, the acquisition or use of the data) shall comply with the requirements of the corresponding laws, regulations and relevant provisions.

[0022] In the field of visible light communication, when a terminal device moves from the current light emitting diode (LED) lamp coverage range to another LED lamp coverage range, during this movement process, due to various types of obstructions or when the user terminal is at the edge of the current lamp coverage, the quality of the received optical signal may be poor or even the communication may be interrupted. Therefore, it is necessary to trigger a switching operation, that is, to manage the terminal device.

[0023] For switching operations, there are two major methods: horizontal switching and vertical switching. The so-called vertical switching refers to switching from a visible light communication network to a radio frequency network (for example, wireless network communication technology WiFi), which involves the integration of heterogeneous networks. Horizontal switching is the switching between visible light networks at different lamp ends. The most basic method is based on the received light intensity. By comparing the received light intensity with the set threshold, it is determined whether to trigger the switch. The main problem faced by horizontal soft switching technology is that the switching process is easily affected by the channel environment, and unstable received signals will lead to low switching accuracy and communication interruption.

[0024] Figure 1 The present invention provides a flow chart of a communication channel switching method provided by an embodiment of the present invention. Applied to a terminal device, the method can be executed by a communication channel switching device, which is applied to the terminal device and can be implemented in the form of software and / or hardware. Optionally, it can be implemented by an electronic device, which can be a mobile terminal, a PC or a server. Figure 1 As shown, the method includes:

[0025] S110. When the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, determine a target visible light device based on location information of multiple visible light devices and the location information of the terminal device.

[0026] In this embodiment, there is no limitation on the specific terminal device, and it may be, for example, a mobile terminal device with communication function, such as a mobile phone or a tablet.

[0027] In this embodiment, there is no limitation on the specific visible light device, for example, it can be an LED lamp, specifically, an LED lamp installed on the ceiling, and an LED lamp network / matrix formed by it and a backend server. In this embodiment, there is no limitation on the number of visible light devices.

[0028] In this embodiment, there is no restriction on the distance threshold, which can be determined according to actual conditions.

[0029] Here, the communication distance can be understood as the location distance.

[0030] The target visible light device may be a visible light device that is closest to the current terminal device, and the current visible light device may be a visible light device that is communicating with the current terminal device.

[0031] In this embodiment, during the communication between the current visible light device and the terminal device, since the position of the current visible light device is fixed and the terminal device is constantly moving, the communication distance between the current visible light device and the terminal device increases, making it impossible for the current visible light device to provide services to the terminal device more accurately and with higher quality. Therefore, when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, the target visible light device can be determined based on the position information of multiple visible light devices and the position information of the terminal device as a new current visible light device.

[0032] Optionally, the target visible light device is determined based on the location information of multiple visible light devices and the location information of the terminal device, including: determining the communication distance between the terminal device and the multiple visible light devices based on the location information of the terminal device and the location information of the multiple visible light devices; and taking the visible light device with the shortest communication distance as the target visible light device.

[0033] In this embodiment, when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, the terminal device can obtain the identity documents (IDs) broadcasted by multiple visible light devices through channel broadcasts. The terminal device determines the communication distance between each visible light device based on its own current location information and the location information of the visible light device corresponding to the ID of each visible light device, and uses the visible light device with the smallest communication distance (or the closest distance) as the target visible light device. That is, the communication channel of the current visible light device is switched to the target visible light device.

[0034] Exemplarily, the terminal devices take mobile phone 1 and mobile phone 2 as examples, the preset distance threshold takes 49m as an example, and the various visible light devices take LED lights as examples. When user 1 uses mobile phone 1 to interact with mobile phone 2 used by user 2, since user 1 and user 2 are constantly moving, the communication distance between the LED light providing service for mobile phone 1 and mobile phone 1 is 50m, which has exceeded the preset distance threshold of 49m. At this time, in order to ensure normal communication between mobile phone 1 and mobile phone 2, mobile phone 1 needs to determine an LED light that is closest to mobile phone 1 as the target LED light, and switch the communication channel to the target LED light.

[0035] Exemplarily, mobile phone 1 obtains location information of multiple LED lights, and the communication distances between mobile phone 1 and each LED light are: LED light 1 (48m), LED light 2 (40m), LED light 3 (58m) and LED light 4 (60m), and LED light 2 with the shortest distance is selected as the target LED light (target visible light device).

[0036] In this embodiment, by automatically selecting the visible light device that is closest to the terminal device in communication distance as the target device, signal attenuation and interference are reduced, thereby improving the reliability and speed of communication.

[0037] S120: Send a time slot switching request carrying a new time slot to the target visible light device through the old time slot.

[0038] The time slot switching request is used to indicate that the old time slot corresponding to the current visible light device is changed to the new time slot of the target visible light device, that is, the new time slot is used as the time slot for communicating with the terminal device. The new time slot is determined according to the communication status of multiple time slots in the target visible light device, and the communication status includes idle or busy.

[0039] In this embodiment, the terminal device sends a timeslot switching request carrying a new timeslot to the target visible light device via an uplink old timeslot, so as to switch the old timeslot corresponding to the current visible light device to the new timeslot corresponding to the target visible light device.

[0040] Optionally, the new time slot is determined by: monitoring the downlink broadcast information of the target visible light device; wherein the downlink broadcast information includes the communication status of multiple time slots; determining at least one candidate time slot according to the communication status of the multiple time slots; wherein the candidate time slot is a time slot whose communication status is idle; and determining the new time slot based on the at least one candidate time slot.

[0041] In this embodiment, after determining the target visible light device, the terminal device monitors the communication status of multiple time slots updated in real time by the target visible light device in real time, and can determine at least one time slot with an idle communication status from the communication status of the multiple time slots as at least one candidate time slot, and randomly selects a time slot from the at least one candidate time slot as a new time slot.

[0042] Exemplarily, the visible light device takes an LED lamp as an example, and the terminal device takes mobile phone 1 as an example. When the LED lamp communicates with mobile phone 1, it will divide certain time intervals (i.e., time slots) in each frame according to the time sequence in a time division multiplexing manner, and number these time intervals according to a certain serial number, thus obtaining the time slot identification (or number).

[0043] Exemplarily, mobile phone 1 monitors the downlink broadcast information of the target LED light, randomly determines a time slot with an idle communication status from the downlink broadcast information as a new time slot, and then mobile phone 1 compiles the new time slot into the time slot switching request to request the target LED light to use the new time slot as the time slot for communicating with mobile phone 1.

[0044] Exemplarily, the communication states of the multiple time slots may be: time slot 1 (idle), time slot 2 (busy), time slot 3 (idle), time slot 4 (busy), etc. At this time, time slot 1 and time slot 3 whose communication states are idle are determined among the multiple time slots. Time slot 1 and time slot 3 are candidate time slots, and a time slot is randomly selected from time slot 1 and time slot 3 as a new time slot. For example, time slot 1 is selected as a new time slot.

[0045] In this embodiment, an idle time slot is randomly selected from multiple time slots as a new time slot for uplink access registration to reduce the probability of collision during access. This embodiment improves the accuracy of horizontal switching based on the communication status of multiple time slots.

[0046] S130. Based on the received reply information of the time slot switching request, perform a time slot switching operation to switch from the old time slot to the new time slot.

[0047] In this embodiment, a reply message of a time slot switching request sent by a target visible light device is received, and the reply message includes an identifier of a new time slot. The terminal device switches the original uplink and downlink old time slots to new uplink and downlink time slots according to the identifier of the new time slot, and the new time slots replace the old time slots to realize the switching of communication channels.

[0048] Exemplarily, the mobile phone 1 switches the original uplink and downlink time slot 0 (old time slot) to the uplink and downlink time slot 1 (new time slot) according to the identifier of the time slot 1 sent by the target LED light.

[0049] S140. Send time slot change confirmation information to the target visible light device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0050] In this embodiment, on the terminal device, the old time slot has been replaced by the new time slot. At this time, the time slot change confirmation information is sent to the target visible light device through the uplink new time slot to realize the confirmation connection response, and the terminal device and the target visible light device begin to communicate according to the new time slot.

[0051] In this embodiment, a time slot switching request carrying a new time slot is sent to the target visible light device; based on the reply information of the received time slot switching request, a time slot switching operation is performed to switch to the new time slot; and time slot change confirmation information is sent to the target visible light device through the new time slot, so that the target visible light device and the terminal device communicate according to the new time slot. That is, after three handshakes, a more comprehensive fault tolerance mechanism is provided, which solves the problems of interruption and ping-pong effect in the switching process, and achieves the effect of smooth switching without interrupting communication.

[0052] Exemplarily, mobile phone 1 sends time slot change confirmation information to the target LED light through uplink time slot 1 to confirm that time slot 1 is the time slot for communication between mobile phone 1 and the target LED light. At this time, mobile phone 1 establishes communication with the target LED light. During subsequent business transmission, mobile phone 1 sends business data to the target LED light through time slot 1, and the switch realizes communication with the server, thereby realizing uninterrupted communication with mobile phone 2.

[0053] The time slot switching request is sent as a data packet requesting a connection.

[0054] Optionally, sending a time slot change confirmation message to the target visible light device via the new time slot, including: if the data packet type corresponding to the reply message is a connection data packet, determining whether the terminal device identifier included in the reply message is the identifier of the current terminal device; if the terminal device identifier included in the reply message is the identifier of the current terminal device, determining whether the connection data packet includes a reply connection instruction; if the connection data packet includes a reply connection instruction, sending a time slot change confirmation message to the target visible light device via the new time slot; if the data packet type corresponding to the reply message is a non-connection data packet or the terminal device identifier included in the reply message is an identifier of a non-current terminal device or the connection data packet does not include a reply connection instruction, continuing to listen to the downlink broadcast information of the target visible light device.

[0055] In this embodiment, the terminal device sends a data packet requesting connection to the target visible light device (a time slot switching request carrying a new time slot, sent in the form of a data packet requesting connection), and the terminal device waits for a reply message from the target visible light device. If the waiting time exceeds a set time threshold, the new time slot is re-determined, and the time slot switching request carrying the new time slot is re-sent. If the waiting time does not exceed the set time threshold, the data packet type corresponding to the reply message is determined to be connection data (the reply message of the time slot switching request is sent in the form of a data packet). If the data packet type corresponding to the reply information is a connection data packet, determine whether the terminal device identifier included in the reply information is the identifier of the current terminal device (that is, whether the replied device identifier is the identifier of the current terminal device, to prevent the target visible light device from sending an erroneous terminal device identifier); if the terminal device identifier included in the reply information is the identifier of the current terminal device, determine whether the connection data packet includes a reply connection instruction; if the connection data packet includes a reply connection instruction, send a time slot change confirmation message to the target visible light device through the new time slot; if the data packet type corresponding to the reply information is a non-connection data packet or the terminal device identifier included in the reply information is an identifier of a non-current terminal device or the connection data packet does not include a reply connection instruction, continue to monitor the downlink broadcast information of the target visible light device.

[0056] In this embodiment, the terminal device monitors the downlink broadcast information of the target visible light device, and after determining the new time slot, starts uplink transmission, sends a time slot switching request carrying the new time slot to the target visible light device through the old time slot, sends it in the form of a data packet requesting connection, and waits for the target visible light device to reply. After the target visible light device replies, it confirms that the data packet type corresponding to the reply information is a connection data packet, and confirms that the terminal device identifier included in the reply information is the identifier of the current terminal device, and after confirming that the connection data packet includes a reply connection instruction, it sends a time slot change confirmation message to the target visible light device through the new time slot, and the terminal device starts to communicate with the target visible light device through the new time slot. This embodiment provides a way to handle possible anomalies during the communication channel switching process, providing a basis for more accurate channel switching.

[0057] The technical solution of the embodiment of the present disclosure is as follows: when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, a target visible light device is determined, and a time slot switching request carrying a new time slot is sent to the target visible light device through an old time slot; after receiving a reply message, a time slot switching operation is performed, and a time slot change confirmation message is sent to the target visible light device through the new time slot. This can avoid the problem of communication interruption during the communication channel switching process. At the same time, when the communication distance between the terminal device and the current visible light device is greater than the preset distance threshold, the visible light device is switched to improve the accuracy of the switching.

[0058] Figure 2 A flow chart of a communication channel switching method provided by an embodiment of the present invention is provided. Applied to a target visible light device, the method can be executed by a communication channel switching device, and the device is applied to the target visible light device.

[0059] S210: Receive a timeslot switching request carrying a new timeslot sent by a terminal device.

[0060] S220, register the new time slot according to the identifier of the terminal device and obtain a registration result. In this embodiment, the identifier (unique identity identifier) ​​of the terminal device is bound to the new time slot to complete the registration of the new time slot. When the subsequent service data is transmitted, communication is performed according to the new time slot.

[0061] In this embodiment, the manner of registering the new time slot according to the identification of the terminal device can avoid the occurrence of conflict events, for example, the proposed new time slot is occupied by the terminal device of another user.

[0062] Exemplarily, the target LED light has a hardware chip that cooperates with the background server to bind the identifier of the terminal device to the new time slot.

[0063] S230. If the registration result is that the registration is passed, a reply message of the time slot switching request is sent to the terminal device based on the old time slot, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot.

[0064] The reply information includes the identifier of the new time slot. In this embodiment, the target visible light device replies to the terminal device in the old downlink time slot that the registration of the new time slot has been completed, that is, the identifier of the new time slot is sent to the terminal device through the old downlink time slot.

[0065] Exemplarily, at the target LED light, the identifier of mobile phone 1 is registered in the new time slot (such as time slot 1) to complete the binding between the new time slot and mobile phone 1, and the identifier (number) of the new time slot is sent to mobile phone 1.

[0066] S240. Receive time slot change confirmation information sent by the terminal device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0067] In this embodiment, after receiving the time slot change confirmation information, the terminal device cancels the old uplink and downlink time slots and transmits data according to the new uplink and downlink time slots.

[0068] In this embodiment, a time slot switching request carrying a new time slot is sent by a terminal device through an old time slot; the new time slot is registered according to the identifier of the terminal device; if the registration result is that the registration is passed, a reply message of the time slot switching request is sent to the terminal device based on the old time slot, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; a method of receiving the time slot change confirmation message sent by the terminal device through the new time slot can avoid the problem of communication interruption during the communication channel switching process, and at the same time, when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, the method of switching the visible light device can improve the accuracy of the switching.

[0069] In the embodiment of the present application, the communication distance with the current visible light device is obtained in real time through the terminal device, and when the communication distance exceeds the preset distance threshold, the target visible light device closest to the terminal device is selected, and a time slot switching request carrying a new time slot is sent to the target visible light device through the old time slot. The target visible light device registers the new time slot according to the identifier of the terminal device, and sends a reply message of the time slot switching request in the downlink old time slot. After that, the terminal device switches the uplink and downlink new time slots, cancels the uplink and downlink old time slots, and replies with the time slot change confirmation message in the uplink new time slot to realize the switching of the communication channel between the target visible light device and the terminal device. The accuracy of the communication channel switching between the target visible light device and the terminal device is improved, and the communication interruption is also avoided.

[0070] Figure 3 A schematic diagram of a switching device for a communication channel provided in an embodiment of the present disclosure, applied to a terminal device, includes:

[0071] A target visible light device determining module 310, configured to determine a target visible light device based on location information of multiple visible light devices and location information of the terminal device when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold;

[0072] A time slot switching request sending module 320, configured to send a time slot switching request carrying a new time slot to the target visible light device via the old time slot;

[0073] A time slot switching execution module 330, configured to execute a time slot switching operation based on the received reply information of the time slot switching request, so as to switch from the old time slot to the new time slot; the reply information includes an identifier of the new time slot;

[0074] The time slot change confirmation information sending module 340 is used to send the time slot change confirmation information to the target visible light device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

[0075] The technical solution of the disclosed embodiment is as follows: when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, the target visible light device is determined by the target visible light device determination module; a time slot switching request carrying a new time slot is sent to the target visible light device through the old time slot by the time slot switching request sending module; after receiving the reply information, the time slot switching operation is executed by the time slot switching execution module; and the time slot change confirmation information is sent to the target visible light device through the new time slot by the time slot change confirmation information sending module. This can avoid the problem of communication interruption during the communication channel switching process. At the same time, when the communication distance between the terminal device and the current visible light device is greater than the preset distance threshold, the visible light device is switched, which can improve the accuracy of the switching.

[0076] Optionally, the target visible light device determination module is specifically used to: determine the communication distance between the terminal device and multiple visible light devices based on the location information of the terminal device and the location information of multiple visible light devices; and take the visible light device with the shortest communication distance as the target visible light device.

[0077] Optionally, the above-mentioned device also includes a new time slot determination module, which is used to monitor the downlink broadcast information of the target visible light device; wherein the downlink broadcast information includes the communication status of multiple time slots; at least one candidate time slot is determined according to the communication status of the multiple time slots; wherein the candidate time slot is a time slot whose communication status is idle; and a new time slot is determined based on the at least one candidate time slot.

[0078] The time slot switching request is sent as a data packet requesting a connection.

[0079] Optionally, the time slot change confirmation information sending module is specifically used for: if the data packet type corresponding to the reply information is a connection data packet, then determining whether the terminal device identifier included in the reply information is the identifier of the current terminal device; if the terminal device identifier included in the reply information is the identifier of the current terminal device, then determining whether the connection data packet includes a reply connection instruction; if the connection data packet includes a reply connection instruction, then sending the time slot change confirmation information to the target visible light device via the new time slot; if the data packet type corresponding to the reply information is a non-connection data packet or the terminal device identifier included in the reply information is an identifier of a non-current terminal device or the connection data packet does not include a reply connection instruction, then continuing to listen to the downlink broadcast information of the target visible light device.

[0080] Figure 4 A schematic diagram of a switching device for a communication channel provided in an embodiment of the present disclosure, which is applied to a target visible light device, includes:

[0081] The time slot switching request receiving module 410 is used to receive a time slot switching request carrying a new time slot sent by a terminal device through an old time slot;

[0082] A new time slot registration module 420, configured to register the new time slot according to the identifier of the terminal device and obtain a registration result;

[0083] A reply information sending module 430 is used for sending reply information of the time slot switching request to the terminal device based on the old time slot if the registration result is that the registration is passed, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; the reply information includes an identifier of the new time slot;

[0084] The time slot change confirmation information receiving module 440 is used to receive the time slot change confirmation information sent by the terminal device through the new time slot, so that the terminal device and the target visible light device can communicate according to the new time slot.

[0085] In this embodiment, a time slot switching request receiving module receives a time slot switching request carrying a new time slot sent by a terminal device through an old time slot; a new time slot registration module registers the new time slot according to an identifier of the terminal device; a reply information sending module sends a reply message of the time slot switching request to the terminal device based on the old time slot if the registration result is that the registration is passed, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; a time slot change confirmation information receiving module receives a time slot change confirmation message sent by the terminal device through the new time slot, thereby avoiding the problem of communication interruption during the communication channel switching process. At the same time, when the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, the visible light device is switched to improve the switching accuracy.

[0086] The communication channel switching device provided in the embodiments of the present disclosure can execute the communication channel switching method provided in any embodiment of the present disclosure, and has the corresponding functional modules and beneficial effects of the execution method.

[0087] Figure 5 A schematic diagram of the structure of an electronic device 10 that can be used to implement an embodiment of the present invention is shown. The electronic device is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device can also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0088] like Figure 5 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0089] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0090] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various dedicated artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 performs the various methods and processes described above, such as switching of the method communication channel.

[0091] In some embodiments, the switching of the method communication channel can be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program can be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the switching of the method communication channel described above can be performed. Alternatively, in other embodiments, the processor 11 can be configured to perform the switching of the method communication channel in any other appropriate manner (for example, by means of firmware).

[0092] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0093] Computer programs for implementing the methods of the present invention may be written in any combination of one or more programming languages. These computer programs may be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program may be executed entirely on the machine, partially on the machine, partially on the machine and partially on a remote machine as a stand-alone software package, or entirely on a remote machine or server.

[0094] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, device, or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices, or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0095] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0096] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0097] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0098] An embodiment of the present invention further provides a computer program product, including a computer program, which, when executed by a processor, implements the communication channel switching method provided in any embodiment of the present application.

[0099] In the process of implementation, the computer program product can be written in one or more programming languages ​​or a combination thereof to perform the computer program code of the present invention, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer can be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or can be connected to an external computer (for example, using an Internet service provider to connect through the Internet).

[0100] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.

Claims

1. A method for switching a communication channel, characterized in that: Applied to terminal equipment, including: When the communication distance between the terminal device and the current visible light device is greater than a preset distance threshold, determining a target visible light device based on the location information of a plurality of visible light devices and the location information of the terminal device; Sending a time slot switching request carrying a new time slot to the target visible light device through the old time slot; Based on the received reply information of the time slot switching request, performing a time slot switching operation to switch from the old time slot to the new time slot; the reply information includes an identifier of the new time slot; The time slot change confirmation information is sent to the target visible light device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

2. The method according to claim 1, characterized in that Determining a target visible light device based on location information of a plurality of visible light devices and location information of the terminal device includes: Determine the communication distance between the terminal device and the multiple visible light devices based on the location information of the terminal device and the location information of the multiple visible light devices; The visible light device with the shortest communication distance is taken as the target visible light device.

3. The method according to claim 1, characterized in that The new time slot is determined as follows: Monitoring downlink broadcast information of the target visible light device; wherein the downlink broadcast information includes communication status of multiple time slots; Determine at least one candidate time slot according to the communication status of the multiple time slots; wherein the candidate time slot is a time slot whose communication status is idle; A new time slot is determined based on the at least one candidate time slot.

4. The method according to claim 3, characterized in that in, The time slot switching request is sent with a data packet requesting a connection; and time slot change confirmation information is sent to the target visible light device through the new time slot, including: If the data packet type corresponding to the reply information is a connection data packet, determining whether the terminal device identifier included in the reply information is the identifier of the current terminal device; If the terminal device identifier included in the reply information is the identifier of the current terminal device, determining whether the connection data packet includes a reply connection instruction; If the connection data packet includes a reply connection instruction, sending a time slot change confirmation message to the target visible light device through the new time slot; If the data packet type corresponding to the reply information is a non-connection data packet or the terminal device identifier included in the reply information is not the identifier of the current terminal device or the connection data packet does not include a reply connection instruction, continue to monitor the downlink broadcast information of the target visible light device.

5. A communication channel switching method, applied to a target visible light device, comprising: receiving a timeslot switching request carrying a new timeslot sent by a terminal device through an old timeslot; Registering the new time slot according to the identifier of the terminal device to obtain a registration result; If the registration result is that the registration is passed, a reply message of the time slot switching request is sent to the terminal device based on the old time slot, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; the reply message includes an identifier of the new time slot; Receive time slot change confirmation information sent by the terminal device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

6. A communication channel switching device, characterized in that: Applied to terminal equipment, including: a target visible light device determining module, configured to determine a target visible light device based on location information of a plurality of visible light devices and location information of the terminal device when a communication distance between the terminal device and the current visible light device is greater than a preset distance threshold; A time slot switching request sending module, used for sending a time slot switching request carrying a new time slot to the target visible light device through the old time slot; A time slot switching execution module, configured to execute a time slot switching operation based on the received reply information of the time slot switching request, so as to switch from the old time slot to the new time slot; the reply information includes an identifier of the new time slot; The time slot change confirmation information sending module is used to send the time slot change confirmation information to the target visible light device through the new time slot, so that the terminal device and the target visible light device communicate according to the new time slot.

7. A communication channel switching device, applied to a target visible light device, comprising: A timeslot switching request receiving module, used for receiving a timeslot switching request carrying a new timeslot sent by a terminal device through an old timeslot; A new time slot registration module, used to register the new time slot according to the identification of the terminal device and obtain a registration result; A reply information sending module, configured to send reply information of the time slot switching request to the terminal device based on the old time slot if the registration result is that the registration is passed, so that the terminal device performs a time slot switching operation to switch from the old time slot to the new time slot; the reply information includes an identifier of the new time slot; The time slot change confirmation information receiving module is used to receive the time slot change confirmation information sent by the terminal device through the new time slot, so that the terminal device and the target visible light device can communicate according to the new time slot.

8. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the communication channel switching method as described in any one of claims 1 to 5.

9. A storage medium comprising computer executable instructions, wherein the computer executable instructions are used to execute the communication channel switching method according to any one of claims 1 to 5 when executed by a computer processor.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the computer program implements the communication channel switching method according to any one of claims 1 to 5.