A remote control method, device, apparatus and computer storage medium

CN119966974BActive Publication Date: 2026-01-02临海市新睿电子科技股份有限公司
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202510086506.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2026-01-02
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

但是,在数据传输过程中,存在网络延迟,导致数据传输不及时,所以,如何能够降低延迟是亟需解决的问题

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119966974B_ABST
    Figure CN119966974B_ABST
Patent Text Reader

Abstract

The application relates to the technical field of the Internet of Things, in particular to a remote control method and device, equipment and a computer storage medium, the method comprises the following steps: acquiring user information; judging whether the user information has control authority; if the user information has control authority, receiving a user instruction; acquiring a target device based on the user instruction and a device list; establishing a WebRTC data channel based on a stun server and the target device; and sending a remote control signal to the target device based on the user instruction and the WebRTC data channel. The application has the effect of reducing data transmission delay.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of Internet of Things, and in particular to a remote control method and device, equipment and computer storage medium. BACKGROUND

[0002] With the development of technology, for some devices, remote control is needed, that is, a user can control the device through a network from a remote place.

[0003] In the control process, not only the operation instruction of the user needs to be transmitted to the device, but also the feedback data of the device needs to be transmitted to the user, so that the user can understand the data and state of the device while realizing remote control. However, in the data transmission process, there is network delay, which leads to untimely data transmission, so how to reduce the delay is a problem to be solved. SUMMARY

[0004] In order to reduce the data transmission delay, the present application provides a remote control method, device, equipment and computer storage medium.

[0005] The remote control method provided by the present application adopts the following technical scheme:

[0006] A remote control method comprises:

[0007] obtaining user information;

[0008] judging whether the user information has control authority;

[0009] if the user information has control authority, receiving a user instruction;

[0010] obtaining a target device based on the user instruction and a device list;

[0011] establishing a WebRTC data channel based on a stun server and the target device;

[0012] sending a remote control signal to the target device based on the user instruction and the WebRTC data channel.

[0013] By adopting the technical scheme, the electronic device acquires user information, and then verifies the user information, that is, judges whether the user information has control authority. If the user information has control authority, it indicates that the user can input an instruction to remotely control the operation of the device. After the electronic device receives the user instruction, the electronic device acquires a target device based on the user instruction and the device list, that is, finds the device needed to be remotely controlled by the user, and then the electronic device establishes a WebRTC data channel with the target device based on a stun server. After that, the electronic device sends a remote control signal to the target device based on the user instruction and the WebRTC data channel, thereby completing the remote operation of the device. The establishment of the WebRTC data channel can improve the data transmission efficiency and reduce the delay, thereby improving the real-time performance. In addition, the WebRTC data channel has the characteristics of high security and good compatibility.

[0014] Optionally, the establishing of the WebRTC data channel based on the stun server and the target device comprises:

[0015] sending request information to the stun server to acquire the nat information of the target device;

[0016] The nat information comprises a nat type and a nat external IP address.

[0017] nat traversal based on an ICE protocol and the nat information;

[0018] judging whether the nat traversal is successful;

[0019] if successful, establishing a WebRTC data channel with the target device;

[0020] if unsuccessful, relaying data based on a TURN server to perform data transmission with the target device.

[0021] By adopting the technical scheme, the IEC protocol technology can be used to realize communication in a complex network environment. The established WebRTC data channel can improve the data transmission efficiency and reduce the delay. In the case where the WebRTC data channel cannot be established, the TURN server can be used to relay data, and data transmission can also be performed.

[0022] Optionally, before the sending of the remote control signal to the target device based on the user instruction and the WebRTC data channel, the method further comprises:

[0023] real-time acquisition of a working state of the target device;

[0024] judging whether the working state meets a control requirement;

[0025] if the control requirement is met, a step of sending a remote control signal to the target device based on the user instruction and the WebRTC data channel is performed;

[0026] if the control requirement is not met, a first prompt signal is output.

[0027] By adopting the technical solution, before sending the remote control signal, the electronic device acquires the working state of the target device in real time, and then judges whether the target device is in a state meeting the control requirement, that is, judges whether the target device can be remotely controlled. If the target device meets the control requirement, the electronic device performs the step of sending the remote control signal. If the target device does not meet the control requirement, the electronic device outputs the first prompt signal to prompt the user that the target device cannot be controlled at this time.

[0028] Optionally, when the working state does not meet the control requirement, the method further comprises:

[0029] packing the received user instruction to obtain an instruction group;

[0030] sending the instruction group to the target device;

[0031] after the working state changes from not meeting the control requirement to meeting the control requirement, the method comprises:

[0032] acquiring a first instruction input by the user;

[0033] judging whether the first instruction is the same as the last user instruction in the instruction group;

[0034] if the first instruction is the same as the last user instruction in the instruction group, a parsing signal is output to make the target device parse the instruction group and be controlled by the instruction group.

[0035] By adopting the technical solution, when the working state of the target device does not meet the control requirement, the electronic device packs the received user instruction to obtain an instruction group, and sends the instruction group to the target device. After the working state changes from not meeting the control requirement to meeting the control requirement, the electronic device acquires a first instruction input by the user. Then, the electronic device judges whether the first instruction is the same as the last user instruction in the instruction group. If the first instruction is the same as the last user instruction in the instruction group, it is determined that the user needs to remotely control the target device according to the previously input instruction. Therefore, the electronic device outputs a parsing signal to the target device, so that the target device parses the instruction group and is controlled by the instruction group. The convenience can be improved. Even if the target device cannot respond when the user inputs the instruction, the instruction can be pre-stored, and after the target device changes, the instruction group is executed, which can improve the convenience of the user.

[0036] Optionally, before the parsing signal is output, the method further comprises:

[0037] determining whether other user instructions in the instruction group are associated with the first instruction;

[0038] if associated, performing the step of outputting the parsed signal;

[0039] if not associated, outputting a second prompt signal;

[0040] determining whether a user input confirmation signal is received based on the second prompt signal;

[0041] if the user input confirmation signal is received, performing the step of outputting the parsed signal.

[0042] By using the above technical solution, before the electronic device outputs the parsed signal, the electronic device determines whether other user instructions in the instruction group except the last user instruction are associated with the first instruction. If associated, it is determined that other user instructions in the instruction group are also required to be executed by the target device, so the electronic device executes the step of outputting the parsed signal. If not associated, the electronic device outputs a second prompt signal, and then determines whether a user input confirmation signal is received based on the second prompt signal. If the confirmation signal is received, it indicates that the user still needs to execute other user instructions, instead of only executing the first instruction, so the electronic device still executes the step of outputting the parsed signal after receiving the confirmation signal.

[0043] Optionally, the method further comprises:

[0044] acquiring feedback data of the target device in real time;

[0045] determining whether the feedback data is continuous data;

[0046] if the feedback data is not the continuous data, acquiring a supplementary strategy;

[0047] sending a supplementary signal to the target device based on the supplementary strategy, so that the target device supplements missing data;

[0048] the supplementary strategy comprises:

[0049] controlling the target device to acquire the missing data;

[0050] acquiring start data and end data based on the missing data, and sending the start data and the end data;

[0051] wherein the start data is the first generated data in the missing data, and the end data is the last generated data in the missing data;

[0052] acquiring intermediate data based on the missing data, and sending the intermediate data;

[0053] The intermediate data is data generated at an intermediate time point in the missing data.

[0054] The first remaining data generated after the intermediate data is transmitted as first starting time point data.

[0055] The second remaining data generated after the starting data is transmitted as second starting time point data.

[0056] By adopting the above technical solution, the electronic device obtains the feedback data of the target device in real time, and then judges whether the feedback data is continuous data, that is, whether there is missing feedback data. If the feedback data is not continuous data, it indicates that there is missing data, and the target device needs to complete the missing data. Therefore, the electronic device obtains a supplement strategy, and then sends a supplement signal to the target device based on the supplement strategy, so that the target device supplements the missing data. The specific supplement strategy includes controlling the target device to obtain the missing data, then controlling the target device to obtain the starting data and the ending data based on the missing data, and sending the starting data and the ending data to the electronic device. Then control the target device to obtain the intermediate data based on the missing data, and send the intermediate data to the electronic device. Then the first remaining data after the intermediate data is sent to the electronic device in succession, and finally the data after the starting data is sent to the electronic device in succession. In the case of normal data transmission, the missing data is sent to the electronic device, which reduces the possibility of increasing real-time data delay. And the starting data and the ending data are sent first, and then the intermediate data is sent, which is convenient for judging whether the target device of the missing data device has a large change. If there is a change, the change trend can be roughly understood. Then the first remaining data after the intermediate data is sent to the electronic device, which can first obtain data closer to the current time, and can first understand the change closer to the current time during the missing data period, so as to make better response for the user.

[0057] Optionally, before the electronic device sends the supplement signal to the target device based on the supplement strategy, the electronic device further includes:

[0058] Obtain the initial time point and the cutoff time point of the missing feedback data;

[0059] Obtain the feedback data within a first preset time before the initial time point, and take the obtained feedback data as first feedback data;

[0060] Obtain the feedback data within a second preset time after the cutoff time point, and take the obtained feedback data as second feedback data;

[0061] determining whether the first feedback data and the second feedback data are different;

[0062] if the first feedback data and the second feedback data are not different, not performing the step of sending a supplementary signal to the target device based on the supplementary strategy

[0063] if the first feedback data and the second feedback data are different, determining whether the difference meets a preset requirement;

[0064] if the difference meets the preset requirement, not performing the step of sending a supplementary signal to the target device based on the supplementary strategy.

[0065] By using the above technical solution, before the electronic device sends a supplementary signal to the target device based on a supplementary strategy, the electronic device acquires an initial time and a cutoff time of missing feedback data, then acquires feedback data within a first preset time before the initial time, i.e., acquires first feedback data, then acquires second feedback data, and then the electronic device determines whether the first feedback data and the second feedback data are different. If there is no difference, it is determined that the target device has not changed to a large extent, so the step of sending a supplementary signal is not performed, i.e., the missing feedback data does not need to be completed. If there is a difference, it is determined whether the difference meets a preset requirement. If the preset requirement is met, data completion is not needed.

[0066] In a second aspect, the application provides a remote control device using the following technical solution:

[0067] A remote control device comprises:

[0068] a first acquisition module configured to acquire user information;

[0069] a determination module configured to determine whether the user information has control authority. If the user information has control authority, a user instruction is received;

[0070] a second acquisition module configured to acquire a target device based on the user instruction and a device list;

[0071] an establishment module configured to establish a WebRTC data channel with the target device based on a STUN server;

[0072] a sending module configured to send a remote control signal to the target device based on the user instruction and the WebRTC data channel.

[0073] In a third aspect, the application provides an electronic device using the following technical solution:

[0074] An electronic device includes a processor coupled with a memory; the processor is configured to execute a computer program stored in the memory to cause the electronic device to perform a remote control method according to the first aspect.

[0075] In a fourth aspect, the present application provides a computer readable storage medium, which employs the technical scheme as follows:

[0076] A computer readable storage medium includes a computer program or instructions, which, when executed on a computer, cause the computer to perform a remote control method according to the first aspect. BRIEF DESCRIPTION OF DRAWINGS

[0077] Figure 1 is a flowchart of the remote control method according to the embodiments of the present application.

[0078] Figure 2 is a block diagram of the remote control device according to the embodiments of the present application.

[0079] Figure 3 is a block diagram of the electronic device according to the embodiments of the present application. DETAILED DESCRIPTION

[0080] The specific embodiments are merely illustrative of the present application, and are not intended to limit the present application. Those skilled in the art can make modifications to the embodiments without creative contribution, and the modifications are within the scope of the present application as long as they are within the scope of the claims of the present application.

[0081] To make the purposes, technical schemes and advantages of the embodiments of the present application clearer, the technical schemes of the embodiments of the present application will be described clearly and completely in conjunction with the drawings of the embodiments of the present application. Obviously, the described embodiments are some of the embodiments of the present application, but not all the embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without creative contribution are within the scope of the present application.

[0082] In addition, the term "and / or" herein is merely a description of the association relationship of the associated objects, which means that there can be three relationships, for example, A and / or B, which can represent the following three cases: A exists alone, A and B exist together, and B exists alone. In addition, the character " / " herein, unless otherwise specified, generally represents an "or" relationship between the associated objects.

[0083] The embodiment of the present application discloses a remote control method. The remote control method can be executed by an electronic device. The electronic device can be a server or a terminal device. The server can be a physical server, a server cluster composed of multiple physical servers, a distributed system, or a cloud server providing cloud computing services. The terminal device can be a smartphone, a tablet computer, a desktop computer, or the like.

[0084] The embodiment of the present application discloses a remote control method. With reference to Figure 1 The remote control method includes the following main processes (S100-S600):

[0085] In step S100, user information is acquired.

[0086] In step S200, it is determined whether the user information has control authority. If the user information has control authority, step S300 is entered.

[0087] In step S300, a user instruction is received.

[0088] In step S400, a target device is acquired based on the user instruction and a device list.

[0089] In step S500, a WebRTC data channel is established between the target device and a STUN server.

[0090] In step S600, a remote control signal is sent to the target device based on the user instruction and the WebRTC data channel.

[0091] The electronic device acquires user information, and then determines whether the user information has control authority, i.e., whether the user has control authority. If the user information has control authority, the electronic device receives a user instruction. At this time, the user has been verified successfully, and the user has control authority. Therefore, the electronic device receives and executes the user instruction input by the user for remote control. The electronic device acquires a target device based on the user instruction and a device list. The user instruction includes a device to be controlled by the user. The electronic device selects the target device from the device list based on the user instruction. After the target device is acquired, the electronic device establishes a WebRTC data channel between the target device and a STUN server. Then, the electronic device sends a remote control signal to the target device based on the user instruction and the WebRTC data channel, thereby realizing remote control of the target device. Data transmission through the WebRTC data channel can reduce delay and improve real-time control and feedback.

[0092] And, in the specific implementation, the WebRTC technology is combined with the VNC technology, and remote control in manners such as a client browser and a mobile WeChat applet can be realized, thereby further improving the convenience and the diversified control manners and being more flexible to adapt to different use scenarios.

[0093] Specifically, the WebRTC data channel is established based on the stun server and the target device, including: sending request information to the stun server to obtain nat information of the target device; the nat information includes a nat type and a nat external IP address; performing nat traversal based on an ICE protocol and the nat information; determining whether the nat traversal is successful; if yes, establishing the WebRTC data channel with the target device; if not, relaying data based on a TURN server to perform data transmission with the target device.

[0094] The electronic device sends request information to the stun server, thereby obtaining the nat information of the target device by using the stun server, and then performing nat traversal by using the ICE protocol and the nat information; then the electronic device determines whether the nat traversal is successful, if yes, the channel WebRTC data channel is successfully established; if not, data needs to be relayed based on the TURN server, that is, the TURN server is used as a relay, thereby realizing data transmission with the target device and completing remote control.

[0095] As an optional implementation of the embodiment of the application, before the step of sending the remote control signal to the target device based on the user instruction and the WebRTC data channel, the method further includes: acquiring a working state of the target device in real time; determining whether the working state meets the control requirement; if yes, executing the step of sending the remote control signal to the target device based on the user instruction and the WebRTC data channel; if not, outputting a first prompt signal.

[0096] Before the electronic device sends the remote control signal to the target device based on the user instruction and the WebRTC data channel, the electronic device acquires the working state of the target device in real time, and determines whether the working state meets the control requirement, that is, whether the target device can be remotely controlled; if the target device meets the control requirement, the step of sending the remote control signal is executed; if not, the electronic device outputs a first prompt signal to prompt the user.

[0097] As an optional implementation of the embodiment of the present application, when the working state does not meet the control requirement, the method further comprises: packing the received user instruction to obtain an instruction group; and sending the instruction group to the target device; and after the working state of the target device changes from not meeting the control requirement to meeting the control requirement, the method comprises: obtaining a first instruction input by the user; determining whether the first instruction is identical to the last user instruction in the instruction group; and if the first instruction is identical to the last user instruction in the instruction group, outputting an analysis signal to make the target device analyze the instruction group and obey the control of the instruction group.

[0098] When the working state of the target device does not meet the control requirement, the electronic device packs the received user instruction to obtain an instruction group, and then sends the instruction group to the target device, thereby realizing the temporary storage of the user input instruction. After the working state of the target device changes from not meeting the control requirement to meeting the control requirement, the electronic device obtains a first instruction input by the user, and then determines whether the first instruction is identical to the last user instruction in the instruction group. If the first instruction is identical to the last user instruction in the instruction group, the electronic device sends an analysis signal to the target device, thereby making the target device analyze the instruction group and obey the control of the instruction group.

[0099] As an optional implementation of the embodiment of the present application, before outputting the analysis signal, the method further comprises: determining whether other user instructions in the instruction group are associated with the first instruction; if the other user instructions are associated with the first instruction, executing the step of outputting the analysis signal; if the other user instructions are not associated with the first instruction, outputting a second prompt signal; determining whether a confirmation signal input by the user is received based on the second prompt signal; and if the confirmation signal input by the user is received, executing the step of outputting the analysis signal.

[0100] Before the electronic device outputs the analysis signal, the electronic device determines whether other user instructions in the instruction group are associated with the first instruction. The association is used to determine whether the user instructions in the instruction group need to be executed. If the other user instructions are associated with the first instruction, the electronic device executes the step of outputting the analysis signal. If the other user instructions are not associated with the first instruction, the electronic device determines that the first instruction input by the user is a single instruction and is irrelevant to the other user instructions in the instruction group. Therefore, the electronic device outputs a second prompt signal. The electronic device determines whether a confirmation signal input by the user is received based on the second prompt signal. If the confirmation signal input by the user is received, it indicates that although the first instruction is irrelevant to the other user instructions in the instruction group, the user still needs to control the target device according to the previous control requirement. Therefore, the electronic device executes the step of outputting the analysis signal.

[0101] As an optional implementation of the embodiment of the present application, the method further comprises: acquiring feedback data of the target device in real time; determining whether the feedback data is continuous data; if the feedback data is not continuous data, acquiring a supplementary strategy; sending a supplementary signal to the target device based on the supplementary strategy, so that the target device supplements the missing data; the supplementary strategy comprises: controlling the target device to acquire the missing data; acquiring the start data and the end data based on the missing data, and sending the start data and the end data; wherein the start data is the first generated data in the missing data, and the end data is the last generated data in the missing data; acquiring the intermediate data based on the missing data, and sending the intermediate data; wherein the intermediate data is the data generated at the intermediate time in the missing data; sending the first remaining data generated after the intermediate data with the intermediate data as the first start time; sending the second remaining data generated after the start data with the start data as the second start time.

[0102] The electronic device acquires the feedback data of the target device in real time, that is, after establishing a connection with the target device, in addition to controlling the target device, the state and situation of the target device also need to be known, that is, the target device will generate feedback data so that the user can understand. The electronic device determines whether the feedback data is continuous data, that is, whether the feedback data is complete when the target device is feeding back, whether there is a loss, if the feedback data is not continuous data, it is determined that the feedback data is missing at this time, at this time the electronic device acquires a supplementary strategy, and sends a supplementary signal to the target device based on the supplementary strategy, so that the target device supplements the missing data.

[0103] Specifically, the supplement strategy includes: the electronic device controls the target device to lack data, and then the target device acquires start data and end data based on the missing data, and then sends the start data and the end data to the electronic device; at the same time, the intermediate data in the real data, that is, the data at the intermediate time in the missing data, is acquired, and then the intermediate data is sent to the electronic device, and then the target device sends the data generated after the intermediate data based on the intermediate data as the first start time until the data generated at the time before the end data. Then the second remaining data generated after the start data is sent based on the start data as the second start time until the data generated at the time before the intermediate data; the electronic device can acquire the data closer to the current time of the target device, so as to better judge the situation of the target device. The start data and the end data are sent to the electronic device first, and the electronic device can judge whether the state of the target device missing data changes greatly based on the data of the two time points of the start and the end, and then the intermediate data is sent to investigate whether the target device changes greatly at the intermediate time. That is, after the feedback data of the three time points is sent to the electronic device, the situation of the target device during this period can be basically determined. And the data sent in time points and segments can reduce the influence of the real data on the data of the target device at the current time and the control signal, that is, on the premise of being able to know the change of the target device in the missing data period as soon as possible, the occupation of the data channel is reduced as much as possible.

[0104] As an optional implementation of the embodiment of the application, before the supplement signal is sent to the target device based on the supplement strategy, the initial time and the cutoff time of the missing feedback data are acquired; the feedback data within a first preset time before the initial time is acquired, and the acquired feedback data is taken as first feedback data; the feedback data within a second preset time after the cutoff time is acquired, and the acquired feedback data is taken as second feedback data; whether the first feedback data and the second feedback data are different is judged; if the first feedback data and the second feedback data are not different, the step of sending the supplement signal to the target device based on the supplement strategy is not performed; if the first feedback data and the second feedback data are different, whether the difference meets the preset requirement is judged; if the difference meets the preset requirement, the step of sending the supplement signal to the target device based on the supplement strategy is not performed.

[0105] Before sending the supplementary signal to the target device based on the supplementary strategy, the electronic device acquires an initial time and a cut-off time of the missing feedback data, then acquires the feedback data within a first preset time before the initial time, i.e., acquires the first feedback data, and then acquires the second feedback data. The electronic device then determines whether there is a difference between the first feedback data and the second feedback data. If there is no difference, it is determined that the target device has not changed to a large extent, so the step of sending the supplementary signal is not performed, i.e., the missing feedback data does not need to be completed. If there is a difference, it is determined whether the difference meets the preset requirement. If the difference meets the preset requirement, the data does not need to be completed.

[0106] After the step of not performing the step of sending the supplementary signal to the target device based on the supplementary strategy, the electronic device determines in real time whether the target device has changed from meeting the control requirement to not meeting the control requirement. If the target device has changed, the electronic device sends a completion signal to the target device to make the target device send all the missing data to the electronic device.

[0107] Since the target device has changed to a state of not meeting the control requirement, the transmission of the accurate data is performed at this time, which does not affect the transmission of the control signal and the real-time data, and since the determination has been performed before, it also does not affect the monitoring of the feedback data of the target device by the user.

[0108] As an optional implementation of the embodiment of the present application, after sending the supplementary signal to the target device based on the supplementary strategy, the method further includes: acquiring the amount of missing data, acquiring the amount of correct completion data based on the amount of missing data, calculating the data completion accuracy based on the amount of missing data and the amount of correct completion data, i.e., using the amount of correct completion data divided by the amount of missing data, and the electronic device determines whether the data completion accuracy is greater than the accuracy threshold. If the data completion accuracy is greater than the accuracy threshold, the electronic device does not act; if the data completion accuracy is less than the accuracy threshold, the electronic device outputs an accuracy prompt signal.

[0109] Figure 2 A structural block diagram of a remote control device 700 provided by an embodiment of the present application is shown in Figure 2 The remote control device 700 includes:

[0110] A first acquisition module 701 is configured to acquire user information.

[0111] A determination module 702 is configured to determine whether the user information has control authority. If the user information has control authority, the process proceeds to a receiving module 703.

[0112] The receiving module 703 is configured to receive a user instruction.

[0113] A second acquisition module 704 is configured to acquire a target device based on the user instruction and a device list.

[0114] The establishing module 705 is configured to establish a WebRTC data channel with the target device based on a STUN server;

[0115] The sending module 706 is configured to send a remote control signal to the target device based on a user instruction and the WebRTC data channel.

[0116] Specifically, the establishing module 705 comprises:

[0117] The request obtaining module is configured to send request information to the STUN server to obtain the nat information of the target device; the nat information comprises a nat type and a nat external IP address.

[0118] The traversing module is configured to perform nat traversal based on an ICE protocol and the nat information.

[0119] The first judging submodule is configured to judge whether the nat traversal is successful; if yes, a WebRTC data channel is established with the target device; if not, data is relayed based on a TURN server to perform data transmission with the target device.

[0120] In this optional embodiment, the remote control device 700 further comprises:

[0121] The first obtaining submodule is configured to obtain the working state of the target device in real time before sending the remote control signal to the target device based on the user instruction and the WebRTC data channel.

[0122] The second judging submodule is configured to judge whether the working state meets the control requirement; if yes, the step of sending the remote control signal to the target device based on the user instruction and the WebRTC data channel is performed; if not, a first prompt signal is output.

[0123] In this optional embodiment, the remote control device 700 further comprises:

[0124] The packing module is configured to pack the received user instruction to obtain an instruction group when the working state does not meet the control requirement.

[0125] The first sending submodule is configured to send the instruction group to the target device.

[0126] The second obtaining submodule is configured to obtain a first instruction input by the user after the working state changes from not meeting the control requirement to meeting the control requirement.

[0127] The third judging submodule is configured to judge whether the first instruction is the same as the last user instruction in the instruction group; if yes, an analysis signal is output to make the target device analyze the instruction group and obey the control of the instruction group.

[0128] In the optional embodiment, the remote control device 700 further comprises:

[0129] A fourth judging sub-module, configured to judge whether other user instructions in the instruction group are associated with the first instruction before outputting the parsed signal; if associated, execute the step of outputting the parsed signal; if not associated, output a second prompt signal;

[0130] A fifth judging sub-module, configured to judge whether a confirmation signal input by the user is received based on the second prompt signal; if the confirmation signal input by the user is received, execute the step of outputting the parsed signal.

[0131] In the optional embodiment, the remote control device 700 further comprises:

[0132] A third acquiring sub-module, configured to acquire feedback data of the target device in real time;

[0133] A sixth judging sub-module, configured to judge whether the feedback data is continuous data; if the feedback data is not continuous data, acquire a supplement strategy;

[0134] A second sending sub-module, configured to send a supplement signal to the target device based on the supplement strategy, so that the target device supplements the missing data;

[0135] The supplement strategy comprises:

[0136] Controlling the target device to acquire the missing data;

[0137] Acquiring start data and end data based on the missing data, and sending the start data and the end data;

[0138] The start data is the data generated first in the missing data, and the end data is the data generated last in the missing data;

[0139] Acquiring intermediate data based on the missing data, and sending the intermediate data;

[0140] The intermediate data is the data generated at the intermediate time in the missing data;

[0141] Sending first residual data generated after the intermediate data with the intermediate data as a first start time;

[0142] Sending second residual data generated after the start data with the start data as a second start time.

[0143] In the optional embodiment, the remote control device 700 further comprises:

[0144] A fourth acquiring sub-module, configured to acquire an initial time and a cut-off time of the missing feedback data before sending the supplement signal to the target device based on the supplement strategy.

[0145] a fifth obtaining sub-module, configured to obtain feedback data within a first preset time before the initial time point, and take the obtained feedback data as first feedback data;

[0146] a sixth obtaining sub-module, configured to obtain feedback data within a second preset time after the end time point, and take the obtained feedback data as second feedback data;

[0147] a seventh judging sub-module, configured to judge whether the first feedback data and the second feedback data are different; if the first feedback data and the second feedback data are not different, the step of sending the supplementary signal to the target device based on the supplementary strategy is not executed; if the first feedback data and the second feedback data are different, it is judged whether the difference meets a preset requirement; if the difference meets the preset requirement, the step of sending the supplementary signal to the target device based on the supplementary strategy is not executed.

[0148] Figure 3 A structural block diagram of an electronic device 800 is provided in the embodiments of the present application. The electronic device 800 can be a mobile phone, a tablet computer, a PC, a server or the like. As shown in the figure, the electronic device 800 includes a memory 801, a processor 802 and a communication bus 803; the memory and the processor 802 are connected through the communication bus 803. The memory 801 stores a computer program capable of being loaded and executed by the processor 802, and the computer program is the remote control method provided in the above embodiments. Figure 3

[0149] The memory 801 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 801 can include a storage program area and a storage hosting data area, wherein the storage program area can store instructions for implementing an operating system, instructions for at least one function and instructions for implementing the remote control method provided in the above embodiments, etc.; the storage hosting data area can store hosting data involved in the remote control method provided in the above embodiments, etc.

[0150] ​The processor 802 can include one or more processing cores. The processor 802 performs various functions and processes managed data by running or executing instructions, programs, code sets, or instruction sets stored in the memory 801, calling managed data stored in the memory 801. The processor 802 can be at least one of an Application Specific Integrated Circuit (ASIC), a Digital Signal Processor (DSP), a Digital Signal Processing Device (DSPD), a Programmable Logic Device (PLD), a Field Programmable Gate Array (FPGA), a Central Processing Unit (CPU), a controller, a microcontroller, and a microprocessor. It can be understood that, for different devices, the electronic device for implementing the functions of the processor 802 described above can also be other, and the embodiments of the present application are not limited specifically.

[0151] The communication bus 803 can include a path for transmitting information between the above components. The communication bus 803 can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. The communication bus 803 can be divided into an address bus, a managed data bus, a control bus, etc. For convenience of representation, Figure 3 Only one double-headed arrow is used in the middle, but it does not mean that there is only one bus or one type of bus.

[0152] The embodiments of the present application provide a computer storage medium, which stores a computer program capable of being loaded and executed by a processor to perform the remote control method provided by the above embodiments.

[0153] In this embodiment, the computer storage medium can be a tangible device that maintains and stores instructions for use by an instruction execution device. The computer storage medium can be, but is not limited to, an electronic storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any combination thereof. Specifically, the computer storage medium can be a portable computer diskette, a hard disk, a USB (Universal Serial Bus) flash drive, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or Flash memory), a static random access memory (SRAM), a portable compact disc read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, an optical disk, a magnetic disk, a mechanical encoding device, and any combination thereof.

[0154] The terms "comprises", "comprising", or any other variation thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus.

Claims

1. A remote control method characterized by, The method comprises: acquiring user information; determining whether the user information has control authority; if the user information has control authority, receiving a user instruction; acquiring a target device based on the user instruction and a device list; establishing a WebRTC data channel with the target device based on a STUN server; sending a remote control signal to the target device based on the user instruction and the WebRTC data channel; The method further comprises: acquiring feedback data of the target device in real time; determining whether the feedback data is continuous data; if the feedback data is not the continuous data, acquiring a supplementary strategy; sending a supplementary signal to the target device based on the supplementary strategy, so that the target device supplements missing data; The supplementary strategy comprises: controlling the target device to acquire the missing data; acquiring start data and end data based on the missing data, and sending the start data and the end data; wherein the start data is the first generated data in the missing data, and the end data is the last generated data in the missing data; acquiring intermediate data based on the missing data, and sending the intermediate data; wherein the intermediate data is the data generated at the intermediate time in the missing data; sending first remaining data generated after the intermediate data with the intermediate data as a first start time; sending second remaining data generated after the start data with the start data as a second start time.

2. The method of claim 1, wherein, The method of establishing a WebRTC data channel with the target device based on a STUN server comprises: sending request information to the STUN server to acquire the target device nat information; The nat information includes nat type and nat external IP address; nat traversal based on ICE protocol and the nat information; determining whether the nat traversal is successful; if successful, establishing a WebRTC data channel with the target device; if not successful, relaying data based on a TURN server to perform data transmission with the target device.

3. The method of claim 1, wherein, Before sending a remote control signal to the target device based on the user instruction and the WebRTC data channel, the method further comprises: acquiring the working state of the target device in real time; determining whether the working state meets the control requirements; if the working state meets the control requirements, performing the step of sending a remote control signal to the target device based on the user instruction and the WebRTC data channel; if the working state does not meet the control requirements, outputting a first prompt signal.

4. The method of claim 3, wherein, When the working state does not meet the control requirements, the method further comprises: packing the received user instruction to obtain an instruction group; sending the instruction group to the target device; after the working state changes from not meeting the control requirements to meeting the control requirements, the method comprises: acquiring a first instruction input by the user; determining whether the first instruction is the same as the last user instruction in the instruction group; if the same, outputting an analysis signal to make the target device analyze the instruction group and obey the control of the instruction group.

5. The method of claim 4, wherein, Before outputting the analysis signal, the method further comprises: determining whether other user instructions in the instruction set are associated with the first instruction; if there is an association, then performing the step of outputting the parsed signal; if there is no association, then outputting a second prompt signal; determining whether a user input confirmation signal is received based on the second prompt signal; if the user input confirmation signal is received, then performing the step of outputting the parsed signal.

6. The method of claim 1, wherein, Before the step of sending a supplementary signal to the target device based on the supplementary strategy, the method further comprises: obtaining an initial time and an end time at which the feedback data is missing; obtaining the feedback data within a first preset time before the initial time, and taking the obtained feedback data as first feedback data; obtaining the feedback data within a second preset time after the end time, and taking the obtained feedback data as second feedback data; determining whether there is a difference between the first feedback data and the second feedback data; if there is no difference between the first feedback data and the second feedback data, then not performing the step of sending a supplementary signal to the target device based on the supplementary strategy if there is a difference between the first feedback data and the second feedback data, then determining whether the difference meets a preset requirement; if the difference meets the preset requirement, then not performing the step of sending a supplementary signal to the target device based on the supplementary strategy.

7. A remote control device, characterized in that comprises: a first obtaining module configured to obtain user information; a determining module configured to determine whether the user information has control authority; if the user information has control authority, then the process proceeds to a receiving module; the receiving module is configured to receive user instructions; a second obtaining module configured to obtain a target device based on the user instructions and a device list; an establishing module configured to establish a WebRTC data channel with the target device based on a STUN server; a sending module configured to send a remote control signal to the target device based on the user instructions and the WebRTC data channel; a third obtaining submodule configured to obtain feedback data of the target device in real time; a sixth determining submodule configured to determine whether the feedback data is continuous data; if the feedback data is not continuous data, then a supplementary strategy is obtained; a second sending submodule configured to send a supplementary signal to the target device based on the supplementary strategy, so that the target device supplements the missing data; the supplementary strategy comprises: controlling the target device to obtain missing data; obtaining start data and end data based on the missing data, and sending the start data and the end data; wherein the start data is the first generated data in the missing data, and the end data is the last generated data in the missing data; obtaining intermediate data based on the missing data, and sending the intermediate data; wherein the intermediate data is the data generated at the intermediate time in the missing data; sending first remaining data generated after the intermediate data, taking the intermediate data as a first start time; sending second remaining data generated after the start data, taking the start data as a second start time.

8. An electronic device, comprising: An electronic device comprising a processor coupled to a memory; the processor is configured to execute a computer program stored in the memory to cause the electronic device to perform a remote control method according to any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, A computer program product, which comprises computer program or instructions, when executed on a computer, cause the computer to perform a remote control method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Smart home equipment control method and device, electronic equipment and storage medium

    CN112331213A

  • Data restoration method and device

    CN112433997A