Password embedding method and device, password matching method and device, and control system
By processing the carrier audio signal and embedding the embedded password sequence into the coefficients of the audio band, the problem of password matching errors caused by carrier information interference is solved, and the accuracy of password matching is improved.
Patent Information
- Application Number
- CN202010641379.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2020-07-06
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2040-07-06
AI Technical Summary
In the prior art, carrier information is easily disturbed during transmission, resulting in errors in password matching results, and no effective solution has been found.
By processing the carrier audio signal, multiple audio bands with coefficients are obtained, the preset binary sequence is expanded into an embedded password sequence, and embedded into the coefficients of the audio band, and sent to the command receiver for password matching.
Improve the accuracy of password matching, avoid misjudgment caused by carrier information interference, and ensure the accuracy of password matching results.
Smart Images

Figure CN111883108B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of information processing technology, and in particular to a password embedding method and device, a password matching method and device, and a control system. Background Art
[0002] At present, there is a flood of counterfeit products on the market. Counterfeit products are similar to genuine products in function, and it is difficult for consumers to distinguish them, which infringes on the interests of consumers and regular manufacturers. At present, in order to prevent products from being counterfeited, two main methods are used. The first is to usually set an encryption and decryption chip on the hardware, which increases the hardware cost. The other is to embed the password through the carrier information. However, when decrypting, the password information needs to match completely. Since the carrier information will be disturbed during transmission, resulting in information distortion, the embedded password cannot be completely restored, resulting in a certain degree of discrepancy between the final decrypted password and the original password, resulting in the final judgment that the password does not match.
[0003] With respect to the problem in the prior art that the password matching result is erroneous due to interference with the carrier information, no effective solution has been proposed yet. Summary of the invention
[0004] The embodiments of the present invention provide a password embedding method and device, a password matching method and device, and a control system to solve the problem in the prior art that carrier information is disturbed, resulting in incorrect password matching results.
[0005] In order to solve the above technical problems, the present invention provides a password embedding method, which is applied to an instruction sending end, and the method comprises:
[0006] Processing a carrier audio signal to obtain a plurality of audio segments having coefficients; wherein the carrier audio signal includes a control instruction;
[0007] Expand the preset binary sequence to obtain an embedded password sequence;
[0008] Processing the audio segment according to the embedded password sequence to obtain carrier audio information after the embedded password;
[0009] The carrier audio signal with the embedded password is sent to the instruction receiving end for password matching.
[0010] Further, the carrier audio signal is processed to obtain a plurality of audio segments having coefficients, including:
[0011] Segmenting the carrier audio information;
[0012] Discrete cosine transform is performed on each segment of carrier audio information to obtain multiple audio segments with coefficients.
[0013] Furthermore, the preset binary sequence is expanded to obtain an embedded password sequence, including:
[0014] Expanding each digit in the binary sequence one by one to generate a corresponding binary subsequence; wherein the number of the binary subsequences is the same as the number of digits in the binary sequence;
[0015] The generated binary subsequences are arranged in sequence according to the numerical order in the preset binary sequence to obtain an embedded password sequence.
[0016] Further, the audio segment is processed according to the embedded password sequence to obtain the carrier audio information after the embedded password, including:
[0017] A preset number of audio segments are selected, and the coefficients of each selected audio segment are replaced one by one in order with the numbers in the embedded password sequence to obtain a carrier audio signal after the embedded password is obtained; wherein the number of the audio segments is the same as the number of bits of the embedded password sequence.
[0018] Furthermore, a preset number of audio segments are selected, including:
[0019] A preset number of audio segments are selected from the low frequency portion of the carrier audio signal.
[0020] Further, selecting a preset number of audio segments from the low-frequency part of the carrier audio signal includes:
[0021] Continuously selecting a preset number of audio segments in the low frequency portion of the carrier audio signal; or;
[0022] According to the preset intervals, a preset number of audio segments are selected from the low frequency part of the carrier audio signal.
[0023] The present invention also provides a password matching method, which is applied to an instruction receiving end, and the method comprises:
[0024] Processing the carrier audio signal sent by the received instruction sending end to obtain the coefficient of each audio segment therein;
[0025] Extracting a restored code sequence from coefficients of the selected audio segment;
[0026] Whether the password is successfully matched is determined based on the overall matching degree between the restored password sequence and the pre-stored password sequence; wherein the pre-stored password sequence is the same as the embedded password sequence.
[0027] Furthermore, the carrier audio signal sent by the received instruction sending end is processed to obtain the coefficient of each audio segment therein, including:
[0028] Perform inverse discrete cosine transform on the received carrier audio signal to obtain coefficients of each audio segment therein.
[0029] Further, judging whether the password matches successfully according to the overall matching degree between the restored password sequence and the pre-stored password sequence includes:
[0030] Determining whether the overall matching degree is greater than or equal to a first preset value;
[0031] If yes, it is determined that the password matches successfully, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal;
[0032] If not, continue to judge whether the password matches successfully according to the matching degree of each binary subsequence in the restored password sequence.
[0033] Further, judging whether the password is successfully matched according to the matching degree of each binary subsequence in the restored password sequence includes:
[0034] Determine whether the matching degree of all binary subsequences is greater than or equal to a second preset value; wherein the second preset value is less than the first preset value;
[0035] If yes, it is determined that the password matches successfully, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal;
[0036] If not, it is determined that the password matching fails, and the control instruction receiving end refuses to perform any operation.
[0037] The present invention also provides a password embedding device for implementing the above-mentioned password embedding method, the device comprising:
[0038] A first processing module, configured to process a carrier audio signal to obtain a plurality of audio segments having coefficients; wherein the carrier audio signal includes a control instruction;
[0039] An extension module, used for extending a preset binary sequence to obtain an embedded password sequence;
[0040] An embedding module, used for processing the audio segment according to the embedding password sequence to obtain carrier audio information after embedding the password;
[0041] The sending module is used to send the carrier audio signal embedded with the password to the instruction receiving end for password matching.
[0042] The present invention also provides a password matching device for implementing the above password matching method, the device comprising:
[0043] A second processing module is used to process the carrier audio signal sent by the instruction sending end to obtain the coefficient of each audio segment therein;
[0044] An extraction module, used for extracting a restored code sequence from coefficients of a selected audio segment;
[0045] The judgment module is used to judge whether the password is matched successfully according to the overall matching degree between the restored password sequence and the pre-stored password sequence; wherein the pre-stored password sequence is the same as the embedded password sequence.
[0046] The present invention also provides a control system, comprising an instruction sending end and an instruction receiving end, wherein the instruction sending end comprises the above-mentioned password embedding device; and the instruction receiving end comprises the above-mentioned password matching device.
[0047] The present invention also provides a computer-readable storage medium on which a computer program is stored, and when the program is executed by a processor, the password embedding method is implemented.
[0048] The present invention also provides a computer-readable storage medium on which a computer program is stored, and the program implements the above-mentioned password matching method when executed by a processor.
[0049] By applying the technical solution of the present invention, an embedded password sequence is obtained by expanding a preset binary sequence; each bit in the embedded password sequence is used to replace the coefficient of the selected audio segment to achieve the embedding of the password; the restored password sequence is extracted and compared with the pre-stored password sequence to calculate the overall matching degree; and whether the password is successfully matched is determined based on the overall matching degree, which can solve the problem that the carrier information is disturbed, causing the password information to be distorted and affecting the matching result, thereby improving the accuracy of password matching and avoiding misjudgment. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] Figure 1 A structural diagram of a control system to which the present invention is applied;
[0051] Figure 2 A flowchart of a password embedding method implemented according to the present invention;
[0052] Figure 3 is a flow chart of a password matching method according to another embodiment of the present invention;
[0053] Figure 4 A structural diagram of an air conditioning control system to which the present invention is applied;
[0054] Figure 5 is a flow chart of an encryption method according to an embodiment of the present invention;
[0055] Figure 6 is a structural diagram of a password embedding device according to an embodiment of the present invention;
[0056] Figure 7 is a structural diagram of a password embedding device according to another embodiment of the present invention;
[0057] Figure 8 is a structural diagram of a password matching device according to an embodiment of the present invention;
[0058] Fig. 9 4 is a structural diagram of a password matching device according to another embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, technical scheme and advantages of the present invention clearer, the present invention will be further described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0060] The terms used in the embodiments of the present invention are only for the purpose of describing specific embodiments, and are not intended to limit the present invention. The singular forms "a", "said" and "the" used in the embodiments of the present invention and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings, and "multiple" generally includes at least two.
[0061] It should be understood that the term "and / or" used in this article is only a description of the association relationship of associated objects, indicating that there can be three relationships. For example, A and / or B can represent: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship.
[0062] It should be understood that, although the terms first, second, etc. may be used to describe preset values in the embodiments of the present invention, these preset values should not be limited to these terms. These terms are only used to distinguish different preset values. For example, without departing from the scope of the embodiments of the present invention, the first preset value may also be referred to as the second preset value, and similarly, the second preset value may also be referred to as the first preset value.
[0063] As used herein, the words "if" and "if" may be interpreted as "at the time of" or "when" or "in response to determining" or "in response to detecting", depending on the context. Similarly, the phrases "if it is determined" or "if (stated condition or event) is detected" may be interpreted as "when it is determined" or "in response to determining" or "when detecting (stated condition or event)" or "in response to detecting (stated condition or event)", depending on the context.
[0064] It should also be noted that the term "includes", "comprising" or any other variation thereof is intended to cover non-exclusive inclusion, so that a commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprising a ..." do not exclude the existence of other identical elements in the commodity or device including the elements.
[0065] The optional embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0066] Example 1
[0067] This embodiment provides a password embedding method. Figure 1 For the control system structure diagram of the present invention, Figure 1 As shown, the control system includes an instruction sending end and an instruction receiving end, and the above password embedding method is specifically applied to the instruction sending end. Figure 2 is a flow chart of a password embedding method according to the present invention, as shown in Figure 2 As shown, the method includes:
[0068] S201, processing a carrier audio signal to obtain a plurality of audio segments having coefficients; wherein the carrier audio signal includes a control instruction.
[0069] In a specific implementation, the carrier audio signal may be a voice control instruction, which includes a wake-up command for waking up the instruction receiving end. Through the above steps, multiple audio segments with different coefficients are obtained.
[0070] S202, expanding the preset binary sequence to obtain an embedded password sequence.
[0071] When matching passwords, if the length of the binary sequence is too short, for example, only 4 bits, if the carrier audio signal is distorted during the transmission process, causing a certain bit of the binary sequence to change, the matching degree at the instruction receiving end will be very low. However, in the case of an incorrect password, the matching degree will also be low. That is to say, if the length of the binary sequence is too short, it is impossible to distinguish whether the error of a certain password bit is caused by the distortion of the audio signal or the password itself is incorrect during matching. Therefore, the embedded password sequence needs to meet a certain length. However, if an embedded password sequence with a length exceeding a certain range is directly set, then it does not meet a certain regularity. During matching, it is still not easy to determine whether the error of a certain password bit is caused by the distortion of the audio signal or the password itself is incorrect. Therefore, it is necessary to extend each bit in a preset binary sequence so that the numbers within a length are repeated. With this setting, if different numbers appear accidentally in the repeated numbers in a password, it can be determined that it is caused by the distortion of the audio signal during the transmission process, which is convenient for distinguishing whether the error of a certain password bit is caused by data distortion or by the error of the password itself when matching the password.
[0072] S203, processing the audio segment according to the embedded password sequence to obtain carrier audio information after the embedded password.
[0073] S204, sending the carrier audio signal embedded with the password to the instruction receiving end for password matching.
[0074] The password embedding method of this embodiment expands a preset binary sequence to obtain an embedded password sequence; each bit in the embedded password sequence replaces the coefficient of the selected audio segment to embed the password, so as to facilitate password matching and distinguish whether the error of a certain password bit is due to the interference of the carrier audio signal causing the password information to be distorted, or the password itself is wrong, thereby improving the accuracy of password matching and avoiding misjudgment.
[0075] Example 2
[0076] This embodiment provides another password embedding method. In this embodiment, in order to obtain multiple audio segments with coefficients, the above step S101 specifically includes: segmenting the carrier audio information; performing discrete cosine transform on each segment of the carrier audio information to obtain multiple audio segments with coefficients. Specifically, the discrete cosine transform formula is:
[0077]
[0078]
[0079] Among them, F(0) is the DC coefficient of the audio segment when u is 0; F(u) is the AC coefficient of the u-th audio segment, where u is not 0; f(x) is the waveform function of the carrier audio signal; N is the total number of audio segments in the carrier audio signal, and u represents the u-th audio segment.
[0080] In order to obtain a regularly repeated embedded password sequence, step S102 specifically includes: expanding a preset binary sequence to obtain an embedded password sequence, including: expanding each digit in the binary sequence one by one to generate a corresponding binary subsequence; wherein the number of the binary subsequences is the same as the number of bits in the binary sequence; and arranging the digits in the generated binary subsequences in sequence to obtain the embedded password sequence.
[0081] After obtaining multiple audio segments with coefficients and embedded password sequences, the audio segments are processed according to the embedded password sequences to obtain carrier audio information after the embedded password is obtained, so as to hide the embedded password sequence into the carrier audio signal. Specifically, a preset number of audio segments are selected, and the coefficients of each selected audio segment are replaced one by one in sequence with the numbers in the embedded password sequence to obtain the carrier audio signal after the embedded password is obtained; wherein the number of the selected audio segments is the same as the number of bits of the embedded password sequence.
[0082] The coefficient of each selected audio segment is replaced by the number on each bit in the above embedded password sequence to achieve the embedding of the password. In the specific implementation, the number of selected audio segments should be the same as the number of bits in the embedded password sequence. For example, if there are 16 bits in the embedded password sequence, 16 audio segments should be selected.
[0083] When selecting audio segments, since low-frequency signals are more robust and less susceptible to interference, when selecting a preset number of audio segments, a preset number of audio segments are preferentially selected from the low-frequency part of the carrier audio signal. The selection method can be continuous selection or interval selection. For example, if the number of bits of the embedded password sequence is 16, the first 16 audio segments in the low-frequency part can be selected for coefficient replacement, or the first 16 audio segments located at odd positions can be selected, or the first 16 audio segments located at even positions can be selected, or the middle 16 positions, or the last 16 positions can be selected, or the selection can be started from any position in the low-frequency part, as long as 16 audio segments can be obtained in sequence, and the present invention does not make specific limitations.
[0084] Example 3
[0085] This embodiment provides a password matching method, which is applied to an instruction receiving end. Figure 3 Flow chart of a password matching method according to another embodiment of the present invention. Figure 3 As shown, the method includes:
[0086] S301, processing the received carrier audio signal sent by the instruction sending end to obtain the coefficient of each audio segment. Through step S301, the carrier audio signal sent by the instruction sending end can be restored to obtain the coefficients of all audio segments.
[0087] S302, extracting a restoration code sequence from the coefficients of the selected audio segment. Extracting the coefficients of the audio segment selected when embedding the code from the coefficients of all audio segments to obtain a restoration code sequence.
[0088] S303, judging whether the password matches successfully based on the overall matching degree between the restored password sequence and the pre-stored password sequence; wherein the pre-stored password sequence is the same as the embedded password sequence. The maximum value of the overall matching degree is 100%, but in order to eliminate the influence of distortion during the transmission of the carrier audio signal on the final judgment result, it can also be judged as a successful match when the matching degree is slightly less than 100%.
[0089] The password matching method of this embodiment, when performing password matching, determines whether the password is successfully matched based on the overall matching degree between the restored password sequence and the pre-stored password sequence. It has a certain fault tolerance and eliminates the influence of distortion in the transmission process of the carrier audio signal on the final judgment result, thereby improving the accuracy of password matching and avoiding misjudgment.
[0090] Example 4
[0091] This embodiment provides another password matching method. In order to obtain the coefficients of all audio segments in the carrier audio signal, the above step S301 specifically includes: performing an inverse discrete cosine transform on the received carrier audio signal to obtain the coefficient of each audio segment therein, wherein the formula of the inverse discrete cosine transform is:
[0092] Among them, F(0) is the DC coefficient of the audio segment when u is 0; F(u) is the AC coefficient of the u-th audio segment, where u is not 0; f(x) is the waveform function of the carrier audio signal; N is the total number of audio segments in the carrier audio signal; u represents the u-th audio segment.
[0093] In order to determine whether the password matches successfully, the above-mentioned step S303 includes: determining whether the overall matching degree is greater than or equal to a first preset value; if so, determining that the password matches successfully, and the control instruction receiving end executes an operation corresponding to the control instruction contained in the carrier audio signal; if not, continuing to determine whether the password matches successfully based on the matching degree of each binary subsequence in the restored password sequence. For example, when the number of bits of the restored password sequence and the embedded password sequence is 16, and the number of binary subsequences contained therein is 4, the first preset value can be set to 93.75%. When the overall matching degree is greater than 93.75%, it is not necessary to calculate the matching degree of each binary subsequence. Only based on the overall matching degree, it can be known that the matching degree of no binary subsequence is less than 75%, that is, at most only one password bit is lost, and it can be determined that the password error is caused by the distortion of the carrier audio information transmission, that is, it is determined that the password matches successfully. If the overall matching degree is less than 93.75%, then it is determined whether the password is successfully matched according to the matching degree of each subsequence in the restored password sequence with the subsequence corresponding to the pre-stored password sequence, specifically, it is determined whether the matching degree of all binary subsequences with the subsequence corresponding to the pre-stored password sequence is greater than or equal to the second preset value; wherein the second preset value is less than the first preset value; if yes, then it is determined that the password is successfully matched, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal; if not, then it is determined that the password is failed to match, and the control instruction receiving end refuses to perform any operation. For example, when the number of bits of the restored password sequence and the embedded password sequence is 16, and the number of binary subsequences contained therein is 4, the first preset value can be set to 75%, and when the matching degree of all binary subsequences with the subsequence corresponding to the pre-stored password sequence is greater than 75%, it means that at most one password error exists in each binary subsequence, and it can be determined that the password error is caused by the distortion of the carrier audio information transmission, and it can be determined that the password is successfully matched.
[0094] Example 5
[0095] This embodiment provides an encryption method. The following takes an air conditioning control system as an example to explain this embodiment in detail. Figure 4 The structure diagram of the air conditioning control system of the present invention is as follows: Figure 4 As shown, the air-conditioning control system includes a voice wire controller (i.e., the command sending end in the above embodiment) and an indoor unit (i.e., the command receiving end in the above embodiment). The voice wire controller includes a first audio processing unit for processing the input audio signal, obtaining the audio signal after the password is embedded, and sending it to the indoor unit. The indoor unit includes a second audio processing unit and a password storage unit for processing the audio signal sent by the voice wire controller, obtaining the restored password, comparing it with the password stored in the password storage unit, and judging whether the passwords match.
[0096] Figure 5 is a flow chart of an encryption method according to an embodiment of the present invention, as shown in Figure 5 As shown, the method includes:
[0097] S1, the voice remote controller obtains the audio information of the wake-up word;
[0098] S2, after processing the audio information, sends it to the indoor unit.
[0099] Specifically, the preset 4-bit binary sequence is first expanded to a 16-bit binary sequence. It should be noted that only one binary sequence is listed in this embodiment. In other embodiments of the present invention, the preset binary sequence may also be 8 bits or other bits, which can be formulated by those skilled in the art according to actual conditions. The above 4-bit binary sequence is expanded to multiples of 4 bits according to predetermined coding rules, for example: 8 bits, 16 bits, 32 bits, etc. However, if it is expanded to 32 bits or even 64 bits, etc., the expanded length will exceed the length of the low-frequency part of the carrier audio, affecting audio transmission and causing audio distortion. If the extended length is too small, the audio will be interfered by noise, resulting in too small a correlation and causing abnormal actual product communication. Those skilled in the art can choose to expand to a suitable number of bits according to actual needs. In this embodiment, the 4-bit binary sequence is expanded to 16 bits. The specific expansion rules are shown in the following table:
[0100] Table 1 Comparison table of sequences before and after expansion
[0101]
[0102]
[0103] After the binary sequence expansion is completed, the audio information is segmented and then subjected to discrete cosine DCT transformation: Assuming that the length of the wake-up word audio information is N audio segments, the one-dimensional DCT transformation formula of its audio signal f(x) is:
[0104]
[0105]
[0106] Among them, F(0) is the DC coefficient of the audio segment when u is 0; F(u) is the AC coefficient of the u-th audio segment, where u is not 0; f(x) is the waveform function of the carrier audio signal; N is the total number of audio segments in the carrier audio signal; u represents the u-th audio segment. The audio segment of the low-frequency part is extracted; each digit in the 16-bit binary sequence replaces the DCT coefficients of the first 16 audio segments in the odd bits of the low-frequency part of the carrier audio, so as to hide the 16-bit binary sequence password in the audio information of the wake-up word of the voice wire controller. Information hiding is achieved by modifying the DCT coefficient. After the DCT transformation, the audio signal has only the real part and no imaginary part, which is convenient for embedding confidential information and controlling the embedding strength. In the DCT transform domain, the energy of the signal is mainly concentrated in several change coefficients, and only a few transform coefficients can represent the overall signal. This feature is the basic basis for using DCT transform for information hiding. After completing the above process, the audio information with the hidden 16-bit binary sequence password is sent to the indoor unit.
[0107] S3, the indoor unit extracts a 16-bit binary sequence password from the audio information sent by the voice remote control, and compares it with the 16-bit binary sequence password stored in the indoor unit.
[0108] S4, determine whether the correlation is greater than a preset threshold, if yes, execute step S5, if no, execute step S6.
[0109] After the internal machine extracts the password, the first 16 odd-bit coefficients of the low-frequency part are extracted through the inverse discrete cosine transform, i.e., IDCT transform. The specific IDCT transform formula is as follows:
[0110]
[0111] Wherein, F(0) is the DC coefficient of the audio segment when u is 0; F(u) is the AC coefficient of the u-th audio segment, where u is not 0; f(x) is the waveform function of the carrier audio signal, N is the total number of audio segments in the carrier audio signal; u represents the u-th audio segment. After extracting the first 16 odd-digit coefficients of the low-frequency part, a 16-bit binary is formed, and the correlation is calculated with the 16-bit binary sequence pre-stored in the indoor unit. If the correlation is greater than or equal to 75%, the match is successful and the communication is successful. If the correlation is less than 75%, the match is wrong and the communication is wrong. Wherein, the 16-bit binary sequence pre-stored in the indoor unit is also expanded into 16-bit binary information by the preset 4-bit binary password and then stored in the indoor unit.
[0112] S5, communication is successful, the indoor unit executes the command sent by the wired controller.
[0113] S6, communication failed, the indoor unit refuses to execute the command sent by the wired controller.
[0114] Example 6
[0115] This embodiment provides a password embedding device for implementing the above-mentioned password embedding method. Figure 6 : is a structural diagram of a password embedding device according to an embodiment of the present invention, such as Figure 6 As shown, the device includes: a first processing module 10, used to process the carrier audio signal to obtain a plurality of audio segments with coefficients; wherein the carrier audio signal contains control instructions; an expansion module 20, used to expand a preset binary sequence to obtain an embedded password sequence; an embedding module 30, used to process the audio segment according to the embedded password sequence to obtain the carrier audio information after the password is embedded; a sending module 40, used to send the carrier audio signal after the password is embedded to the instruction receiving end for password matching.
[0116] The password embedding device of this embodiment obtains an embedded password sequence by expanding a preset binary sequence; and replaces the coefficient of the selected audio segment with each bit in the embedded password sequence to embed the password, so as to facilitate the distinction during password matching whether an error in a certain password bit is due to interference with the carrier audio signal that causes distortion of the password information, or an error in the password itself, thereby improving the accuracy of password matching and avoiding misjudgment.
[0117] Example 7
[0118] Figure 7 is a structural diagram of a password embedding device according to another embodiment of the present invention, in order to obtain multiple audio segments with coefficients, such as Figure 7 As shown, the first processing module 10 includes: a segmentation unit 101, used to segment the carrier audio information; a transformation unit 102, used to perform discrete cosine transformation on each segment of the carrier audio information to obtain multiple audio segments with coefficients.
[0119] In order to obtain a regularly repeated embedded password sequence, the expansion module 20 includes: an expansion unit 201, used to expand each digit in the binary sequence one by one to generate a corresponding binary subsequence; wherein the number of the binary subsequences is the same as the number of bits in the binary sequence; a sequence generation unit 202, used to arrange the generated binary subsequences in sequence according to the numerical order in the preset binary sequence to generate an embedded password sequence.
[0120] After obtaining multiple audio segments with coefficients and embedded password sequences, it is necessary to process the audio segments according to the embedded password sequences to obtain the carrier audio information after the embedded password is obtained, so as to hide the embedded password sequence in the carrier audio signal. Therefore, the above-mentioned embedding module 30 is specifically used to select a preset number of audio segments, replace the coefficients of each selected audio segment with the numbers in the embedded password sequence one by one in order, and obtain the carrier audio signal after the embedded password is obtained; wherein the number of the audio segments is the same as the number of bits of the embedded password sequence. Specifically, a preset number of audio segments are selected from the low-frequency part of the carrier audio signal.
[0121] When selecting audio segments, since low-frequency signals are more robust and less susceptible to interference, when selecting a preset number of audio segments, a preset number of audio segments are preferentially selected from the low-frequency part of the carrier audio signal. The selection method can be continuous selection or interval selection. For example, if the number of bits of the embedded password sequence is 16, the first 16 audio segments in the low-frequency part can be selected for coefficient replacement, or the first 16 odd-digit audio segments, or the first 16 even-digit audio segments, or the middle 16 bits, or the last 16 bits, or selection starting from any position in the low-frequency part, as long as 16 audio segments can be obtained in sequence, the present invention does not make specific limitations.
[0122] Example 8
[0123] This embodiment provides a password matching device for implementing the above password matching method. Figure 8 : is a structural diagram of a password matching device according to an embodiment of the present invention, such as Figure 8 As shown, the device includes: a second processing module 11, used to process the carrier audio signal sent by the instruction sending end to obtain the coefficients of each audio segment therein; an extraction module 21, used to extract the restored password sequence from the coefficients of the selected audio segment; a judgment module 31, used to judge whether the password is successfully matched based on the overall matching degree between the restored password sequence and the pre-stored password sequence; wherein the pre-stored password sequence is the same as the embedded password sequence.
[0124] The password matching device of this embodiment, when performing password matching, determines whether the password is successfully matched based on the overall matching degree between the restored password sequence and the pre-stored password sequence. It has a certain fault tolerance and eliminates the influence of distortion in the transmission process of the carrier audio signal on the final judgment result, thereby improving the accuracy of password matching and avoiding misjudgment.
[0125] Example 9
[0126] This embodiment provides another password matching device. Fig. 9This is a structural diagram of a password matching device according to another embodiment of the present invention. In order to obtain coefficients of all audio segments in a carrier audio signal, the second processing module 11 is specifically used to perform an inverse discrete cosine transform on the received carrier audio signal to obtain the coefficient of each audio segment therein.
[0127] To determine whether the password matches successfully, Fig. 9 As shown, the judgment module 31 includes: a first judgment unit 311, used to judge whether the overall matching degree is greater than or equal to a first preset value; a first judgment unit 312, used to judge that the password matches successfully when the overall matching degree is greater than or equal to the first preset value, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal; a second judgment unit 313, used to continue to judge whether the password matches successfully according to the matching degree of each binary subsequence in the restored password sequence when the overall matching degree is less than the first preset value. The second judgment unit 313 is specifically used to: judge whether the matching degrees of all binary subsequences are greater than or equal to a second preset value; wherein the second preset value is less than the first preset value; if yes, the password matches successfully, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal; if no, the password matches unsuccessfully, and the control instruction receiving end refuses to perform any operation.
[0128] Example 10
[0129] This embodiment provides a control system, including an instruction sending end and an instruction receiving end. The instruction sending end includes the password embedding device in the above embodiment; the instruction receiving end includes the above password matching device, which is used to implement encryption operations to prevent the instruction sending end and the instruction receiving end from being counterfeited.
[0130] Embodiment 11
[0131] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned password embedding method is implemented.
[0132] Example 12
[0133] This embodiment provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the above-mentioned password matching method is implemented.
[0134] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0135] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.
[0136] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A password embedding method, applied to an instruction sending end, characterized in that: The method comprises: Processing a carrier audio signal to obtain a plurality of audio segments having coefficients; wherein the carrier audio signal includes a control instruction; Each digit in the preset binary sequence is expanded one by one to generate a corresponding binary subsequence; wherein the number of the binary subsequences is the same as the number of digits in the binary sequence; the generated binary subsequences are arranged in sequence according to the order of the digits in the binary sequence to obtain an embedded password sequence; wherein each digit in the binary subsequence is the same, so that the digits within the length of the binary subsequence of the embedded password sequence are regularly repeated; Processing the audio segment according to the embedded password sequence to obtain carrier audio information after the embedded password; The carrier audio signal with the embedded password is sent to the instruction receiving end for password matching.
2. The method according to claim 1, characterized in that: The carrier audio signal is processed to obtain a plurality of audio segments with coefficients, including: Segmenting the carrier audio information; Discrete cosine transform is performed on each segment of carrier audio information to obtain multiple audio segments with coefficients.
3. The method according to claim 1, characterized in that The audio segment is processed according to the embedded password sequence to obtain the carrier audio information after the embedded password, including: A preset number of audio segments are selected, and the coefficients of each selected audio segment are replaced one by one in order with the numbers in the embedded password sequence to obtain a carrier audio signal after the embedded password is obtained; wherein the number of the audio segments is the same as the number of bits of the embedded password sequence.
4. The method according to claim 3, characterized in that Choose from a preset number of audio segments, including: A preset number of audio segments are selected from the low frequency portion of the carrier audio signal.
5. The method according to claim 4, characterized in that A preset number of audio segments are selected from the low frequency portion of the carrier audio signal, including: Continuously selecting a preset number of audio segments in the low frequency portion of the carrier audio signal; or; According to the preset intervals, a preset number of audio segments are selected from the low frequency part of the carrier audio signal.
6. A password matching method, applied to an instruction receiving end, characterized in that: The method comprises: Processing the carrier audio signal sent by the received instruction sending end to obtain the coefficient of each audio segment therein; Extracting a restored code sequence from coefficients of the selected audio segment; Whether the password is successfully matched is determined according to the overall matching degree between the restored password sequence and the pre-stored password sequence; wherein the pre-stored password sequence is the same as the embedded password sequence; the pre-stored password sequence includes a plurality of binary subsequences, each digit in the binary subsequence is the same, so that the digits within the length of the binary subsequence of the pre-stored password sequence are regularly repeated.
7. The method according to claim 6, characterized in that The carrier audio signal sent by the received instruction sending end is processed to obtain the coefficients of each audio segment therein, including: Perform inverse discrete cosine transform on the received carrier audio signal to obtain coefficients of each audio segment therein.
8. The method according to claim 6, characterized in that Judging whether the password matches successfully according to the overall matching degree between the restored password sequence and the pre-stored password sequence includes: Determining whether the overall matching degree is greater than or equal to a first preset value; If yes, it is determined that the password matches successfully, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal; If not, continue to judge whether the password matches successfully according to the matching degree of each binary subsequence in the restored password sequence.
9. The method according to claim 8, characterized in that Judging whether the password is successfully matched according to the matching degree of each binary subsequence in the restored password sequence includes: Determine whether the matching degree of all binary subsequences is greater than or equal to a second preset value; wherein the second preset value is less than the first preset value; If yes, it is determined that the password matches successfully, and the control instruction receiving end performs the operation corresponding to the control instruction contained in the carrier audio signal; If not, it is determined that the password matching fails, and the control instruction receiving end refuses to perform any operation.
10. A password embedding device for implementing the password embedding method according to any one of claims 1 to 5, characterized in that: The device comprises: A first processing module, configured to process a carrier audio signal to obtain a plurality of audio segments having coefficients; wherein the carrier audio signal includes a control instruction; An expansion module is used to expand each digit in a preset binary sequence one by one to generate a corresponding binary subsequence; wherein the number of the binary subsequences is the same as the number of digits in the binary sequence; the generated binary subsequences are arranged in sequence according to the order of the digits in the binary sequence to obtain an embedded password sequence; wherein each digit in the binary subsequence is the same, so that the digits within the length of the binary subsequence of the embedded password sequence are regularly repeated; An embedding module, used for processing the audio segment according to the embedding password sequence to obtain carrier audio information after embedding the password; The sending module is used to send the carrier audio signal embedded with the password to the instruction receiving end for password matching.
11. A password matching device for implementing the password matching method according to any one of claims 6 to 9, characterized in that: The device comprises: A second processing module is used to process the carrier audio signal sent by the instruction sending end to obtain the coefficient of each audio segment therein; An extraction module, used to extract a restored password sequence from the coefficients of the selected audio segment; the pre-stored password sequence includes a plurality of binary subsequences, each digit in the binary subsequence is the same, so that the digits within the length of the binary subsequence of the pre-stored password sequence are regularly repeated; The judgment module is used to judge whether the password is matched successfully according to the overall matching degree between the restored password sequence and the pre-stored password sequence; wherein the pre-stored password sequence is the same as the embedded password sequence.
12. A control system, comprising an instruction sending end and an instruction receiving end, characterized in that: The instruction sending end includes the password embedding device described in claim 10; the instruction receiving end includes the password matching device described in claim 11.
13. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the password embedding method according to any one of claims 1 to 5 is implemented.
14. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the password matching method according to any one of claims 6 to 9 is implemented.
Citation Information
Patent Citations
Watermark information extended coding, embedding, evaluating and detection extracting method and device thereof
CN101930587A
Method for embedding and recognizing broadcast audio watermark
CN104361890A
Audio file digital watermark embedding and extracting method and system
CN108735223A