Control method of electronic device, electronic device, and storage medium
By combining voice recognition and ranging modules, the system identifies the sound source characteristics and distance of voice commands, controls the camera's operation, solves the privacy leakage problem of electronic devices when they are not in use, simplifies the device structure, and improves aesthetics.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-02-10
- Publication Date
- 2026-03-27
AI Technical Summary
Existing electronic devices are prone to privacy breaches when users do not need to use the camera, and existing obstruction structures complicate device design.
By combining voice recognition and ranging modules, the system identifies the sound source characteristics and distance of voice commands, controls the operation of the camera, and ensures that the camera is only turned on by authorized users when the conditions are met.
It effectively prevents privacy leaks, simplifies device structure, improves the accuracy of camera operation in matching user needs, and enhances the aesthetics of the device.
Smart Images

Figure CN116320718B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of electronic devices, and in particular to a control method of an electronic device, the electronic device, and a storage medium. BACKGROUND
[0002] With the development of economy and technology, electronic devices are increasingly widely used in daily life, and the functions of electronic devices are increasingly diversified. Many electronic devices (such as sound boxes) are provided with cameras, and image capturing by the cameras when the users do not need to use them (for example, when the users do not need to use the cameras to realize identification or monitoring functions) is likely to cause the leakage of the users' privacy.
[0003] At present, a baffle or other structural member is generally provided on an electronic device, and the user can move the structural member to shield the camera to prevent the leakage of privacy, but such a way is likely to cause the design structure of the electronic device to be complex. SUMMARY
[0004] The main purpose of the present application is to provide a control method of an electronic device, the electronic device, and a storage medium, aiming to prevent the leakage of users' privacy while simplifying the structure of the electronic device.
[0005] To achieve the above purpose, the present application provides a control method of an electronic device, the electronic device comprising a camera, the control method of the electronic device comprising the following steps:
[0006] receiving a voice instruction, the voice instruction comprising a running control instruction of the camera;
[0007] identifying a sound feature parameter of the voice instruction, and detecting a distance between a sound source corresponding to the voice instruction and the electronic device;
[0008] controlling whether the camera executes the running control instruction according to the sound feature parameter and the distance.
[0009] Optionally, the running control instruction comprises an opening instruction of the camera, and the step of controlling whether the camera executes the running control instruction according to the sound feature parameter and the distance comprises:
[0010] determining whether the sound feature parameter and the distance satisfy a preset condition;
[0011] controlling the camera to execute the opening instruction when the sound feature parameter and the distance satisfy the preset condition;
[0012] controlling the camera to prohibit the execution of the opening instruction when the sound feature parameter and the distance do not satisfy the preset condition.
[0013] Optionally, the step of determining whether the sound feature parameter and the distance satisfy a preset condition comprises:
[0014] obtaining pre-stored sound information of a target user having the camera use permission, the pre-stored sound information comprising a pre-stored correspondence between a distance and a first sound parameter of the target user;
[0015] determining whether a first similarity between the first sound parameter corresponding to the distance in the pre-stored correspondence and the sound feature parameter is greater than a first preset value;
[0016] wherein the preset condition comprises that the first similarity is greater than the first preset value.
[0017] Optionally, the sound feature parameter comprises a sound amplitude, a sound frequency and a sound duration, the first sound parameter comprises a user sound amplitude, the pre-stored sound information further comprises a pre-stored sound frequency and a pre-stored sound duration, and after the step of obtaining the pre-stored sound information of the target user having the camera use permission, the method further comprises:
[0018] performing the step of determining whether the first similarity between the first sound parameter corresponding to the distance in the pre-stored correspondence and the sound feature parameter is greater than a first preset value, the first similarity being a similarity between the sound amplitude and the target sound amplitude corresponding to the distance in the pre-stored correspondence;
[0019] determining whether a second similarity between the sound frequency and the pre-stored sound frequency is greater than a second preset value;
[0020] determining whether a third similarity between the sound duration and the pre-stored sound duration is greater than a third preset value;
[0021] wherein the preset condition comprises that the first similarity is greater than the first preset value, the second similarity is greater than the second preset value, and the third similarity is greater than the third preset value.
[0022] Optionally, the step of obtaining the pre-stored sound information of the target user having the camera use permission comprises:
[0023] obtaining an encrypted file in which the pre-stored sound information is stored;
[0024] decrypting the encrypted file to obtain the pre-stored sound information.
[0025] Optionally, before the step of receiving a voice instruction and identifying a sound feature parameter of the voice instruction, the method further comprises:
[0026] collecting sound source information of the target user corresponding to at least two preset distances, the sound source information including the first sound parameter;
[0027] establishing the pre-stored corresponding relationship according to at least two preset distances and corresponding first sound parameters;
[0028] saving the pre-stored corresponding relationship.
[0029] Optionally, the first sound parameter includes a sound source amplitude, the sound source information further includes a sound source sound duration and a sound source frequency, and the step of saving the pre-stored corresponding relationship includes
[0030] storing the pre-stored corresponding relationship, the duration and the frequency in association, and the pre-stored sound information includes the pre-stored corresponding relationship, the duration and the frequency.
[0031] Optionally, the step of storing the pre-stored corresponding relationship, the duration and the frequency in association includes:
[0032] associating and encrypting the pre-stored corresponding relationship, the duration and the frequency to form an encrypted file;
[0033] saving the encrypted file.
[0034] In addition, in order to achieve the above-mentioned purpose, the present application further provides an electronic device, which comprises:
[0035] a camera;
[0036] a voice recognition module, configured to receive a voice instruction;
[0037] a distance measurement module, configured to detect a distance between a sound source corresponding to the voice instruction and the electronic device;
[0038] a control device, wherein the camera, the voice recognition module and the distance measurement module are all connected to the control device, and the control device comprises a memory, a processor and an electronic device control program stored in the memory and executable on the processor, and the electronic device control program is executed by the processor to implement the steps of the control method of the electronic device according to any one of the above-mentioned embodiments.
[0039] In addition, in order to achieve the above-mentioned purpose, the present application further provides a storage medium, wherein the storage medium stores an electronic device control program, and the electronic device control program is executed by a processor to implement the steps of the control method of the electronic device according to any one of the above-mentioned embodiments.
[0040] The application provides a control method of an electronic device. When a voice instruction of camera operation control is received, the method extracts a sound characteristic parameter in the voice instruction and detects a distance between a sound source corresponding to the voice instruction and the electronic device, and controls whether the camera executes the operation control instruction according to the sound characteristic parameter and the distance. The sound characteristic parameter can accurately represent whether a user currently issuing the voice instruction is a user with the right to use the camera, and the distance can accurately reflect the actual use demand of the user on the camera. Therefore, the distance and the sound characteristic parameter can accurately reflect whether the operation control demand of the current camera is a legal request of the electronic device camera operation control, so that the camera is controlled according to the distance and the sound characteristic parameter to respond to the operation control instruction, which is beneficial to improving the accuracy of matching the operation of the camera with the demand of the user with the right to use the camera, ensuring that the camera will not operate according to the operation control instruction of the non-authorized user, the electronic device does not need to be provided with an additional shielding piece, thereby effectively preventing the user privacy from being leaked and simplifying the structure of the electronic device, and being beneficial to improving the aesthetic degree of the electronic device. BRIEF DESCRIPTION OF DRAWINGS
[0041] Figure 1 A schematic diagram of a hardware structure related to the operation of an embodiment of the electronic device of the application;
[0042] Figure 2 A schematic diagram of a flow of an embodiment of the control method of the electronic device of the application;
[0043] Figure 3 A schematic diagram of a flow of another embodiment of the control method of the electronic device of the application;
[0044] Figure 4 A schematic diagram of a flow of still another embodiment of the control method of the electronic device of the application;
[0045] Figure 5 A schematic diagram of a flow of still another embodiment of the control method of the electronic device of the application;
[0046] Figure 6 A schematic diagram of a flow of still another embodiment of the control method of the electronic device of the application.
[0047] The implementation, functional features and advantages of the application will be further described with reference to the embodiments and the accompanying drawings. DETAILED DESCRIPTION
[0048] It should be understood that the specific embodiments described herein are merely intended to explain the application and are not intended to limit the application.
[0049] An electronic device is provided in the embodiments of the application. In the embodiments, the electronic device is a sound box. In other embodiments, the electronic device can also include other types of devices, such as a television, a refrigerator, a temperature measuring instrument, a monitoring device, etc.
[0050] In the embodiment, refer to Figure 1 , the electronic device includes a voice recognition module 1, a camera 2, a ranging module 3 and a control device 4. The voice recognition module 1, the camera 2 and the ranging module 3 are connected with the control device 4, and the control device 4 can acquire the data detected by the above modules and control the operation of the above modules.
[0051] The voice recognition module 1 is used to collect voice information in the space where it is located and recognize the control instructions in the voice information.
[0052] The camera 2 is used to collect image information in the space where it is located.
[0053] The ranging module 3 is used to detect the distance between the sound source and the electronic device. In the embodiment, the ranging module 3 is a radar module, such as a millimeter wave radar and the like. In other embodiments, the ranging module 3 can also be other types of modules, such as an infrared ranging module, a sound source positioning module and the like.
[0054] In the embodiment, refer to Figure 1 , the control device 4 of the electronic device includes a processor 1001 (such as a CPU), a memory 1002, a timer 1003 and the like. The components in the control device 4 are connected through a communication bus. The memory 1002 can be a high-speed RAM memory, or a stable memory (non-volatile memory), such as a disk memory. The memory 1002 can also be an optional storage device independent of the aforementioned processor 1001.
[0055] Those skilled in the art can understand that Figure 1 The device structure shown in the embodiment does not constitute a limitation on the device, and can include more or fewer components than shown, or combine certain components, or different component arrangements.
[0056] As shown in Figure 1 , the memory 1002 as a storage medium can include a control program of the electronic device. In the device shown in Figure 1 , the processor 1001 can be used to call the control program of the electronic device stored in the memory 1002, and perform the related step operations of the control method of the electronic device in the following embodiments.
[0057] The embodiment also provides a control method of an electronic device, applied to the above electronic device.
[0058] Refer to Figure 2 , an embodiment of the control method of the electronic device is proposed. In the embodiment, the control method of the electronic device includes:
[0059] Step S10, receiving a voice instruction, the voice instruction comprising a running control instruction of the camera;
[0060] Specifically, the voice recognition function of the electronic device can be continuously enabled, and when the voice recognition function is enabled, the sound information in the space where the electronic device is located is detected in real time, and the control instruction of the camera is recognized. When the running control instruction of the camera is recognized, it is determined that the voice instruction is received.
[0061] In this embodiment, the running control instruction comprises an opening instruction of the camera. In other embodiments, the running control instruction can also comprise other control instructions of the camera, such as a turning instruction, an image shooting range adjustment instruction, a timing control instruction, and / or an adjustment focus instruction, etc.
[0062] Step S20, identifying the sound feature parameter of the voice instruction, and detecting the distance between the sound source corresponding to the voice instruction and the electronic device;
[0063] The sound feature parameter is a parameter representing the sound feature of the voice instruction. The sound feature parameter comprises sound frequency, sound amplitude, sound duration, sound intensity value, sound source direction, tone, and / or pitch, etc.
[0064] In this embodiment, the distance between the sound source corresponding to the voice instruction and the electronic device is detected according to the sound source direction in the sound feature parameter. Specifically, the position of the human body in the sound source direction is determined according to the radar information detected by the radar detection module, and the distance between the position and the current position of the electronic device is determined.
[0065] Step S30, controlling whether the camera executes the running control instruction according to the sound feature parameter and the distance.
[0066] Specifically, the preset condition required to be met by the sound feature parameter and the distance when the camera executes the running control instruction can be set in advance. When the sound feature parameter and the distance meet the preset condition, the camera is controlled to execute the running control instruction; when the sound feature parameter and the distance do not meet the preset condition, the camera is controlled to prohibit the execution of the running control instruction.
[0067] In one implementation manner, the corresponding relationship between the parameter range required to be reached by the sound feature parameter and the distance can be set in advance, and according to the corresponding relationship, the parameter range corresponding to the current distance can be determined as the target parameter range. The sound feature parameter is in the target parameter range, which meets the preset condition, and the sound feature parameter is not in the target parameter range, which does not meet the preset condition.
[0068] In another implementation, the sound feature parameter can include more than one sub-parameter (e.g., sound amplitude, sound frequency, sound duration, and sound source direction), a target sub-parameter in the more than one sub-parameter is determined according to the distance, different distances correspond to different target sub-parameters, the number of target sub-parameters corresponding to the distance can be one or more than one, and based on this, the preset condition is met when the target sub-parameter is located in the corresponding preset parameter range, and the preset condition is not met when the target sub-parameter is located out of the corresponding preset parameter range.
[0069] The method for controlling an electronic device according to an embodiment of the present application receives a voice instruction for controlling a camera, extracts a sound feature parameter in the voice instruction, and detects a distance between a sound source corresponding to the voice instruction and the electronic device, and controls the camera to execute or not to execute the control instruction according to the sound feature parameter and the distance. The sound feature parameter can accurately indicate whether a user who currently issues the voice instruction is a user who has a right to use the camera, and the distance can accurately reflect an actual use demand of the user on the camera. Therefore, the combination of the distance and the sound feature parameter can accurately reflect whether the control demand of the camera is a legal request for the control of the camera of the electronic device, and thus the camera is controlled to execute or not to execute the control instruction according to the distance and the sound feature parameter. This is advantageous to improve the accuracy of matching the operation of the camera with the demand of the user who has the right to use the camera, to ensure that the camera will not operate according to the control instruction of the user who does not have the right, and to simplify the structure of the electronic device without the need of setting an additional shielding member, thereby effectively preventing the leakage of user privacy and improving the aesthetic appearance of the electronic device.
[0070] Further, based on the above embodiment, another embodiment of the method for controlling an electronic device according to the present application is provided. In this embodiment, the control instruction includes an opening instruction of the camera, and the step S30 includes: Figure 3 , the step S30 includes:
[0071] The step S31 determines whether the sound feature parameter and the distance meet a preset condition.
[0072] The step S32 controls the camera to execute the opening instruction when the sound feature parameter and the distance meet the preset condition.
[0073] The step S33 controls the camera to prohibit the execution of the opening instruction when the sound feature parameter and the distance do not meet the preset condition.
[0074] Specifically, when the camera is in a closed state, the prohibition of the execution of the opening instruction means that the camera maintains the closed state, and when the camera is in an opened state, the prohibition of the execution of the opening instruction means that the camera is switched from the opened state to the closed state.
[0075] In this embodiment, when a voice control command to turn on the camera is received, the system accurately identifies whether the user needs to turn on the camera by using sound feature parameters and distance. If the preset conditions are met, the camera is turned on; if the preset conditions are not met, the camera is turned off, thus preventing the camera from being turned on unnecessarily when the user does not need to use it, thereby further effectively preventing the leakage of user privacy.
[0076] Furthermore, based on any of the above embodiments, another embodiment of the control method for the electronic device of this application is proposed. In this embodiment, reference is made to... Figure 4 Step S31 includes:
[0077] Step S311: Obtain the pre-stored audio information of the target user who has access to the camera, wherein the pre-stored audio information includes a pre-stored correspondence between distance and the first audio parameter of the target user;
[0078] The pre-stored audio information is generated by collecting the user's voice feature parameters when the camera is first turned on or when a preset command is received.
[0079] Different distances correspond to different first sound parameters. The first sound parameters include one or more of the following sound characteristics: sound frequency, sound amplitude, sound duration, sound intensity, sound source direction, timbre, etc.
[0080] Pre-stored correspondences can include computational relationships, mapping relationships, and other forms.
[0081] Step S312: Determine whether the first similarity between the first sound parameter corresponding to the distance in the pre-stored correspondence and the sound feature parameter is greater than a first preset value; wherein, the preset condition includes the first similarity being greater than the first preset value.
[0082] The first similarity can be determined by the deviation characteristic value (such as variance, standard deviation, or difference) between the first sound parameter and the sound feature parameter. The larger the deviation value, the smaller the first similarity, and the smaller the deviation value, the larger the first similarity.
[0083] The first preset value is specifically a similarity threshold used to identify whether the user issuing the voice command is legitimate. When the first preset value is greater than the first preset value, it indicates that the user issuing the voice command is legitimate; when the first preset value is less than or equal to the first preset value, it indicates that the user issuing the voice command is illegitimate.
[0084] In the embodiment, the voice parameter corresponding to the current distance is determined based on the pre-stored correspondence relationship between the distance and the voice parameter of the user who has the right to use the camera, as a reference for identifying whether the user currently issuing the voice instruction is a legal user, and the first similarity can accurately reflect whether the identity of the user currently issuing the voice instruction is legal. Based on this, the opening and closing of the camera can be accurately controlled based on the legality of the user identity, so as to ensure that the image shooting of the camera can accurately meet the actual needs of the user with the right, and ensure that the operation of the camera can effectively avoid the leakage of the privacy of the user with the right.
[0085] Further, based on any of the above embodiments, another embodiment of the control method of the electronic device is provided. In the embodiment, the voice feature parameter includes a voice amplitude, a voice frequency, and a sound duration, the first voice parameter includes a target voice amplitude, the pre-stored voice information further includes a pre-stored voice frequency and a pre-stored sound duration, and the step S311 further includes: Figure 5
[0086] Step S312, determining whether the first similarity between the distance corresponding first voice parameter in the pre-stored correspondence relationship and the voice feature parameter is greater than a first preset value, the first similarity being the similarity between the voice amplitude and the target voice amplitude corresponding to the distance in the pre-stored correspondence relationship;
[0087] Step S313, determining whether the second similarity between the voice frequency and the pre-stored voice frequency is greater than a second preset value;
[0088] The second similarity can be determined according to the frequency deviation value between the voice frequency and the pre-stored voice frequency.
[0089] The second preset value is specifically a similarity threshold value pre-set for identifying whether the user issuing the voice instruction is legal.
[0090] Step S314, determining whether the third similarity between the sound duration and the pre-stored sound duration is greater than a third preset value;
[0091] The sound duration is specifically the duration of the voice instruction. The pre-stored sound duration is specifically the sound duration of the voice of the target user issuing the operation control instruction of the camera.
[0092] The pre-set condition includes that the first similarity is greater than the first preset value, the second similarity is greater than the second preset value, and the third similarity is greater than the third preset value.
[0093] The first preset value, the second preset value, and the third preset value can be pre-set fixed parameters, or can be determined according to the actual operation of the electronic device, such as the volume of the played sound.
[0094] In the embodiment, the first preset value and the second preset value are both less than the third preset value.
[0095] The third similarity can be determined according to a time length difference between the sound emission time length and the pre-stored sound emission time length.
[0096] The third preset value is specifically a similarity threshold value pre-set for identifying whether the user who emits the voice instruction is legitimate.
[0097] It should be noted that the order of execution between the step S312 and the step S314 is not specifically limited.
[0098] In the embodiment, the legitimate identity of the user who currently emits the voice instruction is verified in combination with the similarity between the sound amplitude, the frequency and the sound emission time length of the corresponding sound in the pre-stored sound information and the sound amplitude, the frequency and the sound emission time length of the current voice instruction. When the three similarities are all large enough, it is confirmed that the user who currently emits the voice instruction is a legitimate user, and the camera is allowed to be turned on. Otherwise, the camera is not allowed to be turned on, which is beneficial to further avoid the leakage of user privacy.
[0099] Further, based on any of the above embodiments, a control method of an electronic device is further provided in another embodiment. In the embodiment, the step of obtaining the pre-stored sound information of the target user who has the camera use permission comprises: obtaining an encrypted file in which the pre-stored sound information is stored; and decrypting the encrypted file to obtain the pre-stored sound information.
[0100] In the embodiment, the pre-stored sound information of the legitimate user is stored in an encrypted manner, so as to avoid the pre-stored sound information from being illegally tampered with, thereby effectively ensuring the legality and accuracy of the obtained pre-stored sound information, to further ensure that the user privacy will not be leaked.
[0101] Further, based on any of the above embodiments, a control method of an electronic device is further provided in still another embodiment. In the embodiment, with reference to Figure 6 , before the step S10, the method further comprises:
[0102] The step S01 comprises: collecting sound source information of the target user corresponding to at least two preset distances, wherein the sound source information comprises the first sound parameter.
[0103] Specifically, the step S01 can be performed when the camera is turned on for the first time or when a preset instruction is received.
[0104] The preset distance can be set by the user, can be a pre-stored parameter in the camera, or can be actual detected distance information.
[0105] Specifically, the electronic device can output prompt information to prompt the user to move and issue a voice corresponding to a running control instruction of the camera at at least two different distances. When detecting voice data corresponding to the running control instruction input by the user, the voice data can be subjected to sound feature recognition as the sound source information here. The distance between the current position of the user and the electronic device can be detected as the preset distance here.
[0106] In step S02, the pre-stored correspondence is established according to at least two preset distances and corresponding first sound parameters.
[0107] Specifically, the pre-stored correspondence here can be obtained by fitting at least two preset distances and corresponding first sound parameters.
[0108] In step S03, the pre-stored correspondence is saved.
[0109] In the embodiment, the pre-stored correspondence is established by pre-collecting sound source information of a target user at different distances in the above manner, so that subsequent application of the pre-stored correspondence can realize accurate identification of the legal identity of a user issuing a voice instruction, and further avoid leakage of the target user's privacy.
[0110] Further, the first sound parameter includes a sound source amplitude, the sound source information further includes a sound source sound duration and a sound source frequency, and the step of saving the pre-stored correspondence includes:
[0111] The pre-stored correspondence, the duration and the frequency are associatedly stored, and the pre-stored sound information includes the pre-stored correspondence, the duration and the frequency.
[0112] The duration and the frequency in the sound source information refer to the same concept as the pre-stored sound frequency and the pre-stored sound duration, and the duration and the frequency in the sound source information form the pre-stored sound frequency and the pre-stored sound duration after being saved.
[0113] In the embodiment, the pre-stored sound information is generated by combining pre-collected sound source amplitudes, durations and frequencies of a target user at different distances, so that subsequent verification of the legal identity of a user issuing a voice instruction can be performed in combination with the sound amplitudes, frequencies and sound durations corresponding to the distances in the pre-stored sound information, and only when the three sound features match is the user issuing the voice instruction confirmed to be a legal user, allowing the camera to be turned on; otherwise, the camera is not allowed to be turned on, which is conducive to further avoiding leakage of user privacy.
[0114] Further, in the embodiment, the step of associating and storing the pre-stored correspondence, the duration and the frequency includes: associating and encrypting the pre-stored correspondence, the duration and the frequency to form an encrypted file; and saving the encrypted file.
[0115] Specifically, in the present embodiment, the pre-stored correspondence relationship, time length and frequency can be saved to a target file, and the target file is encrypted to form an encrypted relationship.
[0116] Further, the respiratory feature parameters of the target user can be acquired, the respiratory feature parameters are calculated according to a preset encryption algorithm to obtain key ciphertext, the key ciphertext is spliced with the initial file name of the target file to form a target file name to save the target file. Based on this, when the pre-stored user information is acquired subsequently, the current respiratory feature parameters of the user issuing the voice instruction can be detected (specifically, the above-mentioned millimeter wave radar can be used for detection, and no other modules need to be additionally arranged), the current respiratory feature parameters are calculated according to a preset encryption algorithm to obtain verification ciphertext, the target file is acquired and the part other than the initial file name of the target file is extracted as the key ciphertext from the file name of the target file, the key ciphertext is matched with the verification ciphertext, and then the decryption is successful, and the pre-stored user information can be extracted from the target file. If the key ciphertext does not match the verification ciphertext, the decryption fails, and at this time, the camera can be controlled to prohibit the execution of the running control instruction.
[0117] In the present embodiment, the pre-stored voice information of the legal user is stored in an encrypted manner, so that the pre-stored voice information is prevented from being tampered with illegally, thereby effectively ensuring the legality and accuracy of the acquired pre-stored voice information, to further ensure that the user privacy will not be leaked.
[0118] In addition, the present embodiment further provides a storage medium, and the storage medium stores a control program of an electronic device. When the control program of the electronic device is executed by a processor, the related steps of any one of the above embodiments of the control method of the electronic device are implemented.
[0119] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that a process, method, article or system including a series of elements not only includes those elements, but also includes other elements not explicitly listed, or further includes elements inherent to such a process, method, article or system. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, method, article or system including the element.
[0120] The above-mentioned serial numbers of the embodiments of the present application are only for description, and do not represent the advantages and disadvantages of the embodiments.
[0121] Those skilled in the art can clearly understand the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, can also be through hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application essentially or say the part of the prior art contribution can be embodied in the form of software products, the computer software product is stored in a storage medium (such as ROM / RAM, magnetic disc, optical disc) as described above, including a number of instructions to make a terminal device (may be a mobile phone, computer, server, electronic device, or network equipment, etc.) executes the method described in various embodiments of the present application.
[0122] The above is only the preferred embodiment of the present application, not therefore limit the patent scope of the present application, any equivalent structure or equivalent flow transformation made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A control method for an electronic device, characterized in that, The electronic device includes a camera, and the control method for the electronic device includes the following steps: Collect sound source information of at least two target users at preset distances, wherein the sound source information includes a first sound parameter, the duration of the sound source's sound emission, and the frequency of the sound source; Based on the at least two preset distances and the corresponding first sound parameters, a pre-stored correspondence between the preset distances and the first sound parameters is established; The pre-stored correspondence, duration, and frequency are associated and stored. The pre-stored correspondence, duration, and frequency are saved to a target file. The respiratory feature parameters of the target user are obtained. The respiratory feature parameters are calculated according to a preset encryption algorithm to obtain a key ciphertext. The key ciphertext is concatenated with the initial filename of the target file to obtain the target filename. The target file is saved according to the target filename. Receive voice commands, including operation control commands for the camera; Identify the sound feature parameters of the voice command and detect the distance between the sound source corresponding to the voice command and the electronic device; The camera is controlled to execute the operation control command based on the sound feature parameters and the distance. The operation control command includes the camera activation command, and the step of controlling whether the camera executes the operation control command based on the sound feature parameters and the distance includes: The system acquires pre-stored audio information of a target user with access to the camera, wherein the current breathing characteristic parameters of the user issuing the voice command are detected, and the current breathing characteristic parameters are calculated according to a preset encryption algorithm to obtain verification ciphertext; the target file is acquired, and the part other than the initial filename is extracted from the target file name as key ciphertext; if the key ciphertext and the verification ciphertext match, decryption is determined to be successful, and pre-stored audio information is extracted from the target file, wherein the pre-stored audio information includes the pre-stored correspondence, the duration, and the frequency; Determine whether the first similarity between the first sound parameter corresponding to the distance in the pre-stored correspondence and the sound feature parameter is greater than a first preset value; When the first similarity is greater than the first preset value, the camera is controlled to execute an activation command; When the first similarity is not greater than the first preset value, the camera is controlled to prevent the execution of the opening command.
2. The control method for an electronic device as described in claim 1, characterized in that, The sound feature parameters include sound amplitude, sound frequency, and sound duration. The first sound parameter includes the user's sound amplitude. The pre-stored sound information also includes pre-stored sound frequency and pre-stored sound duration. After the step of obtaining the pre-stored sound information of the target user with access to the camera, the method further includes: The step of determining whether the first similarity between the first sound parameter corresponding to the distance in the pre-stored correspondence and the sound feature parameter is greater than a first preset value is performed, wherein the first similarity is the similarity between the sound amplitude and the target sound amplitude corresponding to the distance in the pre-stored correspondence; Determine whether the second similarity between the sound frequency and the pre-stored sound frequency is greater than a second preset value; Determine whether the third similarity between the sound duration and the pre-stored sound duration is greater than a third preset value; When preset conditions are met, the camera is controlled to execute the activation command; the preset conditions include the first similarity being greater than the first preset value, the second similarity being greater than the second preset value, and the third similarity being greater than the third preset value.
3. An electronic device, characterized in that, The electronic device includes: Camera; A voice recognition module, wherein the voice recognition module is used to receive voice commands; A ranging module, which is used to detect the distance between the sound source corresponding to the voice command and the electronic device; The control device, including the camera, the voice recognition module, and the ranging module, comprises: a memory, a processor, and a control program for an electronic device stored in the memory and executable on the processor. When executed by the processor, the control program for the electronic device implements the steps of the control method for the electronic device as described in any one of claims 1 to 2.
4. A storage medium, characterized in that, The storage medium stores a control program for an electronic device, which, when executed by a processor, implements the steps of the control method for an electronic device as described in any one of claims 1 to 2.
Citation Information
Patent Citations
Method and device for controlling electronic equipment, storage medium, and electronic equipment
CN108924343A
Voice control method and device and storage medium
CN113903331A