A method for controlling a mobile phone by voice
By defining the encoding method and the method of converting the instruction content into sound wave data by defining the encoding method and the method of converting the instruction content into sound wave data in the prior art, the problem of physical network connection is solved, and the mobile phone remote control is realized in a network-free environment is improved, and operation convenience and security are improved.
Patent Information
- Application Number
- CN202410057131.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-15
- Publication Date
- 2025-05-16
- Estimated Expiration
- 2044-01-15
AI Technical Summary
The prior art requires physical network connection when controlling a mobile phone through sound, and the operation is complicated and remote control cannot be achieved in a network-free environment.
The numbering of the controlled mobile phone, the sound definition of the control command and the execution parameter definition of the controlled mobile phone are completed by defining the encoding method. The main mobile phone and the controlled mobile phone are authenticated and the command content is serialized through the hash algorithm. The sound card controller converts the command content into sound wave data to realize sound modulation, and responds to the client to restore system commands and execute actions through the audio decoding algorithm.
Remote control of the mobile phone without the need for physical network connection is realized, which improves the convenience and security of operation, and ensures that control can be achieved in a signal-free environment.
Smart Images

Figure CN117831531B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of voice-controlled mobile phones, and more particularly to a method for controlling a mobile phone by voice. Background Art
[0002] Smart phones have become widely popular in modern society. In many scenarios, batches of smart phones need to be able to be remotely managed, controlled and managed in a unified manner. The method of controlling mobile phones through voice can provide a more intelligent and convenient way of interaction, which can bring convenience: through voice control, there is no need to use both hands to operate the mobile phone. Users can use voice to complete various operations, such as making calls, sending text messages, playing music, etc., thereby improving the convenience and flexibility of using mobile phones. The method of controlling mobile phones through voice can improve the user's interactive experience and provide users with a more intelligent, convenient and personalized mobile phone experience. In short, by using the built-in voice recognition function, you can control the mobile phone to perform specific operations through voice, thereby improving the convenience and efficiency of mobile phone use.
[0003] In the prior art, there are many disadvantages in the method of controlling mobile phones by voice. In the process of use, remote management of mobile phones requires a reliable wireless network, such as joining a common wifi, or connecting to a Bluetooth gateway at the same time, but before that, each mobile phone needs to be set up separately, such as Bluetooth pairing, etc., which has high requirements on the environment and operators, and in some environments, both hands cannot be freed for operation, but a simple way is needed to remotely operate and control the mobile phone. In order to solve such problems, the present invention invents a method of controlling mobile phones by voice. The present invention can realize remote control of mobile phones without any physical network connection. Summary of the invention
[0004] In view of the deficiencies of the above-mentioned technology, the present invention discloses a method for controlling a mobile phone by sound, wherein a definition coding method completes the controlled mobile phone numbering, control instruction sound definition and controlled mobile phone execution parameter definition through a controlled mobile phone numbering module, a control instruction sound definition module and an execution parameter definition module, a master mobile phone identification code and a controlled mobile phone identification code realize mutual identity authentication between the master mobile phone and the controlled mobile phone, supports security authentication, and solves the problem of illegal control of mobile phones, the master mobile phone serializes and encodes the instruction content in the format of "mobile phone number|control instruction|parameter|identity authentication" through a hash algorithm, the sound card controller gradually converts the serialized instruction content into system commands, signaling codes and sound wave data through a system command module, a signaling encoding module and a sound wave data generation module, realizes sound modulation, and solves the problem of interference when the sound is modulated to a high frequency, the response client restores the sound wave data to a system command through an audio decoding algorithm, and the client executes a response action according to the system command, thereby solving the problem of being unable to remotely control the mobile phone in an environment without a network.
[0005] In view of this, the present invention provides a method for controlling a mobile phone by sound, the method comprising the following steps:
[0006] Step 1: Complete the controlled mobile phone number, control command sound definition and controlled mobile phone execution parameter definition by defining the coding method;
[0007] In step 1, the definition coding method includes a controlled mobile phone number module, a control instruction sound definition module and an execution parameter definition module, wherein the output end of the controlled mobile phone number module is connected to the input end of the control instruction sound definition module, and the output end of the control instruction sound definition module is connected to the input end of the execution parameter definition module;
[0008] Step 2: Mutual identity authentication between the master mobile phone and the controlled mobile phone is realized through the master mobile phone identification code and the controlled mobile phone identification code;
[0009] Step 3: The master mobile phone uses a hash algorithm to serialize and encode the instruction content in the format of "mobile phone number | control instruction | parameter | identity authentication";
[0010] Step 4: the master control mobile phone gradually converts the serialized instruction content into system commands, signaling codes and sound wave data through the sound card controller to achieve sound modulation, and the master control mobile phone then plays the sound wave data after sound modulation through the speaker;
[0011] In step 4, the sound card controller includes a system command module, a signaling encoding module and a sound wave data generating module, the output end of the system command module is connected to the input end of the signaling encoding module, and the output end of the signaling encoding module is connected to the input end of the sound wave data generating module;
[0012] Step 5: The controlled mobile phone receives the sound wave data played by the master mobile phone through the response client, the response client restores the sound wave data into a system command through an audio decoding algorithm, and the client executes a response action according to the system command.
[0013] As a further technical solution of the present invention, the controlled mobile phone numbering module predefines the number of the controlled mobile phone through the serial number code, the control instruction sound definition module defines the sounds of making calls, sending text messages and restarting the mobile phone through the built-in audio files of the controlled mobile phone, the built-in audio files are stored through the media resource directory of the controlled mobile phone, and are called and played by triggering the control instructions, the execution parameter definition module sets the telephone number and text message content through the remote management platform of the master mobile phone, and the remote management platform establishes a connection with the controlled mobile phone to ensure communication between the remote management platform and the controlled mobile phone.
[0014] As a further technical solution of the present invention, the controlled mobile phone sends a verification request to the master mobile phone through the HTTPS protocol, and sends the controlled mobile phone identification code to the master mobile phone. After receiving the request, the master mobile phone compares the received controlled mobile phone identification code with the locally stored master mobile phone identification code through matching comparison to achieve identity authentication of the master mobile phone and the controlled mobile phone.
[0015] As a further technical solution of the present invention, the hash algorithm concatenates the mobile phone number, control instructions, parameters and identity authentication into a string through character splicing, and the string is calculated and converted through the MD5 hash function to obtain a hash value. The hash library provides calculation support for the MD5 hash function and outputs the hash value of the concatenated string "mobile phone number|control instructions|parameters|identity authentication", and the hash value is obtained through encoding call in hexadecimal representation.
[0016] As a further technical solution of the present invention, the system command module uses a scripting language to generate a control command generator according to the hash value and the requirements of the controlled mobile phone. The control command generator includes a path development unit, a file import unit and a function calling unit. The output end of the path development unit is connected to the input end of the file import unit, and the output end of the file import unit is connected to the input end of the function calling unit. The path development unit configures the system command development path through a programming interface. The file import unit uses a file import function to copy the hash value and the library file provided by the programming interface to the function calling unit. The function calling unit uses a CND command line function to generate a system command to control the controlled mobile phone.
[0017] As a further technical solution of the present invention, the signaling coding module correctly identifies the system command through the command line interface protocol, and the signaling coding module then maps the system command into a digital code through signaling coding to facilitate subsequent conversion into a sound frequency. The signaling coding associates each system command with a unique digital code through an ASCII code table, and the digital code is transmitted to the sound wave data generation module through a serial port transmission medium.
[0018] As a further technical solution of the present invention, the working method of the sound wave data generation module is:
[0019] Step 1: Select the controlled mobile phone sound control frequency through a digital filter. The digital filter uses a frequency filtering algorithm to filter out irrelevant frequencies to obtain a set of controlled mobile phone sound control frequency values as a frequency code table. The calculation formula of the frequency filtering algorithm is:
[0020]
[0021] In formula (1), H is the sound control frequency value of the controlled mobile phone, p is the irrelevant frequency, x is the stopband width of the frequency filtering algorithm, and a is the passband width of the frequency filtering algorithm;
[0022] Step 2: The frequency code table maps the digital code into the sound frequency through the frequency shift keying coding method, and the digital code group is converted into the sound frequency group. The frequency shift keying coding method uses the random forest algorithm to determine the sine wave frequency corresponding to each digital code. The random forest algorithm uses the digital code as an input feature and outputs the target sine wave frequency according to the relationship between the input feature and the target sine wave frequency. The calculation formula of the random forest algorithm is:
[0023]
[0024] In formula (2), P is the target sine wave frequency, y is the digital quantity of the digital code, z is the sampling rate of the target sine wave frequency, t is the time series, and g is the digitization accuracy between the digital code and the target sine wave frequency;
[0025] Step 3: The sound frequency group is transformed into a sine function of a sine wave frequency by inverse Fourier transform, and the sound frequency group is converted into a sound wave audio signal. The calculation formula of inverse Fourier transform is:
[0026]
[0027] In formula (3), K is the sound wave audio signal, G(w) is the frequency domain signal of the sound wave audio, w is the angular frequency of the frequency domain signal of the sound wave audio, N is the number of sampling points, j is the imaginary unit, and s is the discrete frequency of the frequency domain signal of the sound wave audio;
[0028] Step 4: The sound wave audio signal is converted into an audio PCM data stream composed of a series of discrete sampling points through pulse code modulation. The pulse code modulation adopts a 16-bit mono PCM data format to store the audio PCM data stream, and a sampling rate of 44.1 kHz and a syllable duration of 0.1S are selected to store the audio PCM data stream as sound wave data.
[0029] As a further technical solution of the present invention, the audio decoding algorithm uses the recording component in the controlled mobile phone system to record the sound wave data into a sound wave audio signal in a 16-bit PCM format. The audio decoding algorithm parses the frequency domain information contained in the sound wave audio signal through Fourier transform to obtain the sound wave audio signal frequency. The calculation formula of the Fourier transform is:
[0030]
[0031] In formula (4), R is the frequency of the sound wave audio signal, f is the harmonic resonance peak value of the sound wave audio signal, and T is the sampling interval of the sound wave audio signal;
[0032] The audio decoding algorithm finds the digital code corresponding to the frequency of the sound wave audio signal according to the frequency code table, and the audio decoding algorithm then converts the digital code into a system command through signaling coding.
[0033] The present invention has the following positive and beneficial effects compared with the prior art:
[0034] The invention discloses a method for controlling a mobile phone through sound. The definition coding method completes the controlled mobile phone numbering, control instruction sound definition and controlled mobile phone execution parameter definition through a controlled mobile phone numbering module, a control instruction sound definition module and an execution parameter definition module. The master mobile phone identification code and the controlled mobile phone identification code realize mutual identity authentication between the master mobile phone and the controlled mobile phone, support security authentication, and avoid illegal control of the mobile phone. The master mobile phone serializes and encodes the instruction content according to the format of "mobile phone number|control instruction|parameter|identity authentication" through a hash algorithm. The sound card controller gradually converts the serialized instruction content into system commands, signaling codes and sound wave data through a system command module, a signaling encoding module and a sound wave data generation module to realize sound modulation, and modulates the sound to a high frequency to avoid interference. The response client restores the sound wave data into a system command through an audio decoding algorithm. The client executes a response action according to the system command to realize remote control of the mobile phone in an environment without a network. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative work, among which:
[0036] Figure 1 This is an overall flow chart of a method for controlling a mobile phone by sound according to the present invention;
[0037] Figure 2 This is a working diagram of the acoustic wave data generation module used in the present invention;
[0038] Figure 3 A schematic diagram of the architecture of the definition encoding method adopted by the present invention;
[0039] Figure 4 This is a schematic diagram of the sound card controller architecture used in the present invention;
[0040] Figure 5This is a schematic diagram of the control command generator architecture used in the present invention. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of this article to clearly and completely describe the technical solutions in the embodiments of this article. Obviously, the described embodiments are only part of the embodiments of this article, not all of the embodiments. It should be understood that these descriptions are only exemplary and are not intended to limit the scope of the present invention. In addition, in the following description, the description of well-known structures and technologies is omitted to avoid unnecessary confusion of the concept of the present invention.
[0042] like Figure 1-Figure 5 As shown, a method for controlling a mobile phone by voice comprises the following steps:
[0043] Step 1: Complete the controlled mobile phone number, control command sound definition and controlled mobile phone execution parameter definition by defining the coding method;
[0044] In step 1, the definition coding method includes a controlled mobile phone number module, a control instruction sound definition module and an execution parameter definition module, wherein the output end of the controlled mobile phone number module is connected to the input end of the control instruction sound definition module, and the output end of the control instruction sound definition module is connected to the input end of the execution parameter definition module;
[0045] Step 2: Mutual identity authentication between the master mobile phone and the controlled mobile phone is realized through the master mobile phone identification code and the controlled mobile phone identification code;
[0046] Step 3: The master mobile phone uses a hash algorithm to serialize and encode the instruction content in the format of "mobile phone number | control instruction | parameter | identity authentication";
[0047] Step 4: the master control mobile phone gradually converts the serialized instruction content into system commands, signaling codes and sound wave data through the sound card controller to achieve sound modulation, and the master control mobile phone then plays the sound wave data after sound modulation through the speaker;
[0048] In step 4, the sound card controller includes a system command module, a signaling encoding module and a sound wave data generating module, the output end of the system command module is connected to the input end of the signaling encoding module, and the output end of the signaling encoding module is connected to the input end of the sound wave data generating module;
[0049] Step 5: The controlled mobile phone receives the sound wave data played by the master mobile phone through the response client, the response client restores the sound wave data into a system command through an audio decoding algorithm, and the client executes a response action according to the system command.
[0050] In specific implementation, the principle of the present invention is to achieve the purpose of controlling the mobile phone by converting the system command into sound through frequency, and the control command is sent through the master mobile phone in the form of sound waves or ultrasonic waves to control the mobile phone of the controlled party to perform corresponding operations. The master mobile phone encodes and compresses the control command, parameterizes the content, makes a call, sends a text message, etc. The name of the application started, the phone number dialed, and the text message content are parameters, and then modulated into an ultrasonic control signal and sent to the controlled mobile phone. The controlled mobile phone deploys a client, decodes it after receiving the sound wave, and executes the corresponding program or action. This method can realize remote control of the mobile phone, avoids the modification and installation of the mobile phone hardware and software, and also increases the security and portability of the mobile phone. The method of controlling the mobile phone by sound can also bypass the limitations of wireless network connection, and control can be achieved even in places without signals. In addition, the method of controlling the mobile phone by sound waves can also achieve fine control, because ultrasound has the characteristics of high frequency and short wavelength, and is not easily interfered and limited. In addition, ultrasonic control can also increase the security and accuracy of control by encrypting data or adjusting parameters such as the volume, pitch, and frequency of the control signal. In short, by converting system commands into sound signals to control the mobile phone, it not only increases the convenience and wirelessness of control, but also enables more refined control, improving the security and privacy of control.
[0051] In a further embodiment, the controlled mobile phone numbering module predefines the number of the controlled mobile phone through the serial number code, the control instruction sound definition module defines the sounds of making calls, sending text messages and restarting the mobile phone through the built-in audio files of the controlled mobile phone, the built-in audio files are stored through the media resource directory of the controlled mobile phone, and are called and played by triggering the control instructions, the execution parameter definition module sets the telephone number and text message content through the remote management platform of the master mobile phone, and the remote management platform establishes a connection with the controlled mobile phone to ensure communication between the remote management platform and the controlled mobile phone.
[0052] In a further embodiment, the controlled mobile phone sends a verification request to the master mobile phone through the HTTPS protocol, and sends the controlled mobile phone identification code to the master mobile phone. After receiving the request, the master mobile phone compares the received controlled mobile phone identification code with the locally stored master mobile phone identification code through matching comparison to achieve identity authentication of the master mobile phone and the controlled mobile phone.
[0053] In a further embodiment, the hash algorithm concatenates the mobile phone number, control instructions, parameters and identity authentication into a string through character splicing, and the string is calculated and converted through the MD5 hash function to obtain a hash value. The hash library provides calculation support for the MD5 hash function and outputs the hash value of the concatenated string "mobile phone number|control instructions|parameters|identity authentication", and the hash value is obtained through encoding call in hexadecimal representation.
[0054] In a specific embodiment, the controlled mobile phone numbering module first predefines the numbers of the controlled mobile phones, such as No. 1, No. 2, etc.; the control instruction sound definition module defines the sounds of various control instructions, such as making a call, sending text messages, restarting the phone, etc.; the execution parameter definition module defines the parameters to be executed by the controlled mobile phone, such as phone number, text message content, etc. The hash algorithm serializes the instruction content in the format of "mobile phone number|control instruction|parameter|identity authentication". For example, mobile phone No. 1 sends a text message "HELLO" to "13900000001", and the corresponding instruction is 0001|0003|{"phoneno":13900000001,"message":HELLO}|7a1189ca1650ef630a6c2b0206f42d8b, where "|" is the instruction separator, 0001 is the mobile phone number, and the corresponding instruction is 0001|0003|{"phoneno":13900000001,"message":HELLO}|7a1189ca1650ef630a6c2b0206f42d8b, where "|" is the instruction separator, 0001 is the mobile phone number, and 0003 is the corresponding mobile phone No. 1. 0003 is the control instruction code, which means sending a text message. {"phoneno":13900000001,"parameter":HELLO} is the parameter, which means sending a HELLO message to the phone number 13900000001. 7a1189ca1650ef630a6c2b0206f42d8b is the identity authentication code, which can be encoded with the master phone IMEI, the controlled phone IMEI, the phone number and the control instruction using some encryption algorithm, such as MD5.
[0055] The design of identity authentication for the master phone identification code and the controlled phone identification code can ensure the secure connection between the control end and the controlled end, and prevent hackers and illegal controllers from controlling the controlled end through counterfeiting or malicious operations. Transmitting identity authentication information through the HTTPS protocol can ensure the encryption and security of information during transmission, and prevent sensitive information from being stolen, tampered with or impersonated. In the process of identity authentication, the unique identification code of the controlled phone is sent to the master phone for comparison, which can prevent multiple phones from being controlled at the same time. Only after identity authentication can the master phone obtain control of the corresponding controlled phone. In short, identity authentication can ensure the legitimacy of the identity and secure communication between the controlled phone and the master phone, thereby better protecting the privacy and rights of users.
[0056] In a further embodiment, the system command module uses a scripting language to generate a control command generator according to the hash value and the requirements of the controlled mobile phone. The control command generator includes a path development unit, a file import unit and a function call unit. The output end of the path development unit is connected to the input end of the file import unit, and the output end of the file import unit is connected to the input end of the function call unit. The path development unit configures the system command development path through a programming interface, and the file import unit uses a file import function to copy the hash value and the library file provided by the programming interface to the function call unit. The function call unit uses a CND command line function to generate a system command to control the controlled mobile phone.
[0057] In a further embodiment, the signaling coding module correctly identifies the system commands through the command line interface protocol, and the signaling coding module then maps the system commands into digital codes through signaling coding to facilitate subsequent conversion into sound frequencies. The signaling coding associates each system command with a unique digital code through an ASCII code table, and the digital code is transmitted to the sound wave data generation module through a serial port transmission medium.
[0058] In a specific embodiment, the system command module uses a scripting language to write and generate a control command generator according to the hash value and the requirements of the controlled mobile phone. The main function of the control command generator is to generate system commands that can control the behavior of the controlled mobile phone. The control command generator includes the following units: Path development unit: This unit configures the system command development path through the programming interface, and specifies the library file path and program code path required for the system command generator. File import unit: This unit uses the file import function to copy the hash value and the library file provided by the programming interface to the function call unit. Function call unit: This unit uses the CND command line function to generate the system command to control the controlled mobile phone, passes the hash value and the library file to the CND command line interface, and generates the corresponding system command. In summary, the control command generator takes the hash value as input, uses a scripting language to write the program code required to generate the control command, and finally generates the system command that can control the behavior of the controlled mobile phone through units such as the path development unit, the file import unit, and the function call unit.
[0059] The main function of the signaling coding module is to encode the system command according to certain rules, and transmit the encoded digital to the sound wave data generation module, so as to facilitate the subsequent emission of sound waves for remote control operation. The signaling coding module correctly identifies the system command through the command line interface protocol, and uses signaling coding to map the system command into a digital code. The signaling coding module needs to first associate each system command with a unique digital code through the ASCII code table to ensure that each system command can correspond to a digital code. The signaling coding maps the command into a digital code and converts it into a sound frequency later. The signaling coding can be compiled according to the actual situation. Here, assuming that the ASCII code table is used as an example, the signaling coding generated by the command "reboot" is: 114, 101, 98, 111, 111, 116. The signaling coding is used to map the command into the key of the code. The code table maps each character into a digital code and converts it into a sound frequency later. Here, assuming that the ASCII code table is used as an example, the signaling coding generated by the command "reboot" is: 114, 101, 98, 111, 111, 116. The encoded digital data is transmitted to the sound wave data generation module through the serial port transmission medium. During the transmission process, the digital code will be transferred through the serial port to ensure the correctness and reliability of the digital transmission. In general, the signaling encoding module is the process of mapping the system command into digital code, and transmitting the digital code to the sound wave data generation module through the serial port to realize remote control operation.
[0060] In a further embodiment, the working method of the sound wave data generation module is:
[0061] Step 1: Select the controlled mobile phone sound control frequency through a digital filter. The digital filter uses a frequency filtering algorithm to filter out irrelevant frequencies to obtain a set of controlled mobile phone sound control frequency values as a frequency code table. The calculation formula of the frequency filtering algorithm is:
[0062]
[0063] In formula (1), H is the sound control frequency value of the controlled mobile phone, p is the irrelevant frequency, x is the stopband width of the frequency filtering algorithm, and a is the passband width of the frequency filtering algorithm;
[0064] In a specific embodiment, the hardware carriers that the frequency filtering algorithm relies on mainly include the following:
[0065] Digital Signal Processor (DSP): A digital signal processor is a piece of hardware specifically used to process digital signals, with rich computing power and real-time performance. In frequency filtering algorithms, DSP can be used to implement various digital filtering algorithms, such as low-pass filtering, high-pass filtering, band-pass filtering, etc.
[0066] Analog signal processor (ASP): Analog signal processor is a kind of hardware specially used for processing analog signals. It has the ability to process analog signals. In frequency filtering algorithms, ASP can be used to implement various analog filtering algorithms, such as filter design, filter optimization, etc.
[0067] Microcontroller (MCU): A microcontroller is a single-chip computer that integrates a CPU, memory, and peripheral interfaces, and has high reliability and real-time performance. In frequency filtering algorithms, MCU can be used to implement various frequency filtering algorithms, such as adaptive filtering, Butterworth filtering, etc.
[0068] Integrated Circuit (IC): An integrated circuit is a miniature electronic device that integrates multiple transistors, resistors, capacitors and other components, and has the advantages of high density and low power consumption. In frequency filtering algorithms, various ICs can be used to implement various frequency filtering algorithms, such as filter chips, digital signal processor chips, etc.
[0069] In summary, the hardware carriers that the frequency filtering algorithm relies on include digital signal processors, analog signal processors, microcontrollers, and integrated circuits. Different application scenarios and signal processing requirements may require different hardware configurations to achieve high-performance frequency filtering algorithms. Therefore, during the implementation process, the frequency filtering algorithm can be implemented by connecting different hardware environments.
[0070] The frequency filtering algorithm can mainly filter out noise and frequency interference in the signal during implementation. During the implementation of the frequency filtering algorithm, the filter design parameters can be determined first, such as the filter design parameters, such as filter type, cutoff frequency, passband error, etc. These parameters need to be adjusted according to specific application scenarios and requirements. Then the filter is constructed, and the structure and parameters of the filter, such as filter order, filter type, etc., are designed according to the design parameters. The filter construction can use methods such as digital signal processing (DSP) or analog signal processing (ASP). Then the filter simulation is performed: the filter is simulated using a simulation tool to verify the performance and accuracy of the filter. Software such as MATLAB can be used for simulation. The final filter is implemented: according to the simulation results, the filter is implemented. The filter can be implemented using hardware platforms such as digital signal processors (DSP) or analog signal processors (ASP). In a further specific embodiment, the filter test can also be performed, and the filter is tested using a test instrument to verify the performance and accuracy of the filter. Instruments such as oscilloscopes and signal generators can be used for testing. The implementation process of the frequency filtering algorithm needs to be adjusted according to specific application scenarios and requirements. In practical applications, the frequency filtering algorithm can be used in signal processing, image processing, audio processing and other fields.
[0071] Step 2: The frequency code table maps the digital code into the sound frequency through the frequency shift keying coding method, and the digital code group is converted into the sound frequency group. The frequency shift keying coding method uses the random forest algorithm to determine the sine wave frequency corresponding to each digital code. The random forest algorithm uses the digital code as an input feature and outputs the target sine wave frequency according to the relationship between the input feature and the target sine wave frequency. The calculation formula of the random forest algorithm is:
[0072]
[0073] In formula (2), P is the target sine wave frequency, y is the digital quantity of the digital code, z is the sampling rate of the target sine wave frequency, t is the time series, and g is the digitization accuracy between the digital code and the target sine wave frequency;
[0074] Random Forest is an ensemble learning method that improves prediction accuracy by integrating multiple decision trees. In specific work, the random forest algorithm can realize data preprocessing: for a large-scale data set, the data needs to be preprocessed first, including data cleaning, feature selection, feature scaling and other operations. Then build multiple decision trees: use the random forest algorithm to build multiple decision trees, each of which is trained on a random subset. These decision trees can be built based on different feature sets, different random seeds, different numbers of trees, etc. Then perform data information prediction. For a new data sample, firstly, it is necessary to predict through all decision trees to obtain a set of prediction results. Then, the prediction results in this set are averaged or weighted averaged as the final prediction result. Then, data information evaluation is performed: the performance evaluation of the random forest algorithm is usually evaluated using the cross validation method. Specifically, the data set is divided into a training set and a test set, and then the decision tree is trained using the training set data, and the prediction is performed using the test set data. In each iteration, the current decision tree is used to predict the test set and the prediction results are evaluated until certain evaluation indicators (such as accuracy, precision, etc.) are met. Parameters can also be adjusted during the work process: the parameters in the random forest algorithm need to be adjusted, such as the number of decision trees, the depth of the tree, the weight of each feature, etc. By adjusting these parameters, the performance of the model can be optimized. Repeat operations such as data information prediction, evaluation, and parameter adjustment until satisfactory performance indicators are achieved.
[0075] Step 3: The sound frequency group is transformed into a sine function of a sine wave frequency by inverse Fourier transform, and the sound frequency group is converted into a sound wave audio signal. The calculation formula of inverse Fourier transform is:
[0076]
[0077] In formula (3), K is the sound wave audio signal, G(w) is the frequency domain signal of the sound wave audio, w is the angular frequency of the frequency domain signal of the sound wave audio, N is the number of sampling points, j is the imaginary unit, and s is the discrete frequency of the frequency domain signal of the sound wave audio;
[0078] Step 4: The sound wave audio signal is converted into an audio PCM data stream composed of a series of discrete sampling points through pulse code modulation. The pulse code modulation adopts a 16-bit mono PCM data format to store the audio PCM data stream, and a sampling rate of 44.1 kHz and a syllable duration of 0.1S are selected to store the audio PCM data stream as sound wave data.
[0079] In a further embodiment, the audio decoding algorithm uses the recording component in the controlled mobile phone system to record the sound wave data into a sound wave audio signal in a 16-bit PCM format. The audio decoding algorithm parses the frequency domain information contained in the sound wave audio signal through Fourier transform to obtain the sound wave audio signal frequency. The calculation formula of the Fourier transform is:
[0080]
[0081] In formula (4), R is the frequency of the sound wave audio signal, f is the harmonic resonance peak value of the sound wave audio signal, and T is the sampling interval of the sound wave audio signal;
[0082] The audio decoding algorithm finds the digital code corresponding to the frequency of the sound wave audio signal according to the frequency code table, and the audio decoding algorithm then converts the digital code into a system command through signaling coding.
[0083] In a further specific embodiment, the method in which the audio decoding algorithm works is:
[0084] The audio decoding algorithm is the process of converting digital audio signals into analog audio signals. It is a very important part of the digital audio processing process. The main working process of the audio decoding algorithm can be divided into the following steps: Sampling: The digital audio signal needs to be sampled first, that is, the frequency range of the audio signal is converted into discrete frequency points. The higher the sampling rate, the higher the quality of the audio signal. Common sampling rates are 8000, 16000, 44100, etc. Quantization: The sampled audio signal needs to be quantized, that is, the discrete frequency points are converted into binary numbers. The quantization process usually converts the frequency points into integers or floating point numbers. Common quantization methods include linear quantization, step quantization, quantization order, etc. Encoding: The quantized audio signal needs to be encoded for storage or transmission. Common encoding methods include PCM, WAV, MP3, etc. Decoding: Decoding is the process of converting the encoded audio signal into the original audio signal. The decoding process is the opposite of encoding, and it converts the digital audio signal into an analog audio signal. The decoding method varies according to different encoding methods. Amplification: The decoded audio signal usually needs to be amplified to enhance the quality of the audio signal. Common amplification methods include audio amplifiers, headphone amplifiers, etc. Filtering: Noise and distortion may be introduced during the audio decoding process, which requires filtering. Filters can remove noise and distortion from audio signals, thereby improving the quality of audio signals. Common filter types include low-pass filters, high-pass filters, band-pass filters, etc. In general, the working process of audio decoding algorithms includes steps such as sampling, quantization, encoding, decoding, amplification, and filtering. Different audio decoding algorithms may use different hardware and software implementations to achieve high-performance and low-latency audio decoding effects.
[0085] In a specific embodiment, an application platform of frequency filtering algorithm, random forest algorithm, inverse Fourier transform and Fourier transform can be constructed. During the operation of the platform, a hardware platform can be built, such as by constructing the following components for processing, such as: digital signal processor (DSP), embedded system, analog circuit, power amplifier, etc. The platform can also design a corresponding software platform to realize functions such as processing, encoding and decoding of control commands. The following is a more detailed description of the implementation method:
[0086] Frequency filtering algorithm: This algorithm can automatically filter out some useless frequencies and retain only a few sets of key frequency values. These frequency values are defined as frequency code tables or frequency characteristic patterns as an important reference for subsequent voice control systems.
[0087] Random Forest Algorithm: In fact, when the Random Forest Algorithm is applied to voice control, the input features are a set of digital feature values converted from the voice signal, such as MFCC or FBANK. The Random Forest Algorithm will classify or output the target sine wave frequency based on the pattern of these feature values.
[0088] Inverse Fourier Transform and Inverse Fourier Transform: These two algorithms can be used to convert the input voice signal into a digital signal and convert the digital signal back into a voice signal. The Fourier transform can decompose the voice signal into different frequency components, and the inverse Fourier transform can resynthesize the various frequency components into the original voice signal. In order to achieve efficient Fourier transform and inverse Fourier transform, a digital signal processor (DSP) or embedded system can be used for implementation.
[0089] Hardware platform: The platform may have multiple hardware components including power supply, microphone, digital signal processor (DSP) and power amplifier to realize the collection, processing and output of voice signals. Power supply: The voice control platform requires power supply as support to ensure the normal operation of the system. Power supply: The voice control platform requires power supply as support to ensure the normal operation of the system. Microphone: Used to collect voice signals emitted by users. Common microphones include MEMS microphones, condenser microphones, magnetic microphones, etc. Digital signal processor (DSP): Used to convert the collected voice signals into digital signals, and perform filtering, feature extraction, noise reduction and other processing on the digital signals. Power amplifier: Used to convert digital signals into audio signals and output them to audio equipment such as speakers or headphones. These hardware components can be reasonably combined in the voice control platform to form a complete voice control system to achieve precise control of mobile phones.
[0090] Software platform: This platform can be implemented by programming languages, including control command processing, encoding and decoding functions. It is developed using programming languages such as C / C++, Python, etc.
[0091] In short, these components and algorithms work together to more efficiently implement the method of controlling the mobile phone by voice, improve the accuracy and response speed of command recognition, and thus bring a better user experience. The statistical table of the sound wave audio signal frequency calculation results is shown in Table 1:
[0092] Table 1 Statistical table of sound wave audio signal frequency calculation results
[0093]
[0094]
[0095] As shown in Table 1, four test groups are set up, and two methods are used to calculate the frequency of the sound wave audio signal. Method 1 uses statistical analysis to infer and calculate the frequency of the sound wave audio signal from historical data or sample data. Method 2 is an audio decoding algorithm that parses the frequency domain information contained in the sound wave audio signal through Fourier transform to obtain the frequency of the sound wave audio signal. The error of Method 1 is greater than the error of Method 2. It can be seen that the audio decoding algorithm of the present invention parses the frequency domain information contained in the sound wave audio signal through Fourier transform to obtain the frequency of the sound wave audio signal, which has outstanding technical effects.
[0096] Although the specific embodiments of the present invention are described above, it should be understood by those skilled in the art that these specific embodiments are only illustrative, and those skilled in the art may omit, replace, and change the details of the above methods and systems in various ways without departing from the principles and essence of the present invention. For example, merging the above method steps so as to perform substantially the same functions in substantially the same manner to achieve substantially the same results is within the scope of the present invention. Therefore, the scope of the present invention is limited only by the appended claims.
Claims
1. A method for controlling a mobile phone by voice, characterized in that: The method comprises the following steps: Step 1: Complete the controlled mobile phone number, control command sound definition and controlled mobile phone execution parameter definition by defining the coding method; In step 1, the definition coding method includes a controlled mobile phone number module, a control instruction sound definition module and an execution parameter definition module, wherein the output end of the controlled mobile phone number module is connected to the input end of the control instruction sound definition module, and the output end of the control instruction sound definition module is connected to the input end of the execution parameter definition module; Step 2: Mutual identity authentication between the master mobile phone and the controlled mobile phone is realized through the master mobile phone identification code and the controlled mobile phone identification code; Step 3: The master mobile phone uses a hash algorithm to serialize and encode the instruction content in the format of "mobile phone number|control instruction|parameter|identity authentication"; Step 4: the master control mobile phone gradually converts the serialized instruction content into system commands, signaling codes and sound wave data through the sound card controller to achieve sound modulation, and the master control mobile phone then plays the sound wave data after sound modulation through the speaker; In step 4, the sound card controller includes a system command module, a signaling encoding module and a sound wave data generating module, the output end of the system command module is connected to the input end of the signaling encoding module, and the output end of the signaling encoding module is connected to the input end of the sound wave data generating module; Step 5: The controlled mobile phone receives the sound wave data played by the master mobile phone through the response client, and the response client restores the sound wave data into a system command through an audio decoding algorithm, and the client executes a response action according to the system command. The working method of the sound wave data generation module is: Step 1: Select the controlled mobile phone sound control frequency through a digital filter. The digital filter uses a frequency filtering algorithm to filter out irrelevant frequencies to obtain a set of controlled mobile phone sound control frequency values as a frequency code table. The calculation formula of the frequency filtering algorithm is: In formula (1), H is the sound control frequency value of the controlled mobile phone, p is the irrelevant frequency, x is the stopband width of the frequency filtering algorithm, and a is the passband width of the frequency filtering algorithm; Step 2: The frequency code table maps the digital code into the sound frequency through the frequency shift keying coding method, and the digital code group is converted into the sound frequency group. The frequency shift keying coding method uses the random forest algorithm to determine the sine wave frequency corresponding to each digital code. The random forest algorithm uses the digital code as an input feature and outputs the target sine wave frequency according to the relationship between the input feature and the target sine wave frequency. The calculation formula of the random forest algorithm is: In formula (2), P is the target sine wave frequency, y is the digital quantity of the digital code, z is the sampling rate of the target sine wave frequency, t is the time series, and g is the digitization accuracy between the digital code and the target sine wave frequency; Step 3: The sound frequency group is transformed into a sine function of a sine wave frequency by inverse Fourier transform, and the sound frequency group is converted into a sound wave audio signal. The calculation formula of inverse Fourier transform is: In formula (3), K is the sound wave audio signal, G(w) is the frequency domain signal of the sound wave audio, w is the angular frequency of the frequency domain signal of the sound wave audio, N is the number of sampling points, j is the imaginary unit, and s is the discrete frequency of the frequency domain signal of the sound wave audio; Step 4: The sound wave audio signal is converted into an audio PCM data stream composed of a series of discrete sampling points through pulse code modulation. The pulse code modulation adopts a 16-bit mono PCM data format to store the audio PCM data stream, and a sampling rate of 44.1 kHz and a syllable duration of 0.1S are selected to store the audio PCM data stream as sound wave data.
2. A method for controlling a mobile phone by voice according to claim 1, characterized in that: The controlled mobile phone numbering module predefines the number of the controlled mobile phone through the serial number code, the control instruction sound definition module defines the sounds of making calls, sending text messages and restarting the mobile phone through the built-in audio files of the controlled mobile phone, the built-in audio files are stored through the media resource directory of the controlled mobile phone, and are called and played by triggering the control instructions, the execution parameter definition module sets the telephone number and text message content through the remote management platform of the master mobile phone, and the remote management platform establishes a connection with the controlled mobile phone to ensure communication between the remote management platform and the controlled mobile phone.
3. The method for controlling a mobile phone by voice according to claim 1, characterized in that: The controlled mobile phone sends a verification request to the master mobile phone through the HTTPS protocol and sends the controlled mobile phone identification code to the master mobile phone. After receiving the request, the master mobile phone compares the received controlled mobile phone identification code with the locally stored master mobile phone identification code through matching comparison to achieve identity authentication of the master mobile phone and the controlled mobile phone.
4. The method for controlling a mobile phone by voice according to claim 1, characterized in that: The hash algorithm concatenates the mobile phone number, control instructions, parameters and identity authentication into a string through character concatenation. The string is calculated and converted through the MD5 hash function to obtain a hash value. The hash library provides calculation support for the MD5 hash function and outputs the hash value of the concatenated string "mobile phone number|control instructions|parameters|identity authentication". The hash value is obtained by encoding and calling the hexadecimal representation of the hash value.
5. The method for controlling a mobile phone by voice according to claim 1, characterized in that: The system command module uses a scripting language to write and generate a control command generator according to the hash value and the requirements of the controlled mobile phone. The control command generator includes a path development unit, a file import unit and a function call unit. The output end of the path development unit is connected to the input end of the file import unit, and the output end of the file import unit is connected to the input end of the function call unit. The path development unit configures the system command development path through a programming interface. The file import unit uses a file import function to copy the hash value and the library file provided by the programming interface to the function call unit. The function call unit uses a CND command line function to generate a system command to control the controlled mobile phone.
6. The method for controlling a mobile phone by voice according to claim 1, characterized in that: The signaling coding module correctly identifies the system command through the command line interface protocol, and then maps the system command into a digital code through signaling coding to facilitate subsequent conversion into sound frequency. The signaling coding associates each system command with a unique digital code through an ASCII code table, and the digital code is transmitted to the sound wave data generation module through a serial port transmission medium.
7. The method for controlling a mobile phone by voice according to claim 1, characterized in that: The audio decoding algorithm uses the recording component in the controlled mobile phone system to record the sound wave data into a sound wave audio signal in 16-bit PCM format. The audio decoding algorithm parses the frequency domain information contained in the sound wave audio signal through Fourier transform to obtain the sound wave audio signal frequency. The calculation formula of the Fourier transform is: In formula (4), R is the frequency of the sound wave audio signal, f is the harmonic resonance peak value of the sound wave audio signal, and T is the sampling interval of the sound wave audio signal; The audio decoding algorithm finds the digital code corresponding to the frequency of the sound wave audio signal according to the frequency code table, and the audio decoding algorithm then converts the digital code into a system command through signaling coding.
Citation Information
Patent Citations
Network verification method and device
CN105337937A
Sound processing system and terminal
CN207909501U