Refitting detection method and device, storage medium and electronic equipment

By playing audio signals in the terminal device and recording microphone signals for frequency domain comparison, the problem of users having difficulty judging the risks of terminal device modification is solved, improving the accuracy of judgment and user trust.

CN122120682APending Publication Date: 2026-05-29BEIJING XIAOMI MOBILE SOFTWARE CO LTD

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
BEIJING XIAOMI MOBILE SOFTWARE CO LTD
Filing Date
2024-11-28
Publication Date
2026-05-29

Smart Images

  • Figure CN122120682A_ABST
    Figure CN122120682A_ABST
Patent Text Reader

Abstract

The present disclosure provides a refitting detection method and device, a storage medium and an electronic device. The refitting detection method comprises: recording a second audio signal through a microphone of a terminal device while playing a first audio signal through a loudspeaker of the terminal device, wherein the loudspeaker is configured with an open back cavity, and the open back cavity comprises at least one opening facing an internal space of the terminal device, so that the internal space of the terminal device becomes part of the back cavity of the loudspeaker. Then, based on the difference between the second audio signal and a third audio signal, it is determined whether the terminal device has a refitting risk, wherein the third audio signal is associated with the first audio signal, and the third audio signal is used to indicate that the terminal device does not have a refitting risk. Through this method, the user can more accurately and independently determine whether the terminal device has been refitted, and the user's trust in the product can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This disclosure relates to the field of terminal technology, and in particular to a modification detection method and device, storage medium and electronic device. Background Technology

[0002] Terminal equipment modification typically refers to altering the hardware of terminal devices. Improper modification can lead to various negative consequences, including hardware damage, performance degradation, and increased security risks. Therefore, determining whether a terminal device poses a modification risk (i.e., whether it has been modified) has become a pressing technical problem. Summary of the Invention

[0003] In view of this, embodiments of the present disclosure provide a modification detection method and apparatus, a storage medium and an electronic device.

[0004] According to a first aspect of this disclosure, a method for detecting modifications is proposed, the method comprising:

[0005] While playing a first audio signal through the speaker of the terminal device, a second audio signal is recorded through the microphone of the terminal device; the speaker is configured with an open rear cavity, the open rear cavity including at least one opening facing the internal space of the terminal device, so that the internal space of the terminal device becomes part of the speaker rear cavity;

[0006] Based on the difference between the second audio signal and the third audio signal, it is determined whether the terminal device is at risk of being modified; wherein, the third audio signal is associated with the first audio signal, and the third audio signal is used to indicate that the terminal device is not at risk of being modified.

[0007] In conjunction with any embodiment provided in this disclosure, determining whether the terminal device is at risk of modification based on the difference between the second and third audio signals includes:

[0008] After converting the second audio signal from the time domain to the frequency domain to obtain the first frequency domain signal, the first frequency domain signal is compared with the second frequency domain signal; the second frequency domain signal is the frequency domain signal obtained by converting the third audio signal from the time domain to the frequency domain.

[0009] The comparison results will determine whether the terminal device is at risk of being modified.

[0010] In conjunction with any embodiment provided in this disclosure, comparing the first frequency domain signal with the second frequency domain signal includes:

[0011] Calculate the first frequency response data and the second frequency response data corresponding to the first frequency domain signal and the second frequency domain signal, respectively;

[0012] The first frequency response data is compared with the second frequency response data.

[0013] In conjunction with any embodiment provided in this disclosure, determining whether the terminal device is at risk of modification based on the comparison results includes:

[0014] The terminal device is determined to be at risk of being modified when the comparison result meets at least one of the following conditions:

[0015] The number of target frequencies is greater than or equal to a first quantity threshold; the target frequency is the frequency whose absolute value of the difference between the frequency values ​​in the first frequency domain signal and the second frequency domain signal is greater than or equal to a preset frequency threshold.

[0016] The number of target frequency pairs is greater than or equal to a second quantity threshold; the target frequency pair is a frequency pair in which the difference between the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the first frequency domain signal and the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the second frequency domain signal is greater than or equal to a preset change threshold.

[0017] In conjunction with any embodiment provided in this disclosure, determining whether the terminal device is at risk of modification based on the comparison results includes:

[0018] When the number of target frequencies is less than the first quantity threshold and the number of target frequency pairs is less than the second quantity threshold, it is determined that the terminal device does not have a risk of modification.

[0019] In conjunction with any embodiment provided in this disclosure, when it is determined that the terminal device poses a risk of modification, the method further includes:

[0020] Output a prompt message; the prompt message is used to inform the user that the terminal device has a risk of being modified.

[0021] In conjunction with any embodiment provided in this disclosure, playing the first audio signal through the speaker of the terminal device includes:

[0022] Upon receiving the modification inspection instruction, the first audio signal is played through the speaker of the terminal device.

[0023] According to a second aspect of this disclosure, a modification detection device is provided, the device comprising:

[0024] A signal recording module is used to record a second audio signal through the microphone of the terminal device while playing a first audio signal through the speaker of the terminal device; the speaker is configured with an open rear cavity, the open rear cavity including at least one opening facing the internal space of the terminal device, such that the internal space of the terminal device becomes part of the speaker rear cavity;

[0025] The risk determination module is used to determine whether the terminal device has a modification risk based on the difference between the second audio signal and the third audio signal; wherein the third audio signal is associated with the first audio signal and is used to indicate that the terminal device does not have a modification risk.

[0026] In conjunction with any embodiment provided in this disclosure, the risk determination module, when used to determine whether the terminal device has a modification risk based on the difference between the second audio signal and the third audio signal, includes:

[0027] After converting the second audio signal from the time domain to the frequency domain to obtain the first frequency domain signal, the first frequency domain signal is compared with the second frequency domain signal; the second frequency domain signal is the frequency domain signal obtained by converting the third audio signal from the time domain to the frequency domain.

[0028] The comparison results will determine whether the terminal device is at risk of being modified.

[0029] In conjunction with any embodiment provided in this disclosure, the risk determination module, when comparing the first frequency domain signal with the second frequency domain signal, includes:

[0030] Calculate the first frequency response data and the second frequency response data corresponding to the first frequency domain signal and the second frequency domain signal, respectively;

[0031] The first frequency response data is compared with the second frequency response data.

[0032] In conjunction with any embodiment provided in this disclosure, the risk determination module, when used to determine whether the terminal device has a modification risk based on the comparison results, includes:

[0033] The terminal device is determined to be at risk of being modified when the comparison result meets at least one of the following conditions:

[0034] The number of target frequencies is greater than or equal to a first quantity threshold; the target frequency is the frequency whose absolute value of the difference between the frequency values ​​in the first frequency domain signal and the second frequency domain signal is greater than or equal to a preset frequency threshold.

[0035] The number of target frequency pairs is greater than or equal to a second quantity threshold; the target frequency pair is a frequency pair in which the difference between the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the first frequency domain signal and the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the second frequency domain signal is greater than or equal to a preset change threshold.

[0036] In conjunction with any embodiment provided in this disclosure, the risk determination module, when used to determine whether the terminal device has a modification risk based on the comparison results, includes:

[0037] When the number of target frequencies is less than the first quantity threshold and the number of target frequency pairs is less than the second quantity threshold, it is determined that the terminal device does not have a risk of modification.

[0038] In conjunction with any embodiment provided in this disclosure, when it is determined that the terminal device poses a risk of modification, the device further includes:

[0039] The message output module is used to output a prompt message; the prompt message is used to inform the user that the terminal device has a risk of being modified.

[0040] In conjunction with any embodiment provided in this disclosure, the signal recording module, when used to play a first audio signal through a speaker of a terminal device, includes:

[0041] Upon receiving the modification inspection instruction, the first audio signal is played through the speaker of the terminal device.

[0042] According to a third aspect of this disclosure, a computer-readable storage medium is provided, the machine-readable storage medium storing machine-readable instructions, which, when invoked and executed by a processor, cause the processor to implement the modification detection method of any embodiment of this disclosure.

[0043] According to a fourth aspect of this disclosure, an electronic device is provided, comprising:

[0044] processor;

[0045] Memory used to store processor-executable instructions;

[0046] The processor is configured to execute the modification detection method of any embodiment of this disclosure.

[0047] The technical solutions provided by the embodiments of this disclosure may include the following beneficial effects:

[0048] The modification detection method, apparatus, storage medium, and electronic device provided in this disclosure can simultaneously play a first audio signal through the speaker of a terminal device and record a second audio signal through the microphone of the terminal device. Then, based on the difference between the second and third audio signals, it is determined whether the terminal device has been modified. The third audio signal is associated with the aforementioned first audio signal and indicates that the terminal device does not have a modification risk. This method allows users to more accurately and independently determine whether a terminal device has been modified, thereby increasing user trust in the product.

[0049] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description

[0050] The accompanying drawings, which are incorporated in and form a part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure.

[0051] Figure 1 This disclosure is a flowchart illustrating a modification detection method according to an exemplary embodiment;

[0052] Figure 2 This disclosure is a schematic diagram of the structure of a loudspeaker rear cavity according to an exemplary embodiment;

[0053] Figure 3 This is a flowchart illustrating another modification detection method according to an exemplary embodiment of the present disclosure;

[0054] Figure 4 This is a flowchart illustrating another modification detection method according to an exemplary embodiment of the present disclosure;

[0055] Figure 5 This is a flowchart illustrating another modification detection method according to an exemplary embodiment of the present disclosure;

[0056] Figure 6 This is a schematic diagram of the structure of a modified detection device according to an exemplary embodiment of the present disclosure;

[0057] Figure 7 This is a schematic diagram of the structure of an electronic device according to an exemplary embodiment of the present disclosure. Detailed Implementation

[0058] Exemplary embodiments will now be described in detail, examples of which are illustrated in the accompanying drawings. In the following description relating to the drawings, unless otherwise indicated, the same numerals in different drawings denote the same or similar elements.

[0059] Terminal equipment modification typically refers to modifying the hardware of terminal equipment. Improper terminal equipment modification may have various negative effects, including but not limited to:

[0060] 1. Hardware damage: Improper modifications may cause power failures or physical damage to the terminal equipment, thereby affecting the lifespan of the terminal equipment.

[0061] 2. Performance degradation: Improper modifications may cause system instability in terminal devices, resulting in frequent crashes or restarts, which will affect the overall performance of the terminal devices.

[0062] 3. Increased safety hazards: Inappropriate modifications may introduce new safety hazards and increase the likelihood of incidents such as explosions.

[0063] In the relevant technical solutions, users can only judge whether the device has been disassembled and modified by looking at the appearance details of the terminal device. The accuracy is low and the risk of modification cannot be accurately ruled out.

[0064] In view of this, the present disclosure provides a method for detecting modifications. The method for detecting modifications according to the present disclosure will now be described in detail with reference to the accompanying drawings.

[0065] Figure 1 This disclosure is a flowchart illustrating a modification detection method according to an exemplary embodiment. The method can be performed by a terminal device with a speaker and microphone, including but not limited to smartphones, tablets, and other devices. Figure 1 As shown, the exemplary embodiment method may include the following steps:

[0066] In step 101, while the first audio signal is played through the speaker of the terminal device, the second audio signal is recorded through the microphone of the terminal device.

[0067] The first audio signal is a signal with a continuously varying frequency within an audio range (which can be 20Hz to 20kHz). Optionally, the first audio signal can be an audio sweep signal. The speaker is configured with an open rear cavity, such as... Figure 2 As shown, the open rear cavity 21 has four openings 22, through which the open rear cavity 21 can communicate with the internal space of the terminal device. That is, for a speaker equipped with the open rear cavity 21, the entire internal space of the terminal device can be regarded as the speaker rear cavity.

[0068] Considering that disassembling and modifying the terminal device after it leaves the factory may cause changes to the sealing degree, volume, and shape of the speaker's rear cavity, these changes will all affect the audio signal played by the speaker.

[0069] Specifically, the airtightness of the speaker's rear cavity directly affects the degree of audio signal attenuation. This primarily affects the attenuation of low-frequency signals; when leakage occurs in the speaker's rear cavity, low-frequency signals will attenuate, and the larger the leakage area, the more severe the attenuation.

[0070] Changes in the volume of the speaker's rear cavity affect the low-frequency signal response. Within a certain range, a larger rear cavity volume results in a better low-frequency signal response. If additional components are added to the rear cavity, its volume decreases, and the low-frequency signal response deteriorates.

[0071] Changes in the shape of the speaker's rear cavity can also affect the audio signal. For example, adding a flat, thin, or long modification to the speaker's rear cavity may create a standing wave at a certain frequency. Standing waves cause peaks and troughs in the frequency response, resulting in some frequencies being amplified while others are attenuated.

[0072] Based on this, a third audio signal indicating that the terminal device is free from modification risks can be obtained in advance. For example, a first audio signal can be built into the terminal device. Before the terminal device leaves the factory, the aforementioned third audio signal can be recorded through the terminal device's microphone while the first audio signal is played through the terminal device's speaker, and this third audio signal is stored in the terminal device for subsequent determination of whether the terminal device is subject to modification risks. It is understood that this disclosure is not limited to the above example; the third audio signal can also be stored in the cloud and retrieved from the cloud when the terminal device is in use.

[0073] In practical applications, after receiving a modification detection command issued by the user based on the application used for modification detection, the terminal device can play a built-in first audio signal through the terminal device's speaker, and at the same time, record a second audio signal through the terminal device's microphone.

[0074] In step 102, based on the difference between the second audio signal and the third audio signal, it is determined whether the terminal device has a risk of being modified.

[0075] As mentioned earlier, the third audio signal can be obtained before the terminal device leaves the factory, that is, the third audio signal is obtained under the condition that there is no risk of modification to the terminal device. It is understood that the third audio signal can also be obtained by testing with the same model of terminal device that has not been modified, and the signal can be obtained by the same model of terminal device through the cloud for the determination of modification risk. Of course, even terminal devices of the same model will inevitably have differences, therefore using a third audio signal that corresponds one-to-one with the terminal device will make the determination of modification risk more accurate.

[0076] In this step, if the terminal device determines that there is a risk of modification when it is determined that the difference between the second and third audio signals is significant, then the terminal device is considered to have been acquired under conditions where there is no risk of modification.

[0077] The modification detection method provided in this disclosure allows users to more accurately determine whether a terminal device has been modified, thereby increasing user trust in the product.

[0078] In one embodiment, such as Figure 3 As shown, step 102 can specifically include:

[0079] In step 301, the second audio signal is converted from the time domain to the frequency domain to obtain the first frequency domain signal, and then the first frequency domain signal is compared with the second frequency domain signal.

[0080] The second frequency domain signal is a frequency domain signal obtained by converting the third audio signal from the time domain to the frequency domain.

[0081] In practice, before the terminal device leaves the factory, after acquiring the aforementioned third audio signal, a Fourier transform operation can be performed on the third audio signal to obtain the corresponding audio frequency domain signal. This audio frequency domain signal is then used as the second frequency domain signal and stored in the terminal device so that it can be used to determine whether the terminal device has any risk of modification.

[0082] Optionally, after acquiring the second audio signal, the terminal device can perform a Fourier transform operation on the second audio signal to obtain a first frequency domain signal, and then compare the first frequency domain signal with the aforementioned second frequency domain signal.

[0083] In step 302, the risk of modification of the terminal device is determined based on the comparison results.

[0084] In one optional example, the terminal device can determine that there is a risk of modification when the comparison result satisfies at least one of the following:

[0085] 1. The number of target frequencies is greater than or equal to the first quantity threshold.

[0086] The target frequency is the frequency at which the absolute value of the difference between the frequency values ​​in the first frequency domain signal and the second frequency domain signal is greater than or equal to a preset frequency threshold.

[0087] For example, the aforementioned first quantity threshold can be 3, and the preset frequency threshold can be 4.

[0088] When it is determined that the absolute value of the difference between the frequency values ​​corresponding to 5 frequencies in the first frequency domain signal and the second frequency domain signal is greater than or equal to 4, it can be determined that there is a risk of modification.

[0089] For example, the aforementioned first quantity threshold can be 5, and the preset frequency threshold can be 6.

[0090] When it is determined that the absolute value of the difference between the frequency values ​​corresponding to 5 frequencies in the first frequency domain signal and the second frequency domain signal is greater than or equal to 6, it can be determined that there is a risk of modification.

[0091] 2. The number of target frequency pairs is greater than or equal to the second quantity threshold.

[0092] Wherein, the target frequency pair is a frequency pair in the first frequency domain signal whose difference between the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the first frequency domain signal and the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the second frequency domain signal is greater than or equal to a preset change threshold.

[0093] For example, the aforementioned second quantity threshold can be 1, and the preset change threshold can be 2.

[0094] When the absolute value of the rate of change of the frequency values ​​corresponding to frequency 1 and frequency 2 in the first frequency domain signal is determined to be 4, and the absolute value of the rate of change of the frequency values ​​corresponding to frequency 1 and frequency 2 in the second frequency domain signal is determined to be 1, it can be determined that the difference between the two rates of change is 3, which is greater than the aforementioned preset change threshold. That is, the frequency values ​​corresponding to frequency 1 and frequency 2 in the first frequency domain signal have undergone abnormal and sudden changes. At this time, it can be determined that there is a risk of modification.

[0095] In an optional example, if the number of target frequencies is less than the first quantity threshold and the number of target frequency pairs is less than the second quantity threshold, it can be determined that the terminal device currently does not have a risk of modification.

[0096] It should be noted that the foregoing descriptions of the specific values ​​of the first quantity threshold, the second quantity threshold, the preset frequency threshold, and the preset change threshold are illustrative and intended to enable those skilled in the art to better understand the technical solutions of the embodiments of this disclosure. In practical applications, the specific values ​​can be set by relevant personnel based on actual conditions, and this disclosure does not limit them.

[0097] The modification detection method provided in this disclosure allows for the simultaneous playback of a first audio signal through the terminal device's speaker and the recording of a second audio signal through the terminal device's microphone. Then, based on the difference between the second and third audio signals, it is determined whether the terminal device poses a modification risk. The third audio signal is associated with the aforementioned first audio signal and indicates that the terminal device does not pose a modification risk. This method allows users to more accurately determine whether a terminal device has been modified, thereby increasing user trust in the product.

[0098] In one embodiment, when a modification risk is determined, the terminal device can output a prompt message to alert the user that the terminal device is at risk of modification.

[0099] Optionally, when a modification risk is identified, the terminal device can display the aforementioned prompt message in a pop-up window. This prompt message could be something like: "The current terminal device is at risk of modification. Please use it with caution."

[0100] Optionally, the terminal device may also play the aforementioned prompt message by voice when it is determined that there is a risk of modification; this disclosure does not limit this.

[0101] In another embodiment, when it is determined that there is no risk of modification, the terminal device may also output a prompt message to inform the user that there is no risk of modification to the terminal device.

[0102] In the modification detection method provided in this embodiment, the terminal device can output a prompt message to inform the user after determining whether there is a modification risk or not, thereby improving the user experience.

[0103] In one embodiment, such as Figure 4 As shown, step 301 above, which involves comparing the first frequency domain signal with the second frequency domain signal, can specifically include:

[0104] In step 401, the first frequency response data and the second frequency response data corresponding to the first frequency domain signal and the second frequency domain signal are calculated respectively.

[0105] Frequency response data describes the ratio of the output amplitude to the input signal amplitude of a device such as a loudspeaker at different frequencies, and is usually expressed in decibels (dB).

[0106] The first frequency response data corresponding to the first frequency domain signal can be obtained in the following way:

[0107] 1. Obtain the audio frequency domain signal corresponding to the first audio signal.

[0108] 2. Obtain the aforementioned first frequency domain signal.

[0109] 3. Based on the amplitudes of the aforementioned audio frequency domain signal and the first frequency domain signal, the first frequency response data is calculated.

[0110] The second frequency response data corresponding to the second frequency domain signal can be obtained in the following way:

[0111] 1. Obtain the audio frequency domain signal corresponding to the first audio signal.

[0112] 2. Obtain the aforementioned second frequency domain signal.

[0113] 3. Calculate the second frequency response data based on the amplitudes of the aforementioned audio frequency domain signal and the second frequency domain signal.

[0114] The process of calculating frequency response data can be found in relevant literature and will not be elaborated here.

[0115] In step 402, the first frequency response data is compared with the second frequency response data.

[0116] This step is similar to step 102 mentioned above, and will not be repeated here.

[0117] In the modification detection method provided in this disclosure, by calculating frequency response data, the differences between signals can be quantified more accurately, providing a more objective evaluation standard.

[0118] Figure 5 This is a flowchart illustrating another modification detection method according to an exemplary embodiment of this disclosure. In this embodiment, the same steps as in the foregoing embodiments will be briefly described and will not be detailed further. For details, please refer to any of the foregoing embodiments. Figure 5 As shown, the exemplary embodiment method may include the following steps:

[0119] In step 501, a modification detection command is received.

[0120] As mentioned above, the terminal device can receive modification inspection commands issued by the user based on the application used for modification inspection.

[0121] In step 502, while the first audio signal is played through the speaker of the terminal device, the second audio signal is recorded through the microphone of the terminal device.

[0122] The speaker is configured with an open rear cavity, the open rear cavity including at least one opening facing the internal space of the terminal device, such that the internal space of the terminal device becomes part of the speaker rear cavity.

[0123] In step 503, after performing a Fourier transform operation on the second audio signal to obtain the first frequency domain signal, the first frequency domain signal is compared with the second frequency domain signal.

[0124] The second frequency domain signal is a frequency domain signal obtained by converting the third audio signal from the time domain to the frequency domain. The third audio signal is associated with the first audio signal and is used to indicate that the terminal device does not have the risk of being modified.

[0125] For example, the aforementioned second frequency domain signal can be obtained before the terminal device leaves the factory, and the second frequency domain signal can be stored in the terminal device.

[0126] In step 504, it is determined whether the number of target frequencies is greater than or equal to a first quantity threshold based on the comparison result.

[0127] The target frequency is the frequency at which the absolute value of the difference between the frequency values ​​in the first frequency domain signal and the second frequency domain signal is greater than or equal to a preset frequency threshold.

[0128] If so, proceed to step 505.

[0129] If not, proceed to step 506.

[0130] In step 505, it is determined that the terminal device is at risk of being modified.

[0131] In step 506, it is determined whether the number of target frequency pairs is greater than or equal to the second quantity threshold based on the comparison result.

[0132] The target frequency pair is a frequency pair in the first frequency domain signal whose difference between the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the first frequency domain signal and the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the second frequency domain signal is greater than or equal to a preset change threshold.

[0133] If so, proceed to step 505.

[0134] If not, proceed to step 507.

[0135] In step 507, it is determined that the terminal device does not pose a risk of modification.

[0136] In step 508, a warning message is output to alert the user that the terminal device is at risk of being modified.

[0137] In step 509, a prompt message is output to inform the user that there is no risk of modification to the terminal device.

[0138] The modification detection method provided in this disclosure can determine whether a terminal device has been modified based on the difference between the second frequency domain signal obtained before the terminal device left the factory and the first frequency domain signal obtained during current testing. This method allows users to determine whether a terminal device has been modified, increasing user trust in the product.

[0139] For the foregoing method embodiments, in order to simplify the description, they are all described as a series of actions. However, those skilled in the art should know that this disclosure is not limited to the described order of actions, because according to this disclosure, some steps may be performed in other orders or simultaneously.

[0140] Corresponding to the foregoing method embodiments, this disclosure also provides apparatus embodiments.

[0141] Figure 6 This is a schematic diagram of the structure of a modification detection device according to an exemplary embodiment of the present disclosure, such as... Figure 6 As shown, the modified detection device may include:

[0142] The signal recording module 61 is used to record a second audio signal through the microphone of the terminal device while playing a first audio signal through the speaker of the terminal device; the speaker is configured with an open rear cavity, the open rear cavity including at least one opening facing the internal space of the terminal device, so that the internal space of the terminal device becomes part of the speaker rear cavity.

[0143] The risk determination module 62 is used to determine whether the terminal device has a modification risk based on the difference between the second audio signal and the third audio signal; wherein the third audio signal is associated with the first audio signal and is used to indicate that the terminal device does not have a modification risk.

[0144] Optionally, the risk determination module 62, when determining whether the terminal device has a modification risk based on the difference between the second audio signal and the third audio signal, includes:

[0145] After converting the second audio signal from the time domain to the frequency domain to obtain the first frequency domain signal, the first frequency domain signal is compared with the second frequency domain signal; the second frequency domain signal is the frequency domain signal obtained by converting the third audio signal from the time domain to the frequency domain.

[0146] The comparison results will determine whether the terminal device is at risk of being modified.

[0147] Optionally, the risk determination module 62, when comparing the first frequency domain signal with the second frequency domain signal, includes:

[0148] Calculate the first frequency response data and the second frequency response data corresponding to the first frequency domain signal and the second frequency domain signal, respectively.

[0149] The first frequency response data is compared with the second frequency response data.

[0150] Optionally, the risk determination module 62, when used to determine whether the terminal device has a modification risk based on the comparison results, includes:

[0151] The terminal device is determined to be at risk of being modified when the comparison result meets at least one of the following conditions:

[0152] The number of target frequencies is greater than or equal to a first quantity threshold; the target frequency is the frequency whose absolute value of the difference between the frequency values ​​in the first frequency domain signal and the second frequency domain signal is greater than or equal to a preset frequency threshold.

[0153] The number of target frequency pairs is greater than or equal to a second quantity threshold; the target frequency pair is a frequency pair in which the difference between the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the first frequency domain signal and the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the second frequency domain signal is greater than or equal to a preset change threshold.

[0154] Optionally, the risk determination module 62, when used to determine whether the terminal device has a modification risk based on the comparison results, includes:

[0155] When the number of target frequencies is less than the first quantity threshold and the number of target frequency pairs is less than the second quantity threshold, it is determined that the terminal device does not have a risk of modification.

[0156] Optionally, when it is determined that the terminal device poses a risk of modification, Figure 6 Based on the module shown, the modification detection device may further include:

[0157] The message output module is used to output a prompt message; the prompt message is used to inform the user that the terminal device has a risk of being modified.

[0158] Optionally, the signal recording module 61, when used to play the first audio signal through the speaker of the terminal device, includes:

[0159] Upon receiving the modification inspection instruction, the first audio signal is played through the speaker of the terminal device.

[0160] For the apparatus embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to in the description of the method embodiment.

[0161] Figure 7This is a schematic diagram illustrating the structure of an electronic device 700 according to an exemplary embodiment of this disclosure. The electronic device can be a terminal device with a speaker and a microphone, including but not limited to smartphones, tablets, and other devices.

[0162] Reference Figure 7 The electronic device 700 may include one or more of the following components: a processing component 702, a memory 704, a power supply component 706, a multimedia component 708, an audio component 710, an input / output (I / O) interface 712, a sensor component 714, and a communication component 716.

[0163] Processing component 702 typically controls the overall operation of electronic device 700, such as operations associated with display, telephone calls, data communication, camera operation, and recording operations. Processing component 702 may include one or more processors 720 to execute instructions to complete all or part of the steps of the methods described above. Furthermore, processing component 702 may include one or more modules to facilitate interaction between processing component 702 and other components. For example, processing component 702 may include a multimedia module to facilitate interaction between multimedia component 708 and processing component 702.

[0164] Memory 704 is configured to store various types of data to support the operation of device 700. Examples of this data include instructions for any application or method operating on electronic device 700, contact data, phonebook data, messages, pictures, videos, etc. Memory 704 can be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic storage, flash memory, magnetic disk, or optical disk.

[0165] Power supply component 706 provides power to various components of electronic device 700. Power supply component 706 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power to electronic device 700.

[0166] Multimedia component 708 includes a screen that provides an output interface between the aforementioned electronic device 700 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen may be implemented as a touchscreen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors may sense not only the boundaries of touch or swipe actions but also the duration and pressure associated with the touch or swipe operation. In some embodiments, multimedia component 708 includes a front-facing camera and / or a rear-facing camera. When the electronic device 700 is in an operating mode, such as a shooting mode or a video mode, the front-facing camera and / or the rear-facing camera may receive external multimedia data. Each front-facing camera and rear-facing camera may be a fixed optical lens system or have focal length and optical zoom capabilities.

[0167] Audio component 710 is configured to output and / or input audio signals. For example, audio component 710 includes a microphone (MIC) configured to receive external audio signals when electronic device 700 is in an operating mode, such as call mode, recording mode, and voice recognition mode. The received audio signals may be further stored in memory 704 or transmitted via communication component 716. In some embodiments, audio component 710 also includes a speaker for outputting audio signals.

[0168] I / O interface 712 provides an interface between processing component 702 and peripheral interface modules, such as keyboards, click wheels, buttons, etc. These buttons may include, but are not limited to, home buttons, volume buttons, power buttons, and lock buttons.

[0169] Sensor assembly 714 includes one or more sensors for providing state assessments of various aspects of electronic device 700. For example, sensor assembly 714 can detect the on / off state of electronic device 700, the relative positioning of components such as the display and keypad of electronic device 700, changes in position of electronic device 700 or one of its components, the presence or absence of user contact with electronic device 700, orientation or acceleration / deceleration of electronic device 700, and temperature changes of electronic device 700. Sensor assembly 714 may include a proximity sensor configured to detect the presence of nearby objects without any physical contact. Sensor assembly 714 may also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, sensor assembly 714 may also include an accelerometer, gyroscope, magnetometer, pressure sensor, or temperature sensor.

[0170] Communication component 716 is configured to facilitate wired or wireless communication between electronic device 700 and other devices. Electronic device 700 can access wireless networks based on communication standards, such as WiFi, 4G or 5G, 4G LTE, 5G NR, or combinations thereof. In one exemplary embodiment, communication component 716 receives broadcast signals or broadcast-related information from an external broadcast management system via a broadcast channel. In one exemplary embodiment, the aforementioned communication component 716 also includes a near-field communication (NFC) module to facilitate short-range communication. For example, the NFC module may be implemented based on radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra-wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0171] In an exemplary embodiment, the electronic device 700 may be implemented by one or more application-specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field-programmable gate arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components to perform the methods described above.

[0172] In an exemplary embodiment, a non-transitory computer-readable storage medium is also provided, such as a memory 704 including instructions, which, when executed by a processor 720 of an electronic device 700, enables the electronic device 700 to perform the modification detection method of any embodiment of the present disclosure.

[0173] The non-transitory computer-readable storage medium may be ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0174] It should be understood that this disclosure is not limited to the precise structures described above and shown in the accompanying drawings, and various modifications and changes can be made without departing from its scope. The scope of this disclosure is limited only by the appended claims.

Claims

1. A method for detecting modifications, characterized in that, The method includes: While playing a first audio signal through the speaker of the terminal device, a second audio signal is recorded through the microphone of the terminal device; the speaker is configured with an open rear cavity, the open rear cavity including at least one opening facing the internal space of the terminal device, so that the internal space of the terminal device becomes part of the speaker rear cavity; Based on the difference between the second audio signal and the third audio signal, it is determined whether the terminal device is at risk of being modified; wherein, the third audio signal is associated with the first audio signal, and the third audio signal is used to indicate that the terminal device is not at risk of being modified.

2. The method according to claim 1, characterized in that, The determination of whether the terminal device is at risk of modification based on the difference between the second and third audio signals includes: After converting the second audio signal from the time domain to the frequency domain to obtain the first frequency domain signal, the first frequency domain signal is compared with the second frequency domain signal; the second frequency domain signal is the frequency domain signal obtained by converting the third audio signal from the time domain to the frequency domain. The comparison results will determine whether the terminal device is at risk of being modified.

3. The method according to claim 2, characterized in that, The step of comparing the first frequency domain signal with the second frequency domain signal includes: Calculate the first frequency response data and the second frequency response data corresponding to the first frequency domain signal and the second frequency domain signal, respectively; The first frequency response data is compared with the second frequency response data.

4. The method according to claim 2, characterized in that, The step of determining whether the terminal device is at risk of modification based on the comparison results includes: The terminal device is determined to be at risk of being modified when the comparison result meets at least one of the following conditions: The number of target frequencies is greater than or equal to a first quantity threshold; the target frequency is the frequency whose absolute value of the difference between the frequency values ​​in the first frequency domain signal and the second frequency domain signal is greater than or equal to a preset frequency threshold. The number of target frequency pairs is greater than or equal to a second quantity threshold; the target frequency pair is a frequency pair in which the difference between the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the first frequency domain signal and the absolute value of the rate of change of the frequency value corresponding to the adjacent frequency in the second frequency domain signal is greater than or equal to a preset change threshold.

5. The method according to claim 4, characterized in that, The step of determining whether the terminal device is at risk of modification based on the comparison results includes: When the number of target frequencies is less than the first quantity threshold and the number of target frequency pairs is less than the second quantity threshold, it is determined that the terminal device does not have a risk of modification.

6. The method according to claim 1, characterized in that, When it is determined that the terminal device poses a risk of modification, the method further includes: Output a prompt message; the prompt message is used to inform the user that the terminal device has a risk of being modified.

7. The method according to claim 1, characterized in that, The step of playing the first audio signal through the speaker of the terminal device includes: Upon receiving the modification inspection instruction, the first audio signal is played through the speaker of the terminal device.

8. A modified testing device, characterized in that, The device includes: A signal recording module is used to record a second audio signal through the microphone of the terminal device while playing a first audio signal through the speaker of the terminal device; the speaker is configured with an open rear cavity, the open rear cavity including at least one opening facing the internal space of the terminal device, such that the internal space of the terminal device becomes part of the speaker rear cavity; The risk determination module is used to determine whether the terminal device has a modification risk based on the difference between the second audio signal and the third audio signal; wherein the third audio signal is associated with the first audio signal and is used to indicate that the terminal device does not have a modification risk.

9. A computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the steps of the method of any one of claims 1-7.

10. An electronic device, comprising: processor; Memory used to store processor-executable instructions; The processor is configured to perform the steps of the method according to any one of claims 1-7.