Remote control method, terminal equipment and computer readable storage medium
By realizing the direct transmission and execution of code files between the remote control device and the controlled device, the problems of poor sensitivity and low accuracy of the existing infrared remote control technology are solved, and the control accuracy and user experience of the remote control device are improved.
Patent Information
- Application Number
- CN202311333252.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-10-13
- Publication Date
- 2025-04-15
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing remote control equipment is remotely controlled by infrared technology, which has problems such as poor sensitivity, weak signal, large delay and low control accuracy, which affects the user experience.
A remote control method is provided. The remote control device obtains the first code file in response to the input command, converts it into a second code file, divides it into several data segments according to the preset byte size, and sends it to the controlled device. The controlled device receives and splices it and then converts it into an executable file to execute.
By directly sending the code file to the controlled device, high-precision interaction between the remote control device and the controlled device is achieved, the user experience is improved, and the storage needs of the controlled device are reduced, which is conducive to the miniaturization or lightweighting of the device.
Smart Images

Figure CN119832722A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of remote control technology, and in particular to a remote control method, a terminal device, and a computer-readable storage medium. Background Art
[0002] Remote control technology is a technology that remotely controls the controlled device through a remote control device. As people's material life becomes more and more abundant, remote control technology has become an indispensable and important technology in modern people's lives, and the number of remotely controlled smart devices used by modern people is increasing.
[0003] Generally speaking, the existing remote control device and the controlled device transmit infrared signals through infrared technology, so that the controlled device analyzes the received infrared signals and executes the corresponding instructions. However, the remote control method using infrared technology has the disadvantages of poor sensitivity, weak signal, and large delay. In addition, this remote control method requires the remote control device to control the controlled device in a specific direction, which is not conducive to improving the remote control accuracy of the remote control device and the user experience is low. Summary of the invention
[0004] To solve the above technical problems, the present application provides a remote control method, a terminal device and a computer-readable storage medium.
[0005] To solve the above problems, the present application provides a remote control method, which is applied to a remote control device and a controlled device, wherein the remote control device and the controlled device are communicatively connected, and the remote control method comprises: the remote control device obtains a corresponding first code file in response to an input instruction, and converts the first code file into a second code file, wherein the data format of the second code file is different from that of the first code file; the remote control device divides the second code file into a plurality of data segments according to a preset byte size, and sends the plurality of data segments to the controlled device; the controlled device splices the plurality of data segments in response to receiving the plurality of data segments, so as to obtain the second code file; the controlled device converts the second code file into the first code file, so as to execute the first code file.
[0006] Optionally, the remote control device obtains the corresponding first code file in response to the input instruction, and converts the first code file into a second code file, wherein the step of the second code file having a different data format from the first code file includes: the remote control device obtains the first code file in response to the input instruction, and converts the first code file into a third code file, the data format of the third code file being different from the first code file and the second code file; the remote control device compiles according to the third code file to obtain the second code file, and the second code file is in binary format.
[0007] Optionally, the remote control device divides the second code file into several data segments according to a preset byte size to send the several data segments to the controlled device, including: the remote control device divides the second code file according to a first byte size to obtain several first data sub-segments; the remote control device determines the corresponding second data sub-segments according to the positional relationship of the first data sub-segments in the second code file; the remote control device merges the second data sub-segments of the second byte size with the first data sub-segments to obtain several of the data segments, wherein the sum of the first byte size and the second byte size is the preset byte size.
[0008] Optionally, a low-power Bluetooth connection is established between the remote control device and the controlled device, the preset byte size is 20, the first byte size is 18, and the second byte size is 2.
[0009] Optionally, the step of the remote control device acquiring the corresponding second data sub-segment according to the positional relationship of the first data sub-segment in the second code file includes: when the remote control device identifies that the first data sub-segment is the last data segment of the second code file, using the preset first identification data as the second data sub-segment corresponding to the first data sub-segment; when the remote control device identifies that the first data sub-segment is not the last data segment of the second code file, using the preset second identification data as the second data sub-segment corresponding to the first data sub-segment.
[0010] Optionally, in response to receiving the above-mentioned several data segments, the above-mentioned controlled device splices the above-mentioned several data segments to obtain the above-mentioned second code file, including: the above-mentioned controlled device receives the above-mentioned several data segments, and determines whether the above-mentioned second data sub-segment of each of the above-mentioned data segments is the above-mentioned first identification data; after the above-mentioned controlled device receives the data segment including the above-mentioned first identification data, the first data sub-segments in the above-mentioned data segments are spliced in the order of receiving to obtain the above-mentioned second code file.
[0011] Optionally, the data format of the first code file is Python, and the data format of the third code file is Json.
[0012] Optionally, the remote control device obtains the corresponding first code file in response to the input instruction, and converts the first code file into a second code file, wherein the step in which the second code file has a different data format from the first code file includes: the remote control device parses the input instruction in response to receiving the input instruction from the user to obtain operation information of the user; the remote control device converts the first code file corresponding to the input instruction into a second code file in response to the interaction indicated by the operation information.
[0013] To solve the above problems, the present application provides a terminal device, including a processor and a memory connected to the processor, wherein the memory stores program data, and the processor calls the program data stored in the memory to execute the above remote control method.
[0014] To solve the above problems, the present application provides a computer-readable storage medium storing program instructions, which are executed to implement the above remote control method.
[0015] The present application provides a remote control method, a terminal device, and a computer-readable storage medium. The remote control method obtains a corresponding first code file in response to an input instruction through a remote control device, and converts the first code file into a second code file; the remote control device divides the second code file into several data segments according to a preset byte size, and sends the several data segments to a controlled device; the controlled device splices the several data segments in response to receiving the several data segments to obtain a second code file; the controlled device converts the second code file into a first code file to execute the first code file. Through the method of the present application, the remote control device can directly send the code file to the controlled device, so that the controlled device directly executes the first code file and performs the operation input by the user, so as to realize the remote control interaction between the remote control device and the controlled device, improve the remote control accuracy of the remote control device, and thus improve the user experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work. Among them:
[0017] Figure 1 is a flowchart of a first embodiment of a remote control method provided by the present application;
[0018] Figure 2 is a flowchart of a second embodiment of the remote control method provided by the present application;
[0019] Figure 3 is a flowchart of a third embodiment of the remote control method provided by the present application;
[0020] Figure 4 is a flowchart of a fourth embodiment of the remote control method provided by the present application;
[0021] Figure 5 It is a structural schematic diagram of an embodiment of a terminal device provided by the present application;
[0022] Figure 6 It is a structural schematic diagram of an embodiment of a computer-readable storage medium provided by the present application. DETAILED DESCRIPTION
[0023] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.
[0024] It should be noted that if the embodiments of the present application involve directional indications (such as up, down, left, right, front, back...), the directional indications are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.
[0025] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only used for descriptive purposes and cannot be understood as indicating or suggesting their relative importance or implicitly indicating the number of technical features indicated. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, the technical solutions between the various embodiments can be combined with each other, but they must be based on the ability of ordinary technicians in the field to implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by this application.
[0026] See also Figure 1 , Figure 1 1 is a flow chart of the first embodiment of the remote control method provided by the present application. Figure 1 As shown, the present application first proposes a remote control method, which is specifically applied to a remote control device and a controlled device, wherein a communication connection is established between the remote control device and the controlled device, and the remote control method comprises the following steps:
[0027] Step S11: the remote control device obtains the corresponding first code file in response to the input instruction, and converts the first code file into a second code file, wherein the data format of the second code file is different from that of the first code file.
[0028] Specifically, the first code file is an executable file in the controlled device, for example, the first code file is a python code file that can be executed in the controlled device, and a plurality of first code files are stored in the remote control device. When the remote control device receives an input instruction from the user, the remote control device obtains the corresponding first code file according to the input instruction to convert the first code file into a second code file. The data format of the second code file is different from that of the first code file, and the format of the second code file can be a code file compiled in binary format.
[0029] Among them, the input instruction can be generated based on operations such as clicking or double-clicking performed by the user on the remote control device, or the input instruction can also be generated based on voice instructions input by the user through the remote control device, or the input instruction can also be generated based on operations such as delay control set by the user, which are not specifically limited here.
[0030] Step S12: the remote control device divides the second code file into a plurality of data segments according to a preset byte size, and sends the plurality of data segments to the controlled device.
[0031] After the remote control device obtains the converted second code file, it divides the second code file into a plurality of data segments according to the preset byte size, and sends the plurality of data segments to the controlled device. It can be understood that, limited by the communication connection established between the remote control device and the controlled device, each data transmission between the remote control device and the controlled device can only support data of the preset byte size. Therefore, dividing the second code file into a plurality of data segments according to the preset byte size allows the remote control device to send the data segments to the controlled device in sequence.
[0032] Since the second code file is segmented according to the preset byte size, the number of bytes of each data segment after segmentation is less than or equal to the preset byte size. For example, the number of bytes of the last data segment among several data segments obtained according to the preset segmentation order is less than or equal to the preset byte size, and the number of bytes of all data segments before the last data segment is equal to the preset byte size.
[0033] Step S13: In response to receiving the plurality of data segments, the controlled device splices the plurality of data segments to obtain a second code file.
[0034] After receiving the plurality of data segments, the controlled device splices the plurality of data segments in the order in which they are received, so as to obtain the second code file mentioned above.
[0035] Step S14: the controlled device converts the second code file into the first code file to execute the first code file.
[0036] After the controlled device obtains the second code file, it converts the second code file into the first code file and directly executes the first code file, so that the controlled device performs corresponding actions according to the instructions input by the user in the remote control device, thereby realizing remote control of the controlled device through the remote control device.
[0037] Among them, the data content of the first code file obtained by the remote control device of this embodiment is the same as that of the first code file of the controlled device, and the data content of the second code file obtained by the remote control device is the same as that of the second code file of the controlled device. In an optional implementation mode, when a user uses a remote control device to remotely control a controlled device, it can be understood that the user's remote control needs are generally less. In order to reduce the power consumption of the remote control device, the remote control device and the controlled device do not need to be connected all the time, but only connected when remote control is required. Therefore, when the controlled device and the remote control device are wirelessly connected, for example, when the controlled device and the remote control device transmit data through the Bluetooth function, the controlled device can establish a connection with the remote control device when receiving the user's input command, and be in a sleep state during other idle time, so as to reduce the power consumption of the remote control device and increase the battery life of the remote control device.
[0038] In an embodiment of the present application, the remote control method obtains the corresponding first code file in response to an input instruction through the remote control device, and converts the first code file into a second code file; the remote control device divides the second code file into several data segments according to a preset byte size to send the several data segments to the controlled device; the controlled device splices the several data segments in response to receiving the several data segments to obtain the second code file; the controlled device converts the second code file into the first code file to execute the first code file. The remote control device of this embodiment can directly send the code file to the controlled device so that the controlled device directly executes the first code file and performs the operation input by the user to realize the remote control interaction between the remote control device and the controlled device, which is different from the remote control using infrared technology, and can significantly improve the remote control accuracy of the remote control device, thereby improving the user experience. In addition, the remote control method of this embodiment can make the controlled device not store the corresponding code file, but perform the corresponding operation after receiving the second code file of the remote control device, reducing the demand for storage data of the controlled device, which is conducive to the miniaturization or lightweight of the controlled device.
[0039] In one embodiment, see Figure 2 , Figure 2 2 is a flow chart of the second embodiment of the remote control method provided by the present application. Figure 2 As shown, the remote control method of this embodiment includes the following steps:
[0040] Step S21: the remote control device obtains a first code file in response to an input instruction, and converts the first code file into a third code file, wherein the data format of the third code file is different from that of the first code file and the second code file.
[0041] Specifically, the remote control device obtains the corresponding first code file in response to the input instruction indicated by the user, and converts the first code file into a third code file, and the data format of the third code file is different from the first code file and the second code file.
[0042] Step S22: the remote control device compiles according to the third code file to obtain a second code file, where the second code file is in a binary format.
[0043] After the remote control device obtains the third code file, it compiles the third code file to obtain the second code file in binary format. It can be understood that, due to the difference between the second format file and the first format file, when the first format file cannot be directly converted into the second format file, the first format file can be converted into the third code file, and then the third code file can be converted into the second code file. At this time, the data format of the third code file can be selected from any data format that can be interchanged between the first format file and the second format file.
[0044] Step S23: the remote control device divides the second code file into a plurality of data segments according to a preset byte size, and sends the plurality of data segments to the controlled device.
[0045] Step S24: In response to receiving the plurality of data segments, the controlled device concatenates the plurality of data segments to obtain a second code file.
[0046] Step S25: the controlled device converts the second code file into the first code file to execute the first code file.
[0047] Steps S23-S25 are similar to the above-mentioned steps S12-S14 and will not be described in detail here.
[0048] In an embodiment of the present application, by converting the first code file into a third code file, the remote control device can compile the third code file into a second code file in binary format, and the remote control device can send the second code file in binary format to the controlled device, thereby realizing data transmission between the remote control device and the controlled device. In addition, the remote control method of this embodiment can enable the controlled device to not store the corresponding code file, but to perform the corresponding operation after receiving the second code file of the remote control device, thereby reducing the demand of the controlled device for storing data, which is conducive to the miniaturization or lightweight of the controlled device.
[0049] In one embodiment, see Figure 3 , Figure 3 FIG. 1 is a flow chart of the third embodiment of the remote control method provided by the present application. Figure 3 As shown, step S12 or step S23 further includes the following steps:
[0050] Step S31: the remote control device divides the second code file according to the first byte size to obtain a plurality of first data sub-segments.
[0051] Specifically, the remote control device divides the second code file according to the first byte size to obtain a plurality of first data sub-segments. It can be understood that the plurality of first data sub-segments are original data of the second code file, and the second code file can be obtained by re-joining the plurality of first data sub-segments.
[0052] Step S32: the remote control device confirms the corresponding second data sub-segment according to the positional relationship of the first data sub-segment in the second code file.
[0053] After the remote control device obtains a plurality of first data sub-segments, the corresponding second data sub-segments can be obtained according to the position relationship of each first data sub-segment in the second code file.
[0054] Step S33: The remote control device combines the second data sub-segment of the second byte size with the first data sub-segment to obtain a plurality of data segments, wherein the sum of the first byte size and the second byte size is a preset byte size.
[0055] The remote control device merges the second data subsegment of the second byte size with the corresponding first data subsegment to obtain a data segment, and repeats steps S32-S33 until all the first data subsegments are merged with the corresponding second data subsegments to obtain several data segments.
[0056] The second data subsegment of this embodiment is used to identify the position of the first data subsegment in the second code file, so that when the controlled device receives several data segments, it can obtain the position relationship of the data segments by identifying the second data subsegment in each data segment, and then determine whether the data segment is the last data segment in the second code file based on the position relationship, so as to determine that the data transmission between the controlled device and the remote control device is completed when the data segment is the last data segment in the second code file, and then execute step S24 or step S13, or the controlled device can disconnect the wireless connection with the remote control device in response to the completion of data transmission.
[0057] In an embodiment of the present application, the remote control method inserts a second data sub-segment for identifying the positional relationship of the first data sub-segment in the second code file into the first data sub-segment, so that the controlled device can determine whether the data transmission is completed based on the second data sub-segment. The method is simple and easy to implement, and it is convenient for the remote control device to remotely control the controlled device.
[0058] In other embodiments, after the remote control device divides the second code file according to the first byte size and obtains a plurality of first data sub-segments, the plurality of data sub-segments can be transmitted to the controlled device in sequence. In response to completion of the transmission of the plurality of data sub-segments, the remote control device transmits a second data sub-segment used to indicate completion of the transmission to the controlled device, so that the controlled device executes step S24 or step S13 when receiving the second data sub-segment, or disconnects the wireless connection with the remote control device.
[0059] Optionally, a low-power Bluetooth connection is established between the remote control device and the controlled device, the preset byte size is 20, the first byte size is 18, and the second byte size is 2.
[0060] The remote control device and the controlled device are connected via Bluetooth Low Energy (BLE). Bluetooth Low Energy BLE is used in short-distance, small-data transmission scenarios. It has low communication power consumption and can significantly reduce the power consumption of the remote control device, reduce the charging frequency of the controlled device, and improve the user experience.
[0061] Among them, in one embodiment, the remote control device is only used to remotely control the controlled device. At this time, the remote control device and the controlled device are point-to-point transmission. When the remote control device receives the input command, it sends broadcast data to the controlled device. The controlled device receives the broadcast data in a direction and establishes a BLE connection between the remote control device and the controlled device according to the broadcast data. In another embodiment, the remote control device is used to remotely control several controlled devices. At this time, the remote control device responds to the controlled device specified in the input command and sends broadcast data to the corresponding controlled device to establish a BLE connection; or, the remote control device and the controlled device can also establish a BLE connection through a broadcast mode. For example, the remote control device broadcasts the first Bluetooth data to the outside, and establishes a connection with the corresponding controlled device according to the second Bluetooth data returned by the controlled device. No specific limitation is made here.
[0062] Furthermore, since the remote control device and the controlled device are connected via BLE, the BLE communication method supports a maximum of 20 bytes of data transmission at a time. Therefore, the remote control device needs to divide the second code file into several first data sub-segments of 18 bytes, and merge the first data sub-segments with the second data sub-segments of 2 bytes, so as to send several data segments to the controlled device one by one to realize the transmission of the code file.
[0063] Optionally, step S32 includes: when the remote control device identifies that the first data sub-segment is the last data segment of the second code file, the preset first identification data is used as the second data sub-segment corresponding to the first data sub-segment; when the remote control device identifies that the first data sub-segment is not the last data segment of the second code file, the preset second identification data is used as the second data sub-segment corresponding to the first data sub-segment.
[0064] When the remote control device of this embodiment divides the second code file, the first identification data and the second identification data are pre-set. For example, when the first data sub-segment is at the last segment of the second code file, the preset first identification data is obtained as the second data sub-segment corresponding to the first data sub-segment; when the first data sub-segment is at other positions of the second code file except the last segment, the preset second identification data is obtained as the second data sub-segment corresponding to the first data sub-segment. For example, the first identification data may be 0b01, 0b00, and the second identification data may be 0b01, 0b01.
[0065] In order to facilitate the controlled device to identify the second data sub-segment, the remote control device can insert the second data sub-segment into a specified position of the first data sub-segment when merging the second data sub-segment with the first data sub-segment. For example, the second data sub-segment is inserted before or after the first data sub-segment to improve the recognition speed of the controlled device.
[0066] Further, step S12 or step S23 may also include: the controlled device receives several data segments and determines whether the second data sub-segment of each data segment is the first identification data; after the controlled device receives the data segment including the first identification data, the first data sub-segments in the several data segments are spliced in the order of reception to obtain a second code file.
[0067] Specifically, when the controlled device receives the data segment transmitted by the remote control device, it determines the positional relationship of the first data sub-segment in the second code file by determining whether the second data sub-segment of each data segment includes the first identification data. When the received second data sub-segment is the first identification data, the controlled device determines that the first data sub-segment is the last segment of the second code file, that is, the remote control device completely transmits the second code file to the controlled device. At this time, the controlled device can splice the first data sub-segments in all data segments in the order of receiving the data segments to obtain a complete second code file and convert the second code file into an executable first code file.
[0068] In one embodiment, the data format of the first code file is Python, and the data format of the third code file is Json.
[0069] Specifically, in this embodiment, the data format of the first code file is Python, the data format of the third code file is Json, and the data format of the second code file is binary. The data format of the first code file is the executable format of the controlled device, that is, the data format of the first code file is limited to the code execution format supported by the controlled device, and the data format of the third code file is limited to the data format of the first code file. The data formats of the first code file and the third code file can be adjusted according to the purpose and writing requirements of the controlled device, and are not specifically limited here.
[0070] In one embodiment, step S11 includes: the remote control device parses the input instruction in response to receiving the user's input instruction to obtain the user's operation information; the remote control device converts the first code file corresponding to the input instruction into a second code file in response to the operation information indicating the play.
[0071] Specifically, when the remote control device obtains the user's input instructions, it needs to parse the input instructions to obtain the user's operation information. When the remote control device recognizes that the operation information indicates interaction with the controlled device, for example, the interaction action may include the remote control device instructing the controlled device to play preset audio. At this time, the remote control device establishes a BLE connection with the controlled device and converts the first code file corresponding to the input instruction into a second code file.
[0072] In one embodiment, see Figure 4 , Figure 4 FIG. 4 is a flow chart of the fourth embodiment of the remote control method provided by the present application. Figure 4 As shown, in this embodiment, the user inputs the corresponding operation instruction on the remote control device, and the remote control device determines whether the user presses the play button when inputting the instruction. At this time, the play button can be a confirmation button, for example, whether the user clicks the button to confirm the play after entering the instruction. In response to the user pressing the play button, the remote control device converts the Python code file corresponding to the input instruction into a Json code file, and converts the Json code file into a binary file. The remote control device divides the data in the binary file into several 18-byte first data sub-segments, and adds the corresponding second data sub-segment before each first data sub-segment to identify the position relationship of the first data sub-segment in the binary file. After the remote control device divides the binary file, it sends the data segments obtained after the division to the controlled device through the BLE connection.
[0073] The controlled device receives the data segment, and determines whether the second data sub-segment in the data segment includes the first identification data. In response to the second data sub-segment including the first identification data, the controlled device splices the obtained data segments to obtain a binary file. The controlled device further converts the binary file into a Json code file, and converts the Json code file into a Python code file, so that the controlled device can directly execute the Python code file to perform the action specified by the user, thereby realizing remote control of the controlled device by the remote control device.
[0074] Different from the prior art, the remote control device of this embodiment can directly send the code file to the controlled device, so that the controlled device directly executes the first code file and performs the operation input by the user, and the controlled device does not need to store the corresponding code file. This can significantly improve the remote control accuracy of the remote control device, reduce the controlled device's demand for storing data, and thus improve the user experience, which is conducive to the miniaturization or lightweight of the controlled device.
[0075] See also Figure 5 , Figure 5 Schematic diagram of the structure of an embodiment of the terminal device provided by the present application. Figure 5 As shown, the terminal device 100 includes a processor 101 and a memory 102 connected to the processor 101, wherein the memory 102 stores program data, and the processor 101 retrieves the program data stored in the memory 102 to execute the above remote control method.
[0076] Optionally, in one embodiment, the processor 101 is used to execute program data to implement the following method: the remote control device obtains the corresponding first code file in response to an input instruction, and converts the first code file into a second code file, wherein the data format of the second code file is different from that of the first code file; the remote control device divides the second code file into a plurality of data segments according to a preset byte size, and sends the plurality of data segments to the controlled device; the controlled device, in response to receiving the plurality of data segments, splices the plurality of data segments to obtain a second code file; the controlled device converts the second code file into a first code file to execute the first code file.
[0077] The processor 101 may also be referred to as a CPU (Central Processing Unit). The processor 101 may be an electronic chip having the ability to process signals. The processor 101 may also be a general-purpose processor, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components. The general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.
[0078] The memory 102 can be a memory stick, a TF card, etc., which can store all the information in the terminal device 100, including the input raw data, computer programs, intermediate operation results and final operation results are all stored in the memory 102. It stores and retrieves information according to the location specified by the processor 101. With the memory 102, the terminal device 100 has a memory function and can ensure normal operation. The memory 102 of the terminal device 100 can be divided into main memory (internal memory) and auxiliary memory (external memory) according to its purpose, and there is also a classification method of dividing it into external memory and internal memory. External memory is usually a magnetic medium or an optical disk, etc., which can store information for a long time. Memory refers to the storage component on the motherboard, which is used to store the data and programs currently being executed, but is only used to temporarily store programs and data. If the power is turned off or the power is cut off, the data will be lost.
[0079] See also Figure 6 , Figure 6 Schematic diagram of the structure of an embodiment of the computer-readable storage medium provided by the present application. Figure 6 As shown, the computer-readable storage medium 110 stores program instructions 111 that can implement all the above methods.
[0080] If the integrated units of the functional units in the various embodiments of the present application are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium 110. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer-readable storage medium 110 includes several instructions in a program instruction 111 to enable a computer device (which can be a personal computer, a system server, or a network device, etc.), an electronic device (such as MP3, MP4, etc., or a mobile terminal such as a mobile phone, a tablet computer, a wearable device, or a desktop computer, etc.) or a processor to execute all or part of the steps of the methods of various implementation methods of the present application.
[0081] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, the present application may adopt the form of a computer program product implemented on one or more computer-readable storage media 110 (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0082] The present application is described by flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by a computer-readable storage medium 110. These computer-readable storage media 110 can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the program instructions 111 executed by the processor of the computer or other programmable data processing device generate instructions for implementing the process in the flowchart. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0083] These computer-readable storage media 110 may also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to operate in a specific manner, so that the program instructions 111 stored in the computer-readable storage medium 110 produce a manufactured product including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0084] These computer-readable storage media 110 can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing program instructions 111 executed on the computer or other programmable device for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0085] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, segment or portion of code that includes one or more executable instructions for implementing the steps of a specific logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in the reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0086] The logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or equipment (which can be a personal computer, server, network device or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment. The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made by using the contents of the specification and drawings of this application, or directly or indirectly applied in other related technical fields, is also included in the patent protection scope of the present application.
[0087] The above description is only an implementation method of the present application, and does not limit the patent scope of the present application. Any equivalent structure or equivalent process transformation made using the contents of the present application specification and drawings, or directly or indirectly used in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A remote control method, characterized in that: Applied to a remote control device and a controlled device, the remote control device and the controlled device are in communication connection, and the remote control method includes: The remote control device acquires the corresponding first code file in response to the input instruction, and converts the first code file into a second code file, wherein the data format of the second code file is different from that of the first code file; The remote control device divides the second code file into a plurality of data segments according to a preset byte size, so as to send the plurality of data segments to the controlled device; In response to receiving the plurality of data segments, the controlled device concatenates the plurality of data segments to obtain the second code file; The controlled device converts the second code file into the first code file to execute the first code file.
2. The remote control method according to claim 1, characterized in that: The step of the remote control device acquiring the corresponding first code file in response to the input instruction and converting the first code file into a second code file, wherein the second code file has a different data format from the first code file, comprises: The remote control device acquires the first code file in response to the input instruction, and converts the first code file into a third code file, wherein the data format of the third code file is different from that of the first code file and the second code file; The remote control device compiles according to the third code file to obtain the second code file, where the second code file is in binary format.
3. The remote control method according to claim 1 or 2, characterized in that: The step of dividing the second code file into a plurality of data segments according to a preset byte size by the remote control device, and sending the plurality of data segments to the controlled device, comprises: The remote control device divides the second code file according to the first byte size to obtain a plurality of first data sub-segments; The remote control device determines the corresponding second data sub-segment according to the position relationship of the first data sub-segment in the second code file; The remote control device combines the second data sub-segment of a second byte size with the first data sub-segment to obtain a plurality of the data segments, wherein the sum of the first byte size and the second byte size is the preset byte size.
4. The remote control method according to claim 3, characterized in that: A low-power Bluetooth connection is established between the remote control device and the controlled device, the preset byte size is 20, the first byte size is 18, and the second byte size is 2.
5. The remote control method according to claim 3, characterized in that: The step of the remote control device confirming the corresponding second data sub-segment according to the position relationship of the first data sub-segment in the second code file includes: When the remote control device recognizes that the first data subsegment is the last data segment of the second code file, the preset first identification data is used as the second data subsegment corresponding to the first data subsegment; When the remote control device recognizes that the first data subsegment is not the last data segment of the second code file, the preset second identification data is used as the second data subsegment corresponding to the first data subsegment.
6. The remote control method according to claim 5, characterized in that: In response to receiving the plurality of data segments, the controlled device concatenates the plurality of data segments to obtain the second code file, including: The controlled device receives a plurality of the data segments, and determines whether the second data sub-segment of each of the data segments is the first identification data; After receiving the data segment including the first identification data, the controlled device concatenates the first data sub-segments in a plurality of the data segments in a receiving order to obtain the second code file.
7. The remote control method according to claim 2, characterized in that: The data format of the first code file is Python, and the data format of the third code file is Json.
8. The remote control method according to claim 1, characterized in that: The step of the remote control device acquiring the corresponding first code file in response to the input instruction and converting the first code file into a second code file, wherein the second code file has a different data format from the first code file, comprises: In response to receiving the input instruction from the user, the remote control device parses the input instruction to obtain the operation information of the user; The remote control device converts the first code file corresponding to the input instruction into a second code file in response to the interaction indicated by the operation information.
9. A terminal device, characterized in that: It comprises a processor and a memory connected to the processor, wherein the memory stores program data, and the processor calls the program data stored in the memory to execute the remote control method according to any one of claims 1 to 8.
10. A computer-readable storage medium, characterized in that: Program instructions are stored, and the program instructions are executed to implement the remote control method according to any one of claims 1 to 8.