Equipment control method and device, medium and equipment
By using auxiliary equipment with wireless positioning modules to assist the remote control terminal in determining theoretical position information, the problem that the intelligent remote control requires all controlled devices to have positioning modules is solved, and the compatibility and cost reduction of the remote control for different devices is achieved.
Patent Information
- Application Number
- CN202510437340.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2025-06-24
AI Technical Summary
The existing smart remote control requires all controlled devices to have positioning modules, which leads to high costs and inability to compatible with old stock devices.
The auxiliary device with a wireless positioning module assists the remote control terminal in determining its theoretical position information and compares it with the actual position information to determine the target controlled device, thereby switching the control interface.
Without requiring all controlled devices to have positioning modules, the remote control has the ability to operate different types of devices, which improves compatibility between the remote control terminal and the controlled device, and reduces the costs incurred by additional positioning modules.
Smart Images

Figure CN120199059A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of device control, and in particular, to a device control method, device, medium, and device. Background Art
[0002] When a remote control with an intelligent pointing function on the current market controls a device, the device to be controlled itself needs to be equipped with a specific positioning module, such as a UWB (Ultra Wide Band) module or other similar modules that can achieve positioning through positioning technology, resulting in a small number of devices supported by the intelligent remote control. Only devices equipped with specific positioning modules are supported. However, if you want the remote control to have the ability to control different types of devices, each device to be controlled needs to carry a corresponding positioning module. However, this will not only increase costs but also be unable to be compatible with old and existing devices. Summary of the Invention
[0003] Embodiments of the present application provide a device control method, device, medium, and device. Using the device control method provided by the embodiments of the present application, it is possible to solve the problem that currently, all devices to be controlled need to have a positioning module in order to achieve the effect of controlling all devices to be controlled with one remote control, resulting in high manufacturing costs and inability to be compatible with old and existing devices.
[0004] On the one hand, an embodiment of the present application provides a device control method, which is applied to a remote control terminal. The method includes:
[0005] Receiving a device control request initiated based on the remote control terminal;
[0006] According to the device control request, using an auxiliary device with a wireless positioning module to determine the current first position coordinate of the remote control terminal;
[0007] According to the first position coordinate and the second position coordinate of the device to be controlled pre-bound to the remote control terminal, respectively calculating the theoretical position information of the remote control terminal relative to each device to be controlled;
[0008] Comparing each piece of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target device to be controlled one by one, and determining the target theoretical position information that meets the preset conditions from the comparison results;
[0009] Taking the device to be controlled corresponding to the target theoretical position information as the target device to be controlled currently controlled by the remote control terminal, and switching the control interface on the remote control terminal to the target control interface corresponding to the target device to be controlled.
[0010] Further, in the device control method described in the embodiments of the present application, before calculating the theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinate and the second position coordinate of the controlled device pre-bound to the remote control terminal, the method further includes:
[0011] Controlling the remote control terminal to emit two non-parallel rays at different positions aiming at the controlled device, namely the first ray and the second ray;
[0012] Determining the midpoint position coordinate of the straight line with the shortest distance between the first ray and the second ray;
[0013] Taking the midpoint position coordinate as the second position coordinate of the controlled device.
[0014] Further, in the device control method described in the embodiments of the present application, the determining the midpoint position coordinate of the straight line with the shortest distance between the first ray and the second ray includes:
[0015] Respectively obtaining the emission position coordinates of the first ray and the second ray;
[0016] According to the emission position coordinates, determining the midpoint position coordinate of the straight line with the shortest distance between the first ray and the second ray;
[0017] Taking the midpoint position coordinate as the second position coordinate of the controlled device.
[0018] Further, in the device control method described in the embodiments of the present application, the determining the midpoint position coordinate of the straight line with the shortest distance between the first ray and the second ray according to the emission position coordinates includes:
[0019] Obtaining a first horizontal angle and a first pitch angle of the first ray relative to the remote control terminal, and a second horizontal angle and a second pitch angle of the second ray relative to the remote control terminal;
[0020] Substituting the emission position coordinates, the first horizontal angle, the first pitch angle, the second horizontal angle and the second pitch angle into a preset midpoint determination algorithm for calculation to obtain the midpoint position coordinate of the straight line with the shortest distance between the first ray and the second ray.
[0021] Further, in the device control method described in the embodiments of the present application, the theoretical position information includes a theoretical horizontal angle and a theoretical pitch angle. Calculating the theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinate and the second position coordinate of the controlled device pre-bound to the remote control terminal includes:
[0022] Determine the connection lines between the remote control terminal and each of the controlled devices according to the first position coordinates and each of the second position coordinates;
[0023] Respectively determine the theoretical horizontal angle and the theoretical pitch angle corresponding to each of the connection lines.
[0024] Further, in the device control method described in the embodiments of the present application, the step of comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the currently targeted controlled device, and determining the target theoretical position information that meets the preset conditions from the comparison results includes:
[0025] Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently targeted controlled device one by one, and determine the target theoretical position information with the highest similarity to the actual position information from the comparison results.
[0026] Further, in the device control method described in the embodiments of the present application, the actual position information includes an actual horizontal angle and an actual pitch angle. The step of comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the currently targeted controlled device one by one, and determining the target theoretical position information that meets the preset conditions from the comparison results includes:
[0027] Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently targeted controlled device one by one, and determine the target theoretical position information that simultaneously satisfies that the difference between the theoretical horizontal angle and the actual horizontal angle is less than or equal to a first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle is less than or equal to a second preset threshold from the comparison results.
[0028] Correspondingly, another aspect of the embodiments of the present application further provides a device control device, which is applied to a remote control terminal. The device control device includes:
[0029] A receiving module, configured to receive a device control request initiated based on the remote control terminal;
[0030] A determining module, configured to determine the current first position coordinates of the remote control terminal according to the device control request by using an auxiliary device with a wireless positioning module;
[0031] A calculating module, configured to calculate the theoretical position information of the remote control terminal relative to each of the controlled devices respectively according to the first position coordinates and the second position coordinates of the controlled devices pre-bound to the remote control terminal;
[0032] A comparison module, configured to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed to, and determine target theoretical position information that meets a preset condition from the comparison results;
[0033] A switching module, configured to use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to a target control interface corresponding to the target controlled device.
[0034] Correspondingly, another aspect of the embodiments of the present application further provides a computer storage medium, where the computer storage medium stores multiple instructions, and the instructions are suitable for being loaded by a processor to execute the device control method as described above.
[0035] Correspondingly, another aspect of the embodiments of the present application further provides an electronic device, including a processor and a memory, where the memory stores multiple instructions, and the processor loads the instructions to execute the device control method as described above.
[0036] The embodiments of the present application provide a device control method, device, medium, and device. The method receives a device control request initiated based on a remote control terminal; according to the device control request, uses an auxiliary device with a wireless positioning module to determine the current first position coordinates of the remote control terminal; according to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal, calculates the theoretical position information of the remote control terminal relative to each controlled device respectively; compares each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed to, and determines target theoretical position information that meets a preset condition from the comparison results; uses the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switches the control interface on the remote control terminal to a target control interface corresponding to the target controlled device. By using the device control method provided by the embodiments of the present application, with the assistance of an auxiliary device with a wireless positioning module, the theoretical position information of the remote control terminal relative to each controlled device is determined, and based on the theoretical position information and the actual position information of the remote control terminal relative to the target controlled device currently pointed to, the target controlled device currently controlled by the remote control terminal is determined, so that the remote control can have the ability to control different types of devices without the need for all controlled devices to be equipped with positioning modules, which not only improves the compatibility between the remote control terminal and the controlled devices, but also reduces the cost of other controlled devices due to the additional positioning module. Description of the Drawings
[0037] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the accompanying drawings required for the description of the embodiments. Obviously, the accompanying drawings in the following description are only some embodiments of the present application. For those skilled in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0038] Figure 1 It is a schematic flowchart of the device control method provided by the embodiment of the present application.
[0039] Figure 2 It is a schematic diagram of the calibration process of the controlled device in the embodiment of the present application.
[0040] Figure 3 It is a schematic principle diagram of the calibration process of the controlled device in the embodiment of the present application.
[0041] Figure 4 It is a schematic structural diagram of the device control device provided by the embodiment of the present application.
[0042] Figure 5 It is another schematic structural diagram of the device control device provided by the embodiment of the present application.
[0043] Figure 6 It is a schematic structural diagram of the electronic device provided by the embodiment of the present application. Specific embodiments
[0044] The following will clearly and completely describe the technical solutions in the embodiments of the present application in conjunction with the accompanying drawings in the embodiments of the present application. Obviously, the described embodiments are only some embodiments of the present application, rather than all embodiments. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative efforts belong to the protection scope of the present application.
[0045] The embodiment of the present application provides a device control method. An auxiliary device with a wireless positioning module is used to assist in determining the theoretical position information of the remote control terminal relative to each controlled device. Based on the theoretical position information and the actual position information of the remote control terminal relative to the currently targeted controlled device, the target controlled device currently controlled by the remote control terminal is determined. Thus, without the need for all controlled devices to be equipped with positioning modules, the remote control can have the ability to control different types of devices, which not only improves the compatibility between the remote control terminal and the controlled devices, but also reduces the cost of other controlled devices due to the additional positioning module.
[0046] The term "and / or" appearing in this application can be an association relationship describing associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. Additionally, in this application, the character " / " generally indicates that the associated objects before and after are in an "or" relationship.
[0047] The terms "first", "second", etc. in the specification, claims, and the above-mentioned drawings of this application are used to distinguish similar objects and do not necessarily need to describe a specific order or sequence. It should be understood that such used data can be interchanged under appropriate circumstances so that the embodiments described here can be implemented in an order other than that illustrated or described here. In addition, the terms "comprise" and "have" and any variations thereof are intended to cover non-exclusive inclusion. For example, a process, method, system, product, or electronic device that includes a series of steps or modules does not necessarily have to be limited to those steps or modules clearly listed, but may include other steps or modules not clearly listed or inherent to these processes, methods, products, or electronic devices. The naming or numbering of steps that appear in this application does not mean that the steps in the method flow must be executed in the time / logical sequence indicated by the naming or numbering. The named or numbered process steps can be changed in the execution order according to the technical purpose to be achieved, as long as the same or similar technical effects can be achieved. The division of modules in this application is a logical division, and there can be other division methods in actual implementation. For example, multiple modules can be combined or integrated into another system, or some features can be ignored or not executed. Additionally, the shown or discussed coupling, direct coupling, or communication connection between each other can be through some interfaces, and the indirect coupling or communication connection between modules can be in an electrical or other similar form, which is not limited in this application. Moreover, the modules or sub-modules described as separate components can be physically separated or not, can be physical modules or not, or can be distributed to multiple circuit modules, and some or all of the modules can be selected according to actual needs to achieve the purpose of the solution of this application.
[0048] The device control method involved in the embodiments of this application is mainly applied to electronic devices, which can be remote controls, smartphones, tablets, laptops, desktop computers, servers, etc., without limitation here. Optionally, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers, or an IoT cloud (Internet of Things cloud) that provides the ability to store, process, and manage data generated by Internet of Things electronic devices, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communication, middleware services, domain name services, security services, Content Delivery Network (CDN), and big data and artificial intelligence platforms, without limitation here.
[0049] For ease of understanding, the specific process in the embodiments of this application is described below. Please refer to Figure 1 , Figure 1 which is a schematic flowchart of an embodiment of the device control method provided by the embodiments of this application.
[0050] In Figure 1 the embodiment shown, the method specifically includes the following steps:
[0051] S101, Receive a device control request initiated based on the remote control terminal.
[0052] It should be explained that the remote control terminal used in this solution refers to a conventional remote control or a mobile terminal capable of simulating the functions of a remote control, such as a mobile phone or a tablet computer, etc.
[0053] In this embodiment, when the user needs to operate the controlled device (such as an air conditioner or a TV, etc.) through the remote control terminal, first, a device control request needs to be received and initiated to the remote control terminal. The device control request can be triggered by physical buttons or touchscreens integrated on the remote control terminal. It can also be triggered by inputting voice commands through a voice control module integrated on the remote control terminal, etc., without limitation here.
[0054] S102, According to the device control request, use an auxiliary device with a wireless positioning module to determine the current first position coordinates of the remote control terminal.
[0055] It should be explained that the positioning module can be a UWB (Ultra Wide Band, a wireless carrier communication technology), or a StarFlash dongle (a small external device, usually connected to a computer or other devices through a USB interface, used to provide additional functions or connectivity), or other modules that can achieve positioning through positioning technology, without limitation here.
[0056] In this embodiment, an auxiliary device with a wireless positioning module (such as a TV, an air conditioner, or any one of the controlled devices) can assist in determining the current first position coordinates of the remote control terminal. Meanwhile, the obtained first position coordinates can be stored locally in the remote control terminal or in a cloud server.
[0057] S103. According to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal, calculate the theoretical position information of the remote control terminal relative to each of the controlled devices respectively.
[0058] It should be explained that the theoretical position information refers to the position information calculated according to a certain rule or algorithm when the current first position coordinates of the remote control terminal and the second position coordinates of the controlled device are known. The theoretical position information may include distance, direction angle, etc., which will be described in detail below.
[0059] S104. Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently specified target controlled device one by one, and determine the target theoretical position information that meets the preset conditions from the comparison results.
[0060] It should be explained that the actual position information refers to the position information of the remote control terminal relative to the currently specified target controlled device. The actual position information may include distance, direction angle, etc., but needs to correspond to the same category as the theoretical position information, which will be described in detail below.
[0061] In this embodiment, compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently specified target controlled device one by one, and determine the target theoretical position information that meets the preset conditions from the comparison results. It should be noted that the actual position information can be obtained through sensors (such as gyroscopes, accelerometers, etc.) built in the remote control terminal.
[0062] S105. Use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
[0063] In this embodiment, use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal. Switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device. The target control interface may include device status, control options, etc.
[0064] For example, assume that a user has three smart devices in a room: a TV, an air conditioner, and a light. The user presses the "Control" button on the remote control terminal to initiate a device control request for one of the smart devices. After analysis, the TV is taken as the target controlled device for the current control. At this time, the control interface of the remote control terminal is automatically switched to the TV control interface, and options such as the TV's power on / off, volume adjustment, and channel selection are displayed through the TV control interface.
[0065] An auxiliary device with a wireless positioning module is used to assist in determining the theoretical position information of the remote control terminal relative to each controlled device. Based on the theoretical position information and the actual position information of the remote control terminal relative to the currently targeted controlled device, the target controlled device currently controlled by the remote control terminal is determined. Thus, without the need for all controlled devices to have positioning modules, the remote control can be made capable of controlling different types of devices, which not only improves the compatibility between the remote control terminal and the controlled devices but also reduces the cost incurred by other controlled devices due to the additional positioning module. And there is no need for the user to manually switch the control interface when switching to control different controlled devices, thereby enhancing the user experience.
[0066] In some embodiments, calculating the second position coordinates of the controlled device pre-bound to the remote control terminal according to the first position coordinates includes:
[0067] Controlling the remote control terminal to emit two non-parallel rays at different positions towards the controlled device, namely the first ray and the second ray;
[0068] Determining the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray;
[0069] Taking the midpoint position coordinates as the second position coordinates of the controlled device.
[0070] As Figure 2 shown, in this embodiment, when initially determining the second position coordinates of the controlled device, it is necessary to ensure that the parameters involved in calculating the theoretical position information are obtained based on the same coordinate system. In this embodiment, the coordinate system is established with the position of the auxiliary device (Device 2) as the origin. The specific steps for calibrating the second position coordinates of the controlled device are as follows:
[0071] (1) Enter the device position calibration mode, and the remote control terminal provides a screen guide;
[0072] (2) The user manipulates the remote control terminal (smart remote control) to align it with the controlled device (Device 1) within a set distance range and triggers the first calibration. When determining whether it is aligned with the controlled device, the laser scan on the remote control can be used to make the laser point fall on the device;
[0073] (3) Move the remote control terminal within the required distance range, continue to aim at the controlled device, and make the laser point as close as possible to the point in step (2) until the remote control terminal gives a prompt to remind the user that they can press the second calibration to start triggering the second calibration. To make the parameters required for calculating the second position coordinates of the controlled device obtain unique values and conform as much as possible to the actual position where the controlled device is located, the condition for the remote control terminal to prompt that the second calibration can be triggered is that the first ray L1 and the second ray L2 are not parallel to each other, and the horizontal angle projected on the horizontal plane of the space coordinate system is greater than 45°.
[0074] (4) Determine the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray, and use the midpoint position coordinates as the second position coordinates of the controlled device.
[0075] In some embodiments, the determining the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray includes:
[0076] Obtain the emission position coordinates of the first ray and the second ray respectively;
[0077] According to the emission position coordinates, determine the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray;
[0078] Use the midpoint position coordinates as the second position coordinates of the controlled device.
[0079] In this embodiment, the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray are used as the second position coordinates of the controlled device. Assume that the auxiliary device is a device equipped with a UWB module. Then the emission position coordinates of the first ray and the second ray are calculated based on the auxiliary device and the UWB module installed in the remote control terminal. Since this technology is a known and mature technology, this solution will not be elaborated.
[0080] In some embodiments, the according to the emission position coordinates, determining the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray includes:
[0081] Obtain the first horizontal angle and the first pitch angle of the first ray relative to the remote control terminal, and the second horizontal angle and the second pitch angle of the second ray relative to the remote control terminal;
[0082] Substitute the emission position coordinates, the first horizontal angle, the first pitch angle, the second horizontal angle, and the second pitch angle into a preset midpoint determination algorithm for calculation to obtain the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray.
[0083] As Figure 3As shown in the figure, in this embodiment, it is assumed that point A is the position where the remote control terminal is calibrated for the first time, and point B is the position where the remote control terminal is calibrated for the second time. That is, point A and point B are the emission positions of the first ray and the second ray emission points respectively. The auxiliary device selects any controlled device equipped with a UWB module. At the same time, a UWB module corresponding to the auxiliary device is installed in the remote control terminal. The polar coordinate values of point A and point B relative to the auxiliary device can be calculated by the UWB module installed in the remote control terminal. Since this technology is a known and mature technology, this solution will not be elaborated. Let the coordinates of point A be The coordinates of point B are The first ray and the second ray are L1 and L2 respectively.
[0084] Convert the spherical coordinates to Cartesian coordinates:
[0085]
[0086] Get A(x1, y1, z1)
[0087]
[0088] Get B(x2, y2, z2)
[0089] Let α and β be the first horizontal angle and the first pitch angle at which the first ray L1 passes through point A, and γ and δ be the second horizontal angle and the second pitch angle at which the second ray L2 passes through point B. α and β, γ and δ can be directly given by modules such as gyroscopes and electronic compasses installed in the remote control terminal for measuring angles and directions. This part is a mature and known technology, and this solution will not be elaborated.
[0090] Then the direction vector of the first ray L1 can be expressed as The direction vector of the second ray L2 can be expressed as
[0091]
[0092] Let point p1 be on the first ray L1, point p2 be on the second ray L2, and the distance between p1 and p2 is the shortest. and can be respectively obtained through and the direction vector and be expressed as:
[0093]
[0094] where t and u are parameters.
[0095] According to the vector property, when the distance between p1 and p2 is the shortest, then and and are both perpendicular, we get:
[0096]
[0097] Substitute into the above two formulas, we get a system of linear equations about t and u:
[0098]
[0099] Solve it according to Cramer's rule:
[0100]
[0101]
[0102] If D = 0, the first ray is parallel to the second ray, and recalibration is required; if D ≠ 0, the two lines are not parallel, and there is a unique solution for t and u, we get:
[0103]
[0104] After obtaining t and u, substitute them back into the above and expressions, and the coordinates of p1 and p1 points are:
[0105]
[0106] and The coordinates of the midpoint M are
[0107] Express the coordinates of M as (x M , y M , z M )
[0108]
[0109] After t and u are calculated according to the above steps, they only contain variables x1, y1, z1, x2, y2, z2, a1, b1, c1, a2, b2, c2;
[0110] x1 = r1 * sinθ1cosφ1, y1 = r1 * sinθ1sinφ1, z1 = r1 * cosθ1
[0111] x2 = r2 * sinθ2cosφ2, y2 = r2 * sinθ2sinφ2, z2 = r2 * cosθ2
[0112] a1 = sinβcosα, b1 = sinβsinα, c1 = cosβ;
[0113] a2 = sinδcosγ, b2 = sinδsinγ, c2 = cosδ;
[0114] where r1, θ1, φ1 and r2, θ2, φ2 can be obtained by the UWB module in the remote control terminal; α and β, γ and δ can be obtained by the gyroscope and electronic compass in the remote control terminal. According to the above calculation steps and the above known values, the specific values of M(x M , y M , z M ) can be obtained. The coordinates of point M obtained can be regarded as the second position coordinates of the controlled device.
[0115] In some embodiments, the theoretical position information includes a theoretical horizontal angle and a theoretical pitch angle. Calculating the theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinates and the second position coordinates of the controlled devices pre-bound to the remote control terminal respectively includes:
[0116] Determining the connection lines between the remote control terminal and each of the controlled devices according to the first position coordinates and each of the second position coordinates;
[0117] Respectively determining the theoretical horizontal angle and the theoretical pitch angle corresponding to each of the connection lines.
[0118] In this embodiment, after the position calibration of the controlled device is completed according to the above method, any controlled device that has been calibrated can be controlled using the remote control terminal. When the remote control terminal points to the device, the control of the device pops up on the display screen of the remote control, and the user can perform the control. The steps for determining whether the remote control has pointed to the calibrated device are as follows:
[0119] Obtaining the current coordinates of the remote control:
[0120] The coordinates C(r3, θ3, φ3) of the current first position (hereinafter referred to as point C) of the remote control terminal obtained from the UWB module in the remote control terminal are converted into Cartesian coordinates C(x C , y C , z C ):
[0121] x C = r3*sinθ3cosφ3, y C = r3*sinθ3sinφ3, z C = r3*cosθ3
[0122] Calculate the theoretical horizontal angle and the theoretical pitch angle of the connection line L3 formed by the remote control terminal (point C) and each controlled device (hereinafter referred to as point M). And σ, the steps are as follows:
[0123] Calculate the direction vector
[0124] Calculate the direction cosine: The direction cosine is the cosine value of the angle between the vector and each coordinate axis. Let The direction cosine of be (cosα c , cosβ c , cosγ c ), then:
[0125]
[0126] The theoretical horizontal angle is the angle between the projection of the vector on the xy plane and the positive direction of the x axis. According to the direction cosines cosα c and cosβ c , we get:
[0127]
[0128] If x M = x C , (if y M - y C > 0) or (if y M - y C < 0)
[0129] The theoretical pitch angle σ: The theoretical pitch angle σ is the angle between the vector and the positive direction of the z axis (the z axis is upward as the positive direction). According to the direction cosine cosγ c and (that is The projection length on the xy plane), we get:
[0130]
[0131] If z C = z M , σ = 0 or σ = π.
[0132] In some embodiments, the comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the currently targeted controlled device, and determining the target theoretical position information that meets the preset conditions from the comparison results includes:
[0133] Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine the target theoretical position information with the highest similarity to the actual position information from the comparison results.
[0134] In this embodiment, the theoretical position information with the highest similarity to the actual position information can be determined from the comparison results as the target theoretical position information. It can be understood that the similarity calculation method can be calculated using the cosine similarity algorithm. Since this algorithm is a conventional technology, it will not be elaborated here.
[0135] In some embodiments, the actual position information includes an actual horizontal angle and an actual pitch angle. The step of comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determining the target theoretical position information that meets the preset conditions from the comparison results includes:
[0136] Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine the target theoretical position information that simultaneously satisfies that the difference between the theoretical horizontal angle and the actual horizontal angle is less than or equal to a first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle is less than or equal to a second preset threshold from the comparison results.
[0137] In this embodiment, the actual horizontal angle of the current remote control terminal is read from the gyroscope and electronic compass module in the remote control terminal and the actual pitch angle ρ. Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine the theoretical position information that simultaneously satisfies that the difference between the theoretical horizontal angle and the actual horizontal angle is less than or equal to a first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle is less than or equal to a second preset threshold as the target theoretical position information.
[0138] For example, when and |σ - ρ| < Δρ, it is determined that the remote control terminal is currently pointing at the above-mentioned calibrated target controlled device, and then the control interface of the remote control terminal jumps to the control interface corresponding to the target controlled device, and at that time, the user can control the target controlled device. Where and Δρ are the allowed error values preset in the remote control, and this value is set according to the measured error values of modules such as UWB, gyroscope, and electronic compass.
[0139] All of the above optional technical solutions can be combined arbitrarily to form optional embodiments of the present application, which will not be elaborated here one by one.
[0140] In specific implementation, the present application is not limited by the execution order of the described steps. Without conflict, some steps can also be performed in other orders or simultaneously.
[0141] As can be seen from the above, the device control method provided by the embodiment of the present application includes receiving a device control request initiated based on the remote control terminal; according to the device control request, using an auxiliary device with a wireless positioning module to determine the current first position coordinates of the remote control terminal; according to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal, respectively calculating the theoretical position information of the remote control terminal relative to each controlled device; comparing each piece of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and determining the target theoretical position information that meets the preset conditions from the comparison results; using the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switching the control interface on the remote control terminal to the target control interface corresponding to the target controlled device. By using the device control method provided by the embodiment of the present application, with the assistance of an auxiliary device with a wireless positioning module, the theoretical position information of the remote control terminal relative to each controlled device is determined, and based on the theoretical position information and the actual position information of the remote control terminal relative to the currently pointed target controlled device, the target controlled device currently controlled by the remote control terminal is determined. Thus, without the need for all controlled devices to have a positioning module, the remote control can have the ability to control different types of devices, which not only improves the compatibility between the remote control terminal and the controlled devices, but also reduces the cost of other controlled devices due to the additional positioning module.
[0142] The embodiment of the present application also provides a device control device, which can be integrated in an electronic device.
[0143] Please refer to Figure 4 , Figure 4 which is a schematic structural diagram of the device control device provided by the embodiment of the present application. The device control device 30 may include:
[0144] A receiving module 31, configured to receive a device control request initiated based on the remote control terminal;
[0145] A determining module 32, configured to determine the current first position coordinates of the remote control terminal according to the device control request by using an auxiliary device with a wireless positioning module;
[0146] A calculating module 33, configured to calculate the theoretical position information of the remote control terminal relative to each controlled device according to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal, respectively;
[0147] A comparison module 34, configured to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at one by one, and determine the target theoretical position information that meets the preset conditions from the comparison results;
[0148] A switching module 35, configured to use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
[0149] In some embodiments, the device further includes a calibration module, configured to control the remote control terminal to emit two non-parallel rays at different positions to the controlled device, namely a first ray and a second ray; determine the midpoint position coordinates of the shortest distance line between the first ray and the second ray; and use the midpoint position coordinates as the second position coordinates of the controlled device.
[0150] In some embodiments, the calibration module is configured to respectively obtain the emission position coordinates of the first ray and the second ray; determine the midpoint position coordinates of the shortest distance line between the first ray and the second ray according to the emission position coordinates; and use the midpoint position coordinates as the second position coordinates of the controlled device.
[0151] In some embodiments, the calibration module is configured to obtain a first horizontal angle and a first pitch angle of the first ray relative to the remote control terminal, and a second horizontal angle and a second pitch angle of the second ray relative to the remote control terminal; substitute the emission position coordinates, the first horizontal angle, the first pitch angle, the second horizontal angle and the second pitch angle into a preset midpoint determination algorithm for calculation to obtain the midpoint position coordinates of the shortest distance line between the first ray and the second ray.
[0152] In some embodiments, the calculation module 33 is configured to determine the connection lines between the remote control terminal and each of the controlled devices according to the first position coordinates and each of the second position coordinates; and respectively determine the theoretical horizontal angle and the theoretical pitch angle corresponding to each of the connection lines.
[0153] In some embodiments, the comparison module 34 is configured to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at one by one, and determine the target theoretical position information with the highest similarity to the actual position information from the comparison results.
[0154] In some embodiments, the comparison module 34 is configured to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine, from the comparison results, the target theoretical position information that simultaneously satisfies that the difference between the theoretical horizontal angle and the actual horizontal angle is less than or equal to a first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle is less than or equal to a second preset threshold.
[0155] In specific implementation, each of the above modules may be implemented as an independent entity, or may be arbitrarily combined and implemented as the same or several entities.
[0156] As can be seen from the above, for the device control device 30 provided in the embodiments of the present application, the receiving module 31 is configured to receive a device control request initiated based on the remote control terminal; the determining module 32 is configured to determine the current first position coordinates of the remote control terminal by using an auxiliary device with a wireless positioning module according to the device control request; the calculating module 33 is configured to calculate the theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal; the comparison module 34 is configured to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine the target theoretical position information that meets the preset conditions from the comparison results; the switching module 35 is configured to use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device. The device control device 30 provided in the embodiments of the present application assists in determining the theoretical position information of the remote control terminal relative to each controlled device through an auxiliary device with a wireless positioning module, and determines the target controlled device currently controlled by the remote control terminal based on the theoretical position information and the actual position information of the remote control terminal relative to the target controlled device currently pointed at, so that the remote controller has the ability to control different types of devices without the need for all controlled devices to have positioning modules, which not only improves the compatibility between the remote control terminal and the controlled devices, but also reduces the cost of other controlled devices due to the additional positioning module.
[0157] The embodiments of the present application further provide a device control device, and the device control device may be integrated in an electronic device.
[0158] In specific implementation, each of the above modules may be implemented as an independent entity, or may be arbitrarily combined and implemented as the same or several entities.
[0159] Please refer to Figure 5 , Figure 5Another schematic structural diagram of the device control device provided by the embodiment of the present application. The device control device 30 includes a memory 120, one or more processors 180, and one or more application programs. The one or more application programs are stored in the memory 120 and are configured to be executed by the processor 180. The processor 180 may include a receiving module 31, a determining module 32, a calculating module 33, a comparing module 34, and a switching module 35. For example, the structures and connection relationships of the above components may be as follows:
[0160] The memory 120 can be used to store application programs and data. The application programs stored in the memory 120 contain executable codes. The application programs can form various functional modules. The processor 180 executes various functional applications and data processing by running the application programs stored in the memory 120. In addition, the memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other volatile solid-state storage devices. Correspondingly, the memory 120 may also include a memory controller to provide the processor 180 with access to the memory 120.
[0161] The processor 180 is the control center of the device, connects various parts of the entire terminal using various interfaces and lines, and executes various functions of the device and processes data by running or executing the application programs stored in the memory 120 and calling the data stored in the memory 120, thereby performing overall monitoring of the device. Optionally, the processor 180 may include one or more processing cores; preferably, the processor 180 may integrate an application processor and a modulation and demodulation processor, where the application processor mainly processes the operating system, user interface, and application programs, etc.
[0162] Specifically in this embodiment, the processor 180 will, according to the following instructions, load the executable codes corresponding to the processes of one or more application programs into the memory 120, and the processor 180 will run the application programs stored in the memory 120 to implement various functions:
[0163] A receiving instruction, used to receive a device control request initiated based on the remote control terminal;
[0164] A determining instruction, used to determine the current first position coordinates of the remote control terminal according to the device control request by using an auxiliary device with a wireless positioning module;
[0165] A calculating instruction, used to respectively calculate the theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinates and the second position coordinates of the controlled devices pre-bound to the remote control terminal;
[0166] A comparison instruction for comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed to one by one, and determining the target theoretical position information that meets the preset conditions from the comparison results;
[0167] A switching instruction for using the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switching the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
[0168] In some embodiments, the program further includes a calibration instruction for controlling the remote control terminal to emit two non-parallel rays at different positions to the controlled device, namely a first ray and a second ray; determining the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray; and using the midpoint position coordinates as the second position coordinates of the controlled device.
[0169] In some embodiments, the calibration instruction is used to respectively obtain the emission position coordinates of the first ray and the second ray; determine the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray according to the emission position coordinates; and use the midpoint position coordinates as the second position coordinates of the controlled device.
[0170] In some embodiments, the calibration instruction is used to obtain the first horizontal angle and the first pitch angle of the first ray relative to the remote control terminal, and the second horizontal angle and the second pitch angle of the second ray relative to the remote control terminal; substitute the emission position coordinates, the first horizontal angle, the first pitch angle, the second horizontal angle and the second pitch angle into a preset midpoint determination algorithm for calculation to obtain the midpoint position coordinates of the straight line with the shortest distance between the first ray and the second ray.
[0171] In some embodiments, the calculation instruction is used to determine the connection lines between the remote control terminal and each of the controlled devices according to the first position coordinates and each of the second position coordinates; and respectively determine the theoretical horizontal angle and the theoretical pitch angle corresponding to each of the connection lines.
[0172] In some embodiments, the comparison instruction is used to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed to one by one, and determine the target theoretical position information with the highest similarity to the actual position information from the comparison results.
[0173] In some embodiments, the comparison instruction is used to compare each piece of the theoretical position information with the actual position information of the remote control terminal relative to the currently targeted controlled device one by one, and determine, from the comparison results, the target theoretical position information that simultaneously satisfies that the difference between the theoretical horizontal angle and the actual horizontal angle is less than or equal to a first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle is less than or equal to a second preset threshold.
[0174] Embodiments of the present application further provide an electronic device. Please refer to Figure 6 , Figure 6 which shows a schematic structural diagram of the electronic device provided by the embodiments of the present application. This electronic device can be used to implement the device control method provided in the above embodiments. The electronic device 1200 can be a remote control or a mobile phone, etc.
[0175] As Figure 6 shown, the electronic device 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more (only one is shown in the figure) computer-readable storage media, an input unit 130, a display unit 140, a sensor 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more (only one is shown in the figure) processing cores, and a power supply 190, etc. Those skilled in the art can understand that Figure 6 the structure of the electronic device 1200 shown in
[0176] does not constitute a limitation on the electronic device 1200, and it may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements. Among them:
[0177] The memory 120 can be used to store software programs and modules, such as the program instructions / modules corresponding to the device control method in the above embodiments. The processor 180 executes various functional applications and data processing by running the software programs and modules stored in the memory 120, and can automatically select a vibration reminder mode for device control according to the current scenario where the electronic device is located, which can not only ensure that the meeting and other scenarios are not disturbed, but also ensure that the user can perceive incoming calls, improving the intelligence of the electronic device. The memory 120 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memories, or other non-volatile solid-state memories. In some instances, the memory 120 may further include a memory remotely provided with respect to the processor 180, and these remote memories can be connected to the electronic device 1200 through a network. Examples of the above network include but are not limited to the Internet, enterprise intranet, local area network, mobile communication network, and combinations thereof.
[0178] The input unit 130 can be used to receive input digital or character information, and generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. Specifically, the input unit 130 may include a touch-sensitive surface 131 and other input electronic devices 132. The touch-sensitive surface 131, also known as a touch display screen or a touchpad, can collect touch operations of the user on or near it (such as operations of the user using a finger, a stylus, or any suitable object or accessory on or near the touch-sensitive surface 131), and drive the corresponding connection device according to a pre-set program. Optionally, the touch-sensitive surface 131 may include two parts: a touch detection device and a touch controller. Among them, the touch detection device detects the touch orientation of the user, detects the signal brought by the touch operation, and transmits the signal to the touch controller; the touch controller receives the touch information from the touch detection device, converts it into touch point coordinates, and then sends it to the processor 180, and can receive and execute the commands sent by the processor 180. In addition, the touch-sensitive surface 131 can be implemented in multiple types such as resistive, capacitive, infrared, and surface acoustic wave. In addition to the touch-sensitive surface 131, the input unit 130 may further include other input electronic devices 132. Specifically, the other input electronic devices 132 may include but are not limited to one or more of a physical keyboard, function keys (such as volume control keys, power-on keys, etc.), trackballs, mice, joysticks, etc.
[0179] The display unit 140 can be used to display information input by the user or information provided to the user, as well as various graphical user interfaces of the electronic device 1200. These graphical user interfaces can be composed of graphics, text, icons, videos, and any combination thereof. The display unit 140 may include a display panel 141. Optionally, the display panel 141 can be configured in the form of an LCD (Liquid Crystal Display), an OLED (Organic Light-Emitting Diode), etc. Further, the touch-sensitive surface 131 can cover the display panel 141. When the touch-sensitive surface 131 detects a touch operation on or near it, it is transmitted to the processor 180 to determine the type of touch event. Subsequently, the processor 180 provides a corresponding visual output on the display panel 141 according to the type of touch event. Although in Figure 6 the touch-sensitive surface 131 and the display panel 141 are implemented as two independent components to perform input and output functions, in some embodiments, the touch-sensitive surface 131 and the display panel 141 can be integrated to implement input and output functions.
[0180] The electronic device 1200 may further include at least one sensor 150, such as a light sensor, a motion sensor, and other sensors. Specifically, the light sensor may include an ambient light sensor and a proximity sensor. Among them, the ambient light sensor can adjust the brightness of the display panel 141 according to the brightness of the ambient light, and the proximity sensor can turn off the display panel 141 and / or the backlight when the electronic device 1200 is moved to the ear. As a kind of motion sensor, the gravity acceleration sensor can detect the magnitude of acceleration in all directions (generally three axes). When stationary, it can detect the magnitude and direction of gravity, and can be used for applications that identify the posture of the mobile phone (such as horizontal and vertical screen switching, related games, magnetometer posture calibration), vibration recognition related functions (such as pedometer, tapping), etc.; as for other sensors such as gyroscopes, barometers, hygrometers, thermometers, and infrared sensors that the electronic device 1200 can also be configured with, they will not be elaborated here.
[0181] The audio circuit 160, the speaker 161, and the microphone 162 can provide an audio interface between the user and the electronic device 1200. The audio circuit 160 can transmit the electrical signal converted from the received audio data to the speaker 161, and the speaker 161 converts it into a sound signal for output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, which is received by the audio circuit 160 and then converted into audio data. After the audio data is output to the processor 180 for processing, it is sent through the RF circuit 110 to, for example, another terminal, or the audio data is output to the memory 120 for further processing. The audio circuit 160 may further include an earphone jack to provide communication between the peripheral earphone and the electronic device 1200.
[0182] The electronic device 1200 can help users send and receive emails, browse the web, and access streaming media through a transmission module 170 (such as a Wi-Fi module), providing users with wireless broadband Internet access. Although Figure 6 the transmission module 170 is shown, it can be understood that it is not an essential component of the electronic device 1200 and can be omitted entirely within the scope of not changing the essence of the invention as needed.
[0183] The processor 180 is the control center of the electronic device 1200, connecting various parts of the entire mobile phone through various interfaces and circuits. By running or executing software programs and / or modules stored in the memory 120, and by calling data stored in the memory 120, it performs various functions of the electronic device 1200 and processes data, thereby monitoring the mobile phone as a whole. Optionally, the processor 180 may include one or more processing cores; in some embodiments, the processor 180 may integrate an application processor and a modem processor, where the application processor mainly processes the operating system, user interface, and application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 180 either.
[0184] The electronic device 1200 further includes a power supply 190 for powering each component. In some embodiments, the power supply can be logically connected to the processor 180 through a power management system, thereby realizing functions such as management of discharging and power consumption management through the power management system. The power supply 190 may also include any components such as one or more DC or AC power supplies, a recharge system, a power failure detection circuit, a power converter or inverter, a power status indicator, etc.
[0185] Although not shown, the electronic device 1200 may also include a camera (such as a front camera, a rear camera), a Bluetooth module, etc., which will not be elaborated here. Specifically, in this embodiment, the display unit 140 of the electronic device 1200 is a touch screen display, and the electronic device 1200 further includes a memory 120, and one or more programs, where one or more programs are stored in the memory 120 and are configured to be executed by one or more processors 180. The one or more programs include instructions for performing the following operations:
[0186] A receiving instruction, for receiving a device control request initiated based on the remote control terminal;
[0187] A determining instruction, for determining the current first position coordinates of the remote control terminal according to the device control request by using an auxiliary device with a wireless positioning module;
[0188] A calculation instruction for calculating the theoretical position information of the remote control terminal relative to each controlled device respectively according to the first position coordinate and the second position coordinate of the controlled device pre-bound to the remote control terminal.
[0189] A comparison instruction for comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and determining the target theoretical position information that meets the preset conditions from the comparison results.
[0190] A switching instruction for using the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switching the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
[0191] In some embodiments, the program further includes a calibration instruction for controlling the remote control terminal to emit two non-parallel rays at different positions to align with the controlled device, namely the first ray and the second ray; determining the midpoint position coordinate of the shortest distance straight line between the first ray and the second ray; and using the midpoint position coordinate as the second position coordinate of the controlled device.
[0192] In some embodiments, the calibration instruction is used to respectively obtain the emission position coordinates of the first ray and the second ray; determine the midpoint position coordinate of the shortest distance straight line between the first ray and the second ray according to the emission position coordinates; and use the midpoint position coordinate as the second position coordinate of the controlled device.
[0193] In some embodiments, the calibration instruction is used to obtain the first horizontal angle and the first pitch angle of the first ray relative to the remote control terminal, and the second horizontal angle and the second pitch angle of the second ray relative to the remote control terminal; substitute the emission position coordinates, the first horizontal angle, the first pitch angle, the second horizontal angle and the second pitch angle into a preset midpoint determination algorithm for calculation to obtain the midpoint position coordinate of the shortest distance straight line between the first ray and the second ray.
[0194] In some embodiments, the calculation instruction is used to determine the connection lines between the remote control terminal and each controlled device according to the first position coordinate and each second position coordinate; and respectively determine the theoretical horizontal angle and the theoretical pitch angle corresponding to each connection line.
[0195] In some embodiments, the comparison instruction is used to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and determine the target theoretical position information with the highest similarity to the actual position information from the comparison results.
[0196] In some embodiments, the comparison instruction is used to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine, from the comparison results, the target theoretical position information that simultaneously satisfies that the difference between the theoretical horizontal angle and the actual horizontal angle is less than or equal to a first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle is less than or equal to a second preset threshold.
[0197] An embodiment of the present application further provides an electronic device. The electronic device may be a device such as a remote control or a mobile phone.
[0198] As can be seen from the above, an embodiment of the present application provides an electronic device 1200, and the electronic device 1200 performs the following steps:
[0199] Receive a device control request initiated based on the remote control terminal;
[0200] According to the device control request, use an auxiliary device with a wireless positioning module to determine the current first position coordinates of the remote control terminal;
[0201] According to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal, respectively calculate the theoretical position information of the remote control terminal relative to each of the controlled devices;
[0202] Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed at, and determine, from the comparison results, the target theoretical position information that satisfies the preset conditions;
[0203] Use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
[0204] An embodiment of the present application further provides a storage medium, in which a computer program is stored. When the computer program runs on a computer, the computer performs the following steps:
[0205] Receive a device control request initiated based on the remote control terminal;
[0206] According to the device control request, use an auxiliary device with a wireless positioning module to determine the current first position coordinates of the remote control terminal;
[0207] According to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal, respectively calculate the theoretical position information of the remote control terminal relative to each of the controlled devices;
[0208] Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the target controlled device currently pointed to, and determine the target theoretical position information that meets the preset conditions from the comparison results;
[0209] Use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
[0210] It should be noted that for the device control method described in this application, those of ordinary skill in the art can understand that all or part of the process of implementing the device control method described in the embodiments of this application can be completed by controlling related hardware through a computer program. The computer program can be stored in a computer-readable storage medium, such as stored in the memory of an electronic device and executed by at least one processor in the electronic device. During the execution process, it can include the process of the embodiments of the device control method. Among them, the storage medium can be a magnetic disk, an optical disc, a read-only memory (ROM, Read Only Memory), a random access memory (RAM, Random Access Memory), etc.
[0211] For the device control device described in the embodiments of this application, its various functional modules can be integrated in a processing chip, or each module can exist physically alone, or two or more modules can be integrated in one module. The above integrated modules can be implemented in the form of hardware or in the form of software functional modules. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium, such as a read-only memory, a magnetic disk or an optical disc, etc.
[0212] The device control method, device, medium and device provided in the embodiments of this application have been introduced in detail above. Specific examples are used in this article to elaborate on the principle and implementation manner of this application. The description of the above embodiments is only used to help understand the method and its core idea of this application; at the same time, for those skilled in the art, according to the idea of this application, there will be changes in the specific implementation manner and application scope. In summary, the content of this specification should not be construed as a limitation to this application.
Claims
1. A device control method, applied to a remote control terminal, characterized in that: include: Receiving a device control request initiated by the remote control terminal; According to the device control request, using an auxiliary device with a wireless positioning module to determine the current first position coordinates of the remote control terminal; Calculating theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinates and the second position coordinates of the controlled devices pre-bound to the remote control terminal; Compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and determine the target theoretical position information that meets the preset conditions from the comparison results; The controlled device corresponding to the target theoretical position information is used as the target controlled device currently controlled by the remote control terminal, and the control interface on the remote control terminal is switched to the target control interface corresponding to the target controlled device.
2. The device control method according to claim 1, characterized in that: Before respectively calculating theoretical position information of the remote control terminal relative to each of the controlled devices based on the first position coordinates and the second position coordinates of the controlled devices pre-bound to the remote control terminal, the method further includes: Control the remote control terminal to emit two non-parallel rays, namely a first ray and a second ray, at different positions toward the controlled device; Determine the midpoint position coordinates of the shortest distance straight line between the first ray and the second ray; The midpoint position coordinates are used as the second position coordinates of the controlled device.
3. The device control method according to claim 2, characterized in that: The determining of the midpoint position coordinates of the shortest distance straight line between the first ray and the second ray includes: Respectively obtaining emission position coordinates of the first ray and the second ray; Determining the midpoint position coordinates of the shortest distance straight line between the first ray and the second ray according to the emission position coordinates; The midpoint position coordinates are used as the second position coordinates of the controlled device.
4. The device control method according to claim 3, characterized in that: The step of determining the midpoint position coordinates of the shortest distance straight line between the first ray and the second ray according to the emission position coordinates includes: Acquire a first horizontal angle and a first pitch angle of the first ray relative to the remote control terminal, and a second horizontal angle and a second pitch angle of the second ray relative to the remote control terminal; Substitute the emission position coordinates, the first horizontal angle, the first pitch angle, the second horizontal angle and the second pitch angle into a preset midpoint determination algorithm for calculation to obtain the midpoint position coordinates of the shortest distance straight line between the first ray and the second ray.
5. The device control method according to claim 1, characterized in that: The theoretical position information includes a theoretical horizontal angle and a theoretical pitch angle, and the calculating of the theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinates and the second position coordinates of the controlled device pre-bound to the remote control terminal includes: Determine a connection line between the remote control terminal and each controlled device according to the first position coordinates and each of the second position coordinates; The theoretical horizontal angle and the theoretical pitch angle corresponding to each of the connecting lines are determined respectively, and the theoretical position information of the remote control terminal relative to each of the controlled devices is obtained.
6. The device control method according to claim 1, characterized in that: The step of comparing each of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and determining the target theoretical position information satisfying the preset conditions from the comparison results, comprises: Each of the theoretical position information is compared with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and the target theoretical position information having the highest similarity with the actual position information is determined from the comparison result.
7. The device control method according to claim 3, characterized in that: The actual position information includes an actual horizontal angle and an actual pitch angle, and the theoretical position information is compared one by one with the actual position information of the remote control terminal relative to the currently pointed target controlled device, and the target theoretical position information that meets the preset conditions is determined from the comparison results, including: The theoretical position information of each item is compared with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and the target theoretical position information that satisfies both the difference between the theoretical horizontal angle and the actual horizontal angle being less than or equal to the first preset threshold, and the difference between the theoretical pitch angle and the actual pitch angle being less than or equal to the second preset threshold is determined from the comparison result.
8. A device control device, applied to a remote control terminal, characterized in that: The equipment control device comprises: A receiving module, used for receiving a device control request initiated by the remote control terminal; A determination module, configured to determine the current first position coordinates of the remote control terminal using an auxiliary device with a wireless positioning module according to the device control request; a calculation module, configured to calculate theoretical position information of the remote control terminal relative to each of the controlled devices according to the first position coordinates and the second position coordinates of the controlled devices pre-bound to the remote control terminal; A comparison module, used to compare each of the theoretical position information with the actual position information of the remote control terminal relative to the currently pointed target controlled device one by one, and determine the target theoretical position information that meets the preset conditions from the comparison results; The switching module is used to use the controlled device corresponding to the target theoretical position information as the target controlled device currently controlled by the remote control terminal, and switch the control interface on the remote control terminal to the target control interface corresponding to the target controlled device.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a plurality of instructions, and the instructions are suitable for being loaded by a processor to execute the device control method according to any one of claims 1 to 7.
10. An electronic device, characterized in that: The device comprises a processor and a memory, wherein the memory stores a plurality of instructions, and the processor loads the instructions to execute the device control method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Intelligent remote control method, system and intelligent controller
CN107067695A
Remote control method and device
CN107203178A
Terminal control method and device and wireless access point equipment
CN108632744A
Control method and device, remote control equipment and readable storage medium
CN112799418A
Equipment control method, device and system, storage medium and electronic device
CN112838968A