CN111542037B - Instruction transmission method, apparatus and storage medium - Google Patents

Instruction transmission method, apparatus and storage medium Download PDF

Info

Publication number
CN111542037B
CN111542037B CN202010390876.7A CN202010390876A CN111542037B CN 111542037 B CN111542037 B CN 111542037B CN 202010390876 A CN202010390876 A CN 202010390876A CN 111542037 B CN111542037 B CN 111542037B
Authority
CN
China
Prior art keywords
instruction
bluetooth
set file
code
sent
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202010390876.7A
Other languages
Chinese (zh)
Other versions
CN111542037A (en
Inventor
俞斌
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Kangying Semiconductor Technology Co ltd
Original Assignee
Shenzhen Kangying Semiconductor Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Kangying Semiconductor Technology Co ltd filed Critical Shenzhen Kangying Semiconductor Technology Co ltd
Priority to CN202010390876.7A priority Critical patent/CN111542037B/en
Publication of CN111542037A publication Critical patent/CN111542037A/en
Application granted granted Critical
Publication of CN111542037B publication Critical patent/CN111542037B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W4/00Services specially adapted for wireless communication networks; Facilities therefor
    • H04W4/80Services using short range communication, e.g. near-field communication [NFC], radio-frequency identification [RFID] or low energy communication
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04WWIRELESS COMMUNICATION NETWORKS
    • H04W76/00Connection management
    • H04W76/10Connection setup
    • H04W76/14Direct-mode setup
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D30/00Reducing energy consumption in communication networks
    • Y02D30/70Reducing energy consumption in communication networks in wireless communication networks

Abstract

The embodiment of the application provides an instruction transmission method, an instruction transmission device and a storage medium, wherein the method comprises the following steps: setting an instruction set file, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; establishing network connection with Bluetooth equipment; transmitting the instruction set file to the Bluetooth device; when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file. According to the embodiment of the application, when the mobile terminal and the Bluetooth device are interconnected, the instruction code corresponding to the Bluetooth instruction is sent, so that the instruction transmission rate is improved, and the instruction execution efficiency is improved.

Description

Instruction transmission method, apparatus and storage medium
Technical Field
The present disclosure relates to the field of bluetooth technologies, and in particular, to a method and apparatus for transmitting instructions, and a storage medium.
Background
At present, a bluetooth chip is commonly adopted on a mobile terminal, so that the mobile terminal supports a bluetooth function, and is in wireless connection with other devices with bluetooth (such as an automobile, a watch, a sound box, an earphone, a mouse, a keyboard and the like). Bluetooth is a wireless technology standard that enables short-range data exchange between fixed devices, mobile devices, and building personal area networks.
At present, mobile terminals are connected with each other through bluetooth interconnection, for example, a bluetooth mouse is used to connect with the mobile terminals, so that the mobile terminals can be operated by the bluetooth mouse. The mobile terminal and the bluetooth device can only receive and transmit a single instruction in the interconnection process, and as the bluetooth protocol is more and more complex, the receiving and transmitting of the single instruction often needs to occupy more data, especially when a plurality of continuous bluetooth instructions are transmitted to the bluetooth device by the mobile terminal, more time is consumed, more network resources are occupied, and therefore the actual execution effect is affected.
Accordingly, the prior art has drawbacks and needs to be improved and developed.
Disclosure of Invention
The embodiment of the application provides an instruction transmission method, an instruction transmission device and a storage medium, which are used for improving the instruction transmission rate and the instruction execution efficiency by sending an instruction code corresponding to a Bluetooth instruction when a mobile terminal and Bluetooth equipment are interconnected.
The embodiment of the application provides an instruction transmission method, which is applied to a mobile terminal and comprises the following steps:
setting an instruction set file, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
Establishing network connection with Bluetooth equipment;
transmitting the instruction set file to the Bluetooth device;
when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
In some embodiments, the set instruction set file includes:
and configuring a corresponding instruction code according to the use frequency of the Bluetooth instruction in the Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instruction is, the shorter the data length of the configured instruction code is.
In some embodiments, the method further comprises:
reconfiguring a corresponding new instruction code based on the use frequency of the Bluetooth instruction in the Bluetooth instruction set every preset time period so as to update the instruction set file;
transmitting the updated instruction set file to the Bluetooth equipment;
when a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
In some embodiments, when the bluetooth command needs to be sent to the bluetooth device, sending an instruction code corresponding to the bluetooth command to the bluetooth device includes:
when a plurality of Bluetooth instructions are required to be sent to the Bluetooth device, a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth device, and the plurality of instruction codes are respectively used for instructing the Bluetooth device to execute a plurality of Bluetooth instructions corresponding to the plurality of instruction codes in the instruction set file.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, sending a plurality of instruction codes corresponding to the plurality of bluetooth instructions to the bluetooth device respectively includes:
and sequentially transmitting a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the execution sequence of the plurality of Bluetooth instructions to be transmitted.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, sending a plurality of instruction codes corresponding to the plurality of bluetooth instructions to the bluetooth device respectively includes:
when the Bluetooth transmission rate is detected to be in a descending trend, sequentially transmitting a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence from big to small of the length of the instruction codes corresponding to the plurality of Bluetooth instructions to be transmitted.
The embodiment of the application also provides an instruction transmission method, which is applied to the Bluetooth equipment and comprises the following steps:
establishing network connection with a mobile terminal;
receiving an instruction set file sent from the mobile terminal, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
receiving an instruction code sent from the mobile terminal;
executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The embodiment of the application also provides an instruction transmission device, which is applied to the mobile terminal, and comprises:
the device comprises a setting module, a setting module and a processing module, wherein the setting module is used for setting an instruction set file, each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
the first connection module is used for establishing network connection with the Bluetooth equipment;
the first sending module is used for sending the instruction set file to the Bluetooth equipment;
the second sending module is used for sending an instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment when the Bluetooth instruction is required to be sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The embodiment of the application also provides an instruction transmission device, which is applied to Bluetooth equipment, and comprises:
the second connection module is used for establishing network connection with the mobile terminal;
the mobile terminal comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving an instruction set file sent by the mobile terminal, each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
the second receiving module is used for receiving the instruction codes sent by the mobile terminal;
and the execution module is used for executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The embodiment of the application also provides a storage medium, in which a computer program is stored, which when run on a computer causes the computer to execute the steps in the above-mentioned instruction transmission method.
According to the embodiment of the application, through setting the instruction set file, each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; establishing network connection with Bluetooth equipment; transmitting the instruction set file to the Bluetooth device; when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file. According to the embodiment of the application, when the mobile terminal and the Bluetooth device are interconnected, the instruction code corresponding to the Bluetooth instruction is sent, so that the instruction transmission rate is improved, and the instruction execution efficiency is improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings that are required to be used in the description of the embodiments will be briefly described below. It is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained from these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for transmitting instructions according to an embodiment of the present application.
Fig. 2 is a second flow chart of the instruction transmission method according to the embodiment of the present application.
Fig. 3 is a schematic structural diagram of a first instruction transmission device according to an embodiment of the present application.
Fig. 4 is a schematic structural diagram of a second instruction transmission device according to an embodiment of the present application.
Fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present application.
Fig. 6 is a schematic structural diagram of a bluetooth device according to an embodiment of the present application.
Detailed Description
The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. It will be apparent that the described embodiments are only some, but not all, of the embodiments of the present application. All other embodiments, which can be made by a person skilled in the art without any inventive effort, are intended to be within the scope of the present application based on the embodiments herein.
The embodiment of the application provides an instruction transmission method which can be applied to a mobile terminal or a Bluetooth device. The mobile terminal can be a smart phone, a tablet computer, a desktop computer, a smart watch and other devices. The bluetooth device may include a vehicle bluetooth device, a watch, a sound box, a wireless headset, a wireless mouse, a wireless keyboard, etc.
Referring to fig. 1, fig. 1 is a schematic flow chart of a method for transmitting instructions according to an embodiment of the present disclosure. The instruction transmission method is applied to a mobile terminal, and the mobile terminal is provided with a Bluetooth module. The method may comprise the steps of:
step 101, an instruction set file is set, each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code.
In some embodiments, the set instruction set file includes:
and configuring a corresponding instruction code according to the use frequency of the Bluetooth instruction in the Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instruction is, the shorter the data length of the configured instruction code is.
Wherein the data size of the instruction code is much smaller than the data size of the bluetooth instruction. For example, the instruction code is only 4b, and the corresponding bluetooth instruction is 5kb.
Specifically, the Bluetooth device instructions commonly used by the mobile terminal are collected when the mobile terminal is used daily to form a Bluetooth instruction set, and corresponding instruction codes are configured for the Bluetooth instructions in the Bluetooth instruction set, wherein the Bluetooth instructions and the instruction codes are in one-to-one correspondence.
For example, in order to speed up the transmission rate of bluetooth commands as much as possible so that the time for bluetooth transmission is as short as possible, the command code needs to be adjusted frequently. For example, a shorter instruction code is assigned to the most common bluetooth instruction in the bluetooth instruction set, and a longer instruction code is assigned to the relatively less common bluetooth instruction in the bluetooth instruction set.
For example, when the mobile terminal interacts with the bluetooth device, a special counter is allocated for bluetooth instructions whose use times exceed a threshold (such as 10 times) within a set period (such as 1 month), the counter is increased by 1 every time the bluetooth instructions are used subsequently, and a corresponding instruction code is configured for the bluetooth instructions in the bluetooth instruction set after sorting according to the result of the counter, so as to finally form an instruction set file.
The bluetooth instruction in the instruction set file may be a single operation instruction, or may be an operation instruction set composed of a plurality of operation instructions. The operation instruction set may be an instruction sequence composed of a plurality of operation instructions with execution sequence, or an instruction sequence composed of a plurality of operation instructions with execution sequence and high probability, or an instruction sequence composed of operation instructions with consecutive execution actions and higher use frequency. When configuring instruction codes for bluetooth instructions, the instruction sequences are configured as a single individual, and one instruction sequence configures only one instruction code. The instruction code may be any one of numbers, letters, and characters, or a combination of at least two or more.
For example, the instruction set file includes an operation instruction a, an operation instruction B, an operation instruction C, an instruction sequence a+b, an instruction sequence b+a, an instruction sequence c+a, an instruction sequence a+b+c, and an instruction sequence a+c+b, where the instruction sequence a+b is formed by the operation instruction a and the operation instruction B according to an execution sequence, the instruction sequence b+a is formed by the operation instruction B and the operation instruction a according to an execution sequence, the instruction sequence c+a is formed by the operation instruction C and the operation instruction a according to an execution sequence, the instruction sequence a+b+c is formed by the operation instruction a, the operation instruction B, and the operation instruction C according to an execution sequence. When the instruction code is configured for the Bluetooth instruction, the instruction code a is configured for the operation instruction A, the instruction code B is configured for the operation instruction B, the instruction code C is configured for the operation instruction C, the instruction code d is configured for the instruction sequence A+B, the instruction code e is configured for the instruction sequence B+A, the instruction code f is configured for the instruction sequence C+A, the instruction code g is configured for the instruction sequence A+B+C, and the instruction code h is configured for the instruction sequence A+C+B. Therefore, compared with the case of sending the instruction sequence, the embodiment of the application only needs to send the instruction code corresponding to the instruction sequence to the Bluetooth equipment, and the transmission rate of the Bluetooth instruction is greatly accelerated.
For example, the instruction set file may be made up of several subfiles, and the filename of each subfile may be used to tag an operation instruction or a unique code of an operation instruction set. Each subfile in the instruction set file is an operation instruction or an operation instruction set which can be sent by the Bluetooth device, namely the instruction set file is composed of all operation instructions or operation instruction sets which can be sent by the Bluetooth device. The instruction set file is generally collected in advance by a bluetooth equipment manufacturer during production, and then packaged and stored in the mobile terminal. By configuring the instruction code for the operation instruction or the operation instruction set in the instruction set file, each subfile in the instruction set file has a set of paired groups of operation instructions and instruction codes, or a set of paired groups of operation instruction sets and instruction codes.
For example, the instruction set file may also be composed of a bluetooth instruction set, an instruction code set, and an instruction-instruction code correspondence table. The bluetooth instruction set includes all bluetooth instructions, and the bluetooth instructions may be a single operation instruction or an operation instruction set composed of a plurality of operation instructions. The instruction code set includes all instruction codes. The instruction-instruction code correspondence table records a one-to-one correspondence between bluetooth instructions and instruction codes.
Step 102, establishing network connection with the Bluetooth device.
Specifically, the mobile terminal is connected with the Bluetooth network of the Bluetooth device, and the mobile terminal sends a preset Bluetooth instruction to the Bluetooth device, so that the Bluetooth device can automatically execute the corresponding Bluetooth instruction after receiving the Bluetooth instruction.
And step 103, transmitting the instruction set file to the Bluetooth device.
After the corresponding instruction codes are configured for the Bluetooth instructions in the instruction set file, the instruction set file carrying the corresponding relation between the Bluetooth instructions and the instruction codes is sent to the Bluetooth equipment, so that the Bluetooth equipment is ready to start receiving the instructions of the mobile terminal after receiving the instruction set file sent by the mobile terminal.
And 104, when a Bluetooth instruction needs to be sent to the Bluetooth device, sending an instruction code corresponding to the Bluetooth instruction to the Bluetooth device, wherein the instruction code is used for instructing the Bluetooth device to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
For example, when a bluetooth instruction needs to be sent to the bluetooth device and the bluetooth instruction is a single operation instruction, an instruction code corresponding to the bluetooth instruction is sent to the bluetooth device, where the instruction code is used to instruct the bluetooth device to execute the single operation instruction corresponding to the instruction code.
For example, when a bluetooth instruction needs to be sent to the bluetooth device, and the bluetooth instruction is an instruction sequence including a plurality of operation instructions, an instruction code corresponding to the bluetooth instruction is sent to the bluetooth device, where the instruction code is used to instruct the bluetooth device to execute the instruction sequence including the plurality of operation instructions corresponding to the instruction code.
In some embodiments, when the bluetooth command needs to be sent to the bluetooth device, sending an instruction code corresponding to the bluetooth command to the bluetooth device includes:
when a plurality of Bluetooth instructions are required to be sent to the Bluetooth device, a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth device, and the plurality of instruction codes are respectively used for instructing the Bluetooth device to execute a plurality of Bluetooth instructions corresponding to the plurality of instruction codes in the instruction set file.
For example, if the plurality of bluetooth instructions to be sent to the bluetooth device are an operation instruction a, an operation instruction B, and an operation instruction C, then the instruction code a, the instruction code B, and the instruction code C are sent to the bluetooth device, so that the bluetooth device executes the operation instruction a, the operation instruction B, and the operation instruction C, respectively.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, sending a plurality of instruction codes corresponding to the plurality of bluetooth instructions to the bluetooth device respectively includes:
and sequentially transmitting a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the execution sequence of the plurality of Bluetooth instructions to be transmitted.
For example, the plurality of bluetooth instructions to be sent to the bluetooth device are an operation instruction a, an operation instruction B, and an operation instruction C, and the execution sequence of the bluetooth instructions is the operation instruction a, the operation instruction C, and the operation instruction B, and then the instruction code a, the instruction code C, and the instruction code B are sequentially sent to the bluetooth device, so that the bluetooth device sequentially executes the operation instruction a, the operation instruction C, and the operation instruction B.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, and each bluetooth instruction in the plurality of bluetooth instructions need to be sent is a single operation instruction, the plurality of bluetooth instructions need to be sent are a plurality of operation instructions, and if the plurality of operation instructions are the same as a first instruction sequence in an instruction set file, an instruction code corresponding to the first instruction sequence is sent to the bluetooth device.
For example, a plurality of bluetooth instructions to be sent to the bluetooth device are an operation instruction a, an operation instruction B, and an operation instruction C, and the execution sequence of the bluetooth instructions is the operation instruction a, the operation instruction C, and the operation instruction B, where the plurality of bluetooth instructions are the same as the instruction sequence a+c+b, and only the instruction code h corresponding to the instruction sequence a+c+b needs to be sent to the bluetooth device. Compared with the case of sequentially transmitting the instruction code a, the instruction code c and the instruction code b to the Bluetooth device, only one instruction code corresponding to the instruction sequence containing the same operation instruction is transmitted, and the transmission time is shorter.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, sending a plurality of instruction codes corresponding to the plurality of bluetooth instructions to the bluetooth device respectively includes:
when the Bluetooth transmission rate is detected to be in a descending trend, sequentially transmitting a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence from big to small of the length of the instruction codes corresponding to the plurality of Bluetooth instructions to be transmitted.
For example, in order to ensure a shorter transmission time, when a decrease trend of the bluetooth transmission rate is detected, a plurality of instruction codes corresponding to a plurality of bluetooth instructions to be transmitted are sequentially transmitted to the bluetooth device according to the sequence from large to small of the length of the instruction codes corresponding to the plurality of bluetooth instructions. In the initial stage of data transmission, the instruction code with longer length is preferentially transmitted under the better network transmission rate, the instruction code with the next longer length is transmitted again, and the instruction code with the shortest length is transmitted finally so as to ensure the shorter transmission time under the condition that the transmission rate is slower and slower. For example, if there is no execution sequence among the plurality of bluetooth instructions to be transmitted, the bluetooth instruction corresponding to the first transmitted instruction code is executed by the bluetooth device. For example, if there is an execution sequence among the multiple bluetooth instructions to be sent, the first instruction code may be sent to the bluetooth device with an execution waiting command and execution sequence information, until the last instruction code is sent with an execution start command, so that the bluetooth device sequentially executes the multiple bluetooth instructions according to the execution sequence in the execution sequence information when receiving the last instruction code and the execution start command.
In some embodiments, the method further comprises:
reconfiguring a corresponding new instruction code based on the use frequency of the Bluetooth instruction in the Bluetooth instruction set every preset time period so as to update the instruction set file;
transmitting the updated instruction set file to the Bluetooth equipment;
when a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
For example, during the process of using the bluetooth device, some bluetooth instructions may be frequently invoked, and some bluetooth devices may be invoked less frequently, and then at intervals, such as every other week, or every other month, a corresponding new instruction code may be reconfigured based on the frequency of use of the bluetooth instructions in the bluetooth instruction set to update the instruction set file.
For example, if the instruction set file may be composed of several subfiles, each subfile has a pairing group composed of bluetooth instructions and instruction codes, that is, each subfile has a pairing group composed of operation instructions and instruction codes, or has a pairing group composed of operation instruction sets and instruction codes. Then a new pairing set consisting of bluetooth instructions and instruction codes is regenerated when the instruction set file is updated. When the updated instruction set file is sent to the Bluetooth device, the updated whole instruction set file or the subfiles with changed pairing groups need to be sent. When a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
For example, when the instruction set file may also be composed of a bluetooth instruction set, an instruction code set and an instruction-instruction code correspondence table, only the instruction-instruction code correspondence table is updated, that is, the one-to-one correspondence between bluetooth instructions and instruction codes in the instruction-instruction code correspondence table is reset when the instruction set file is updated. When the updated instruction set file is sent to the bluetooth device, only the updated instruction-instruction code correspondence table may be sent, or the updated whole instruction set file may be sent. When a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file. When a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
In particular, the present application is not limited by the order of execution of the steps described, and certain steps may be performed in other orders or concurrently without conflict.
As can be seen from the above, the instruction transmission method provided in the embodiments of the present application sets an instruction set file, where each bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the bluetooth instruction is greater than the data size of the instruction code; establishing network connection with Bluetooth equipment; transmitting the instruction set file to the Bluetooth device; when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file. According to the method and the device for transmitting the data command, when the mobile terminal and the Bluetooth device are interconnected, the mobile terminal can consume small data flow to simultaneously transmit a plurality of data commands by transmitting the command code corresponding to the Bluetooth command, the purpose of rapidly receiving and transmitting the commands is achieved, the command transmission rate is improved, and the command execution efficiency is improved.
Referring to fig. 2, fig. 2 is a second flow chart of the instruction transmission method according to the embodiment of the present application. The instruction transmission method is applied to Bluetooth equipment, the Bluetooth equipment is provided with a Bluetooth module, and the method can comprise the following steps:
step 201, establishing a network connection with a mobile terminal.
Specifically, the Bluetooth device is connected with a Bluetooth network of the mobile terminal to perform communication interaction with the mobile terminal.
Step 202, receiving an instruction set file sent from the mobile terminal, wherein each bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the bluetooth instruction is larger than that of the instruction code.
The set instruction set file is generated after the mobile terminal configures a corresponding instruction code according to the use frequency of the Bluetooth instruction in the Bluetooth instruction set in a preset time period. The higher the use frequency of the Bluetooth instruction is, the shorter the data length of the configured instruction code is.
For example, after the mobile terminal configures a corresponding instruction code for a bluetooth instruction in the instruction set file, the instruction set file carrying the corresponding relationship between the bluetooth instruction and the instruction code is sent to the bluetooth device, and the bluetooth device is ready to start receiving the instruction of the mobile terminal after receiving the instruction set file sent by the mobile terminal.
And 203, receiving an instruction code sent from the mobile terminal.
When the mobile terminal needs to send a Bluetooth instruction to the Bluetooth device, the mobile terminal sends an instruction code corresponding to the Bluetooth instruction to the Bluetooth device, and the Bluetooth device receives the instruction code sent from the mobile terminal, wherein the instruction code is used for instructing the Bluetooth device to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
And 204, executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
After receiving the instruction code sent from the mobile terminal, the Bluetooth device further executes the Bluetooth instruction corresponding to the instruction code in the instruction set file.
For example, when the instruction code received by the bluetooth device corresponds to a single operation instruction, the bluetooth device executes the single operation instruction corresponding to the instruction code.
For example, when the instruction code received by the bluetooth device corresponds to an instruction sequence including a plurality of operation instructions, the bluetooth device executes the instruction sequence including the plurality of operation instructions corresponding to the instruction code.
For example, the bluetooth device generally executes bluetooth instructions on a first-received first-executed basis. However, if the bluetooth device receives the first instruction code and the execution wait command and the execution sequence information at the same time, the bluetooth device needs to wait for receiving the last instruction code and the execution start command, and then sequentially execute the plurality of bluetooth instructions according to the execution sequence in the execution sequence information.
Any combination of the above optional solutions may be adopted to form an optional embodiment of the present application, which is not described herein in detail.
In particular, the present application is not limited by the order of execution of the steps described, and certain steps may be performed in other orders or concurrently without conflict.
As can be seen from the above, the instruction transmission method provided in the embodiments of the present application establishes a network connection with a mobile terminal; receiving an instruction set file sent from the mobile terminal, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; receiving an instruction code sent from the mobile terminal; executing the Bluetooth instruction corresponding to the instruction code in the instruction set file. According to the embodiment of the application, when the mobile terminal and the Bluetooth device are interconnected, the instruction code corresponding to the Bluetooth instruction is sent, so that the instruction transmission rate is improved, and the instruction execution efficiency is improved.
The embodiment of the application also provides an instruction transmission device which can be integrated in a mobile terminal, wherein the mobile terminal can be a smart phone, a tablet computer, a desktop computer, a smart watch and other devices.
Referring to fig. 3, fig. 3 is a schematic structural diagram of a first instruction transmission device according to an embodiment of the present application. The first instruction transmitting device 30 is applied to a mobile terminal, and the first instruction transmitting device 30 may include:
the setting module 31 is configured to set an instruction set file, where each bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the bluetooth instruction is greater than the data size of the instruction code;
a first connection module 32 for establishing a network connection with a bluetooth device;
a first transmitting module 33, configured to transmit the instruction set file to the bluetooth device;
and the second sending module 34 is configured to send an instruction code corresponding to the bluetooth instruction to the bluetooth device when the bluetooth instruction needs to be sent to the bluetooth device, where the instruction code is used to instruct the bluetooth device to execute the bluetooth instruction corresponding to the instruction code in the instruction set file.
In some embodiments, the setting module 31 is configured to configure a corresponding instruction code according to a frequency of use of a bluetooth instruction in a bluetooth instruction set within a preset period of time, so as to generate an instruction set file, where the higher the frequency of use of the bluetooth instruction, the shorter the data length of the configured instruction code.
In some embodiments, the setting module 31 is further configured to reconfigure a corresponding new instruction code based on the frequency of use of the bluetooth instruction in the bluetooth instruction set every preset time period, so as to update the instruction set file;
the first sending module 33 is further configured to send the updated instruction set file to the bluetooth device;
the second sending module 34 is further configured to send a new instruction code corresponding to the bluetooth instruction to the bluetooth device when the bluetooth instruction needs to be sent to the bluetooth device, where the new instruction code is used to instruct the bluetooth device to execute the bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
In some embodiments, the second sending module 34 is configured to send, when a plurality of bluetooth instructions need to be sent to the bluetooth device, a plurality of instruction codes corresponding to the plurality of bluetooth instructions respectively to the bluetooth device, where the plurality of instruction codes are respectively used to instruct the bluetooth device to execute a plurality of bluetooth instructions corresponding to the plurality of instruction codes in the instruction set file.
In some embodiments, the second sending module 34 is further configured to send, in sequence, a plurality of instruction codes corresponding to the plurality of bluetooth instructions to the bluetooth device according to an execution sequence of the plurality of bluetooth instructions to be sent.
In some embodiments, the second sending module 34 is further configured to send, when it is detected that the bluetooth transmission rate is in a decreasing trend, a plurality of instruction codes corresponding to the plurality of bluetooth instructions to be sent to the bluetooth device sequentially according to an order of from greater to lesser lengths of the instruction codes corresponding to the plurality of bluetooth instructions.
As can be seen from the above, the instruction transmission device 30 provided in the embodiment of the present application sets an instruction set file through the setting module 31, where each bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the bluetooth instruction is greater than the data size of the instruction code; establishing a network connection with the bluetooth device through the first connection module 32; the first transmitting module 33 transmits the instruction set file to the bluetooth device; when a bluetooth instruction needs to be sent to the bluetooth device, the second sending module 34 sends an instruction code corresponding to the bluetooth instruction to the bluetooth device, where the instruction code is used to instruct the bluetooth device to execute the bluetooth instruction corresponding to the instruction code in the instruction set file. According to the method and the device for transmitting the data command, when the mobile terminal and the Bluetooth device are interconnected, the mobile terminal can consume small data flow to simultaneously transmit a plurality of data commands by transmitting the command code corresponding to the Bluetooth command, the purpose of rapidly receiving and transmitting the commands is achieved, the command transmission rate is improved, and the command execution efficiency is improved.
The embodiment of the application also provides an instruction transmission device, which can be integrated in a Bluetooth device, wherein the Bluetooth device can comprise a vehicle-mounted Bluetooth device, a watch, a sound box, a wireless earphone, a wireless mouse, a wireless keyboard and the like.
Referring to fig. 4, fig. 4 is a schematic structural diagram of a second instruction transmission device according to an embodiment of the present application. The second instruction transmission device 40 is applied to a bluetooth apparatus, and the second instruction transmission device 40 may include:
a second connection module 41 for establishing a network connection with the mobile terminal;
a first receiving module 42, configured to receive an instruction set file sent from the mobile terminal, where each bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and a data size of the bluetooth instruction is greater than a data size of the instruction code;
a second receiving module 43, configured to receive an instruction code sent from the mobile terminal;
and the execution module 44 is configured to execute the bluetooth instruction corresponding to the instruction code in the instruction set file.
As can be seen from the above, the instruction transmitting device 40 provided in the embodiment of the present application establishes a network connection with the mobile terminal through the second connection module 41; the first receiving module 42 receives an instruction set file sent from the mobile terminal, wherein each bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the bluetooth instruction is larger than that of the instruction code; the second receiving module 43 receives an instruction code transmitted from the mobile terminal; the execution module 44 executes the bluetooth instructions in the instruction set file that correspond to the instruction codes. According to the embodiment of the application, when the mobile terminal and the Bluetooth device are interconnected, the instruction code corresponding to the Bluetooth instruction is received, so that the instruction transmission rate is improved, and the instruction execution efficiency is improved.
The embodiment of the application also provides a mobile terminal. The mobile terminal can be a smart phone, a tablet computer, a desktop computer, a smart watch, a display and other devices.
Referring to fig. 5, fig. 5 shows a schematic structural diagram of a mobile terminal according to an embodiment of the present application, where the mobile terminal may be used to implement the instruction transmission method provided in the foregoing embodiment. The mobile terminal 1200 may be a smart phone, tablet computer, smart watch, display, etc.
As shown in fig. 5, the mobile terminal 1200 may include an RF (Radio Frequency) circuit 110, a memory 120 including one or more computer-readable storage media (only one is shown), an input unit 130, a display unit 140, a bluetooth module 150, an audio circuit 160, a transmission module 170, a processor 180 including one or more processing cores (only one is shown), a power supply 190, and the like. Those skilled in the art will appreciate that the configuration of the mobile terminal 1200 shown in fig. 5 is not limiting of the mobile terminal 1200 and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
The RF circuit 110 is configured to receive and transmit electromagnetic waves, and to perform mutual conversion between the electromagnetic waves and the electrical signals, so as to communicate with a communication network or other devices. RF circuitry 110 may include various existing circuit elements for performing these functions, such as an antenna, a radio frequency transceiver, a digital signal processor, an encryption/decryption chip, a Subscriber Identity Module (SIM) card, memory, and the like. The RF circuitry 110 may communicate with various networks such as the internet, intranets, wireless networks, or other devices via wireless networks.
The memory 120 may be used to store software programs and modules, such as program instructions/modules corresponding to the instruction transmission methods in the above embodiments, and the processor 180 executes the software programs and modules stored in the memory 120 to perform various functional applications and data processing. Memory 120 may include high-speed random access memory, and may also include non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 120 may further include memory located remotely from the processor 180, which may be connected to the mobile terminal 1200 via a network. Examples of such networks include, but are not limited to, the internet, intranets, local area networks, mobile communication networks, and combinations thereof.
The input unit 130 may be used to receive input numeric or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may comprise a touch sensitive surface 131 and other input devices 132. The touch-sensitive surface 131, also referred to as a touch display screen or a touch pad, may collect touch operations thereon or thereabout by a user (e.g., operations of the user on the touch-sensitive surface 131 or thereabout by using any suitable object or accessory such as a finger, stylus, etc.), and actuate the corresponding connection means according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection device and a touch controller. The touch detection device detects the touch azimuth of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch detection device and converts it into touch point coordinates, which are then sent to the processor 180, and can receive commands from the processor 180 and execute them. In addition, the touch-sensitive surface 131 may be implemented in various types of resistive, capacitive, infrared, surface acoustic wave, and the like. In addition to the touch-sensitive surface 131, the input unit 130 may also comprise other input devices 132. In particular, other input devices 132 may include, but are not limited to, one or more of a physical keyboard, function keys (e.g., volume control keys, switch keys, etc.), a trackball, mouse, joystick, etc.
The display unit 140 may be used to display information input by a user or information provided to the user and various graphical user interfaces of the mobile terminal 1200, which may be composed of graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and alternatively, the display panel 141 may be configured in the form of an LCD (Liquid Crystal Display ), an OLED (Organic Light-Emitting Diode), or the like. Further, the touch-sensitive surface 131 may overlay the display panel 141, and upon detection of a touch operation thereon or thereabout by the touch-sensitive surface 131, the touch-sensitive surface is transferred to the processor 180 to determine the type of touch event, and the processor 180 then provides a corresponding visual output on the display panel 141 based on the type of touch event. Although in fig. 5 the touch-sensitive surface 131 and the display panel 141 are implemented as two separate components for input and output functions, in some embodiments the touch-sensitive surface 131 may be integrated with the display panel 141 to implement the input and output functions.
The mobile terminal 1200 may also include a bluetooth module 150 for enabling short-range communication between devices.
Audio circuitry 160, speaker 161, microphone 162 may provide an audio interface between a user and mobile terminal 1200. The audio circuit 160 may transmit the received electrical signal converted from audio data to the speaker 161, and the electrical signal is converted into a sound signal by the speaker 161 to be output; on the other hand, the microphone 162 converts the collected sound signal into an electrical signal, receives the electrical signal from the audio circuit 160, converts the electrical signal into audio data, outputs the audio data to the processor 180 for processing, transmits the audio data to, for example, another terminal via the RF circuit 110, or outputs the audio data to the memory 120 for further processing. Audio circuitry 160 may also include an ear bud jack to provide communication of a peripheral ear bud with mobile terminal 1200.
The mobile terminal 1200 may facilitate user email, web browsing, streaming media access, etc. via the transmission module 170 (e.g., wi-Fi module), which provides wireless broadband internet access to the user. Although fig. 5 shows the transmission module 170, it is understood that it does not belong to the essential constitution of the mobile terminal 1200, and may be omitted entirely as needed within the scope of not changing the essence of the invention.
The processor 180 is a control center of the mobile terminal 1200, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 1200 and processes data by running or executing software programs and/or modules stored in the memory 120, and calling data stored in the memory 120, thereby performing overall monitoring of the mobile phone. Optionally, the processor 180 may include one or more processing cores.
The mobile terminal 1200 also includes a power supply 190 (e.g., a battery) that provides power to the various components, and in some embodiments, may be logically coupled to the processor 180 via a power management system to enable management of charging, discharging, and power consumption by the power management system. The power supply 190 may also include one or more of any of a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
Although not shown, the mobile terminal 1200 may further include cameras (e.g., front camera, rear camera), sensors, etc., which are not described herein.
In particular, in the present embodiment, the display unit 140 of the mobile terminal 1200 is a touch screen display, the mobile terminal 1200 further includes a memory 120, and one or more programs, wherein the one or more programs are stored in the memory 120 and configured to be executed by the one or more processors 180, the one or more programs comprising instructions for:
setting an instruction set file, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; establishing network connection with Bluetooth equipment; transmitting the instruction set file to the Bluetooth device; when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
In some embodiments, the processor 180 is configured to set an instruction set file, including:
And configuring a corresponding instruction code according to the use frequency of the Bluetooth instruction in the Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instruction is, the shorter the data length of the configured instruction code is.
In some embodiments, the processor 180 is further configured to:
reconfiguring a corresponding new instruction code based on the use frequency of the Bluetooth instruction in the Bluetooth instruction set every preset time period so as to update the instruction set file;
transmitting the updated instruction set file to the Bluetooth equipment;
when a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
In some embodiments, the processor 180 is configured to send, when a bluetooth instruction needs to be sent to the bluetooth device, an instruction code corresponding to the bluetooth instruction to the bluetooth device, including:
when a plurality of Bluetooth instructions are required to be sent to the Bluetooth device, a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth device, and the plurality of instruction codes are respectively used for instructing the Bluetooth device to execute a plurality of Bluetooth instructions corresponding to the plurality of instruction codes in the instruction set file.
In some embodiments, the processor 180 is configured to send, when a plurality of bluetooth instructions need to be sent to the bluetooth device, a plurality of instruction codes corresponding to the plurality of bluetooth instructions respectively to the bluetooth device, where the steps include:
and sequentially transmitting a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the execution sequence of the plurality of Bluetooth instructions to be transmitted.
In some embodiments, the processor 180 is configured to send, when a plurality of bluetooth instructions need to be sent to the bluetooth device, a plurality of instruction codes corresponding to the plurality of bluetooth instructions respectively to the bluetooth device, where the steps include:
when the Bluetooth transmission rate is detected to be in a descending trend, sequentially transmitting a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence from big to small of the length of the instruction codes corresponding to the plurality of Bluetooth instructions to be transmitted.
The above operations are specifically referred to the previous embodiments, and are not described herein.
As can be seen from the above, the embodiments of the present application provide a mobile terminal 1200, wherein the mobile terminal 1200 performs the following steps: setting an instruction set file, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; establishing network connection with Bluetooth equipment; transmitting the instruction set file to the Bluetooth device; when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file. According to the method and the device for transmitting the data command, when the mobile terminal and the Bluetooth device are interconnected, the mobile terminal can consume small data flow to simultaneously transmit a plurality of data commands by transmitting the command code corresponding to the Bluetooth command, the purpose of rapidly receiving and transmitting the commands is achieved, the command transmission rate is improved, and the command execution efficiency is improved.
The embodiment of the application also provides Bluetooth equipment. The bluetooth device may include a vehicle bluetooth device, a watch, a sound box, a wireless headset, a wireless mouse, a wireless keyboard, etc.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a bluetooth device according to an embodiment of the present application, where the bluetooth device may be used to implement the instruction transmission method provided in the foregoing embodiment. The mobile terminal 1200 may be a smart phone, tablet computer, smart watch, display, etc.
As shown in fig. 6, the bluetooth device 2200 may include one or more processors 210 of a processing core, one or more memories 220 of a computer readable storage medium, a power supply 230 and an input unit 240, a bluetooth module 250, and the like. Those skilled in the art will appreciate that the configuration of the Bluetooth device 2200 shown in FIG. 6 is not limiting of the Bluetooth device 2200, and may include more or fewer components than shown, or may combine certain components, or a different arrangement of components. Wherein:
the processor 210 is a control center of the bluetooth device 2200, connects various parts of the entire bluetooth device 2200 using various interfaces and lines, and performs various functions of the bluetooth device 2200 and processes data by running or executing software programs and/or modules stored in the memory 220, and calling data stored in the memory 220, thereby performing overall monitoring of the bluetooth device 2200. Optionally, processor 210 may include one or more processing cores.
The memory 220 may be used to store software programs and modules, and the processor 210 performs various functional applications and data processing by executing the software programs and modules stored in the memory 220. The memory 220 may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required for at least one function, and the like; the storage data area may store data created according to the use of the bluetooth device 2200, etc. In addition, memory 220 may include high-speed random access memory, and may also include non-volatile memory, such as at least one magnetic disk storage device, flash memory device, or other volatile solid-state storage device. Accordingly, the memory 220 may also include a memory controller to provide the processor 210 with access to the memory 220.
The bluetooth device 2200 also includes a power supply 230 for powering the various components, and preferably the power supply 230 may be logically coupled to the processor 210 via a power management system so as to perform functions such as managing charging, discharging, and power consumption via the power management system. The power supply 230 may also include one or more of any components, such as a direct current or alternating current power supply, a recharging system, a power failure detection circuit, a power converter or inverter, a power status indicator, and the like.
The bluetooth device 2200 may further comprise an input unit 240, which input unit 240 may be used to receive input digital or character information and to generate keyboard, mouse, joystick, optical or trackball signal inputs in connection with user settings and function control.
The bluetooth device 2200 may also include a bluetooth module 250 for enabling short-range communication between devices.
Although not shown, the bluetooth device 2200 may further include a display unit or the like, which is not described herein. In particular, in this embodiment, the processor 210 in the bluetooth device 2200 loads executable files corresponding to the processes of one or more computer programs into the memory 220 according to the following instructions, and the processor 210 executes the computer programs stored in the memory 220, so as to implement various functions as follows:
establishing network connection with a mobile terminal; receiving an instruction set file sent from the mobile terminal, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; receiving an instruction code sent from the mobile terminal; executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The above operations are specifically referred to the previous embodiments, and are not described herein.
As can be seen from the above, the bluetooth device 2200 provided in this embodiment, the bluetooth device 2200 performs the following steps: establishing network connection with a mobile terminal; receiving an instruction set file sent from the mobile terminal, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code; receiving an instruction code sent from the mobile terminal; executing the Bluetooth instruction corresponding to the instruction code in the instruction set file. According to the embodiment of the application, when the mobile terminal and the Bluetooth device are interconnected, the instruction code corresponding to the Bluetooth instruction is sent, so that the instruction transmission rate is improved, and the instruction execution efficiency is improved.
The embodiment of the application also provides a storage medium, in which a computer program is stored, and when the computer program runs on a computer, the computer executes the instruction transmission method described in any one of the embodiments.
It should be noted that, for the instruction transmission method described in the present application, it will be understood by those skilled in the art that all or part of the flow of implementing the instruction transmission method described in the embodiments of the present application may be implemented by controlling related hardware by using a computer program, where the computer program may be stored in a computer readable storage medium, such as a memory of a mobile terminal, and executed by at least one processor in the mobile terminal, and the execution may include the flow of the embodiment of the instruction transmission method. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a random access Memory (RAM, random Access Memory), or the like.
For the instruction transmitting device in the embodiment of the present application, each functional module may be integrated in one processing chip, or each module may exist alone physically, or two or more modules may be integrated in one module. The integrated modules may be implemented in hardware or in software functional modules. The integrated module, if implemented as a software functional module and sold or used as a stand-alone product, may also be stored in a computer readable storage medium such as read-only memory, magnetic or optical disk, etc.
The method, the device and the storage medium for transmitting the instruction provided by the embodiment of the application are described in detail. The principles and embodiments of the present application are described herein with specific examples, the above examples being provided only to assist in understanding the methods of the present application and their core ideas; meanwhile, those skilled in the art will have variations in the specific embodiments and application scope in light of the ideas of the present application, and the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. An instruction transmission method applied to a mobile terminal, characterized in that the method comprises the following steps:
setting an instruction set file, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
establishing network connection with Bluetooth equipment;
transmitting the instruction set file to the Bluetooth device;
when a Bluetooth instruction is required to be sent to the Bluetooth equipment, an instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
2. The instruction transmission method of claim 1, wherein the setting instruction set file includes:
and configuring a corresponding instruction code according to the use frequency of the Bluetooth instruction in the Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instruction is, the shorter the data length of the configured instruction code is.
3. The instruction transmission method according to claim 2, wherein the method further comprises:
reconfiguring a corresponding new instruction code based on the use frequency of the Bluetooth instruction in the Bluetooth instruction set every preset time period so as to update the instruction set file;
Transmitting the updated instruction set file to the Bluetooth equipment;
when a Bluetooth instruction is required to be sent to the Bluetooth equipment, a new instruction code corresponding to the Bluetooth instruction is sent to the Bluetooth equipment, and the new instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the new instruction code in the updated instruction set file.
4. The method for transmitting an instruction according to claim 1, wherein when a bluetooth instruction is required to be transmitted to the bluetooth device, transmitting an instruction code corresponding to the bluetooth instruction to the bluetooth device comprises:
when a plurality of Bluetooth instructions are required to be sent to the Bluetooth device, a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth device, and the plurality of instruction codes are respectively used for instructing the Bluetooth device to execute a plurality of Bluetooth instructions corresponding to the plurality of instruction codes in the instruction set file.
5. The method for transmitting commands according to claim 4, wherein when a plurality of bluetooth commands need to be transmitted to the bluetooth device, transmitting a plurality of command codes respectively corresponding to the plurality of bluetooth commands to the bluetooth device, comprises:
And sequentially transmitting a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the execution sequence of the plurality of Bluetooth instructions to be transmitted.
6. The method for transmitting commands according to claim 4, wherein when a plurality of bluetooth commands need to be transmitted to the bluetooth device, transmitting a plurality of command codes respectively corresponding to the plurality of bluetooth commands to the bluetooth device, comprises:
when the Bluetooth transmission rate is detected to be in a descending trend, sequentially transmitting a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence from big to small of the length of the instruction codes corresponding to the plurality of Bluetooth instructions to be transmitted.
7. A method for transmitting instructions, applied to a bluetooth device, the method comprising:
establishing network connection with a mobile terminal;
receiving an instruction set file sent from the mobile terminal, wherein each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
receiving an instruction code sent from the mobile terminal;
executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
8. An instruction transmission device applied to a mobile terminal, characterized in that the device comprises:
the device comprises a setting module, a setting module and a processing module, wherein the setting module is used for setting an instruction set file, each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
the first connection module is used for establishing network connection with the Bluetooth equipment;
the first sending module is used for sending the instruction set file to the Bluetooth equipment;
the second sending module is used for sending an instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment when the Bluetooth instruction is required to be sent to the Bluetooth equipment, and the instruction code is used for instructing the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
9. An instruction transmission apparatus applied to a bluetooth device, the apparatus comprising:
the second connection module is used for establishing network connection with the mobile terminal;
the mobile terminal comprises a first receiving module, a second receiving module and a third receiving module, wherein the first receiving module is used for receiving an instruction set file sent by the mobile terminal, each Bluetooth instruction in the instruction set file is configured with a corresponding instruction code, and the data size of the Bluetooth instruction is larger than that of the instruction code;
The second receiving module is used for receiving the instruction codes sent by the mobile terminal;
and the execution module is used for executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
10. A storage medium having a computer program stored therein, which when run on a computer causes the computer to perform the steps of the instruction transmission method of any one of claims 1 to 6 or the steps of the instruction transmission method of claim 7.
CN202010390876.7A 2020-05-11 2020-05-11 Instruction transmission method, apparatus and storage medium Active CN111542037B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010390876.7A CN111542037B (en) 2020-05-11 2020-05-11 Instruction transmission method, apparatus and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010390876.7A CN111542037B (en) 2020-05-11 2020-05-11 Instruction transmission method, apparatus and storage medium

Publications (2)

Publication Number Publication Date
CN111542037A CN111542037A (en) 2020-08-14
CN111542037B true CN111542037B (en) 2023-07-21

Family

ID=71975529

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010390876.7A Active CN111542037B (en) 2020-05-11 2020-05-11 Instruction transmission method, apparatus and storage medium

Country Status (1)

Country Link
CN (1) CN111542037B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114924987A (en) * 2022-06-08 2022-08-19 北京百度网讯科技有限公司 Method, device, equipment and medium for detecting script input instruction

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483836A (en) * 2009-01-15 2009-07-15 中兴通讯股份有限公司 Novel maintenance system and method
CN103809933A (en) * 2012-11-06 2014-05-21 财团法人工业技术研究院 Reconfigurable instruction encoding method, execution method and electronic device
CN106534924A (en) * 2016-12-19 2017-03-22 深圳创维数字技术有限公司 Method and device for adapting to multiple remote controllers
CN107146616A (en) * 2017-06-13 2017-09-08 广东欧珀移动通信有限公司 Apparatus control method and Related product
CN109802705A (en) * 2019-01-31 2019-05-24 慧翰微电子股份有限公司 Automobile or industrial data transmission system based on BT5
CN110099374A (en) * 2019-04-29 2019-08-06 广州力控智电信息科技有限公司 The network-building method of a kind of electronic equipment
CN110505655A (en) * 2018-09-10 2019-11-26 深圳市文鼎创数据科技有限公司 Data command processing method, storage medium and bluetooth shield

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7143407B2 (en) * 2001-07-26 2006-11-28 Kyocera Wireless Corp. System and method for executing wireless communications device dynamic instruction sets
US7184793B2 (en) * 2001-07-26 2007-02-27 Kyocera Wireless Corp. System and method for over the air area code update

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101483836A (en) * 2009-01-15 2009-07-15 中兴通讯股份有限公司 Novel maintenance system and method
CN103809933A (en) * 2012-11-06 2014-05-21 财团法人工业技术研究院 Reconfigurable instruction encoding method, execution method and electronic device
CN106534924A (en) * 2016-12-19 2017-03-22 深圳创维数字技术有限公司 Method and device for adapting to multiple remote controllers
CN107146616A (en) * 2017-06-13 2017-09-08 广东欧珀移动通信有限公司 Apparatus control method and Related product
CN110505655A (en) * 2018-09-10 2019-11-26 深圳市文鼎创数据科技有限公司 Data command processing method, storage medium and bluetooth shield
CN109802705A (en) * 2019-01-31 2019-05-24 慧翰微电子股份有限公司 Automobile or industrial data transmission system based on BT5
CN110099374A (en) * 2019-04-29 2019-08-06 广州力控智电信息科技有限公司 The network-building method of a kind of electronic equipment

Also Published As

Publication number Publication date
CN111542037A (en) 2020-08-14

Similar Documents

Publication Publication Date Title
EP3873004B1 (en) Method for establishing classic bluetooth connection between dual-mode bluetooth devices, and dual-mode bluetooth device
CN111142711B (en) Firmware configuration method and device, storage medium and mobile terminal
CN105653486A (en) Mobile terminal and method for reusing USB ports of processors thereof
US10912027B2 (en) Scanning method and device
CN106776036A (en) A kind of resource allocation methods and device
CN106055408A (en) Application control method and mobile terminal
CN106446111A (en) Data migration method and terminal
CN111008090B (en) Battery electric quantity control method and device, storage medium and terminal equipment
CN111542037B (en) Instruction transmission method, apparatus and storage medium
CN111432387B (en) Many-to-many switching module, multi-machine wireless communication system and communication method thereof
CN111026457B (en) Hardware configuration method and device, storage medium and terminal equipment
CN110225106B (en) Data transmission method, device and storage medium
CN112235082A (en) Communication information transmission method, device, equipment and storage medium
CN112261634B (en) Bluetooth transmission control method and device, terminal equipment and storage medium
CN110191503B (en) Audio playing method, system, storage medium and mobile terminal
CN106776041A (en) A kind of data processing method and device
CN112286849A (en) Wireless charging base data switching method and system, storage medium and terminal equipment
CN110913022A (en) Method, device and system for downloading network file of mobile terminal and storage medium
CN110582079A (en) Bluetooth connection setting method and device, computer readable storage medium and terminal
CN112235806B (en) Bluetooth parameter configuration method and device, storage medium and mobile terminal
CN111488123B (en) Storage space management method and device, storage medium and mobile terminal
CN105279175B (en) Data transmission method and device
CN112491562B (en) Communication control method and device and mobile terminal
CN109617660B (en) Method and device for setting carrier aggregation frequency band, storage medium and mobile terminal
CN111262636B (en) Method and device for enhancing network data transmission speed, storage medium and mobile terminal

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20230620

Address after: 518000, 4th Floor, Kangjia R&D Building, No. 28 Keji South 12th Road, Gaoxin District, Yuehai Street, Nanshan District, Shenzhen, Guangdong Province

Applicant after: Shenzhen Kangying Semiconductor Technology Co.,Ltd.

Address before: 10 / F, No.5 Lane 999, Yangfan Road, high tech Zone, Ningbo City, Zhejiang Province

Applicant before: TCL mobile communication technology (Ningbo) Co.,Ltd.

GR01 Patent grant
GR01 Patent grant