Equipment control method and device, electronic equipment and storage medium
By monitoring the environmental broadcast information and sending the target broadcast information, the problem of the controlled devices being interfered in the multi-device environment is solved, and the interference-free information transmission between devices is realized.
Patent Information
- Application Number
- CN202311065899.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-08-23
- Publication Date
- 2025-02-25
AI Technical Summary
In the environment of multiple sets of control devices and controlled devices, the controlled device may be interfered with by unpaired control devices, resulting in information transfer errors.
By listening to broadcast information in the current environment, the target position number occupied by the device is determined, and the target broadcast information is sent to avoid interference. The specific steps include monitoring the broadcast information, determining the target position number and broadcast information, sending the broadcast information, and performing actions in the target time period in the preset period.
It effectively avoids mutual interference between different devices, so that each device performs actions at a specific time period in the preset cycle, ensuring the accuracy of information transmission.
Smart Images

Figure CN119520571A_ABST
Abstract
Description
Technical Field
[0001] The present disclosure relates to the field of computer technology, and in particular to a device control method, an apparatus, an electronic device, and a storage medium. Background Art
[0002] Devices, such as control devices, have corresponding controlled devices. The control device and the controlled device can communicate by, for example, lighting up infrared lights. If there are multiple sets of control devices and controlled devices in the current environment, the controlled device may be interfered by other non-paired control devices, resulting in information transmission errors. Summary of the invention
[0003] The present disclosure provides a device control method, an apparatus, an electronic device, and a storage medium.
[0004] The present disclosure adopts the following technical solutions.
[0005] In some embodiments, the present disclosure provides a method for controlling a device, comprising:
[0006] Listen to the broadcast information in the current environment, which reflects the occupied position number;
[0007] Based on the monitoring result, determine the target position number occupied by the current device and the target broadcast information to be sent, wherein the target broadcast information reflects the target position number occupied by the current device;
[0008] Send the target broadcast information in the current environment, and perform the target action in the target time period of the preset cycle;
[0009] Among them, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
[0010] In some embodiments, the present disclosure provides a control device for a device, comprising:
[0011] A monitoring unit, used to monitor broadcast information in the current environment, wherein the broadcast information reflects the occupied position number;
[0012] A control unit, configured to determine, based on the monitoring result, the target position number occupied by the current device and the target broadcast information to be sent, wherein the content of the target broadcast information reflects the target position number occupied by the current device;
[0013] The control unit is further configured to send the target broadcast information in the current environment and perform the target action in the target time period of the preset cycle;
[0014] Among them, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
[0015] In some embodiments, the present disclosure provides an electronic device, comprising: at least one memory and at least one processor;
[0016] The memory is used to store program codes, and the processor is used to call the program codes stored in the memory to execute the above method.
[0017] In some embodiments, the present disclosure provides a computer-readable storage medium, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to perform the above method.
[0018] In some embodiments of the present disclosure, before the current device is about to perform a target action, it first listens to the broadcast information in the current environment, so as to determine the occupied location number, and then determine the target location number and send the target broadcast information, and then perform the target action in the target time period of a preset cycle, so that different devices perform actions in different time periods of the preset cycle, thereby avoiding mutual interference between different devices. BRIEF DESCRIPTION OF THE DRAWINGS
[0019] 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 that components and elements are not necessarily drawn to scale.
[0020] Figure 1 is a flowchart of a method for controlling a device according to an embodiment of the present disclosure.
[0021] Figure 2 It is a timing diagram within a preset period of an embodiment of the present disclosure.
[0022] Figure 3 It is a schematic diagram of the structure of an electronic device according to an embodiment of the present disclosure. DETAILED DESCRIPTION
[0023] 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.
[0024] It should be understood that the various steps described in the method embodiments of the present disclosure can be performed in sequence and / or in parallel. In addition, the method embodiments may include additional steps and / or omit the steps shown. The scope of the present disclosure is not limited in this respect.
[0025] The term "including" and its variations used herein are open inclusions, i.e., "including but not limited to". The term "based on" means "based at least in part on". The term "one embodiment" means "at least one embodiment"; the term "another embodiment" means "at least one additional embodiment"; the term "some embodiments" means "at least some embodiments". The relevant definitions of other terms will be given in the following description.
[0026] It should be noted that the concepts such as "first" and "second" 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.
[0027] It should be noted that the modification of “one” mentioned in the present disclosure is illustrative rather than restrictive, and those skilled in the art should understand that it should be understood as “one or more” unless otherwise clearly indicated in the context.
[0028] The names of the messages or information exchanged between multiple devices in the embodiments of the present disclosure are only used for illustrative purposes and are not used to limit the scope of these messages or information.
[0029] The solution provided by the embodiment of the present disclosure will be described in detail below with reference to the accompanying drawings.
[0030] Taking a controller that is paired with an extended reality device (such as a virtual reality device, an augmented reality device, or a mixed reality device) as an example, the controller is paired with the extended reality device (such as a head-mounted display device). In order for the extended reality device to accurately identify the position of the controller, the controller has an optical tracking function. The principle is that the controller has a built-in infrared light, which is lit at intervals. The optical tracking camera of the extended reality device takes a picture of the infrared light of the controller. The infrared light point on the controller can be captured in the photo. The extended reality device can calculate the photo to determine the position of the controller relative to the extended display device and map it to the extended reality space.
[0031] However, when multiple users use multiple extended reality devices, the infrared lights on the handles may interfere with each other. For example, user A's handle may be photographed by user B's extended reality device, causing user B's extended reality device to mistakenly believe that user A's handle is a paired handle, resulting in abnormal display in the extended reality space using user B's extended reality device.
[0032] In some embodiments of the present disclosure, a method for controlling a device is provided. The device may be a handle of an extended reality device, but is not limited thereto. Figure 1 As shown, Figure 1 It is a flowchart of a control method of a device according to an embodiment of the present disclosure, and includes the following steps.
[0033] S11. Listen to the broadcast information in the current environment.
[0034] In some embodiments, the current environment is the environment where the current device is located, such as the environment within a certain distance around the current device. The current device may be a device that executes the method of the present disclosure, which may be a handle, and the monitored broadcast information may be broadcast information sent by other devices of the same type as the current device. In some embodiments, the broadcast information may exist, indicating that other devices of the same type are in working state, or may not exist, indicating that other devices of the same type are not in working state.
[0035] S12. Based on the monitoring result, determine the target position number occupied by the current device and the target broadcast information to be sent.
[0036] In some embodiments, the monitoring results may include monitoring broadcast information and not monitoring broadcast information, as well as the content of the monitored broadcast information. In some embodiments, the position number is used for different devices in the current environment, and the position numbers of different devices are different. Numbers 1 to n can be used as position numbers, and one device corresponds to a number from 1 to n. The position number corresponding to the current device is the target position number. The broadcast information reflects the occupied position number. The unoccupied position number can be determined through the monitoring results, and then the target position number is determined from the unoccupied position number. The content of the target broadcast information reflects the target position number occupied by the current device.
[0037] S13: Send target broadcast information in the current environment, and perform target actions in a target time period in a preset cycle.
[0038] In some embodiments, different devices in the current environment occupy different position numbers, and different position numbers correspond to different time periods in the preset cycle. The target time period is the time period corresponding to the target position number in the preset cycle. In some embodiments, after the current device determines the target broadcast information, it will broadcast and send the target broadcast information in the current environment, for example, sending the target broadcast information periodically at a fixed time (for example, 1 second as a period), so that other devices can monitor the target broadcast information and know that the target position number has been occupied. The preset period can be a periodic time period, and the preset period can be a communication period, and its time length can be, for example, 20ms, indicating that each device repeats its own action every 20ms. A preset period includes multiple time periods, and different time periods correspond to different position numbers. For each different device, it determines the corresponding time period in the preset cycle according to its own position number, and performs the actions that need to be performed in the corresponding time period, such as performing communication actions. The current device performs the target action in the target time period, and the target action can be sending a communication signal to the device paired with the current device, such as lighting up an infrared lamp, and the target action is not performed outside the target time period.
[0039] In some embodiments of the present disclosure, before the current device is about to execute the target action, it first listens to the broadcast information in the current environment, so as to determine the occupied position number, and then determine the target position number and send the target broadcast information, and then executes the target action in the target time period of the preset cycle. In this way, different devices execute actions in different time periods in the preset cycle, and no actions may be executed outside the time period corresponding to each device. In this way, only one device can execute an action in a time period, thereby avoiding mutual interference between different devices.
[0040] The following is an example in which the current device and other devices are both handles. In the current environment, there are one or more extended reality devices and paired handles. The handles light up the infrared light so that the paired extended reality devices can locate the handles. If the handles of different extended reality devices light up the infrared light at the same time, the extended reality device may recognize the unpaired handle. Therefore, in some embodiments, the handle first listens to the broadcast information before lighting the infrared light (performing the target action), so as to determine the position number occupied by other handles, and then determines an unoccupied target position number according to the monitoring result, and generates the target broadcast information, broadcasts the target broadcast information to inform other handles that the target position number has been occupied, and can notify the paired device (the target time period occupied by the extended reality device) through Bluetooth or other methods, and then only lights up the infrared light in the target time period of the communication cycle. Since the handles of different extended reality devices occupy different time periods of the communication cycle, at one time, only the infrared light of the handle paired with one extended reality device will be lit, so that different extended reality devices and handles can perform infrared positioning of the handle in the corresponding time period, thus avoiding mutual interference between the handles paired with different extended reality devices.
[0041] In some embodiments of the present disclosure, the broadcast information includes first-category broadcast information and second-category broadcast information by type; the content of the first-category broadcast information reflects the position number occupied by the device in the current environment; the content of the second-category broadcast information reflects the position number occupied by the device sending the second-category broadcast information.
[0042] In some embodiments, a broadcast message may be a first-category broadcast message or a second-category broadcast message. The first-category broadcast message determines all occupied position numbers, so monitoring the broadcast message in the current environment may be monitoring the first-category broadcast message in the current environment. In some embodiments, there is at most one first-category broadcast message in the broadcast message, that is, the first device that sends the broadcast message may be the one that sends the first-category broadcast message. After the first-category broadcast message exists, other devices can only send the second-category broadcast message. The first-category broadcast message and the second-category broadcast message can be distinguished by the identification bit of the broadcast message. By setting the first-category broadcast message and the second-category broadcast message, it is possible to avoid the need to monitor all broadcast messages, because when there are multiple second-category broadcast messages, they are easy to be missed, which may cause the problem of duplicate occupied position numbers for different devices.
[0043] In some embodiments of the present disclosure, based on the monitoring results, the target position number occupied by the current device in a preset period is determined, including: in response to not monitoring the broadcast information, determining the first position number as the target position number occupied by the current device; or, in response to monitoring the first type of broadcast information, determining the occupied position number based on the content of the first type of broadcast information, and determining the target position number from the unoccupied position numbers.
[0044] In some embodiments, if no broadcast information is monitored, it indicates that there are no other devices in the current environment that are in working state. At this time, the first position number is used as the target position number. In this embodiment, the position number can be numbered in sequence. For example, the initial value of the broadcast information can be 00000000 in binary. Each position of the 8 0s corresponds to a position number. 0 in the 8 0s indicates that the position is not occupied. If 0 is changed to 1, it can indicate that the position is occupied. The position number can be represented by a number n from 1 to 8, thereby indicating the nth position from left to right in the binary. The first position number can be the position number of the first position. After the first position number is occupied, the broadcast information becomes 10000000. The second position number can be 2. At this time, it can be 0 with 1 occupying the second position, that is, the broadcast information is 01000000, and so on. The position number can be a number from 1 to n (i.e., the number of binary digits of n digits), and the first position number can be 1 (i.e., the position of the first digit in the binary number). In other embodiments, if broadcast information is monitored, the first type of broadcast information can be found from the broadcast information. The content of the first type of broadcast information reflects all occupied position numbers. For example, if the first type of broadcast information is 11000000, it means that there are two devices, which have occupied the first and second positions. Therefore, the target position number can be determined from the unoccupied position numbers. The target position number can be the first position in the unoccupied position numbers according to a preset order, that is, the position numbers can be sorted according to a preset order. For example, if the first type of broadcast information is 11000000, the target position number can be 3, indicating that the third position is occupied.
[0045] In some embodiments of the present disclosure, target broadcast information to be sent is determined based on monitoring results, including: in response to not monitoring the broadcast information, determining that the target broadcast information is first-category broadcast information, and determining the content of the target broadcast information based on the target position number; or, in response to monitoring the first-category broadcast information, determining that the target broadcast information is second-category broadcast information, and determining the content of the target broadcast information based on the target position number.
[0046] In some embodiments, there is at most one first-class broadcast information in the broadcast information. After the first-class broadcast information is present, the other broadcast information sent is the second-class broadcast information. In the case where no broadcast information is monitored, it indicates that the first-class broadcast information does not exist yet, so the target broadcast information will be used as the first-class broadcast information, and the content of the target broadcast information is determined according to the target position number. For example, the initial value of the broadcast information is 00000000, and the current device occupies the first position, then the target position number is 1, and the target broadcast information can be 10000000. In other embodiments, when the broadcast information is monitored, it indicates that the first-class broadcast information already exists. At this time, the first-class broadcast information can be distinguished from the broadcast information. If the first-class broadcast information is monitored, the target broadcast information is the second-class broadcast information, and then the target broadcast information is determined based on the target position number. For example, the first-class broadcast information monitored is 10000000, indicating that the first position has been occupied. At this time, the current device should occupy the second position, and the target position number is 2, then the target broadcast information can be 01000000.
[0047] In some embodiments of the present disclosure, if the target broadcast information is first-category broadcast information, after sending the target broadcast information in the current environment, the method also includes: continuing to monitor the broadcast information in the current environment; in response to monitoring newly added second-category broadcast information sent by other devices, based on the content of the newly added second-category broadcast information, changing the content of the target broadcast information that is the first-category broadcast information and sending the changed target broadcast information.
[0048] In some embodiments, the first type of broadcast information reflects the position number occupied by the device in the current environment. Because the position number occupied in the current environment is dynamically changing, the content of the first type of broadcast information needs to be updated. The device sending the first type of broadcast information can be a master device, and the device sending the second type of broadcast information can be a slave device. The master device needs to dynamically adjust the content of the first type of broadcast information according to the second type of broadcast information initiated by the slave device. Therefore, in the case where the current device is the master device, after sending the target broadcast information, if it monitors the newly added second type of broadcast information sent by other slave devices, it means that a new position number is occupied. At this time, the target broadcast information needs to be updated. Specifically, the occupied position number can be determined based on the newly added second type of broadcast information, and the target broadcast information is updated based on the occupied position number. For example, the first type of broadcast information was originally 10000000. If the second type of broadcast information 01000000 is monitored, the first type of broadcast information needs to be updated to 11000000, thereby indicating that both the first and second positions are occupied.
[0049] In some embodiments, in order to reduce interference from various types of broadcast information in the current environment, for devices that send first-class broadcast information, it is necessary to continue to send the first-class broadcast information. For devices that send second-class broadcast information, when it is detected that the content of the first-class broadcast information has reflected the position number occupied by the device, it can stop sending the second-class broadcast information. In this way, the broadcast information in the current environment is minimized, and only the first-class broadcast information exists most of the time, so that when new devices join, the first-class broadcast information can be received faster and more accurately.
[0050] In some embodiments of the present disclosure, the first type of broadcast information includes n repeated first characters and mn repeated second characters, wherein the position of the first character in the first type of broadcast information indicates an occupied position number, and the position of the second character in the first type of broadcast information indicates an unoccupied position number. In some embodiments, the second type of broadcast information includes 1 first character and (m-1) second characters, and the position of the first character in the second type of broadcast information indicates the position number occupied by the device sending the second type of broadcast information.
[0051] In some embodiments, n is not less than 1, m is not less than 2, and m is not less than n. The length of the broadcast information can be fixed, m represents the number of bits of the broadcast information, the broadcast information can be m-bit binary, for example, it can be an 8-bit byte, the default is 00000000, the second character can be the number 0, each device occupies different bits in the byte in order from left to right, corresponding to their respective position numbers, the occupied position number can be used as the first character to occupy the position, n represents the number of devices that have occupied the position, for example, when there is a device working in the current environment, it occupies the first position, the occupied position number is 1, the first type of broadcast information is 10000000, when there are two devices working in the current environment, they occupy the first and second positions, the occupied positions are numbered 1 and 2 respectively, the first type of broadcast information is 11000000, it can be seen that the first character represents the placeholder, and the position of the first character in the first type of broadcast information represents the occupied position number. If a third device is added at this time, after receiving the first-class broadcast information 11000000, it determines that the position number it occupies is 3, then the corresponding second-class broadcast information is 00100000. After the second-class broadcast information is sent, the first-class broadcast information can be updated to 11100000.
[0052] In some embodiments of the present disclosure, the current device is a handle of an extended reality device, and the extended reality device detects a target action in a target time period. In some embodiments, other devices in the current environment are handles of other extended reality devices; in some embodiments, executing the target action includes: controlling the infrared light on the current device to light up. In some embodiments, the current cycle includes a preset number of time periods, and there are intervals between different time periods. The preset number may be 8 or more, and there are intervals between different time periods, which is equivalent to a time buffer to avoid two different devices working in one time period due to delays or time deviations, for example Figure 3 As shown, the long horizontal line represents a preset period, for example, 20ms. Device A, device B and device C work in their respective corresponding time periods. A time period may be 50μs, and there is an interval period t between the time periods of different devices.
[0053] In order to better illustrate the method proposed in the embodiment of the present disclosure, a specific embodiment is proposed below. In this embodiment, the device is handle A. After handle A is turned on, it will listen for broadcast information in the current environment. If there is no broadcast information, the current handle A acts as the host and sends the first type of broadcast information at a fixed time period (for example, 1 second, 2 seconds or 3 seconds, etc.), which defaults to 1 byte. The initial default value of the broadcast information is 00000000. The current handle A occupies the first position as the host, so the first type of broadcast information is 10000000. The host uses the broadcast information as a reference and turns on the infrared light at a fixed frequency, such as 50Hz, so that the paired extended reality device can track it. The light-on time is 50μs. When there is another user's handle B in the area, handle B listens to the first type of broadcast sent by host A. After receiving the message 10000000, it is known that there is a controller A in the current area, so it is determined to occupy the second position and sends the second-class broadcast message 01000000, indicating that there is a controller B occupying the second position. After receiving the second-class broadcast message of controller B, controller A updates the first-class broadcast message to 11000000, indicating that the first and second positions have been occupied by controllers. Similarly, if there are other controllers, they will occupy the third to eighth positions in turn. If the eighth position is occupied, the second-class broadcast message 00000001 is sent to controller A. Handle A updates the first-class broadcast message to 11111111, indicating that the 8 controllers are in the same area and all 8 controllers have determined their positions in the area.
[0054] Reference for the lighting sequence of the handle Figure 2For example, there are three controllers A, B and C. The first type of broadcast information is 11100000, the infrared light is on for 50μs, and the light-on time interval t is 100μs. Different controllers turn on the light in their corresponding time periods, so that the extended reality devices paired with different controllers can track the infrared lights of the controllers without interfering with each other. A lighting cycle can be set long enough, such as 20ms, which can accommodate more than 100 controllers.
[0055] The present disclosure also provides a control device for a device, comprising:
[0056] A monitoring unit, used to monitor broadcast information in the current environment;
[0057] A control unit, used to determine the target position number occupied by the current device and the target broadcast information to be sent based on the monitoring result;
[0058] The control unit is further configured to send the target broadcast information in the current environment and perform the target action in the target time period of the preset cycle;
[0059] Among them, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
[0060] In some embodiments, the broadcast information includes first-category broadcast information and second-category broadcast information by type; the content of the first-category broadcast information reflects the position number occupied by the device in the current environment; the content of the second-category broadcast information reflects the position number occupied by the device sending the second-category broadcast information.
[0061] In some embodiments, determining the target position number occupied by the current device in a preset period based on the monitoring result includes:
[0062] In response to not listening to the broadcast information, determining the first position number as the target position number occupied by the current device; or,
[0063] In response to monitoring the first type of broadcast information, an occupied position number is determined based on the content of the first type of broadcast information, and the target position number is determined from unoccupied position numbers.
[0064] In some embodiments, determining the target broadcast information to be sent based on the monitoring result includes:
[0065] In response to not monitoring the broadcast information, determining that the target broadcast information is first-category broadcast information, and determining the content of the target broadcast information based on the target position number;
[0066] Alternatively, in response to monitoring the first type of broadcast information, the target broadcast information is determined to be the second type of broadcast information, and the content of the target broadcast information is determined based on the target position number.
[0067] In some embodiments, the monitoring unit is further configured to: if the target broadcast information is the first type of broadcast information, after sending the target broadcast information in the current environment, continue to monitor the broadcast information in the current environment;
[0068] The control unit is also used to respond to monitoring the newly added second-category broadcast information sent by other devices, change the content of the target broadcast information of the first-category broadcast information based on the content of the newly added second-category broadcast information, and send the changed target broadcast information.
[0069] In some embodiments, the first type of broadcast information includes n repeated first characters and mn repeated second characters, wherein the position of the first character in the first type of broadcast information represents an occupied position number, and the position of the second character in the first type of broadcast information represents an unoccupied position number;
[0070] and / or, the second type of broadcast information includes 1 first character and (m-1) second characters, and the position of the first character in the second type of broadcast information indicates the position number occupied by the device sending the second type of broadcast information;
[0071] Among them, n is not less than 1, m is not less than 2, and m is not less than n.
[0072] In some embodiments, at least one of the following is satisfied:
[0073] The current device is a handle of an extended reality device, and the extended reality device detects the target action in the target time period;
[0074] The other devices in the current environment are handles of other extended reality devices;
[0075] The executing target action includes: controlling the infrared light on the current device to light up;
[0076] The current cycle includes a preset number of time periods, and there are intervals between different time periods.
[0077] For the embodiments of the device, since they basically correspond to the method embodiments, the relevant parts refer to the partial description of the method embodiments. The device embodiments described above are merely illustrative, wherein the modules described as separation modules may or may not be separated. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of the present embodiment. Those of ordinary skill in the art can understand and implement without paying creative work.
[0078] The method and device of the present disclosure are described above based on the embodiments and application examples. In addition, the present disclosure also provides an electronic device and a computer-readable storage medium, which are described below.
[0079] Reference below Figure 3 , which shows a schematic diagram of the structure of an electronic device (such as a terminal device or a server) 800 suitable for implementing the embodiment of the present disclosure. The terminal device in the embodiment of the present disclosure may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (personal digital assistants), PADs (tablet computers), PMPs (portable multimedia players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. The electronic device shown in the figure is only an example and should not bring any limitation to the functions and scope of use of the embodiment of the present disclosure.
[0080] The electronic device 800 may include a processing device (e.g., a central processing unit, a graphics processing unit, etc.) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage device 808 into a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the electronic device 800 are also stored. The processing device 801, the ROM 802, and the RAM 803 are connected to each other via a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0081] Typically, the following devices may be connected to the I / O interface 805: input devices 806 including, for example, a touch screen, a touchpad, a keyboard, a mouse, a camera, a microphone, an accelerometer, a gyroscope, etc.; output devices 807 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 808 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 809. The communication device 809 may allow the electronic device 800 to communicate with other devices wirelessly or by wire to exchange data. Although the electronic device 800 with various devices is shown in the figure, it should be understood that it is not required to implement or have all the devices shown. More or fewer devices may be implemented or have alternatively.
[0082] In particular, according to an embodiment of the present disclosure, the process described above with reference to the flowchart can be implemented as a computer software program. For example, an embodiment of the present disclosure includes a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device 809, or installed from a storage device 808, or installed from a ROM 802. When the computer program is executed by the processing device 801, the above-mentioned functions defined in the method of the embodiment of the present disclosure are executed.
[0083] It should be noted that the computer-readable medium disclosed above may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, 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 above. In the present disclosure, a computer-readable storage medium may be any tangible medium containing or storing a program that may be used by or in combination with an instruction execution system, device or device. In the present disclosure, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, in which a computer-readable program code is carried. This propagated data signal may take a variety of forms, including but not limited to an electromagnetic signal, an optical signal, or any suitable combination of the above. The computer readable signal medium may also be any computer readable medium other than a computer readable storage medium, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer readable medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (radio frequency), etc., or any suitable combination of the above.
[0084] In some embodiments, the client and the server may communicate using any currently known or future developed network protocol such as HTTP (HyperText Transfer Protocol), and may be interconnected with 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"), an internet (e.g., the Internet), and a peer-to-peer network (e.g., an ad hoc peer-to-peer network), as well as any currently known or future developed network.
[0085] The computer-readable medium may be included in the electronic device, or may exist independently without being incorporated into the electronic device.
[0086] The computer-readable medium carries one or more programs. When the one or more programs are executed by the electronic device, the electronic device executes the method of the present disclosure.
[0087] Computer program code for performing the operations of the present disclosure may be written in one or more programming languages, or a combination thereof, including object-oriented programming languages, such as Java, Smalltalk, C++, and conventional procedural programming languages, such as "C" or similar programming languages. The program code may 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 cases involving a remote computer, the remote computer may 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 may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0088] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present disclosure. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some implementations as replacements, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0089] The units involved in the embodiments described in the present disclosure may be implemented by software or hardware, wherein the name of a unit does not, in some cases, limit the unit itself.
[0090] The functions described above herein may be performed at least in part by one or more hardware logic components. For example, without limitation, exemplary types of hardware logic components that may be used include: field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), complex programmable logic devices (CPLDs), and the like.
[0091] In the context of the present disclosure, a machine-readable medium may be a tangible medium that may contain or store a program for use by or in conjunction with an instruction execution system, device, or equipment. A machine-readable medium may be a machine-readable signal medium or a machine-readable storage medium. A machine-readable medium may include, but is not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, device, or equipment, or any suitable combination of the foregoing. 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.
[0092] According to one or more embodiments of the present disclosure, a method for controlling a device is provided, including:
[0093] Listen to the broadcast information in the current environment, which reflects the occupied position number;
[0094] Based on the monitoring result, determine the target position number occupied by the current device and the target broadcast information to be sent, wherein the content of the target broadcast information reflects the target position number occupied by the current device;
[0095] Send the target broadcast information in the current environment, and perform the target action in the target time period of the preset cycle;
[0096] Among them, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
[0097] According to one or more embodiments of the present disclosure, a method for controlling a device is provided, wherein broadcast information includes first-category broadcast information and second-category broadcast information by type; the content of the first-category broadcast information reflects the position number occupied by the device in the current environment; the content of the second-category broadcast information reflects the position number occupied by the device that sends the second-category broadcast information.
[0098] According to one or more embodiments of the present disclosure, a method for controlling a device is provided, which determines a target position number occupied by a current device in a preset period based on a monitoring result, including:
[0099] In response to not listening to the broadcast information, determining the first position number as the target position number occupied by the current device; or,
[0100] In response to monitoring the first type of broadcast information, an occupied position number is determined based on the content of the first type of broadcast information, and the target position number is determined from unoccupied position numbers.
[0101] According to one or more embodiments of the present disclosure, a method for controlling a device is provided, which determines target broadcast information to be sent based on a monitoring result, including:
[0102] In response to not monitoring the broadcast information, determining that the target broadcast information is first-category broadcast information, and determining the content of the target broadcast information based on the target position number;
[0103] or,
[0104] In response to monitoring the first type of broadcast information, the target broadcast information is determined to be the second type of broadcast information, and the content of the target broadcast information is determined based on the target position number.
[0105] According to one or more embodiments of the present disclosure, a method for controlling a device is provided. If the target broadcast information is the first type of broadcast information, after sending the target broadcast information in the current environment, the method further includes:
[0106] Continue to monitor the broadcast information in the current environment;
[0107] In response to monitoring newly added second-category broadcast information sent by other devices, based on the content of the newly added second-category broadcast information, the content of the target broadcast information as the first-category broadcast information is changed and the changed target broadcast information is sent.
[0108] According to one or more embodiments of the present disclosure, a device control method is provided, wherein the first type of broadcast information includes n repeated first characters and mn repeated second characters, wherein the position of the first character in the first type of broadcast information represents an occupied position number, and the position of the second character in the first type of broadcast information represents an unoccupied position number;
[0109] and / or,
[0110] The second-type broadcast information includes 1 first character and (m-1) second characters, and the position of the first character in the second-type broadcast information indicates the position number occupied by the device sending the second-type broadcast information;
[0111] Among them, n is not less than 1, m is not less than 2, and m is not less than n.
[0112] According to one or more embodiments of the present disclosure, a method for controlling a device is provided, which satisfies at least one of the following conditions:
[0113] The current device is a handle of an extended reality device, and the extended reality device detects the target action in the target time period;
[0114] The other devices in the current environment are handles of other extended reality devices;
[0115] The executing target action includes: controlling the infrared light on the current device to light up;
[0116] The current cycle includes a preset number of time periods, and there are intervals between different time periods.
[0117] According to one or more embodiments of the present disclosure, there is provided a control device for a device, comprising:
[0118] A monitoring unit, used to monitor broadcast information in the current environment, wherein the broadcast information reflects the occupied position number;
[0119] A control unit, configured to determine, based on the monitoring result, the target position number occupied by the current device and the target broadcast information to be sent, wherein the content of the target broadcast information reflects the target position number occupied by the current device;
[0120] The control unit is further configured to send the target broadcast information in the current environment and perform the target action in the target time period of the preset cycle;
[0121] Wherein, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
[0122] According to one or more embodiments of the present disclosure, there is provided an electronic device, including: at least one memory and at least one processor;
[0123] The at least one memory is used to store program codes, and the at least one processor is used to call the program codes stored in the at least one memory to execute any one of the above methods.
[0124] According to one or more embodiments of the present disclosure, a computer-readable storage medium is provided, wherein the computer-readable storage medium is used to store program code, and when the program code is executed by a processor, the processor is prompted to execute the above method.
[0125] The above description is only a preferred embodiment of the present disclosure and an explanation of the technical principles used. Those skilled in the art should understand that the scope of disclosure involved in the present disclosure is not limited to the technical solutions formed by a specific combination of the above technical features, but should also cover other technical solutions formed by any combination of the above technical features or their equivalent features without departing from the above disclosed concept. For example, the above features are replaced with the technical features with similar functions disclosed in the present disclosure (but not limited to) by each other to form a technical solution.
[0126] In addition, although each operation is described in a specific order, this should not be understood as requiring these operations to be performed in the specific order shown or in a sequential order. Under certain circumstances, multitasking and parallel processing may be advantageous. Similarly, although some specific implementation details are included in the above discussion, these should not be interpreted as limiting the scope of the present disclosure. Some features described in the context of a separate embodiment can also be implemented in a single embodiment in combination. On the contrary, the various features described in the context of a single embodiment can also be implemented in multiple embodiments individually or in any suitable sub-combination mode.
[0127] Although the subject matter has been described in language specific to structural features and / or methodological logical actions, it should be understood that the subject matter defined in the appended claims is not necessarily limited to the specific features or actions described above. On the contrary, the specific features and actions described above are merely example forms of implementing the claims.
Claims
1. A method for controlling a device, characterized in that: include: Listen to the broadcast information in the current environment, which reflects the occupied position number; Based on the monitoring result, determine the target position number occupied by the current device and the target broadcast information to be sent, wherein the content of the target broadcast information reflects the target position number occupied by the current device; Send the target broadcast information in the current environment and perform the target action in the target time period in the preset cycle; Among them, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
2. The method according to claim 1, characterized in that The broadcast information includes first-category broadcast information and second-category broadcast information by type; the content of the first-category broadcast information reflects the position number occupied by the device in the current environment; the content of the second-category broadcast information reflects the position number occupied by the device sending the second-category broadcast information.
3. The method according to claim 2, characterized in that Based on the monitoring results, determine the target position number occupied by the current device in the preset period, including: In response to not listening to the broadcast information, determining the first position number as the target position number occupied by the current device; or, In response to monitoring the first type of broadcast information, an occupied position number is determined based on the content of the first type of broadcast information, and the target position number is determined from unoccupied position numbers.
4. The method according to claim 2 or 3, characterized in that: Based on the monitoring results, determine the target broadcast information to be sent, including: In response to not monitoring the broadcast information, determining that the target broadcast information is first-category broadcast information, and determining the content of the target broadcast information based on the target position number; or, In response to monitoring the first type of broadcast information, the target broadcast information is determined to be the second type of broadcast information, and the content of the target broadcast information is determined based on the target position number.
5. The method according to claim 4, characterized in that If the target broadcast information is the first type of broadcast information, after sending the target broadcast information in the current environment, the method further includes: Continue to monitor the broadcast information in the current environment; In response to monitoring newly added second-category broadcast information sent by other devices, based on the content of the newly added second-category broadcast information, the content of the target broadcast information as the first-category broadcast information is changed and the changed target broadcast information is sent.
6. The method according to claim 2, characterized in that The first type of broadcast information includes n repeated first characters and mn repeated second characters, wherein the position of the first character in the first type of broadcast information represents an occupied position number, and the position of the second character in the first type of broadcast information represents an unoccupied position number; and / or, The second-type broadcast information includes 1 first character and (m-1) second characters, and the position of the first character in the second-type broadcast information indicates the position number occupied by the device sending the second-type broadcast information; Among them, n is not less than 1, m is not less than 2, and m is not less than n.
7. The method according to claim 1, characterized in that Satisfy at least one of the following: The current device is a handle of an extended reality device, and the extended reality device detects the target action in the target time period; The other devices in the current environment are handles of other extended reality devices; The executing target action includes: controlling the infrared light on the current device to light up; The current cycle includes a preset number of time periods, and there are intervals between different time periods.
8. A control device for an equipment, comprising: A monitoring unit, used to monitor broadcast information in the current environment, wherein the broadcast information reflects the occupied position number; A control unit, configured to determine, based on the monitoring result, the target position number occupied by the current device and the target broadcast information to be sent, wherein the content of the target broadcast information reflects the target position number occupied by the current device; The control unit is further configured to send the target broadcast information in the current environment and perform the target action in the target time period in the preset cycle; Among them, different devices in the current environment occupy different position numbers, different position numbers correspond to different time periods in the preset cycle, and the target time period is the time period corresponding to the target position number in the preset cycle.
9. An electronic device, comprising: at least one memory and at least one processor; The at least one memory is used to store program code, and the at least one processor is used to call the program code stored in the at least one memory to execute the method according to any one of claims 1 to 7. 10 . A computer-readable storage medium, wherein the computer-readable storage medium is used to store program codes, wherein when the program codes are executed by a processor, the processor is prompted to execute the method according to claim 1 .