CN111542037A - Instruction transmission method, device and storage medium - Google Patents

Instruction transmission method, device and storage medium Download PDF

Info

Publication number
CN111542037A
CN111542037A CN202010390876.7A CN202010390876A CN111542037A CN 111542037 A CN111542037 A CN 111542037A CN 202010390876 A CN202010390876 A CN 202010390876A CN 111542037 A CN111542037 A CN 111542037A
Authority
CN
China
Prior art keywords
instruction
bluetooth
set file
code
instructions
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.)
Granted
Application number
CN202010390876.7A
Other languages
Chinese (zh)
Other versions
CN111542037B (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
TCL Mobile Communication Technology Ningbo 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 TCL Mobile Communication Technology Ningbo Ltd filed Critical TCL Mobile Communication Technology Ningbo 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

Images

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 the Bluetooth equipment; sending the instruction set file to the Bluetooth device; when a Bluetooth instruction needs 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 indicating 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 is interconnected with the Bluetooth device, the instruction transmission rate is improved and the instruction execution efficiency is improved by sending the instruction code corresponding to the Bluetooth instruction.

Description

Instruction transmission method, device and storage medium
Technical Field
The present application relates to the field of bluetooth technologies, and in particular, to a method and an apparatus for instruction transmission and a storage medium.
Background
At present, a bluetooth chip is generally adopted on a mobile terminal, so that the mobile terminal supports a bluetooth function, and is wirelessly connected 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, the mobile terminals are interconnected through bluetooth in a common connection manner, for example, a bluetooth mouse is used to connect with the mobile terminals, so that operations can be performed on the mobile terminals through the bluetooth mouse. When the mobile terminal and the bluetooth device are interconnected, only a single instruction is often transmitted and received, and as the bluetooth protocol is more and more complex, the single instruction is often required to occupy more data for transmitting and receiving, and especially when a plurality of continuous bluetooth instructions are transmitted to the bluetooth device by the mobile terminal, more time is consumed, and more network resources are occupied, so that the actual execution effect is influenced.
Therefore, the prior art has defects 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, when a mobile terminal is interconnected with a Bluetooth device, the instruction transmission rate is improved and the instruction execution efficiency is improved by sending an instruction code corresponding to a Bluetooth instruction.
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 the Bluetooth equipment;
sending the instruction set file to the Bluetooth device;
when a Bluetooth instruction needs 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 indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
In some embodiments, the setting instruction set file includes:
configuring corresponding instruction codes according to the use frequency of Bluetooth instructions in a Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instructions is, the shorter the data length of the configured instruction codes 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;
sending the updated instruction set file to the Bluetooth equipment;
and when a Bluetooth instruction needs to be sent to the Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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 it is necessary to send a bluetooth instruction to the bluetooth device, sending an instruction code corresponding to the bluetooth instruction to the bluetooth device includes:
when a plurality of Bluetooth instructions need to be sent to the Bluetooth equipment, a plurality of instruction codes corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth equipment, and the instruction codes are used for indicating the Bluetooth equipment to execute the Bluetooth instructions corresponding to the 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 respectively corresponding to the plurality of bluetooth instructions to the bluetooth device includes:
and according to the execution sequence of the plurality of Bluetooth instructions to be sent, sequentially sending a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, sending a plurality of instruction codes respectively corresponding to the plurality of bluetooth instructions to the bluetooth device includes:
when detecting that the Bluetooth transmission rate is in a descending trend, sequentially sending a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence of the lengths of the instruction codes corresponding to the plurality of Bluetooth instructions to be sent from large to small.
The embodiment of the application also provides an instruction transmission method, which is applied to the Bluetooth equipment, and the method 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 transmitted from the mobile terminal;
and executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The embodiment of the present application further provides an instruction transmission apparatus, which is applied to a mobile terminal, and the apparatus includes:
the Bluetooth system comprises a setting module, a setting module and a control 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;
and the second sending module is used for sending an instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment when the Bluetooth instruction needs to be sent to the Bluetooth equipment, and the instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The embodiment of the present application further provides an instruction transmission apparatus, which is applied to bluetooth devices, the apparatus includes:
the second connection module is used for establishing network connection with the mobile terminal;
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 code 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.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer is caused to execute the steps in the instruction transmission method.
In the embodiment of the application, 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; establishing network connection with the Bluetooth equipment; sending the instruction set file to the Bluetooth device; when a Bluetooth instruction needs 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 indicating 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 is interconnected with the Bluetooth device, the instruction transmission rate is improved and the instruction execution efficiency is improved by sending the instruction code corresponding to the Bluetooth instruction.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings used in the description of the embodiments will be briefly introduced below. It is obvious that the drawings in the following description are only some embodiments of the application, and that for a person skilled in the art, other drawings can be derived from them without inventive effort.
Fig. 1 is a first flowchart of a command transmission method according to an embodiment of the present disclosure.
Fig. 2 is a second flowchart of a command transmission method according to an embodiment of the present application.
Fig. 3 is a schematic structural diagram of a first instruction transmitting device according to an embodiment of the present disclosure.
Fig. 4 is a schematic structural diagram of a second instruction transmitting 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 is to be understood that the embodiments described are only a few embodiments of the present application and not all embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without inventive step, are within the scope of the present application.
The embodiment of the application provides an instruction transmission method, which can be applied to a mobile terminal and can also be applied to Bluetooth equipment. 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-mounted bluetooth device, a watch, a speaker, a wireless headset, a wireless mouse, a wireless keyboard, and the like.
Referring to fig. 1, fig. 1 is a first flowchart of a command transmission method 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, 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.
In some embodiments, the setting instruction set file includes:
configuring corresponding instruction codes according to the use frequency of Bluetooth instructions in a Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instructions is, the shorter the data length of the configured instruction codes is.
The data size of the instruction code is far smaller than that of the Bluetooth instruction. For example, the command code is only 4b, and the corresponding bluetooth command is 5 kb.
Specifically, the Bluetooth device instructions commonly used by the mobile terminal are collected and compiled into a Bluetooth instruction set when the mobile terminal is used daily, and corresponding instruction codes are configured for the Bluetooth instructions in the Bluetooth instruction set, wherein the Bluetooth instructions correspond to the instruction codes one by one.
For example, in order to increase the transmission rate of bluetooth commands as much as possible so that the time for bluetooth transmission is as short as possible, frequent adjustment of command codes is required. For example, shorter command codes are assigned to the most commonly used bluetooth commands in the bluetooth command set, and longer command codes are assigned to the relatively less commonly used bluetooth commands in the bluetooth command set.
For example, when the mobile terminal interacts with a bluetooth device, a dedicated counter is allocated to a bluetooth instruction whose usage number exceeds a threshold (e.g., 10 times) within a set time period (e.g., 1 month), the counter is incremented by 1 every time the subsequent bluetooth instruction is used, and corresponding instruction codes are configured for the bluetooth instructions in the bluetooth instruction set after sequencing 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 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 sequence and high probability of execution, or an instruction sequence composed of operation instructions with consecutive execution actions and high use frequency. When configuring the instruction codes for the bluetooth instruction, the instruction sequence is configured as an independent individual, and only one instruction code is configured for one instruction sequence. The instruction code may be composed of any one of numbers, letters, and characters, or a combination of at least two or more of them.
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 composed of the operation instruction a and the operation instruction B in execution order, the instruction sequence B + a is composed of the operation instruction B and the operation instruction a in execution order, the instruction sequence C + a is composed of the operation instruction C and the operation instruction a in execution order, the instruction sequence a + B + C is composed of the operation instruction a, the operation instruction B, and the operation instruction C in execution order, and the instruction sequence a + C + B is composed of the operation instruction a, the operation instruction B, and the operation instruction C in execution order. When configuring the instruction code for the bluetooth instruction, configure the instruction code a for the operation instruction a, configure the instruction code B for the operation instruction B, configure the instruction code C for the operation instruction C, configure the instruction code d for the instruction sequence a + B, configure the instruction code e for the instruction sequence B + a, configure the instruction code f for the instruction sequence C + a, configure the instruction code g for the instruction sequence a + B + C, and configure the instruction code h for the instruction sequence a + C + B. Therefore, the instruction sequence consisting of the plurality of operation instructions in sequence is configured with one instruction code, and compared with the condition 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, so that the transmission rate of the Bluetooth instruction is greatly increased.
For example, the instruction set file may be composed of several subfiles, and the file name of each subfile may be used to tag the operation instruction or the unique code of the operation instruction set. Each subfile in the instruction set file is an operation instruction or an operation instruction set which may be sent by the bluetooth device, that is, the instruction set file is composed of all the possible operation instructions or operation instruction sets sent by the bluetooth device. The instruction set file is generally collected in advance by a bluetooth equipment manufacturer during production, and then is packaged and stored in the mobile terminal. By configuring the operation instruction or the operation instruction set with the instruction code in the instruction set file, each subfile in the instruction set file has a group of pairs consisting of the operation instruction and the instruction code or a group of pairs consisting of the operation instruction set and the instruction code.
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 instruction may be a single operation instruction or an operation instruction set composed of a plurality of operation instructions. The instruction code set contains all instruction codes. The instruction-instruction code corresponding relation table records the one-to-one corresponding relation between the Bluetooth instruction and the instruction code.
Step 102, establishing network connection with the Bluetooth device.
Specifically, the mobile terminal is connected with a bluetooth network of the bluetooth device, and the mobile terminal sends a preset bluetooth instruction to the bluetooth device, so that the bluetooth device automatically executes the corresponding bluetooth instruction after receiving the bluetooth instruction.
And 103, sending the instruction set file to the Bluetooth equipment.
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 equipment, sending an instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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.
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 it is necessary to send a bluetooth instruction to the bluetooth device, sending an instruction code corresponding to the bluetooth instruction to the bluetooth device includes:
when a plurality of Bluetooth instructions need to be sent to the Bluetooth equipment, a plurality of instruction codes corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth equipment, and the instruction codes are used for indicating the Bluetooth equipment to execute the Bluetooth instructions corresponding to the instruction codes in the instruction set file.
For example, if the plurality of bluetooth instructions that need to be sent to the bluetooth device are an operation instruction a, an operation instruction B, and an operation instruction C, 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 respectively corresponding to the plurality of bluetooth instructions to the bluetooth device includes:
and according to the execution sequence of the plurality of Bluetooth instructions to be sent, sequentially sending a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment.
For example, the plurality of bluetooth instructions that need 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 sent to the bluetooth device in sequence, so that the bluetooth device executes the operation instruction a, the operation instruction C, and the operation instruction B in sequence.
In some embodiments, when a plurality of bluetooth instructions need to be sent to the bluetooth device, and each of the plurality of bluetooth instructions that need to be sent is a single operation instruction, the plurality of bluetooth instructions that need to be sent are the plurality of operation instructions, and if the plurality of operation instructions are the same as the first instruction sequence in the instruction set file, a instruction code corresponding to the first instruction sequence is sent to the bluetooth device.
For example, the plurality of bluetooth instructions that need to be sent to the bluetooth device are an operation instruction a, an operation instruction B, and an operation instruction C, the execution order of the bluetooth instructions is the operation instruction a, the operation instruction C, and the operation instruction B, and the plurality of bluetooth instructions are the same as the instruction sequence a + C + B, and then only the instruction code h corresponding to the instruction sequence a + C + B needs to be sent to the bluetooth device. Compared with the situation that the instruction code a, the instruction code c and the instruction code b are sent to the Bluetooth device in sequence, only one instruction code corresponding to the instruction sequence containing the same operation instruction is sent, 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 respectively corresponding to the plurality of bluetooth instructions to the bluetooth device includes:
when detecting that the Bluetooth transmission rate is in a descending trend, sequentially sending a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence of the lengths of the instruction codes corresponding to the plurality of Bluetooth instructions to be sent from large to small.
For example, in order to ensure a short transmission time, when it is detected that the bluetooth transmission rate is in a downward trend, a plurality of instruction codes corresponding to a plurality of bluetooth instructions to be sent are sequentially sent to the bluetooth device according to a descending order of the lengths of the instruction codes corresponding to the plurality of bluetooth instructions. In the initial stage of data transmission, the instruction codes with longer length are transmitted preferentially at a better network transmission rate, the instruction codes with second-longest length are transmitted again, and so on, and the instruction codes with the shortest length are transmitted finally, so that the shorter transmission time is ensured under the condition that the transmission rate is slower and slower. For example, if there is no execution sequence among the multiple bluetooth instructions that need to be sent, the bluetooth instruction corresponding to the instruction code that is transmitted first is executed first by the bluetooth device. For example, if there is an execution sequence among the multiple bluetooth instructions to be sent, the first instruction code sent to the bluetooth device may carry an execution waiting instruction and execution sequence information, and an execution start instruction is carried until the last instruction code is sent, so that the bluetooth device does not execute the multiple bluetooth instructions sequentially according to the execution sequence in the execution sequence information when receiving the last instruction code and the execution start instruction.
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;
sending the updated instruction set file to the Bluetooth equipment;
and when a Bluetooth instruction needs to be sent to the Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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 course of using the bluetooth device by the user, some bluetooth commands may be frequently called as the user behavior changes, and some bluetooth devices are called less frequently, and then the corresponding new command codes may be reconfigured at intervals, such as every other week or every other month, based on the usage frequency of the bluetooth commands in the bluetooth command set, so as to update the command set file.
For example, if the instruction set file may be composed of several subfiles, each subfile has a group of pairs consisting of bluetooth instructions and instruction codes, that is, each subfile has a group of pairs consisting of operation instructions and instruction codes, or has a group of pairs consisting of operation instruction sets and instruction codes. A new pairing group 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 subfile with the changed pair group needs to be sent. When a Bluetooth instruction needs to be sent to Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein the new instruction code is used for instructing 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, when the instruction set file is updated, 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 updated instruction set file is sent to the bluetooth device, only the updated instruction-instruction code correspondence table may be sent, or the updated entire instruction set file may be sent. And when a Bluetooth instruction needs to be sent to the Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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. And when a Bluetooth instruction needs to be sent to the Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, in the instruction transmission method provided in the embodiment of the present application, 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 the data size of the instruction code; establishing network connection with the Bluetooth equipment; sending the instruction set file to the Bluetooth device; when a Bluetooth instruction needs 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 indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file. When the mobile terminal is connected with the Bluetooth device in an interconnected mode, the mobile terminal can simultaneously send a plurality of data instructions by sending the instruction codes corresponding to the Bluetooth instructions through small data flow, the purpose of rapidly receiving and sending the instructions is achieved, the instruction transmission rate is improved, and the instruction execution efficiency is improved.
Referring to fig. 2, fig. 2 is a second flowchart of a method for transmitting an instruction according to an embodiment of the present disclosure. The instruction transmission method is applied to a Bluetooth device, the Bluetooth device is provided with a Bluetooth module, and the method can comprise the following steps:
step 201, establishing network connection with the 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, 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 larger than the data size of the instruction code.
The setting instruction set file is generated after the mobile terminal configures corresponding instruction codes according to the use frequency of the Bluetooth instructions in the Bluetooth instruction set in the preset time period. Wherein, the higher the use frequency of the Bluetooth command is, the shorter the data length of the configured command code is.
For example, after configuring a corresponding instruction code for a bluetooth instruction in an instruction set file, the mobile terminal sends the instruction set file carrying a corresponding relationship between the bluetooth instruction and the instruction code to the bluetooth device, and the bluetooth device prepares to start receiving the instruction of the mobile terminal after receiving the instruction set file sent by the mobile terminal.
Step 203, receiving the 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 step 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 the bluetooth command by first receiving the first execution rule. However, if the bluetooth device receives the execution waiting command and the execution sequence information at the same time when receiving the first instruction code, it needs to wait for receiving the last instruction code and the execution start command, and then sequentially executes the plurality of bluetooth instructions according to the execution sequence in the execution sequence information.
All the above optional technical solutions may be combined arbitrarily to form optional embodiments of the present application, and are not described herein again.
In particular implementation, the present application is not limited by the execution sequence of the described steps, and some steps may be performed in other sequences or simultaneously without conflict.
As can be seen from the above, the instruction transmission method provided in the embodiment of the present application establishes a network connection with the 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 transmitted from the mobile terminal; and 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 is interconnected with the Bluetooth device, the instruction transmission rate is improved and the instruction execution efficiency is improved by sending the instruction code corresponding to the Bluetooth instruction.
The embodiment of the application further provides an instruction transmission device, the instruction transmission device can be integrated in a mobile terminal, and 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 transmitting device according to an embodiment of the present disclosure. The first instruction transmission device 30 is applied to a mobile terminal, and the first instruction transmission 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 a data size of the bluetooth instruction is larger than a data size of the instruction code;
a first connection module 32, configured to establish a network connection with a bluetooth device;
a first sending module 33, configured to send the instruction set file to the bluetooth device;
and a second sending module 34, 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, 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 usage frequency of a bluetooth instruction in a bluetooth instruction set within a preset time period to generate an instruction set file, where the higher the usage frequency of the bluetooth instruction is, the shorter a data length of the configured instruction code is.
In some embodiments, the setting module 31 is further configured to reconfigure, every preset time period, a corresponding new instruction code based on a usage frequency of a bluetooth instruction in the bluetooth instruction set, 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, to the bluetooth device, a plurality of instruction codes respectively corresponding to a plurality of bluetooth instructions when the bluetooth device needs to send the plurality of bluetooth instructions, where the plurality of instruction codes are respectively used to instruct the bluetooth device to execute the 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, according to the execution sequence of the multiple bluetooth instructions to be sent, multiple instruction codes corresponding to the multiple bluetooth instructions respectively to the bluetooth device in sequence.
In some embodiments, the second sending module 34 is further configured to, when it is detected that the bluetooth transmission rate is in a downward trend, sequentially send, according to a descending order of the lengths of the instruction codes corresponding to the multiple bluetooth instructions to be sent, the multiple instruction codes corresponding to the multiple bluetooth instructions to the bluetooth device.
As can be seen from the above, in the instruction transmission device 30 provided in this embodiment of the present application, the setting module 31 sets 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 the data size of the instruction code; establishing a network connection with the bluetooth device through the first connection module 32; the first sending module 33 sends 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. When the mobile terminal is connected with the Bluetooth device in an interconnected mode, the mobile terminal can simultaneously send a plurality of data instructions by sending the instruction codes corresponding to the Bluetooth instructions through small data flow, the purpose of rapidly receiving and sending the instructions is achieved, the instruction transmission rate is improved, and the instruction execution efficiency is improved.
The embodiment of the application further provides an instruction transmission device, the instruction transmission device can be integrated in the bluetooth equipment, and the bluetooth equipment can include an on-vehicle 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 transmitting device according to an embodiment of the present disclosure. The second instruction transmitting device 40 is applied to a bluetooth apparatus, and the second instruction transmitting device 40 may include:
a second connection module 41, configured to establish 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 the 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; a first receiving module 42 receives 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 the data size of the bluetooth instruction is larger than the data size of the instruction code; the second receiving module 43 receives the instruction code transmitted from the mobile terminal; the execution module 44 executes the bluetooth instruction corresponding to the instruction code in the instruction set file. According to the embodiment of the application, when the mobile terminal is interconnected with the Bluetooth equipment, the instruction transmission rate is improved and the instruction execution efficiency is improved by receiving the instruction codes corresponding to the Bluetooth instructions.
The embodiment of the application also provides the mobile terminal. The mobile terminal can be a smart phone, a tablet computer, a desktop computer, a smart watch, a display and the like.
Referring to fig. 5, fig. 5 is a schematic structural diagram of a mobile terminal according to an embodiment of the present disclosure, 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, a tablet computer, a smart watch, a display, and the like.
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 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 shown), and a power supply 190. Those skilled in the art will appreciate that the mobile terminal 1200 configuration illustrated in fig. 5 is not intended to be limiting of the mobile terminal 1200 and may include more or less components than those illustrated, or some components in combination, or a different arrangement of components. Wherein:
the RF circuit 110 is used for receiving and transmitting electromagnetic waves, and performs interconversion between the electromagnetic waves and electrical signals, so as to communicate with a communication network or other devices. The 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 so forth. The RF circuitry 110 may communicate with various networks such as the internet, an intranet, a wireless network, or with other devices over a wireless network.
The memory 120 may be used to store software programs and modules, such as program instructions/modules corresponding to the instruction transmission method in the above-described embodiments, and the processor 180 executes various functional applications and data processing by operating the software programs and modules stored in the memory 120. 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, memory 120 may further include memory located remotely from processor 180, which may be connected to 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 generate keyboard, mouse, joystick, optical or trackball signal inputs related to user settings and function control. In particular, the input unit 130 may include a touch-sensitive surface 131 as well as 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 by a user on or near the touch-sensitive surface 131 (e.g., operations by a user on or near the touch-sensitive surface 131 using a finger, a stylus, or any other suitable object or attachment), and drive the corresponding connection device according to a predetermined program. Alternatively, the touch sensitive surface 131 may comprise two parts, a touch detection means and a touch controller. The touch detection device detects the touch direction 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 sensing device, converts the touch information into touch point coordinates, sends the touch point coordinates to the processor 180, and can receive and execute commands sent by the processor 180. Additionally, the touch-sensitive surface 131 may be implemented using various types of resistive, capacitive, infrared, and surface acoustic waves. In addition to the touch-sensitive surface 131, the input unit 130 may also include 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 (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
The display unit 140 may be used to display information input by or provided to the user and various graphic user interfaces of the mobile terminal 1200, which may be configured by graphics, text, icons, video, and any combination thereof. The display unit 140 may include a display panel 141, and optionally, 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 cover the display panel 141, and when a touch operation is detected on or near the touch-sensitive surface 131, the touch operation is transmitted to the processor 180 to determine the type of the touch event, and then the processor 180 provides a corresponding visual output on the display panel 141 according to the type of the touch event. Although in FIG. 5, touch-sensitive surface 131 and display panel 141 are shown as two separate components to implement input and output functions, in some embodiments, touch-sensitive surface 131 may be integrated with display panel 141 to implement 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, and microphone 162 may provide an audio interface between a user and mobile terminal 1200. The audio circuit 160 may transmit the electrical signal converted from the received audio data to the speaker 161, and convert the electrical signal into a sound signal for output by the speaker 161; on the other hand, the microphone 162 converts the collected sound signal into an electric signal, converts the electric signal into audio data after being received by the audio circuit 160, and then outputs the audio data to the processor 180 for processing, and then to the RF circuit 110 to be transmitted to, for example, another terminal, or outputs the audio data to the memory 120 for further processing. The audio circuitry 160 may also include an earbud jack to provide communication of peripheral headphones with the mobile terminal 1200.
The mobile terminal 1200, which may assist the user in e-mail, web browsing, and streaming media access through the transmission module 170 (e.g., Wi-Fi module), provides the user with wireless broadband internet access. Although fig. 5 illustrates 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 within the scope not changing the essence of the invention as needed.
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 operating or executing software programs and/or modules stored in the memory 120 and calling data stored in the memory 120, thereby integrally monitoring the mobile phone. Optionally, processor 180 may include one or more processing cores.
The mobile terminal 1200 also includes a power supply 190 (e.g., a battery) that powers the various components and, in some embodiments, may be logically coupled to the processor 180 via a power management system that may be used to manage charging, discharging, and power consumption management functions. The power supply 190 may also include any component including one or more of a dc or ac power source, 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 a camera (e.g., a front camera, a rear camera), a sensor, etc., which will not be described herein.
Specifically, in the present embodiment, the display unit 140 of the mobile terminal 1200 is a touch screen display, and 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 the one or more programs configured to be executed by the one or more processors 180 include 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 the Bluetooth equipment; sending the instruction set file to the Bluetooth device; when a Bluetooth instruction needs 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 indicating 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 the instruction set file, including:
configuring corresponding instruction codes according to the use frequency of Bluetooth instructions in a Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instructions is, the shorter the data length of the configured instruction codes 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;
sending the updated instruction set file to the Bluetooth equipment;
and when a Bluetooth instruction needs to be sent to the Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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 it is required to send a bluetooth instruction to the bluetooth device, an instruction code corresponding to the bluetooth instruction to the bluetooth device, and includes:
when a plurality of Bluetooth instructions need to be sent to the Bluetooth equipment, a plurality of instruction codes corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth equipment, and the instruction codes are used for indicating the Bluetooth equipment to execute the Bluetooth instructions corresponding to the instruction codes in the instruction set file.
In some embodiments, the processor 180 is configured to, when a plurality of bluetooth instructions need to be sent to the bluetooth device, send a plurality of instruction codes respectively corresponding to the plurality of bluetooth instructions to the bluetooth device, including:
and according to the execution sequence of the plurality of Bluetooth instructions to be sent, sequentially sending a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment.
In some embodiments, the processor 180 is configured to, when a plurality of bluetooth instructions need to be sent to the bluetooth device, send a plurality of instruction codes respectively corresponding to the plurality of bluetooth instructions to the bluetooth device, including:
when detecting that the Bluetooth transmission rate is in a descending trend, sequentially sending a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence of the lengths of the instruction codes corresponding to the plurality of Bluetooth instructions to be sent from large to small.
The above operations can be specifically referred to the previous embodiments, and are not described herein.
As can be seen from the above, an embodiment of the present application provides a mobile terminal 1200, where 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 the Bluetooth equipment; sending the instruction set file to the Bluetooth device; when a Bluetooth instruction needs 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 indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file. When the mobile terminal is connected with the Bluetooth device in an interconnected mode, the mobile terminal can simultaneously send a plurality of data instructions by sending the instruction codes corresponding to the Bluetooth instructions through small data flow, the purpose of rapidly receiving and sending the instructions is achieved, the instruction transmission rate is improved, and the instruction execution efficiency is improved.
The embodiment of the application also provides the Bluetooth equipment. The bluetooth device may include a vehicle-mounted bluetooth device, a watch, a speaker, a wireless headset, a wireless mouse, a wireless keyboard, and the like.
Referring to fig. 6, fig. 6 is a schematic structural diagram of a bluetooth device provided in the 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, a tablet computer, a smart watch, a display, and the like.
As shown in fig. 6, the bluetooth apparatus 2200 may include a processor 210 of one or more processing cores, a memory 220 of one or more computer-readable storage media, 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 does not constitute a limitation of the bluetooth device 2200, and may include more or fewer components than shown, or some components in combination, 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 monitoring the bluetooth device 2200 as a whole. 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 executes various functional applications and data processing by operating the software programs and modules stored in the memory 220. The memory 220 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application program required by at least one function (such as a sound playing function, an image playing function, etc.), and the like; the storage data area may store data created according to the use of the bluetooth device 2200, and the like. Further, the 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 further comprises a power supply 230 for supplying power to each component, and preferably, the power supply 230 may be logically connected to the processor 210 through a power management system, so as to implement functions of managing charging, discharging, and power consumption through the power management system. The power supply 230 may also include any component of one or more dc or ac power sources, recharging systems, power failure detection circuitry, power converters or inverters, power status indicators, and the like.
The bluetooth device 2200 may further include an input unit 240, and the input unit 240 may be used to receive input numeric or character information and generate a keyboard, mouse, joystick, optical or trackball signal input in relation to user setting and function control.
The bluetooth device 2200 may further 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 and the like, which will not be described herein. Specifically, in this embodiment, the processor 210 in the bluetooth device 2200 may load the executable file corresponding to one or more processes of the computer program into the memory 220 according to the following instructions, and the processor 210 runs the computer program 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 transmitted from the mobile terminal; and executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
The above operations can be specifically referred to the previous embodiments, and are not described herein.
As can be seen from the above, in the bluetooth apparatus 2200 provided in this embodiment, the bluetooth apparatus 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 transmitted from the mobile terminal; and 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 is interconnected with the Bluetooth device, the instruction transmission rate is improved and the instruction execution efficiency is improved by sending the instruction code corresponding to the Bluetooth instruction.
An embodiment of the present application further provides a storage medium, where a computer program is stored in the storage medium, and when the computer program runs on a computer, the computer executes the instruction transmission method according to any of the above embodiments.
It should be noted that, for the instruction transmission method described in the present application, it can be understood by a person skilled in the art that all or part of the process of implementing the instruction transmission method described in the embodiment of the present application can be implemented by controlling related hardware through a computer program, where the computer program can 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 during the execution process, the process of implementing the embodiment of the instruction transmission method can be included as described above. The storage medium may be a magnetic disk, an optical disk, a Read Only Memory (ROM), a Random Access Memory (RAM), or the like.
In the instruction transmission device according to the embodiment of the present application, each functional module may be integrated into one processing chip, or each module may exist alone physically, or two or more modules are integrated into one module. The integrated module can be realized in a hardware mode, and can also be realized in a software functional module mode. The integrated module, if implemented in the form of 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 a read-only memory, a magnetic or optical disk, or the like.
The instruction transmission method, the instruction transmission device, and the storage medium provided by the embodiments of the present application are described in detail above. The principle and the implementation of the present application are explained herein by applying specific examples, and the above description of the embodiments is only used to help understand the method and the core idea of the present application; meanwhile, for those skilled in the art, according to the idea of the present application, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present application.

Claims (10)

1. An instruction transmission method is applied to a mobile terminal, and is characterized by comprising 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 the Bluetooth equipment;
sending the instruction set file to the Bluetooth device;
when a Bluetooth instruction needs 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 indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
2. The instruction transmission method according to claim 1, wherein the setting of the instruction set file includes:
configuring corresponding instruction codes according to the use frequency of Bluetooth instructions in a Bluetooth instruction set in a preset time period to generate an instruction set file, wherein the higher the use frequency of the Bluetooth instructions is, the shorter the data length of the configured instruction codes is.
3. The method of instruction transmission 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;
sending the updated instruction set file to the Bluetooth equipment;
and when a Bluetooth instruction needs to be sent to the Bluetooth equipment, sending a new instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment, wherein 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 instruction transmission method according to claim 1, wherein the transmitting an instruction code corresponding to the bluetooth instruction to the bluetooth device when the bluetooth instruction needs to be transmitted to the bluetooth device, comprises:
when a plurality of Bluetooth instructions need to be sent to the Bluetooth equipment, a plurality of instruction codes corresponding to the plurality of Bluetooth instructions are sent to the Bluetooth equipment, and the instruction codes are used for indicating the Bluetooth equipment to execute the Bluetooth instructions corresponding to the instruction codes in the instruction set file.
5. The instruction transmission method according to claim 4, wherein when a plurality of bluetooth instructions need to be transmitted to the bluetooth device, transmitting a plurality of instruction codes respectively corresponding to the plurality of bluetooth instructions to the bluetooth device, comprises:
and according to the execution sequence of the plurality of Bluetooth instructions to be sent, sequentially sending a plurality of instruction codes respectively corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment.
6. The instruction transmission method according to claim 4, wherein when a plurality of bluetooth instructions need to be transmitted to the bluetooth device, transmitting a plurality of instruction codes respectively corresponding to the plurality of bluetooth instructions to the bluetooth device, comprises:
when detecting that the Bluetooth transmission rate is in a descending trend, sequentially sending a plurality of instruction codes corresponding to the plurality of Bluetooth instructions to the Bluetooth equipment according to the sequence of the lengths of the instruction codes corresponding to the plurality of Bluetooth instructions to be sent from large to small.
7. An instruction transmission method applied to Bluetooth equipment is characterized by comprising 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 transmitted from the mobile terminal;
and executing the Bluetooth instruction corresponding to the instruction code in the instruction set file.
8. An instruction transmission device applied to a mobile terminal, the device comprising:
the Bluetooth system comprises a setting module, a setting module and a control 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;
and the second sending module is used for sending an instruction code corresponding to the Bluetooth instruction to the Bluetooth equipment when the Bluetooth instruction needs to be sent to the Bluetooth equipment, and the instruction code is used for indicating the Bluetooth equipment to execute the Bluetooth instruction corresponding to the instruction code in the instruction set file.
9. An instruction transmission device applied to Bluetooth equipment, the device comprising:
the second connection module is used for establishing network connection with the mobile terminal;
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 code 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 stored therein a computer program which, when run on a computer, causes the computer to perform the steps in the instruction transmission method of any one of claims 1 to 6 or the steps in 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 true CN111542037A (en) 2020-08-14
CN111542037B 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)

Cited By (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 (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033599A1 (en) * 2001-07-26 2003-02-13 Gowri Rajaram System and method for executing wireless communications device dynamic instruction sets
US20050064847A1 (en) * 2001-07-26 2005-03-24 Bilhan Kirbas System and method for over the air area code update
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

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20030033599A1 (en) * 2001-07-26 2003-02-13 Gowri Rajaram System and method for executing wireless communications device dynamic instruction sets
US20050064847A1 (en) * 2001-07-26 2005-03-24 Bilhan Kirbas System and method for over the air area code update
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

Cited By (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

Also Published As

Publication number Publication date
CN111542037B (en) 2023-07-21

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
US10912027B2 (en) Scanning method and device
CN106775828B (en) Application program installation method and device and computer equipment
CN104778055B (en) Method and device for displaying progress bar
WO2017206901A1 (en) Process control method and related device
CN111008090A (en) Battery electric quantity control method and device, storage medium and terminal equipment
CN111542037B (en) Instruction transmission method, apparatus and storage medium
CN106919458B (en) Method and device for Hook target kernel function
CN112235082A (en) Communication information transmission method, device, equipment and storage medium
CN111432387A (en) Many-to-many switching module, multi-machine wireless communication system and communication method thereof
CN106547400B (en) Method, device and terminal for reporting information
US11914813B2 (en) Ranging method and apparatus thereof, storage medium, and terminal device
CN110191503B (en) Audio playing method, system, storage medium and mobile terminal
CN112261634A (en) Bluetooth transmission control method, device, terminal equipment and storage medium
CN112286849A (en) Wireless charging base data switching method and system, storage medium and terminal equipment
CN105278967B (en) System updating method, device and system of mobile terminal
CN105279175B (en) Data transmission method and device
CN113179344B (en) SIM card detection method, device, storage medium and terminal
CN111262636B (en) Method and device for enhancing network data transmission speed, storage medium and mobile terminal
CN106033358B (en) Batch installation method and device of application programs
CN112256610B (en) Connection control method, system, storage medium and mobile terminal
CN111488123B (en) Storage space management method and device, storage medium and mobile terminal
CN112367701B (en) Mobile terminal control method, device, storage medium and mobile terminal
CN112491562B (en) Communication control method and device 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