Audio switching method of smart mattress and related products
By using TWS headsets and controllers on the smart mattress, the problem of low efficiency and audio signal interference when controlling the audio playback device on the smart mattress is solved, and more efficient audio switching and lower interference.
Patent Information
- Application Number
- CN202210834573.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-14
- Publication Date
- 2025-02-14
- Estimated Expiration
- 2042-07-14
AI Technical Summary
Existing smart mattresses are inefficient when controlling the audio playback device to play the next audio file, and the audio signal may interfere with others around.
By configuring the TWS headset on the smart mattress, the main headset and the secondary headset recognize the status when touched and notify the controller, the controller sends a switching command to the audio playback device according to the headset status, causing it to play the next or previous audio file.
Improves the efficiency of controlling the audio playback device to play the next audio file, and avoids interference from the audio signal to others around it through the output of the TWS headset.
Smart Images

Figure CN115243142B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of smart mattresses, and in particular to an audio switching method for a smart mattress and related products. Background Art
[0002] Some smart mattresses on the market not only have built-in audio playback devices and controllers, but also have several buttons (such as play button, pause button, previous song button and next song button) and speakers on the side. When the controller detects that the user on the smart mattress presses a button, it sends a control instruction corresponding to the button to the audio playback device to control the audio playback device to perform the control operation corresponding to the button.
[0003] Typically, when a user on a smart mattress needs to control an audio player to play the next audio file, the user usually needs to press a next song button set on the side of the smart mattress, which reduces the efficiency of controlling the audio player to play the next audio file. In addition, when the audio signal corresponding to the audio file played by the audio player is output through a speaker, it may cause interference to other people around. Summary of the invention
[0004] The embodiment of the present application discloses an audio switching method for a smart mattress and related products, which can at least improve the efficiency of controlling an audio playback device to play the next audio file, and prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around.
[0005] The first aspect of the embodiment of the present application discloses an audio switching method of a smart mattress, wherein the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also configured with a TWS headset, wherein the TWS headset includes a main headset and a secondary headset, and the method includes:
[0006] After the master earphone detects that the master earphone touches the slave earphone, the master earphone identifies a first state of the master earphone and a second state of the slave earphone; and notifies the controller of the first state of the master earphone and the second state of the slave earphone;
[0007] The controller identifies a first state of the primary earphone and a second state of the secondary earphone;
[0008] When the controller identifies that the first state of the primary earphone is an unworn state and the second state of the secondary earphone is a worn state, the controller sends a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the primary earphone;
[0009] The audio playback device plays an audio signal corresponding to a next audio file to the primary earphone according to the first switching instruction;
[0010] The main earphone outputs the audio signal corresponding to the next audio file played by the audio playback device, and transmits the audio signal corresponding to the next audio file to the auxiliary earphone for output.
[0011] As an optional implementation manner, in the first aspect of the embodiment of the present application, the method further includes:
[0012] When the controller identifies that the first state of the primary earphone is the wearing state and the second state of the secondary earphone is the unwearing state, the controller sends a second switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a previous audio file to the primary earphone;
[0013] The audio playback device plays the audio signal corresponding to the previous audio file to the primary earphone according to the second switching instruction;
[0014] The main earphone outputs the audio signal corresponding to the last audio file played by the audio playback device, and transmits the audio signal corresponding to the last audio file to the auxiliary earphone for output.
[0015] As another optional implementation manner, in the first aspect of the embodiment of the present application, the master earphone notifies the controller of the first state of the master earphone and the second state of the slave earphone, including:
[0016] The master earphone sends a broadcast message including a unique identifier of the master earphone, a first identifier of a first state of the master earphone, and a second identifier of a second state of the slave earphone to the controller;
[0017] The controller identifies a first state of the master earphone and a second state of the slave earphone, including:
[0018] The controller receives the broadcast information and identifies whether the unique identifier of the main earphone is the same as the unique identifier of the legitimate main earphone pre-configured by the controller; if they are the same, the first state of the main earphone is identified according to the first identifier of the first state of the main earphone; and the second state of the secondary earphone is identified according to the second identifier of the second state of the secondary earphone.
[0019] As another optional implementation, in the first aspect of the embodiment of the present application, the upper surface area of the smart mattress is divided into a plurality of sub-areas, and each sub-area is associated with a unique area identifier, and the unique area identifiers associated with any two sub-areas are different from each other; before the main earphone detects that the main earphone touches the secondary earphone, the method further includes:
[0020] The controller detects each target sub-region that is pressed in sequence among the plurality of sub-regions; wherein the number of the each target sub-region is less than or equal to the number of the plurality of sub-regions;
[0021] The controller obtains a target image sent by a trusted terminal during the pressing process of the last pressed sub-region in each target sub-region, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress;
[0022] The controller identifies the removable device from the target image, and verifies whether the device unique identifier of the removable device is the same as the designated device unique identifier configured by the legal access verification information of the hotspot of the audio playback device; if they are the same, the unique area identifiers associated with each target sub-area are sorted according to the order in which each target sub-area is pressed, and a first sequence S1 of unique area identifiers is obtained;
[0023] The controller verifies whether the first sequence S1 of the unique area identifier is identical to the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are identical, a hotspot access notification message including the unique identifier of the legal master headset preconfigured by the controller and the legal access verification information of the hotspot is transmitted;
[0024] The master headset receives the hotspot access notification message and identifies whether the unique identifier of the pre-configured legitimate master headset is the same as the unique identifier of the master headset; if they are the same, the hotspot is accessed according to the legitimate access verification information of the hotspot to achieve wireless connection between the master headset and the audio playback device.
[0025] As another optional implementation, in the first aspect of the embodiment of the present application, the designated device unique identifier configured by the legal access verification information of the hotspot is also associated with the designated device location. After the controller verifies that the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot, the method further includes:
[0026] The controller obtains the current position of the movable device in the surrounding environment of the smart mattress;
[0027] The controller verifies whether the current location is the same as the designated device location; if they are the same, the step of transmitting a hotspot access notification message including the unique identifier of the legitimate master headset preconfigured by the controller and the legitimate access verification information of the hotspot is executed.
[0028] The second aspect of the embodiment of the present application discloses an audio switching system of a smart mattress, including a smart mattress, wherein the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also configured with a TWS headset, wherein the TWS headset includes a main headset and a secondary headset, wherein:
[0029] The master earphone is configured to identify a first state of the master earphone and a second state of the slave earphone after detecting that the master earphone touches the slave earphone; and notify the controller of the first state of the master earphone and the second state of the slave earphone;
[0030] The controller is used to identify a first state of the primary earphone and a second state of the secondary earphone;
[0031] The controller is further configured to, when recognizing that the first state of the primary earphone is an unworn state and the second state of the secondary earphone is a worn state, send a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the primary earphone;
[0032] The audio playback device is configured to play an audio signal corresponding to a next audio file to the primary earphone according to the first switching instruction;
[0033] The main earphone is further used to output the audio signal corresponding to the next audio file played by the audio playback device, and transmit the audio signal corresponding to the next audio file to the auxiliary earphone for output.
[0034] As an optional implementation, in the second aspect of the embodiment of the present application, the controller is further used to send a second switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a previous audio file to the main earphone when it is identified that the first state of the main earphone is a wearing state and the second state of the auxiliary earphone is a not-worn state;
[0035] The audio playback device is further configured to play the audio signal corresponding to the previous audio file to the primary earphone according to the second switching instruction;
[0036] The main earphone is further used to output the audio signal corresponding to the last audio file played by the audio playback device, and transmit the audio signal corresponding to the last audio file to the auxiliary earphone for output.
[0037] As another optional implementation, in the second aspect of the embodiment of the present application, the manner in which the primary earphone notifies the controller of the first state of the primary earphone and the second state of the secondary earphone is:
[0038] The master earphone sends a broadcast message including a unique identifier of the master earphone, a first identifier of a first state of the master earphone, and a second identifier of a second state of the slave earphone to the controller;
[0039] The controller identifies the first state of the master earphone and the second state of the slave earphone in the following manner:
[0040] The controller receives the broadcast information and identifies whether the unique identifier of the main earphone is the same as the unique identifier of the legitimate main earphone pre-configured by the controller; if they are the same, the first state of the main earphone is identified according to the first identifier of the first state of the main earphone; and the second state of the secondary earphone is identified according to the second identifier of the second state of the secondary earphone.
[0041] As another optional implementation, in the second aspect of the embodiment of the present application, the upper surface area of the smart mattress is divided into a plurality of sub-areas, and each sub-area is associated with a unique area identifier, and the unique area identifiers associated with any two sub-areas are different from each other, then:
[0042] The controller is further configured to detect each target sub-region pressed in sequence in the plurality of sub-regions before the primary earphone detects that the primary earphone touches the secondary earphone; wherein the number of the target sub-regions is less than or equal to the number of the plurality of sub-regions;
[0043] The controller is further used to obtain a target image sent by a trusted terminal during the pressing process of the last pressed sub-region in each target sub-region, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress;
[0044] The controller is further used to identify the removable device from the target image, and verify whether the device unique identifier of the removable device is the same as the designated device unique identifier configured by the legal access verification information of the hotspot of the audio playback device; if they are the same, the unique area identifiers associated with each target sub-area are sorted according to the order in which each target sub-area is pressed, to obtain a first sequence S1 of unique area identifiers;
[0045] The controller is further configured to verify whether the first sequence S1 of the unique area identifier is identical to the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are identical, a hotspot access notification message including the unique identifier of the legal master headset preconfigured by the controller and the legal access verification information of the hotspot is transmitted;
[0046] The main earphone is also used to receive the hotspot access notification message and identify whether the unique identifier of the pre-configured legitimate main earphone is the same as the unique identifier of the main earphone; if they are the same, access the hotspot according to the legitimate access verification information of the hotspot to achieve wireless connection between the main earphone and the audio playback device.
[0047] As another optional implementation, in the second aspect of the embodiment of the present application, the designated device unique identifier configured by the legal access verification information of the hotspot is also associated with the designated device location, then:
[0048] The controller is further configured to obtain the current position of the movable device in the surrounding environment of the smart mattress after verifying that the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot;
[0049] The controller is also used to verify whether the current location is the same as the designated device location; if they are the same, execute the step of transmitting a hotspot access notification message including the unique identifier of the legitimate master headset pre-configured by the controller and the legitimate access verification information of the hotspot.
[0050] A third aspect of an embodiment of the present application discloses a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the steps in the audio switching method of a smart mattress described in the first aspect of the embodiment of the present application or any optional implementation manner of the first aspect are implemented.
[0051] Compared with the prior art, the embodiments of the present application have the following beneficial effects:
[0052] In an embodiment of the present application, the controller identifies the first state of the main earphone and the second state of the secondary earphone after the main earphone and the secondary earphone included in the TWS earphone configured on the smart mattress touch each other; if the first state of the main earphone is an unworn state and the second state of the secondary earphone is a worn state, the controller instructs the audio playback device to play the audio signal corresponding to the next audio file to the main earphone, so that the main earphone outputs the audio signal corresponding to the next audio file and transmits the audio signal corresponding to the next audio file to the secondary earphone for output. It can be seen that, by implementing the embodiment of the present application, for the user on the smart mattress, he only needs to take off the main earphone from one ear and touch the taken-off main earphone with the secondary earphone worn on the other ear to control the audio playback device to play the next audio file. Compared with the prior art of pressing the next song button set on the side of the smart mattress by hand to control the audio playback device to play the next audio file, the embodiment of the present application can effectively improve the efficiency of controlling the audio playback device to play the next audio file; in addition, in the embodiment of the present application, the audio signal corresponding to the audio file played by the audio playback device is output through the main earphone and the secondary earphone included in the TWS earphone, which can effectively prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 It is a flowchart of a first embodiment of the audio switching method of a smart mattress disclosed in an embodiment of the present application;
[0055] Figure 2 It is a flow chart of a second embodiment of the audio switching method of a smart mattress disclosed in an embodiment of the present application;
[0056] Figure 3 It is a schematic diagram that the upper surface area of the smart mattress disclosed in the embodiment of the present application is divided into a plurality of sub-areas;
[0057] Figure 4 It is a flowchart of a third embodiment of the audio switching method of a smart mattress disclosed in an embodiment of the present application;
[0058] Figure 5 It is a flowchart of a fourth embodiment of the audio switching method of a smart mattress disclosed in the embodiments of the present application;
[0059] Figure 6It is a schematic diagram of the architecture of the audio switching system of the smart mattress disclosed in the embodiment of the present application. DETAILED DESCRIPTION
[0060] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0061] It should be noted that the terms "including" and "having" in the embodiments of the present application and any variations thereof are intended to cover non-exclusive inclusions. For example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0062] The embodiment of the present application discloses an audio switching method of a smart mattress and related products, which can at least improve the efficiency of controlling an audio playback device to play the next audio file, and prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around. The following is a detailed description with reference to the accompanying drawings.
[0063] See also Figure 1 , Figure 1 1 is a flow chart of the first embodiment of the audio switching method of the smart mattress disclosed in the embodiment of the present application. Figure 1 In the audio switching method of the smart mattress shown, the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also equipped with a True Wireless Stereo (TWS) headset, which includes a main headset and a secondary headset. The main headset and the secondary headset automatically establish a wireless communication connection (such as a Bluetooth connection) when they are turned on. Figure 1 As shown, the audio switching method of the smart mattress may include the following steps:
[0064] 101. After detecting that the main earphone touches the auxiliary earphone, the main earphone identifies a first state of the main earphone and a second state of the auxiliary earphone.
[0065] In some embodiments, after the main earphone detects that the main earphone and the auxiliary earphone are in contact through the sensor, the main earphone can perform an ear canal shape detection operation within a specified time period. If the ear canal shape is detected within the specified time period, it means that the main earphone is currently worn, and the first state of the main earphone is the wearing state; conversely, if the ear canal shape is not detected within the specified time period, it means that the main earphone is not currently worn, and the first state of the main earphone is the not-worn state. Similarly, after the auxiliary earphone detects that the auxiliary earphone and the main earphone are in contact through the sensor, the auxiliary earphone can perform an ear canal shape detection operation within a specified time period. If the ear canal shape is detected within the specified time period, it means that the auxiliary earphone is currently worn, and the second state of the auxiliary earphone is the wearing state; conversely, if the ear canal shape is not detected within the specified time period, it means that the auxiliary earphone is not currently worn, and the second state of the auxiliary earphone is the not-worn state. Further, the auxiliary earphone can send its second state to the main earphone through the wireless communication connection between the main and auxiliary earphones, so that the main earphone can identify the first state of the main earphone and the second state of the auxiliary earphone after detecting that the main earphone and the auxiliary earphone are in contact.
[0066] 102. The primary earphone notifies the controller of a first state of the primary earphone and a second state of the secondary earphone.
[0067] In some implementations, the master earphone may notify the controller of the first state of the master earphone and the second state of the slave earphone through a wireless communication connection between the master earphone and the controller.
[0068] 103. The controller identifies a first state of the primary earphone and a second state of the secondary earphone.
[0069] In some implementations, in step 102, the master earphone notifies the controller of the first state of the master earphone and the second state of the slave earphone in the following manner:
[0070] The master earphone sends a broadcast message including a unique identifier of the master earphone, a first identifier of a first state of the master earphone, and a second identifier of a second state of the slave earphone to the controller;
[0071] The controller receives the broadcast information and identifies whether the unique identifier of the main earphone is the same as the unique identifier of the legitimate main earphone pre-configured by the controller; if they are the same, the first state of the main earphone is identified according to the first identifier of the first state of the main earphone; and the second state of the secondary earphone is identified according to the second identifier of the second state of the secondary earphone.
[0072] Exemplarily, the first identifier of the first state of the main earphone may be composed of the unique identifier of the main earphone and the first identifier of the first state, and the second identifier of the second state of the auxiliary earphone may be composed of the unique identifier of the auxiliary earphone and the second identifier of the second state. When the first identifier of the first state is "1", the controller can identify that the first state of the main earphone is a wearing state based on the unique identifier of the main earphone and the first identifier "1" of the first state; when the first identifier of the first state is "0", the controller can identify that the first state of the main earphone is a not-wearing state based on the unique identifier of the main earphone and the first identifier "0" of the first state; and when the second identifier of the second state is "1", the controller can identify that the second state of the auxiliary earphone is a wearing state based on the unique identifier of the auxiliary earphone and the second identifier "1" of the second state; when the second identifier of the second state is "0", the controller can identify that the second state of the auxiliary earphone is a not-wearing state based on the unique identifier of the auxiliary earphone and the second identifier "0" of the second state.
[0073] 104. When the controller identifies that the first state of the main earphone is the unworn state and the second state of the auxiliary earphone is the worn state, the controller sends a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the main earphone.
[0074] 105. The audio playback device plays an audio signal corresponding to a next audio file to the primary earphone according to the first switching instruction.
[0075] 106. The main earphone outputs an audio signal corresponding to a next audio file played by the audio playback device, and transmits the audio signal corresponding to the next audio file to the auxiliary earphone for output.
[0076] It can be seen that in the implementation Figure 1 In the audio switching method of the smart mattress shown in the figure, the user on the smart mattress only needs to take off the main earphone from one ear and touch the removed main earphone with the secondary earphone worn on the other ear to control the audio playback device to play the next audio file. Compared with the prior art of pressing the next song button set on the side of the smart mattress to control the audio playback device to play the next audio file, Figure 1 The audio switching method of the smart mattress shown can effectively improve the efficiency of controlling the audio playback device to play the next audio file; in addition, in the implementation Figure 1 In the audio switching method of the smart mattress shown, the audio signal corresponding to the audio file played by the audio playback device is output through the main earphone and the auxiliary earphone included in the TWS earphone, which can effectively prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around.
[0077] See also Figure 2 , Figure 21 is a flow chart of a second embodiment of the audio switching method for a smart mattress disclosed in the embodiment of the present application. Figure 2 In the audio switching method of the smart mattress shown, the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also configured with a TWS headset, the TWS headset includes a main headset and a secondary headset, wherein a wireless communication connection (such as a Bluetooth connection) has been established between the main headset and the secondary headset. Figure 2 In the audio switching method of the smart mattress shown, the upper surface area of the smart mattress is divided into several sub-areas, and each sub-area is associated with a unique area identifier, and the unique area identifiers associated with any two sub-areas are different. Figure 3 As shown, the upper surface area of the smart mattress is divided into 15 sub-areas, wherein sub-area 1 is associated with a unique area identifier A, sub-area 2 is associated with a unique area identifier B, sub-area 3 is associated with a unique area identifier C, sub-area 4 is associated with a unique area identifier D, sub-area 5 is associated with a unique area identifier E, sub-area 6 is associated with a unique area identifier F, sub-area 7 is associated with a unique area identifier G, sub-area 8 is associated with a unique area identifier H, sub-area 9 is associated with a unique area identifier I, sub-area 10 is associated with a unique area identifier J, sub-area 11 is associated with a unique area identifier K, sub-area 12 is associated with a unique area identifier L, sub-area 13 is associated with a unique area identifier M, sub-area 14 is associated with a unique area identifier N, and sub-area 15 is associated with a unique area identifier O; wherein, the unique area identifiers associated with any two sub-areas from sub-area 1 to sub-area 15 are different from each other. Figure 2 As shown, the audio switching method of the smart mattress may include the following steps:
[0078] 201. A controller detects target sub-regions that are pressed sequentially in the plurality of sub-regions; wherein the number of the target sub-regions is less than or equal to the number of the plurality of sub-regions.
[0079] 202. The controller obtains a target image sent by the trusted terminal during the pressing process of the last pressed target sub-region among the above target sub-regions, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress.
[0080] Exemplarily, the trusted terminal includes but is not limited to a mobile phone held by a user on the smart mattress. In actual application, the left hand of the user on the smart mattress can press each of the above target sub-areas in turn, and the right hand can hold the mobile phone. When the left hand of the user on the smart mattress presses the last target sub-area, the right hand can control the mobile phone to shoot any movable device (such as a sweeping robot or a floor-standing fan) in the surrounding environment of the smart mattress to obtain a target image and send it to the controller.
[0081] 203. The controller identifies the removable device from the target image and verifies whether the device unique identifier of the removable device is the same as the specified device unique identifier configured with the legal access verification information of the hotspot of the audio playback device; if they are the same, execute steps 204 to 205; if they are not the same, end this process.
[0082] Exemplarily, the unique device identifier of the removable device may include but is not limited to a unique name or MAC address of the removable device.
[0083] 204. The controller sorts the unique region identifiers associated with the target sub-regions according to the order in which the target sub-regions are pressed, to obtain a first sequence S1 of unique region identifiers.
[0084] Assume that the above-mentioned target sub-areas are sub-area 1 to sub-area 9, and the pressing order of sub-area 1 to sub-area 9 is sub-area 9, sub-area 7, sub-area 5, sub-area 3, sub-area 1, sub-area 2, sub-area 4, sub-area 6, sub-area 8; accordingly, the controller obtains the first sequence S1 of the unique area identifier as IGECABDFH.
[0085] 205. The controller verifies whether the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are the same, execute steps 206 to 207; if they are not the same, end this process.
[0086] The second sequence S2 of unique area identifiers is composed of a plurality of unique area identifiers included in the upper surface area of the smart mattress.
[0087] 206. The controller transmits a hotspot access notification message including a unique identifier of a legitimate master headset preconfigured by the controller and legitimate access verification information of the hotspot.
[0088] 207. The master headset receives the hotspot access notification message and identifies whether the unique identifier of the pre-configured legitimate master headset is the same as the unique identifier of the master headset; if they are the same, execute steps 208 to 210; if they are not the same, end this process.
[0089] 208. The main headset accesses the hotspot according to the legal access verification information of the hotspot to achieve wireless connection between the main headset and the audio playback device.
[0090] Among them, implementing the above steps 201 to 208 can effectively improve the reliability and convenience of the main earphone when connecting to the hotspot of the audio playback device, thereby improving the intelligence level of the smart mattress.
[0091] 209. After detecting that the main earphone touches the auxiliary earphone, the main earphone identifies a first state of the main earphone and a second state of the auxiliary earphone.
[0092] 210. The primary earphone notifies the controller of the first state of the primary earphone and the second state of the secondary earphone.
[0093] 211. The controller identifies the first state of the main earphone and the second state of the auxiliary earphone; if it is identified that the first state of the main earphone is the unworn state and the second state of the auxiliary earphone is the worn state, execute steps 212 to 214; if it is identified that the first state of the main earphone is the worn state and the second state of the auxiliary earphone is the unworn state, execute steps 215 to 217.
[0094] 212. The controller sends a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the primary earphone.
[0095] 213. The audio playback device plays an audio signal corresponding to the next audio file to the primary earphone according to the first switching instruction.
[0096] 214. The main earphone outputs an audio signal corresponding to the next audio file played by the audio playback device, and transmits the audio signal corresponding to the next audio file to the auxiliary earphone for output, and ends this process.
[0097] 215. The controller sends a second switching instruction to the audio playback device for instructing the audio playback device to play the audio signal corresponding to the previous audio file to the primary earphone.
[0098] 216. The audio playback device plays the audio signal corresponding to the previous audio file to the primary earphone according to the second switching instruction.
[0099] 217. The main earphone outputs the audio signal corresponding to the last audio file played by the audio playback device, and transmits the audio signal corresponding to the last audio file to the auxiliary earphone for output, and ends this process.
[0100] It can be seen that in the implementation Figure 2 In the audio switching method of the smart mattress shown in the figure, the user on the smart mattress only needs to take off the main earphone from one ear and touch the removed main earphone with the secondary earphone worn on the other ear to control the audio playback device to play the next audio file. Compared with the prior art of pressing the next song button set on the side of the smart mattress to control the audio playback device to play the next audio file, Figure 2 The audio switching method of the smart mattress shown can effectively improve the efficiency of controlling the audio playback device to play the next audio file; or, in the implementation Figure 2In the audio switching method of the smart mattress shown in the figure, the user on the smart mattress only needs to take off the secondary earphone from one ear and touch the removed secondary earphone with the main earphone worn on the other ear to control the audio playback device to play the previous audio file. Compared with the prior art of pressing the previous song button set on the side of the smart mattress to control the audio playback device to play the previous audio file, Figure 2 The audio switching method of the smart mattress shown can effectively improve the efficiency of controlling the audio playback device to play the previous audio file; in addition, in the implementation Figure 2 In the audio switching method of the smart mattress shown, the audio signal corresponding to the audio file played by the audio playback device is output through the main earphone and the auxiliary earphone included in the TWS earphone, which can effectively prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around.
[0101] See also Figure 4 , Figure 4 1 is a flow chart of the third embodiment of the audio switching method for a smart mattress disclosed in the embodiment of the present application. Figure 4 In the audio switching method of the smart mattress shown, the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also equipped with a TWS headset, the TWS headset includes a main headset and a secondary headset, wherein a wireless communication connection (such as a Bluetooth connection) has been established between the main headset and the secondary headset. Figure 4 In the audio switching method of the smart mattress shown in FIG, the upper surface area of the smart mattress is divided into several sub-areas (such as Figure 3 ), and each sub-region is associated with a unique region identifier, and the unique region identifiers associated with any two sub-regions are different. Figure 4 As shown, the audio switching method of the smart mattress may include the following steps:
[0102] 401. A controller detects target sub-regions that are pressed sequentially in the plurality of sub-regions; wherein the number of the target sub-regions is less than or equal to the number of the plurality of sub-regions.
[0103] 402. The controller obtains a target image sent by the trusted terminal during the pressing process of the last pressed sub-region among the above target sub-regions, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress.
[0104] 403. The controller identifies the removable device from the target image and verifies whether the device unique identifier of the removable device is the same as the specified device unique identifier configured with the legal access verification information of the hotspot of the audio playback device; if they are the same, execute steps 404 to 405; if they are not the same, end this process.
[0105] 404. The controller sorts the unique region identifiers associated with the target sub-regions according to the order in which the target sub-regions are pressed, to obtain a first sequence S1 of unique region identifiers.
[0106] 405. The controller verifies whether the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are the same, execute steps 406 to 407; if they are not the same, end this process.
[0107] The second sequence S2 of unique region identifiers is composed of a plurality of unique region identifiers.
[0108] 406. The controller obtains the current position of the movable device in the surrounding environment of the smart mattress.
[0109] In some implementations, the controller may analyze the current position of the movable device in the surrounding environment of the smart mattress from the target image.
[0110] In other embodiments, the controller may use Bluetooth technology to measure the current position of the movable device in the environment surrounding the smart mattress; wherein the current position is the position of the movable device relative to the controller in the environment surrounding the smart mattress.
[0111] 407. The controller verifies whether the current location is the same as the designated device location configured by the legal access verification information of the hotspot; if they are the same, execute step 408; if they are not the same, end this process.
[0112] 408. The controller transmits a hotspot access notification message including a unique identifier of a legitimate master headset preconfigured by the controller and legitimate access verification information of the hotspot.
[0113] 409. The master headset receives the hotspot access notification message and identifies whether the unique identifier of the pre-configured legitimate master headset is the same as the unique identifier of the master headset; if they are the same, execute steps 410 to 412; if they are not the same, end this process.
[0114] 410. The main headset accesses the hotspot according to the legal access verification information of the hotspot to achieve wireless connection between the main headset and the audio playback device.
[0115] Among them, implementing the above steps 401 to 410 can significantly improve the reliability and convenience of the main earphone when connecting to the hotspot of the audio playback device, thereby improving the intelligence level of the smart mattress.
[0116] Among them, steps 411 to 419 are the same as steps 209 to 217 in the previous embodiment and are not repeated here.
[0117] It can be seen that the implementation Figure 4 The audio switching method of the smart mattress shown can effectively improve the efficiency of controlling the audio playback device to play the next audio file or the previous audio file; and can effectively prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around.
[0118] See also Figure 5 , Figure 5 1 is a flow chart of the fourth embodiment of the audio switching method of the smart mattress disclosed in the embodiment of the present application. Figure 5 In the audio switching method of the smart mattress shown, the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also equipped with a TWS headset, the TWS headset includes a main headset and a secondary headset, wherein a wireless communication connection (such as a Bluetooth connection) has been established between the main headset and the secondary headset. Figure 5 In the audio switching method of the smart mattress shown in FIG, the upper surface area of the smart mattress is divided into several sub-areas (such as Figure 3 ), and each sub-region is associated with a unique region identifier, and the unique region identifiers associated with any two sub-regions are different. Figure 5 As shown, the audio switching method of the smart mattress may include the following steps:
[0119] 501. A controller detects target sub-regions that are pressed sequentially in the plurality of sub-regions; wherein the number of the target sub-regions is less than or equal to the number of the plurality of sub-regions.
[0120] 502. The controller obtains a target image sent by the trusted terminal during the pressing process of the last pressed sub-region among the above target sub-regions, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress.
[0121] 503. The controller identifies the removable device from the target image and verifies whether the device unique identifier of the removable device is the same as the specified device unique identifier configured with the legal access verification information of the hotspot of the audio playback device; if they are the same, execute steps 504 to 505; if they are not the same, end this process.
[0122] 504. The controller sorts the unique region identifiers associated with the target sub-regions according to the order in which the target sub-regions are pressed, to obtain a first sequence S1 of unique region identifiers.
[0123] Assume that the above-mentioned target sub-areas are sub-area 1 to sub-area 9, and the pressing order of sub-area 1 to sub-area 9 is sub-area 9, sub-area 7, sub-area 5, sub-area 3, sub-area 1, sub-area 2, sub-area 4, sub-area 6, sub-area 8; accordingly, the controller obtains the first sequence S1 of the unique area identifier as IGECABDFH.
[0124] 505. The controller verifies whether the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if not, execute steps 506 to 509; if the same, execute step 510.
[0125] The second sequence S2 of unique area identifiers is composed of a plurality of unique area identifiers included in the upper surface area of the smart mattress.
[0126] Exemplarily, assuming that the second sequence S2 of the unique region identifier is BDFHIGECA, then in the above step 505, the controller verifies that the first sequence S1 of the unique region identifier is different from the second sequence S2 of the unique region identifier, and executes steps 506 to 509.
[0127] 506. The controller obtains the current position of the movable device in the surrounding environment of the smart mattress.
[0128] 507. The controller calculates the distance value between the current location and the designated device location configured by the legal access verification information of the hotspot as the designated distance value.
[0129] 508. The controller shifts the unique area identifiers included in the second sequence S2 of unique area identifiers according to the specified distance value to obtain a third sequence S3 of unique area identifiers configured with the legal access verification information of the hotspot.
[0130] In some implementations, the implementation of step 508 may include the following steps:
[0131] The controller determines a target distance value range including the specified distance value from a plurality of preset distance value ranges; wherein no intersection exists between any two distance value ranges among the plurality of distance value ranges, and each distance value range is configured with an identification transfer quantity, and the identification transfer quantities configured for any two distance value ranges are different from each other;
[0132] And, the controller obtains the number of identification transfers configured for the target distance value range as the designated number of identification transfers;
[0133] Furthermore, the controller starts from the head end of the second sequence S2 of unique area identifiers configured with the legal access verification information of the above-mentioned hotspot, and shifts the unique area identifiers contained in the second sequence S2 of unique area identifiers to the tail end opposite to the head end for splicing one by one, until the number of shifted unique area identifiers is equal to the specified identifier transfer number, and stops transferring the unique area identifiers to obtain the third sequence S3 of unique area identifiers configured with the legal access verification information of the above-mentioned hotspot.
[0134] Exemplarily, assuming that the first sequence S1 of unique area identifiers is IGECABDFH, and the second sequence S2 of unique area identifiers is BDFHIGECA, and the number of identifier transfers configured by the controller for the target distance value range containing the specified distance value determined from several preset distance value ranges is 4, then the controller can start from the head end of the second sequence S2 of unique area identifiers (i.e., BDFHIGECA), and shift the unique area identifiers contained in the second sequence S2 of unique area identifiers (i.e., BDFHIGECA) one by one to the tail end opposite to the head end for splicing, and stop shifting the unique area identifiers when the number of shifted unique area identifiers is equal to 4, so as to obtain the third sequence S3 of unique area identifiers configured with the legal access verification information of the above-mentioned hotspot, i.e., the third sequence S3 of unique area identifiers is IGECABDFH.
[0135] 509. The controller verifies whether the first sequence S1 of the unique area identifier is the same as the third sequence S3 of the unique area identifier configured by the legal access verification information of the hotspot; if they are the same, execute step 510; if they are not the same, end this process.
[0136] Among them, when implementing the above steps 506 to 509, when the controller verifies that the first sequence S1 of the unique area identifier is different from the second sequence S2 of the unique area identifier configured by the legal access verification information of the above hotspot, the controller can calculate the distance value between the current position of the movable device in the surrounding environment of the smart mattress and the designated device position configured by the legal access verification information of the above hotspot as the designated distance value, and according to the designated distance value, shift the unique area identifiers included in the second sequence S2 of the unique area identifier to obtain the third sequence S3 of the unique area identifier configured by the legal access verification information of the above hotspot, which is the same as the first sequence S1 of the unique area identifier, which is conducive to improving the success rate of the main earphone accessing the hotspot of the audio playback device.
[0137] 510. The controller transmits a hotspot access notification message including a unique identifier of a legitimate master headset preconfigured by the controller and legitimate access verification information of the hotspot.
[0138] 511. The master headset receives a hotspot access notification message and identifies whether the unique identifier of the pre-configured legitimate master headset is the same as the unique identifier of the master headset; if they are the same, execute steps 512 to 514; if they are not the same, end this process.
[0139] 512. The main headset accesses the hotspot according to the legal access verification information of the hotspot to achieve wireless connection between the main headset and the audio playback device.
[0140] In some implementations, after the primary earphone is connected to the hotspot of the audio playback device, the controller may further perform the following steps:
[0141] The controller detects whether the current position of the movable device in the surrounding environment of the smart mattress has changed (such as a floor-standing fan is moved to the designated device position configured by the legal access verification information of the above-mentioned hotspot); if it has changed, it detects whether the distance value between the changed position of the movable device and the designated device position configured by the legal access verification information of the above-mentioned hotspot is 0. If so, the controller starts from the tail end of the above-mentioned third sequence of unique area identifiers S3 (such as IGECABDFH), and shifts the unique area identifiers contained in the third sequence of unique area identifiers S3 to the head end opposite to the tail end one by one for splicing, until the number of shifted unique area identifiers is equal to the designated identifier transfer number (such as 4)), and stops shifting the unique area identifier to obtain the second sequence of unique area identifiers S2 (such as BDFHIGECA) configured by the legal access verification information of the above-mentioned hotspot.
[0142] Among them, the implementation of the above-mentioned embodiment enables the second sequence S2 of the unique area identifier configured with the legal access verification information of the hotspot of the audio playback device to dynamically change with the change of the distance value between the position of any movable device in the surrounding environment of the smart mattress photographed by the trusted terminal during the pressing process of the last pressed sub-area in the above-mentioned target sub-areas and the designated device position configured with the legal access verification information of the above-mentioned hotspot, thereby facilitating the improvement of the reliability of the main earphone accessing the hotspot of the audio playback device.
[0143] 513. After detecting that the main earphone touches the slave earphone, the main earphone identifies a first state of the main earphone and a second state of the slave earphone.
[0144] 514. The primary earphone notifies the controller of the first state of the primary earphone and the second state of the secondary earphone.
[0145] 515. The controller identifies the first state of the primary earphone and the second state of the secondary earphone.
[0146] 516. When the controller identifies that the first state of the main earphone is the unworn state and the second state of the auxiliary earphone is the worn state, the controller sends a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the main earphone.
[0147] 517. The audio playback device plays an audio signal corresponding to the next audio file to the primary earphone according to the first switching instruction.
[0148] 518. The main earphone outputs an audio signal corresponding to a next audio file played by the audio playback device, and transmits the audio signal corresponding to the next audio file to the auxiliary earphone for output.
[0149] In some embodiments, if the controller recognizes that the first state of the primary earphone is the wearing state and the second state of the secondary earphone is the not-wearing state, the controller sends a second switching instruction to the audio playback device for instructing the audio playback device to play the audio signal corresponding to the previous audio file to the primary earphone;
[0150] Correspondingly, the audio playback device plays the audio signal corresponding to the previous audio file to the main earphone according to the second switching instruction;
[0151] Correspondingly, the main earphone outputs the audio signal corresponding to the last audio file played by the audio playback device, and transmits the audio signal corresponding to the last audio file to the auxiliary earphone for output.
[0152] In some implementations, after the controller sends a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the main earphone or sends a second switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a previous audio file to the main earphone, the controller may further perform the following steps:
[0153] When the controller recognizes that the first state of the main earphone is the wearing state and the second state of the auxiliary earphone is also the wearing state, it detects whether the main and auxiliary earphones are worn by the same user on the smart mattress; if so, it detects the posture of the same user wearing the main and auxiliary earphones on the smart mattress. If the posture is a sitting posture, it identifies whether a preset mattress head lifting angle θ corresponding to the user is recorded. If so, it controls the motor to drive the head of the smart mattress to be lifted to the preset mattress head lifting angle θ, so that the same user wearing the main and auxiliary earphones can comfortably lean on the head of the smart mattress to listen to the audio signal corresponding to the previous audio file or the next audio file played by the audio playback device, thereby improving the experience of the same user wearing the main and auxiliary earphones using the TWS earphones on the smart mattress.
[0154] Alternatively, when the controller detects that the main earphone is worn by the first user (such as the husband) located on the smart mattress and the secondary earphone is worn by the second user (such as the wife) located on the smart mattress, the controller identifies the user level of the first user wearing the main earphone and the user level of the second user wearing the secondary earphone; and determines the target user from the first user and the second user, the target user being the user with the highest user level between the first user and the second user; identifies the posture of the target user on the smart mattress, and if the posture is a sitting posture, identifies whether a preset mattress head lifting angle θ1 corresponding to the target user is recorded, and if so, controls the motor to drive the head of the smart mattress to be lifted to the preset mattress head lifting angle θ1, so that the first and second users wearing the main and secondary earphones can lean on the head of the smart mattress to listen to the audio signal corresponding to the previous audio file or the next audio file played by the audio playback device, thereby improving the experience of the first and second users wearing the main and secondary earphones in using the TWS earphones on the smart mattress.
[0155] It can be seen that the implementation Figure 5 The audio switching method of the smart mattress shown can effectively improve the efficiency of controlling the audio playback device to play the next audio file or the previous audio file; and can effectively prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around.
[0156] See also Figure 6 , Figure 6 Schematic diagram of the structure of an audio switching system of a smart mattress disclosed in an embodiment of the present application. Figure 6 As shown, the audio switching system of the smart mattress includes:
[0157] Smart mattress 601, smart mattress 601 has built-in audio playback device 602 and controller 603, smart mattress 601 is also equipped with TWS earphones, TWS earphones include main earphones 604 and auxiliary earphones 605, wherein:
[0158] The main earphone 604 is used to identify the first state of the main earphone 604 and the second state of the auxiliary earphone 605 after detecting that the main earphone 604 touches the auxiliary earphone 605; and notify the controller 603 of the first state of the main earphone 604 and the second state of the auxiliary earphone 605;
[0159] A controller 603, configured to identify a first state of a primary earphone 604 and a second state of a secondary earphone 605;
[0160] The controller 603 is further configured to send a first switching instruction to the audio playback device 602 for instructing the audio playback device 602 to play an audio signal corresponding to a next audio file to the main earphone 604 when it is recognized that the first state of the main earphone 604 is an unworn state and the second state of the auxiliary earphone 605 is a worn state;
[0161] The audio playback device 602 is used to play the audio signal corresponding to the next audio file to the main earphone 604 according to the first switching instruction;
[0162] The main earphone 604 is also used to output the audio signal corresponding to the next audio file played by the audio playback device 602, and transmit the audio signal corresponding to the next audio file to the auxiliary earphone 605 for output.
[0163] In some embodiments, the controller 603 is further configured to, when recognizing that the first state of the main earphone 604 is the wearing state and the second state of the auxiliary earphone 605 is the unwearing state, send a second switching instruction to the audio playback device 602 for instructing the audio playback device 602 to play the audio signal corresponding to the previous audio file to the main earphone 604;
[0164] Correspondingly, the audio playback device 602 is further configured to play the audio signal corresponding to the previous audio file to the primary earphone 604 according to the second switching instruction;
[0165] Correspondingly, the main earphone 604 is also used to output the audio signal corresponding to the last audio file played by the audio playback device 602, and transmit the audio signal corresponding to the last audio file to the auxiliary earphone 605 for output.
[0166] In some implementations, the master earphone 604 notifies the controller 603 of the first state of the master earphone 604 and the second state of the slave earphone 605 in the following manner:
[0167] The master earphone 604 sends a broadcast message including a unique identifier of the master earphone 604, a first identifier of a first state of the master earphone 604, and a second identifier of a second state of the slave earphone 605 to the controller 603;
[0168] Correspondingly, the controller 603 identifies the first state of the primary earphone 604 and the second state of the secondary earphone 605 in the following manner:
[0169] The controller 603 receives the broadcast information and identifies whether the unique identifier of the main earphone 604 is the same as the unique identifier of the legitimate main earphone 604 pre-configured by the controller 603; if they are the same, the first state of the main earphone 604 is identified according to the first identifier of the first state of the main earphone 604; and, the second state of the secondary earphone 605 is identified according to the second identifier of the second state of the secondary earphone 605.
[0170] In some embodiments, the upper surface area of the smart mattress 601 is divided into a plurality of sub-areas, and each sub-area is associated with a unique area identifier, and the unique area identifiers associated with any two sub-areas are different from each other, then:
[0171] The controller 603 is further configured to detect each target sub-region pressed in sequence in the plurality of sub-regions before the primary earphone 604 detects that the primary earphone 604 touches the secondary earphone 605; wherein the number of the target sub-regions is less than or equal to the number of the plurality of sub-regions;
[0172] The controller 603 is further used to obtain a target image sent by a trusted terminal during the pressing process of the last pressed sub-region among the above-mentioned target sub-regions, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress 601;
[0173] The controller 603 is further used to identify the removable device from the target image, and verify whether the device unique identifier of the removable device is the same as the designated device unique identifier configured by the legal access verification information of the hotspot of the audio playback device 602; if they are the same, the unique area identifiers associated with each of the target sub-areas are sorted according to the order in which each of the target sub-areas is pressed, and a first sequence S1 of unique area identifiers is obtained;
[0174] The controller 603 is further used to verify whether the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are the same, a hotspot access notification message including the unique identifier of the legal master headset 604 pre-configured by the controller 603 and the legal access verification information of the hotspot is transmitted; wherein the second sequence S2 of the unique area identifier is composed of a plurality of unique area identifiers of the upper surface area of the smart mattress 601;
[0175] The main earphone 604 is also used to receive hotspot access notification messages and identify whether the unique identifier of the pre-configured legitimate main earphone 604 is the same as the unique identifier of the main earphone 604; if they are the same, access the above hotspot according to the legitimate access verification information of the above hotspot to achieve wireless connection between the main earphone 604 and the audio playback device 602.
[0176] In some implementations, the designated device unique identifier configured in the legal access verification information of the hotspot is also associated with the designated device location, then:
[0177] The controller 603 is further used to obtain the current position of the movable device in the surrounding environment of the smart mattress 601 after verifying that the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot;
[0178] The controller 603 is also used to verify whether the current location is the same as the designated device location; if they are the same, execute the above-mentioned step of transmitting a hotspot access notification message including the unique identifier of the legitimate master headset 604 pre-configured by the controller 603 and the legitimate access verification information of the above-mentioned hotspot.
[0179] In other embodiments, the designated device unique identifier configured in the legal access verification information of the hotspot is also associated with the designated device location. After the controller 603 verifies that the first sequence S1 of the unique area identifier is different from the second sequence S2 of the unique area identifier configured in the legal access verification information of the hotspot, the controller 603 may further perform the following steps:
[0180] Get the current position of the movable device in the surrounding environment of the smart mattress.
[0181] The distance value between the current location and the designated device location configured by the legal access verification information of the hotspot is calculated as the designated distance value.
[0182] According to the specified distance value, the unique area identifiers included in the second sequence S2 of unique area identifiers are shifted to obtain a third sequence S3 of unique area identifiers configured with the legal access verification information of the hotspot.
[0183] Check whether the first sequence S1 of unique area identifiers is the same as the third sequence S3 of unique area identifiers configured with the legal access verification information of the above-mentioned hotspot; if they are the same, execute the above-mentioned step of transmitting a hotspot access notification message including the unique identifier of the legal master headset 604 pre-configured by the controller 603 and the legal access verification information of the above-mentioned hotspot.
[0184] In some implementations, the controller 603 shifts the unique area identifiers included in the second sequence S2 of unique area identifiers according to the specified distance value to obtain a third sequence S3 of unique area identifiers configured with the legal access verification information of the hotspot, including:
[0185] The controller 603 determines a target distance value range including the specified distance value from a plurality of preset distance value ranges; wherein there is no intersection between any two distance value ranges among the plurality of distance value ranges, and each distance value range is configured with an identification transfer quantity, and the identification transfer quantities configured for any two distance value ranges are different from each other.
[0186] And, the controller 603 obtains the number of identification transfers configured for the target distance value range as the designated number of identification transfers;
[0187] Furthermore, the controller 603 starts from the head end of the second sequence S2 of unique area identifiers configured with the legal access verification information of the above-mentioned hotspot, and shifts the unique area identifiers contained in the second sequence S2 of unique area identifiers to the tail end opposite to the head end for splicing one by one, and stops shifting the unique area identifiers when the number of shifted unique area identifiers is equal to the specified identifier transfer number, so as to obtain the third sequence S3 of unique area identifiers configured with the legal access verification information of the above-mentioned hotspot.
[0188] In the embodiment of the present application, the controller 603 may also execute other steps described in the previous method embodiment, which will not be repeated here.
[0189] It can be seen that the implementation Figure 6 The audio switching system of the smart mattress shown can effectively improve the efficiency of controlling the audio playback device to play the next audio file or the previous audio file; and can effectively prevent the audio signal corresponding to the audio file played by the audio playback device from interfering with other people around.
[0190] The embodiment of the present application further discloses a computer-readable storage medium having a computer program stored thereon, wherein the computer program, when executed by a processor, implements the steps in the audio switching method of the smart mattress described in the previous embodiment.
[0191] The above is a detailed introduction to the audio switching method of a smart mattress and related products disclosed in the embodiment of the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for general technical personnel in this field, according to the idea of the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the application.
Claims
1. An audio switching method for a smart mattress, characterized in that: The smart mattress has a built-in audio playback device and a controller, and the smart mattress is also equipped with a TWS headset, and the TWS headset includes a main headset and a secondary headset, and the method includes: After the master earphone detects that the master earphone touches the slave earphone, the master earphone identifies a first state of the master earphone and a second state of the slave earphone; and notifies the controller of the first state of the master earphone and the second state of the slave earphone; The controller identifies a first state of the primary earphone and a second state of the secondary earphone; When the controller identifies that the first state of the primary earphone is an unworn state and the second state of the secondary earphone is a worn state, the controller sends a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the primary earphone; The audio playback device plays an audio signal corresponding to a next audio file to the primary earphone according to the first switching instruction; The main earphone outputs the audio signal corresponding to the next audio file played by the audio playback device, and transmits the audio signal corresponding to the next audio file to the auxiliary earphone for output.
2. The audio switching method of the smart mattress according to claim 1, characterized in that: The method further comprises: When the controller identifies that the first state of the primary earphone is the wearing state and the second state of the secondary earphone is the unwearing state, the controller sends a second switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a previous audio file to the primary earphone; The audio playback device plays the audio signal corresponding to the previous audio file to the primary earphone according to the second switching instruction; The main earphone outputs the audio signal corresponding to the last audio file played by the audio playback device, and transmits the audio signal corresponding to the last audio file to the auxiliary earphone for output.
3. The audio switching method of the smart mattress according to claim 1 or 2, characterized in that: The master earphone notifies the controller of a first state of the master earphone and a second state of the slave earphone, comprising: The master earphone sends a broadcast message including a unique identifier of the master earphone, a first identifier of a first state of the master earphone, and a second identifier of a second state of the slave earphone to the controller; The controller identifies a first state of the master earphone and a second state of the slave earphone, including: The controller receives the broadcast information and identifies whether the unique identifier of the main earphone is the same as the unique identifier of the legitimate main earphone pre-configured by the controller; if they are the same, the first state of the main earphone is identified according to the first identifier of the first state of the main earphone; and the second state of the secondary earphone is identified according to the second identifier of the second state of the secondary earphone.
4. The audio switching method of the smart mattress according to claim 3, characterized in that: The upper surface area of the smart mattress is divided into a plurality of sub-areas, and each sub-area is associated with a unique area identifier, and the unique area identifiers associated with any two sub-areas are different from each other; Before the primary earphone detects that the primary earphone touches the secondary earphone, the method further includes: The controller detects each target sub-region that is pressed in sequence among the plurality of sub-regions; wherein the number of the each target sub-region is less than or equal to the number of the plurality of sub-regions; The controller obtains a target image sent by a trusted terminal during the pressing process of the last pressed sub-region in each target sub-region, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress; The controller identifies the removable device from the target image, and verifies whether the device unique identifier of the removable device is the same as the designated device unique identifier configured by the legal access verification information of the hotspot of the audio playback device; if they are the same, the unique area identifiers associated with each target sub-area are sorted according to the order in which each target sub-area is pressed, and a first sequence S1 of unique area identifiers is obtained; The controller verifies whether the first sequence S1 of the unique area identifier is identical to the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are identical, a hotspot access notification message including the unique identifier of the legal master headset preconfigured by the controller and the legal access verification information of the hotspot is transmitted; The master headset receives the hotspot access notification message and identifies whether the unique identifier of the pre-configured legitimate master headset is the same as the unique identifier of the master headset; if they are the same, the hotspot is accessed according to the legitimate access verification information of the hotspot to achieve wireless connection between the master headset and the audio playback device.
5. The audio switching method of the smart mattress according to claim 4, characterized in that: The designated device unique identifier configured by the legal access verification information of the hotspot is also associated with the designated device location. After the controller verifies that the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot, the method further includes: The controller obtains the current position of the movable device in the surrounding environment of the smart mattress; The controller verifies whether the current location is the same as the designated device location; if they are the same, the step of transmitting a hotspot access notification message including the unique identifier of the legitimate master headset preconfigured by the controller and the legitimate access verification information of the hotspot is executed.
6. An audio switching system for a smart mattress, comprising a smart mattress, wherein the smart mattress has a built-in audio playback device and a controller, and the smart mattress is also equipped with a TWS headset, wherein the TWS headset includes a main headset and a secondary headset, and is characterized in that: The master earphone is used to identify a first state of the master earphone and a second state of the slave earphone after detecting that the master earphone touches the slave earphone; and, notifying the controller of the first state of the primary earphone and the second state of the secondary earphone; The controller is used to identify a first state of the primary earphone and a second state of the secondary earphone; The controller is further configured to, when recognizing that the first state of the primary earphone is an unworn state and the second state of the secondary earphone is a worn state, send a first switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a next audio file to the primary earphone; The audio playback device is configured to play an audio signal corresponding to a next audio file to the primary earphone according to the first switching instruction; The main earphone is further used to output the audio signal corresponding to the next audio file played by the audio playback device, and transmit the audio signal corresponding to the next audio file to the auxiliary earphone for output.
7. The audio switching system of the smart mattress according to claim 6, characterized in that: The controller is further configured to, when recognizing that the first state of the primary earphone is a wearing state and the second state of the secondary earphone is a not-wearing state, send a second switching instruction to the audio playback device for instructing the audio playback device to play an audio signal corresponding to a previous audio file to the primary earphone; The audio playback device is further configured to play the audio signal corresponding to the previous audio file to the primary earphone according to the second switching instruction; The main earphone is further used to output the audio signal corresponding to the last audio file played by the audio playback device, and transmit the audio signal corresponding to the last audio file to the auxiliary earphone for output.
8. The audio switching system of the smart mattress according to claim 6 or 7, characterized in that: The manner in which the master earphone notifies the controller of the first state of the master earphone and the second state of the slave earphone is: The master earphone sends a broadcast message including a unique identifier of the master earphone, a first identifier of a first state of the master earphone, and a second identifier of a second state of the slave earphone to the controller; The controller identifies the first state of the master earphone and the second state of the slave earphone in the following manner: The controller receives the broadcast information, and identifies whether the unique identifier of the master headset is the same as the unique identifier of the legitimate master headset preconfigured by the controller; if they are the same, identifying the first state of the master headset according to the first identifier of the first state of the master headset; And, the second state of the secondary earphone is identified according to the second identifier of the second state of the secondary earphone.
9. The audio switching system of the smart mattress according to claim 8, characterized in that: The upper surface area of the smart mattress is divided into a plurality of sub-areas, and each sub-area is associated with a unique area identifier. If the unique area identifiers associated with any two sub-areas are different, then: The controller is further configured to detect each target sub-region pressed in sequence in the plurality of sub-regions before the primary earphone detects that the primary earphone touches the secondary earphone; wherein the number of the target sub-regions is less than or equal to the number of the plurality of sub-regions; The controller is further used to obtain a target image sent by a trusted terminal during the pressing process of the last pressed sub-region in each target sub-region, which is obtained by the trusted terminal photographing any movable device in the surrounding environment of the smart mattress; The controller is further used to identify the removable device from the target image, and verify whether the device unique identifier of the removable device is the same as the designated device unique identifier configured by the legal access verification information of the hotspot of the audio playback device; if they are the same, the unique area identifiers associated with each target sub-area are sorted according to the order in which each target sub-area is pressed, to obtain a first sequence S1 of unique area identifiers; The controller is further configured to verify whether the first sequence S1 of the unique area identifier is identical to the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; if they are identical, a hotspot access notification message including the unique identifier of the legal master headset preconfigured by the controller and the legal access verification information of the hotspot is transmitted; The main earphone is also used to receive the hotspot access notification message and identify whether the unique identifier of the pre-configured legitimate main earphone is the same as the unique identifier of the main earphone; if they are the same, access the hotspot according to the legitimate access verification information of the hotspot to achieve wireless connection between the main earphone and the audio playback device.
10. The audio switching system of the smart mattress according to claim 9, characterized in that: The designated device unique identifier configured in the legal access verification information of the hotspot is also associated with the designated device location, then: The controller is further configured to obtain the current position of the movable device in the surrounding environment of the smart mattress after verifying that the first sequence S1 of the unique area identifier is the same as the second sequence S2 of the unique area identifier configured by the legal access verification information of the hotspot; The controller is also used to verify whether the current location is the same as the designated device location; if they are the same, execute the step of transmitting a hotspot access notification message including the unique identifier of the legitimate master headset pre-configured by the controller and the legitimate access verification information of the hotspot.
11. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps in the audio switching method of the smart mattress as described in any one of claims 1 to 5 are implemented.
Citation Information
Patent Citations
Contact type extended earphone
CN109151641A
TWS true wireless Bluetooth MP3 swimming earphone
CN210579109U