Equipment control method and device, medium and computing equipment
By obtaining the sound signal intensity in the system audio on the user terminal in real time and converting it into functional strength level values, dynamically adjusting the working parameters of the controlled device, the problems of single function experience and cumbersome operation in the existing equipment control method are solved, and the problem of "single" and "commercial" is realized. The interaction between the device and audio and video content improves the diversity and depth of the user experience.
Patent Information
- Application Number
- CN202411506680.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-25
- Publication Date
- 2025-02-18
AI Technical Summary
The existing device control methods have problems such as single functional experience, cumbersome operation, lack of flexibility and personalization in smart homes and personal entertainment devices, which limit the diversity and depth of user experience.
By installing an application on the user terminal, the sound signal intensity in the system audio is obtained in real time and converted into the functional strength level value of the controlled device, and the operation control command is constructed to dynamically adjust the operating parameters of the controlled device.
The controlled device is effectively interacted with the audio and video content, allowing users to gain a more immersive and personalized experience when enjoying the audio and video content.
Smart Images

Figure CN119472346A_ABST
Abstract
Description
Technical Field
[0001] Embodiments of the present invention relate to the fields of computer science and information technology, and more specifically, to device control methods, apparatuses, media, and computing devices. Background Art
[0002] This section is intended to provide a background or context to embodiments of the invention that are recited in the claims. No description herein is admitted to be prior art by inclusion in this section.
[0003] In the current field of smart home and personal entertainment devices, with the continuous advancement of technology, users have an increasing demand for the intelligence, personalization and interactivity of devices. Currently, most device function controls rely on preset function mode selection or manual adjustment operations. This type of control method brings a single functional experience, cumbersome operation, lack of flexibility and personalization, and limits the diversity and depth of user experience. Summary of the invention
[0004] In view of this, in order to solve the above problems, embodiments of the present invention are intended to provide a device control method, apparatus, medium and computing device.
[0005] In a first aspect of an embodiment of the present invention, a device control method is provided, which is applied to an application installed on a user terminal, and the method includes:
[0006] Acquire the system audio played by the user terminal in real time, and determine the sound signal strength within a set frequency range in the system audio;
[0007] Converting the sound signal strength into a functional strength level value of the controlled device;
[0008] According to the functional strength level value, an operation control instruction is constructed and sent to the controlled device; the operation control instruction is used to instruct the controlled device to operate according to the working parameters corresponding to the functional strength level value.
[0009] Optionally, converting the sound signal strength into a functional strength level value of the controlled device includes:
[0010] Acquiring a sensitivity parameter; the sensitivity parameter is used to adjust the response degree of the controlled device to the change of the sound signal intensity;
[0011] The intensity of the sound signal is adjusted according to the sensitivity parameter to obtain the adjusted intensity and use it as the exponential value of the exponential transformation;
[0012] The functional strength level value is obtained by performing exponential transformation based on a preset base value and the exponential value; the base value is greater than 1.
[0013] Optionally, the method further comprises:
[0014] When the sound signal strength is less than a set minimum strength value, updating the sound signal strength to the minimum strength value;
[0015] When the sound signal strength is greater than a set maximum strength value, the sound signal strength is updated to the maximum strength value.
[0016] Optionally, determining the strength of a sound signal within a set frequency range in the system audio includes:
[0017] For a system audio segment of a set time window length, obtaining a power value at each discrete frequency point in the system audio segment through spectrum analysis;
[0018] Determine a target frequency point within the set frequency range from the discrete frequency points, and obtain an average value of power values of all the target frequency points;
[0019] The average value is converted into a decibel value as the sound signal intensity.
[0020] Optionally, constructing an operation control instruction according to the function strength level value and sending the instruction to the controlled device includes:
[0021] According to a preset instruction format, the functional strength level value is encapsulated into an operation control instruction;
[0022] or,
[0023] According to the pre-stored mapping relationship between the function strength level of the controlled device and the working parameters of the controlled function, the working parameters matching the function strength level value are obtained; and the working parameters are encapsulated into operation control instructions.
[0024] Optionally, the controlled device includes multiple controlled functions; each mapping record of the mapping relationship includes a function strength level value and corresponding working parameters of each of the multiple controlled functions; and obtaining the working parameters matching the function strength level value includes:
[0025] According to the on / off state of each controlled function recorded locally, determining the controlled function in the on state;
[0026] Searching for a target mapping record matching the functional strength level value from the mapping relationship;
[0027] The operating parameters of the controlled function in the turned-on state are obtained from the target mapping record as the operating parameters of the function intensity level value.
[0028] Optionally, constructing and sending the operation control instruction to the controlled device includes:
[0029] Obtaining the switch status of each controlled function in the controlled device;
[0030] The switch state of the controlled function is encapsulated into the operation control instruction, so that the controlled function in the turned-on state in the controlled device operates according to the working parameters corresponding to the function strength level value.
[0031] Optionally, the user interaction interface of the application displays a switch control of a controlled function of the controlled device; the method further includes:
[0032] In response to the selection operation of the switch control, the switch state of the controlled function selected by the selection operation is switched, and a state change instruction is constructed and sent to the controlled device, so that the controlled device changes the selected controlled function from a current state to a target state;
[0033] Among them, when the current state is the open state, the target state is the closed state; when the current state is the closed state, the target state is the open state.
[0034] Optionally, the method further comprises:
[0035] In response to the start-up operation of the application, requesting the user terminal for permission to obtain system audio;
[0036] In response to the authorization operation of the system audio acquisition authority, the system audio of the user terminal is acquired in real time.
[0037] Optionally, the method further comprises:
[0038] In response to a startup operation of the application, displaying a user interaction interface of the application;
[0039] In response to the operation of starting the audio control device function on the user interaction interface, the system audio of the user terminal is acquired in real time after obtaining the system audio acquisition authority.
[0040] In a second aspect of the embodiments of the present invention, there is provided a device control apparatus, which is applied to an application installed on a user terminal, and the apparatus comprises:
[0041] An audio acquisition and strength calculation module, used to acquire the system audio played by the user terminal in real time and determine the sound signal strength within a set frequency range in the system audio;
[0042] An intensity level conversion module, used to convert the intensity of the sound signal into a functional intensity level value of the controlled device;
[0043] An instruction construction and sending module is used to construct an operation control instruction according to the functional strength level value and send it to the controlled device; the operation control instruction is used to instruct the controlled device to operate according to the working parameters corresponding to the functional strength level value.
[0044] Optionally, the intensity level conversion module is specifically used to:
[0045] Acquiring a sensitivity parameter; the sensitivity parameter is used to adjust the response degree of the controlled device to the change of the sound signal intensity;
[0046] The intensity of the sound signal is adjusted according to the sensitivity parameter to obtain the adjusted intensity and use it as the exponential value of the exponential transformation;
[0047] The functional strength level value is obtained by performing exponential transformation based on a preset base value and the exponential value; the base value is greater than 1.
[0048] Optionally, the device further comprises:
[0049] When the sound signal strength is less than a set minimum strength value, updating the sound signal strength to the minimum strength value;
[0050] When the sound signal strength is greater than a set maximum strength value, the sound signal strength is updated to the maximum strength value.
[0051] Optionally, the audio acquisition and intensity calculation module is specifically used for:
[0052] For a system audio segment of a set time window length, the power value at each discrete frequency point in the system audio segment is obtained through spectrum analysis; a target frequency point within the set frequency range is determined from each discrete frequency point, and the average power value of all the target frequency points is obtained; the average value is converted into a decibel value as the sound signal intensity.
[0053] Optionally, the instruction structure sending module is specifically used for:
[0054] According to a preset instruction format, the function strength level value is encapsulated into an operation control instruction;
[0055] Or, according to the pre-stored mapping relationship between the function strength level of the controlled device and the working parameters of the controlled function, the working parameters matching the function strength level value are obtained; and the working parameters are encapsulated into operation control instructions.
[0056] Optionally, the controlled device includes multiple controlled functions; each mapping record of the mapping relationship includes a function strength level value and corresponding working parameters of each of the multiple controlled functions; when the instruction structure sending module is used to obtain the working parameters matching the function strength level value, it includes:
[0057] According to the switch status of each controlled function recorded locally, determine the controlled function in the turned-on state; search for the target mapping record that matches the function strength level value from the mapping relationship; obtain the working parameters of the controlled function in the turned-on state from the target mapping record as the working parameters of the function strength level value.
[0058] Optionally, the instruction structure sending module is specifically used for:
[0059] Obtaining the switch state of each controlled function in the controlled device; encapsulating the switch state of the controlled function into the operation control instruction, so that the controlled function in the controlled device that is in the turned-on state operates according to the working parameters corresponding to the function strength level value.
[0060] Optionally, the user interaction interface of the application displays a switch control of a controlled function of the controlled device; and the apparatus further comprises:
[0061] In response to the selection operation of the switch control, the switch state of the controlled function selected by the selection operation is switched, and a state change instruction is constructed and sent to the controlled device, so that the controlled device changes the selected controlled function from a current state to a target state; wherein, when the current state is an open state, the target state is a closed state; and when the current state is a closed state, the target state is an open state.
[0062] Optionally, the device further comprises:
[0063] In response to the startup operation of the application, requesting the user terminal for permission to obtain the system audio; in response to the authorization operation of the system audio obtaining permission, obtaining the system audio of the user terminal in real time.
[0064] Optionally, the device further comprises:
[0065] In response to the start-up operation of the application, the user interaction interface of the application is displayed; in response to the start-up audio control device function operation of the user interaction interface, the system audio of the user terminal is acquired in real time after obtaining the system audio acquisition authority.
[0066] In a third aspect of the embodiments of the present invention, a readable storage medium is provided, on which a computer program is stored, and when the program is executed by a processor, the above method is implemented.
[0067] In a fourth aspect of the embodiments of the present invention, a computing device is provided, comprising: a processor and a memory; the memory is used to store a computer program; the processor is used to execute the above method by calling the computer program.
[0068] The embodiments of the present invention provide an interactive mode that can adjust the controlled device in real time according to the system audio of the user terminal. It obtains the system audio of the user terminal and converts the sound signal strength therein into a functional strength level value of the controlled device, thereby constructing a real-time operation control instruction, so that the controlled device can dynamically adjust its working parameters as the audio of the user terminal changes, thereby realizing effective interaction between the controlled device and the audio and video content, so that the user can have a more immersive and personalized experience when enjoying the audio and video content. BRIEF DESCRIPTION OF THE DRAWINGS
[0069] The above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood by reading the detailed description below with reference to the accompanying drawings. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, in which:
[0070] Figure 1A A schematic diagram of interaction subjects involved in a method implementation process according to an embodiment of the present invention is schematically shown;
[0071] Figure 1B A flowchart schematically shows a method for controlling a device according to an embodiment of the present invention;
[0072] Figure 2A A flowchart schematically shows a step of converting the sound signal strength into a functional strength level value of a controlled device according to an embodiment of the present invention;
[0073] Figure 2B A schematic diagram of a user interaction interface of an application according to an embodiment of the present invention is schematically shown;
[0074] Figure 3 A flowchart of steps for determining the strength of a sound signal within a set frequency range in the system audio according to an embodiment of the present invention is schematically shown;
[0075] Figure 4 A schematic diagram of a user interaction interface of another application according to an embodiment of the present invention is schematically shown;
[0076] Figure 5 A block diagram of a device control apparatus according to an embodiment of the present invention is schematically shown;
[0077] Figure 6 A schematic diagram of a medium according to an embodiment of the present invention is schematically shown;
[0078] Figure 7 A schematic diagram of a computing device according to an embodiment of the present invention is schematically shown.
[0079] In the drawings, the same or corresponding reference numerals represent the same or corresponding parts. DETAILED DESCRIPTION
[0080] The principles and spirit of the present invention will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and implement the present invention, and are not intended to limit the scope of the present invention in any way. On the contrary, these embodiments are provided to make the present invention more thorough and complete, and to fully convey the scope of the present invention to those skilled in the art.
[0081] Those skilled in the art will appreciate that the embodiments of the present invention may be implemented as a device control system, apparatus, device, method or computer program product. Therefore, the present invention may be implemented in the following forms, namely: complete hardware, complete software (including firmware, resident software, microcode, etc.), or a combination of hardware and software.
[0082] It should be understood that any number of elements in the drawings is for illustration and not for limitation, and any naming is only for distinction and does not have any limiting meaning. The principle and spirit of the present invention are explained in detail below with reference to several representative embodiments of the present invention.
[0083] With the rapid development of science and technology, smart home and personal entertainment devices have gradually become an important part of modern life. These devices not only provide convenient life services, but also enrich people's entertainment experience. However, the existing device control methods are still insufficient in terms of intelligence, personalization and interactivity, and it is difficult to meet the growing needs of users.
[0084] At present, device function control usually relies on pre-set function control mode selection or manual adjustment operation. Taking the massage chair in the smart home as an example, the massage chair usually provides several preset fixed massage gears, and the user can adjust the massage intensity of the massage chair by selecting the specified massage gear; in addition, some massage chairs are equipped with a massage intensity adjustment button, allowing the user to manually modify the massage intensity through the adjustment button to a certain extent. However, the above control method still has the problems of cumbersome operation, lack of sufficient flexibility and diversity, and the control method lacks real-time interaction with the user's current situation, which makes it impossible for the user to obtain a better interactive experience effect.
[0085] In view of this, the present invention proposes a device control method that integrates the user's current context information. In an embodiment of the present invention, the user's current context information includes the system audio played by the user terminal. The method converts the system audio played by the user terminal into the working control information of the controlled device in real time, and then controls the working status of the controlled device in real time, thereby realizing effective interaction between the controlled device and the audio and video content played by the user terminal, so that the user can get a more immersive and personalized interactive experience while enjoying the audio and video content.
[0086] The implementation process of this method involves the interaction between the user terminal, the application program and the controlled device. Figure 1A The schematic diagram of the interactive subject is shown as an example, in which the application is pre-installed on the user terminal, and the application establishes a wired or wireless communication connection between itself and the controlled device through the user terminal to interact with information. When the user starts the application through the user terminal, the application starts to obtain the system audio played on the user terminal in real time, and constructs an operation control instruction based on the system audio, and sends the operation control instruction to the controlled device. The controlled device adjusts its own operation mode according to the received operation control instruction to achieve synchronization and real-time interaction between the operation mode of the controlled device and the progress of the system audio playback. Among them, the user terminal refers to the device used by the user, including but not limited to smart phones, tablet computers, smart TVs or car entertainment systems, and the user terminal can play audio.
[0087] The method can be applied to various interactive devices that support adjusting the operating status of the device through applications installed on the user terminal, such as smart health devices, smart home devices, and entertainment devices. For example, smart health devices may include fitness equipment such as smart treadmills and spinning bikes, which can automatically adjust the resistance or speed of the equipment by analyzing the audio; the smart home devices may include but are not limited to massage devices, smart speakers, smart lighting systems, etc., such as adjusting the massage intensity of the massage device according to the terminal audio changes, or adjusting the vibration intensity of the subwoofer in the speaker; the entertainment devices may include but are not limited to game controllers, virtual reality devices, etc., and the feedback intensity of the entertainment devices can be adjusted according to the sound effects or background music in the game or movie, such as adjusting the head vibration or tactile feedback of the virtual reality device.
[0088] It should be noted that the above application scenarios are only shown to facilitate understanding of the spirit and principle of the present invention, and the embodiments of the present invention are not limited in this respect. On the contrary, the embodiments of the present invention can be applied to any applicable scenario.
[0089] After introducing the basic principles of the present invention, various non-limiting embodiments of the present invention are described in detail below.
[0090] Exemplary Methods
[0091] Combine the following Figure 1A Schematic diagram of the interaction subject, refer to Figure 1B-Figure 7 The device control method according to the exemplary embodiment of the present invention is described below. Figure 1B A flowchart of a device control method according to an embodiment of the present invention is schematically shown. The device control method is applied to an application installed on the above user terminal and may include at least the following steps:
[0092] S101, acquiring in real time the system audio played by the user terminal, and determining the strength of the sound signal within a set frequency range in the system audio;
[0093] The system audio may include audio generated by the operating system or application of the terminal or audio signals in the video on the user terminal, which are generated and played instantly with the operation of the application or the terminal operating system. For example, the system audio may be music being played by the user terminal, or may be video sound in the video being played by the user terminal.
[0094] When the application is started to execute the device control method provided by the present invention, the application can access the audio information being played by the user terminal in real time through system-level interfaces such as sound card drivers and operating system audio APIs (Application Programming Interfaces), that is, the acquisition of audio data is synchronized with the audio playback without significant delay, and the acquired system audio is a continuous, time-varying analog signal or a digitized audio stream. Regarding the operating system audio API, for example, in the Android system, the AudioRecord class can be called; in the iOS system, the AVAudioSession and AVAudioRecorder classes can be called; in the Windows or Linux operating systems, a lower-level audio interface such as PulseAudio or ALSA can be used.
[0095] The set frequency range refers to a predefined set of audio frequency ranges for sound signal detection or analysis for specific purposes. A default frequency range such as 100-300 Hz may be provided during application development. Furthermore, a setting may be provided to allow the user to customize the frequency setting through the user interaction interface of the application.
[0096] In some embodiments, in order to more flexibly provide a default frequency range for user reference, multiple frequency ranges suitable for different types of controlled devices can be pre-defined in the application. According to the controlled device that the user wants to control after starting the application, the default frequency range of the controlled device that the user wants to control is displayed in the user interaction interface of the application.
[0097] The sound signal strength refers to a physical quantity used to quantify the size or energy of a sound signal, and is usually expressed in decibels (dB). The sound signal strength within the set frequency range is used to represent the energy or loudness level of the audio signal within the frequency range, and can be obtained by measuring and analyzing the characteristics of the sound signal within the set frequency range. Specifically, it can be determined based on the average value of the energy of all frequency components within the frequency range, or the root mean square value (RMS) or other related parameters.
[0098] For the system audio acquired in real time, the time domain audio signal can be converted into a frequency domain representation through Fourier transform or other frequency analysis techniques to analyze the sound signal within a set frequency range and calculate its sound signal strength. In the process of converting to frequency domain representation, the audio signal is decomposed into a series of discrete frequency points (also called frequency components or frequency bins), and the power (or energy) at each frequency point is calculated.
[0099] Before converting to frequency domain representation, the captured audio signal can also be preprocessed such as filtering and noise reduction to improve signal quality. For example, based on a bandpass filter, signals within a certain frequency range can be selectively allowed to pass through while attenuating signals of other frequencies. Therefore, in the preprocessing stage, a bandpass filter can be used to filter the collected audio signal to extract the sound signal within the set frequency range. In the case where the collected audio signal is weak, a signal amplifier can be used to amplify the filtered signal to improve the signal-to-noise ratio and measurement accuracy of the signal.
[0100] Since audio is a continuous data stream, for the convenience of processing, a sliding time window can be used to analyze the audio segment by segment. Each sliding time window contains audio segment data of a certain time length, such as 1 second, so that each audio segment can be processed independently and the processing delay can be reduced. That is, the sound signal strength is calculated for the audio segment in the current window, and the next window is analyzed after the window moves backward by a set step size.
[0101] In order to improve the accuracy of frequency analysis, the above sliding time windows may be overlapping windows, that is, the frequency segments included in two adjacent windows are partially overlapped to reduce spectrum leakage and boundary effects.
[0102] S102, converting the sound signal strength into a functional strength level value of a controlled device;
[0103] The controlled device refers to a device that has established a communication connection with the application and is controlled by the application. For example, it can be a massage device, a game controller, an intelligent lighting system, etc. When the user terminal plays audio and video content, the working state of the controlled device is synchronously adjusted according to the operation control instructions sent by the application.
[0104] The functional strength level value refers to a series of discrete level values that quantify the functional strength or working state of the controlled device. The level value corresponds to the working parameters of the controlled device. Different functional strength level values correspond to different working parameters, and accordingly different output effects are generated on the controlled device. The working parameters of the controlled device include the parameters that the controlled device relies on when performing the device function, which depend on the type and function of the device.
[0105] Taking a massage device as an example, the working parameters may include massage speed and massage intensity. The massage speed indicates the number of times the massage head or massage component moves or vibrates per minute when the massage device is running. The massage intensity indicates the amount of pressure applied by the massage device to the muscles or body parts. The functional intensity level value is used to indicate the massage intensity or effect of the massage device under different working parameters. Each functional intensity level value corresponds to a set of specific massage speed and massage intensity values. That is, when a specific functional intensity level value is selected, the massage device will automatically adjust its massage speed and massage intensity to achieve the massage effect corresponding to the level value. It can be understood that a set of values represents a combination of values composed of the two parameters of massage speed and massage intensity, which can accurately reflect the operating status of the massage device under the current functional intensity level value.
[0106] The conversion of the sound signal strength into the functional strength level value can be implemented through a predefined mapping rule or function, and the mapping rule can include at least any one of a linear function, a nonlinear function, and a mapping table, and can be adaptively set according to the working parameter value of the controlled device. For example, when implemented based on a mapping table, a threshold range can be set to divide the decibel value representing the sound signal strength into different intervals, and each interval corresponds to a functional strength level value of a controlled device.
[0107] In some embodiments, the conversion of the sound signal strength into a functional strength level value can be achieved in the following manner: through a preset linear transformation relationship, the sound signal strength is mapped to a preset functional strength level value range to obtain the functional strength level value; wherein the linear transformation relationship is determined based on the set sound signal strength value range and the functional strength level value range; the functional strength level value is positively correlated with the sound signal strength.
[0108] S103: construct an operation control instruction according to the function strength level value and send it to the controlled device; the operation control instruction is used to instruct the controlled device to operate according to the working parameters corresponding to the function strength level value.
[0109] When the functional strength level value corresponding to the sound signal strength is obtained, the application will construct an operation control instruction based on the functional strength level value, and send the operation control instruction to the controlled device through a pre-established communication connection, so that the controlled device performs the corresponding function according to the working parameters indicated by the operation control instruction.
[0110] In the process of constructing an operation control instruction based on the function strength level value, the function strength level value can be encapsulated into an operation control instruction and sent according to a preset instruction format; or, the application can pre-request from the controlled device to obtain and store a mapping relationship between the function strength level of the controlled device and the working parameters of the controlled function in the controlled device, and then the working parameters matching the function strength level value can be obtained based on the pre-stored mapping relationship; and the working parameters can be encapsulated into an operation control instruction.
[0111] That is, the parameter carried by the operation control instruction may be a function strength level value. When the controlled device receives the operation control instruction, it reads the function strength level value from the operation control instruction, and converts the level value into a specific working parameter according to the mapping relationship stored inside the device itself, and adjusts the controlled device to perform the corresponding function according to the converted working parameter.
[0112] Alternatively, the operation control instruction may also directly carry the working parameters of the controlled device when it is operating at the functional intensity level value, such as the massage speed and massage intensity of a massage device. When the controlled device receives the operation control instruction, it can directly read the working parameters from the instruction and perform corresponding functions according to the read working parameters without the need for additional parsing or mapping processes, thereby improving the response speed of the controlled device.
[0113] Regarding the implementation process of constructing the operation control instruction, a dynamic selection can be made according to the computing power of the controlled device. For example, when the computing power of the controlled device is poor, or for the purpose of reducing the amount of calculation inside the controlled device or simplifying the processing logic of the controlled device, the operation control instruction containing the working parameters corresponding to the functional strength level value can be sent.
[0114] In an embodiment of the present invention, the system audio played by the user terminal is used as the control signal source, and the sound signal strength within a specific frequency range in the audio is analyzed and extracted in real time, and then the sound signal strength is mapped to a functional strength level value of the controlled device, and an operation control instruction for the controlled device is constructed based on the functional strength level value, thereby realizing the conversion from audio signals to device control instructions, allowing the user to finely control the operating state of the controlled device according to the audio signal emitted by the user terminal without directly operating the physical interface of the controlled device or relying on an additional controller, so that the controlled device can dynamically adjust its working parameters as the audio of the user terminal changes, thereby realizing effective interaction between the controlled device and the audio and video content, so that the user can have a more immersive and personalized experience when enjoying the audio and video content, greatly enhancing the user's personalized experience.
[0115] For the above-mentioned device control method, taking the user terminal as a projector and the controlled device as a massage chair as an example, after starting the application installed in the projector and establishing a communication connection between the application and the massage chair, when the user watches an exciting movie through the projector, the projector can obtain the movie audio in real time and convert it into sound signal intensity, generate operation control instructions to adjust the massage strength and / or speed of the massage chair. As the progress of the movie playback changes, the movie audio obtained in real time is constantly updated, and the projector generates corresponding operation control instructions through the application in turn to adjust the massage strength and / or speed of the massage chair, thereby realizing that the massage strength and / or speed of the massage chair can be automatically adjusted according to the intensity of the movie plot, providing users with a more immersive viewing experience and massage experience.
[0116] In addition, taking the user terminal as a smart phone and the controlled device as a handheld massage device as an example, after starting the application installed in the mobile phone and establishing a communication connection between the application and the handheld massage device, when the user watches a video program through the mobile phone, the mobile phone can obtain audio related to the video program in real time (for example, the voice of the protagonist in the video program) and convert it into sound signal intensity, generate operation control instructions to adjust the massage strength and / or speed of the handheld massage device, and the relevant audio obtained in real time is constantly updated as the progress of the video program changes. The mobile phone generates corresponding operation control instructions through the application in turn to adjust the massage strength and / or speed of the massage device, thereby realizing that the massage strength and / or speed of the massage device can be automatically adjusted as the sound signal in the video program changes, providing users with a more immersive viewing experience and massage experience.
[0117] In some embodiments, the decibel change based on the sound signal strength presents an exponential characteristic, that is, the human ear's perception of a relatively weak sound intensity is relatively subtle. If a linear equation is directly used for conversion, the operating change of the controlled device may exceed the sound intensity change actually perceived by the human ear, thereby causing a mismatch between the user's hearing and tactile experience. Therefore, this embodiment proposes a conversion method based on sensitivity parameters and exponential transformation to optimize the conversion process from the sound signal strength to the functional strength level value of the controlled device, such as Figure 2A As shown, the conversion of the sound signal strength into the functional strength level value of the controlled device can be achieved by the following steps:
[0118] S201, obtaining a sensitivity parameter; the sensitivity parameter is used to adjust the response degree of the controlled device to the change of the sound signal intensity;
[0119] The sensitivity parameter is a control variable and is used to adjust or calibrate the sensitivity of the controlled device to changes in the sound signal strength. By adjusting the sensitivity parameter, the user can control the sensitivity or responsiveness of the controlled device in response to changes in the audio played by the user terminal, that is, how a slight change in the sound signal strength is converted into a significant change or subtle adjustment in the functional strength of the controlled device.
[0120] The sensitivity parameter supports customization by the user through the user interface of the application installed on the user terminal. That is, the user can flexibly adjust the sensitivity parameter through the user interface of the application according to personal preferences or needs during the experience. For example, Figure 2B The schematic diagram of the user interaction interface of the application is shown as an example, in which a sliding component for adjusting the sensitivity parameter is set. The user can flexibly adjust the value of the sensitivity parameter by changing the position of the slider in the sliding component. In addition, in order to clearly display the controlled device currently controlled by the user, the user interaction interface can also include device information about the controlled device, such as device power, device name, device model, activation time and other information. This type of device information can be obtained by the application sending a request to the controlled device after establishing a communication connection between the application and the controlled device. For the sake of aesthetic design of the interface, the user interaction interface can also include interface background animation, such as background pictures or dynamic simulation animations that simulate the operation of the controlled device, etc., to enhance the user's visual experience of the interface.
[0121] S202, adjusting the sound signal strength according to the sensitivity parameter to obtain an adjusted strength and use it as an exponential value for exponential transformation;
[0122] When the sound signal strength is adjusted according to the sensitivity parameter, it can be achieved by using the sensitivity parameter as a multiplication factor or as a division factor. When the sensitivity parameter itself is used as a multiplication factor and a division factor, the sensitivity parameter affects the sound signal strength in different ways, and the value range of the sensitivity parameter in the two ways needs to be set separately.
[0123] For example, taking the sensitivity parameter a as a division factor, the adjustment intensity can be expressed as the sound signal intensity P / a. In order to achieve a scaling effect, so that the same decibel change will result in different amplitudes of functional intensity level value changes under different sensitivities, the value of sensitivity a can be greater than 1. Regarding the value range setting of the sensitivity parameter, based on the limited number of functional intensity level values set in the controlled device, the value of the level value is a limited interval, and the value range of the sensitivity parameter can be determined according to the maximum functional intensity level value of the controlled device, so that the functional intensity level value calculated based on the adjustment intensity is as close to the limited interval as possible.
[0124] S203, performing exponential transformation according to a preset base value and the exponent value to obtain the functional strength level value; the base value is greater than 1.
[0125] In the exponential transformation, the base is a constant that determines the characteristics of the exponential transformation. In this step, the base is a preset value and is greater than 1. The exponent value represents a variable in the exponential transformation, which determines the number of times the base is multiplied by itself. In this step, the adjustment strength is calculated based on the previous step S202 as the exponent value. In this embodiment, an exponential transformation is performed based on the base value and the exponent value, and the functional strength level value for the controlled device is determined according to the output result of the exponential transformation.
[0126] Based on setting a limited number of functional strength level values in the controlled device, the value of the level value is a limited interval. Therefore, the minimum strength level value and the maximum strength level value of the limited interval can be used as level value limits. In the process of determining the functional strength level value according to the output result of the exponential transformation, when the output result of the exponential transformation is less than the set minimum strength level value, the minimum strength level value will be determined as the functional strength level value. When the output result of the exponential transformation is greater than the set maximum strength level value, the maximum strength level value will be determined as the functional strength level value.
[0127] Furthermore, since the function strength level value is a discrete numerical value, the finite interval includes multiple discrete values. In the process of determining the function strength level value according to the output result of the exponential transformation, if the output result of the exponential transformation exists in the finite interval, that is, it matches any discrete value in the finite interval, then the output result of the exponential transformation is directly determined as the function strength level value; if the output result of the exponential transformation does not exist in the finite interval, then the discrete value in the finite interval with the output result of the exponential transformation having the smallest distance therefrom is determined as the function strength level value.
[0128] Taking the aforementioned user terminal as a projector and the controlled device as a massage chair as an example, assuming that the base value is 1.1, the sensitivity parameter is 2.1, and the preset functional intensity level value in the massage chair is 0 to 15. If the sound signal intensity of the set frequency range in the movie audio obtained by the projector is 30 decibels, and the adjustment intensity after adjusting the sensitivity parameter is 30 / 2.1, then the exponential transformation result with 1.1 as the base and 35 / 2.1 as the exponent is 1.1^(30 / 2.1)≈3.797. Based on the output result 3.797 of the exponential transformation, the level value 4 that is the smallest distance from the result is taken as the functional intensity level value corresponding to the sound signal intensity.
[0129] Based on the above step description, the conversion method based on sensitivity parameter and exponential transformation provided in this embodiment can be expressed by the formula: S=N (P / a) , where P represents the acquired sound signal strength, a represents the sensitivity parameter, N is the preset base value in the exponential transformation and N is greater than 1, and S represents the functional strength level value obtained through the exponential transformation. Based on the fact that the functional strength level value set in the controlled device is a finite interval, the base value N should not be too large, such as N can be a value greater than 1 and less than 2.
[0130] In some embodiments, based on the fact that the sound signal strength in actual applications may exceed the processing range of the device, in order to ensure that the functional strength level value S is within a reasonable range, the method may further include the following preprocessing process for the sound signal strength:
[0131] When the sound signal strength is less than a set minimum strength value, the sound signal strength is updated to the minimum strength value; when the sound signal strength is greater than a set maximum strength value, the sound signal strength is updated to the maximum strength value.
[0132] For example, the maximum intensity value is set to 150 decibels and the minimum intensity value is set to 0 decibels. Then, the sound signal intensity less than 0 decibels is calculated as 0 decibels, and the sound signal intensity greater than 150 decibels is calculated as 150 decibels.
[0133] In the embodiment of the present invention, by introducing sensitivity parameters and exponential transformation, it is possible to more accurately match the perception characteristics of the human ear, so that the operating change amplitude of the controlled device is more consistent with the human ear's perception of changes in sound intensity, thereby avoiding the problem of excessive or insufficient device response due to linear conversion, and improving the consistency of the user's auditory and tactile experience. At the same time, the introduction of sensitivity parameters allows users to adjust the degree of response of the controlled device to changes in sound signal intensity according to personal preferences or actual needs, thereby achieving more refined control. In addition, this conversion method can be applied to controlled devices of different types and specifications. It only needs to adjust the sensitivity parameters and the preset base value to achieve adaptation and optimization to different sound signal intensity change ranges, thereby increasing the adaptability of the system.
[0134] In some embodiments, the determination of the sound signal strength within the set frequency range in the system audio in the aforementioned step S101 can be obtained by spectrum analysis and calculation of the average value of the energy of all frequency components within the frequency range, see Figure 3 As shown in the flowchart of steps, the method may include the following processing steps:
[0135] S301, for a system audio segment of a set time window length, obtaining a power value at each discrete frequency point in the system audio segment through spectrum analysis;
[0136] Setting the time window length means dividing the continuous audio signal into a series of audio segments of fixed time length when performing system audio processing, namely the system audio segmentation. The audio segments in each time window will be processed separately to facilitate spectrum analysis or other signal processing operations.
[0137] Spectral analysis is used to convert audio signals from the time domain to the frequency domain and to analyze the energy distribution of audio signals at different frequencies. In spectrum analysis, the frequency range of an audio signal is divided into a series of discrete frequency points (or “frequency components”). The power value at a discrete frequency point represents the energy of the audio signal at that frequency point.
[0138] S302, determining a target frequency point within the set frequency range from the discrete frequency points, and obtaining an average value of power values of all the target frequency points;
[0139] Among all the discrete frequency points of the spectrum analysis results, the frequency points within the set frequency range are screened out as the target frequency points. For the processing described in this embodiment, libraries such as numpy and scipy can be used in Python to perform spectrum analysis and power calculation. For example, the fast Fourier transform function of numpy can be used to calculate the spectrum of the audio signal, and the signal processing tool of scipy can be used to analyze the spectrum data to obtain the target frequency point.
[0140] For each target frequency point determined, the power of each target frequency point is accumulated and summed to obtain the total intensity, and the average power value of all target frequency points is obtained based on the total intensity divided by the number of target frequency points. In the case where the power value of the frequency analysis is expressed in decibels, the power value is converted into a linear value such as power or amplitude before calculating the average value to avoid the problem of inaccurate calculation caused by decibel being a logarithmic unit.
[0141] S303: Convert the average value into a decibel value as the sound signal intensity.
[0142] The conversion of the average value into a decibel value can be achieved by using a logarithmic operation, and the conversion between the average value and the decibel value can be performed using the following formula, which can be expressed as:
[0143]
[0144] The reference value is a fixed value used to define the zero point of decibels. It is taken as the minimum value that can be measured for the sound signal or a specific benchmark value to ensure the uniformity and comparability of the measurement results. In practical applications, the choice of reference value depends on the specific application scenario and measurement standard.
[0145] In an embodiment of the present invention, through spectrum analysis, the power value of the audio signal at each discrete frequency point can be accurately obtained, thereby more accurately reflecting the energy distribution of the audio signal at different frequencies. Furthermore, by calculating the average value of the power values of all target frequency points within a set frequency range, a more accurate sound signal strength index can be obtained, and the calculated average value is converted into a decibel value as the sound signal strength, thereby realizing accurate, flexible and interpretable measurement of the sound signal strength within the set frequency range in the system audio.
[0146] In some embodiments, the determination of the sound signal strength within the set frequency range in the system audio in the aforementioned step S101 may also be obtained by calculating the root mean square value (RMS), which may include the following processing steps:
[0147] For a system audio segment of a set time window length, power values at each discrete frequency point in the system audio segment are obtained through spectrum analysis; a target frequency point within the set frequency range is determined from each discrete frequency point, and RMS values of the power values of all target frequency points are calculated to obtain an RMS value; and the RMS value is converted into a decibel value as the sound signal intensity.
[0148] The RMS value represents the average power or intensity of all frequency components within the set frequency range, and actually reflects an average effect of the energy of all frequency components within the frequency range, but is not a simple arithmetic mean. The calculation formula for RMS value calculation can be expressed as:
[0149]
[0150] Wherein, k represents the number of target frequency points, Xi represents the power value of the i-th target frequency point, and RMS represents the RMS value obtained by RMS value calculation.
[0151] The conversion of the RMS value into the decibel value can be achieved by the conversion method described in the above embodiment, which will not be repeated in this embodiment.
[0152] In the embodiment of the present invention, the sound signal strength is calculated by combining RMS value calculation and spectrum analysis, thereby avoiding interference of instantaneous peaks or valleys on the overall audio signal strength evaluation, thereby improving the accuracy and stability of the measurement.
[0153] In some embodiments, when multiple functions are set on the controlled device and the function supports adjusting the working state by audio signal strength, that is, the controlled device includes multiple controlled functions, for the mapping relationship between the function strength level of the controlled device and the working parameters of the controlled function described in the aforementioned embodiments, each mapping record of the mapping relationship may include a function strength level value and the corresponding working parameters of the multiple controlled functions.
[0154] For example, assuming that the massage device has a beating function, a kneading function, and a vibration function, wherein the working parameters of the beating function include the beating force and the beating speed, the working parameters of the kneading function include the rotation speed and the kneading force, and the vibration function includes the vibration speed and the vibration intensity, then when constructing the mapping relationship, each function intensity level value corresponds to the respective working parameters of the three functions, that is, corresponding to six working parameters, which constitute a mapping record. Assuming that the function intensity level value is 1, the mapping record also includes the respective working parameter values of the beating function, the kneading function, and the vibration function when the function intensity level is 1.
[0155] Based on the multiple controlled functions of the controlled device, the operation control instruction containing the working parameters is constructed in the above-mentioned embodiment, that is, according to the pre-stored mapping relationship between the functional strength level of the controlled device and the working parameters of the controlled function, the working parameters matching the functional strength level value are obtained, and the working parameters are encapsulated into the implementation mode of the operation control instruction. The step of obtaining the working parameters matching the functional strength level value can be implemented in the following way:
[0156] According to the switch status of each controlled function recorded locally, determine the controlled function in the turned-on state; search for the target mapping record that matches the function strength level value from the mapping relationship; obtain the working parameters of the controlled function in the turned-on state from the target mapping record as the working parameters of the function strength level value.
[0157] Among them, regarding the switch state of the controlled function, the user can control the activation and deactivation of each controlled function through the controlled function adjustment button provided by the user interaction interface of the application installed on the user terminal, or the user can also directly manually operate the controlled device to control the activation and deactivation of the controlled function. In the case of control through the user interaction interface, the switch state of each controlled function locally recorded by the application can be updated in response to the user's operation on the user interaction interface. In addition, based on the fact that the user can directly operate the controlled device, the application can periodically request the switch state of all controlled functions from the controlled device through a pre-established communication connection, and synchronously update the local record after the state changes.
[0158] In view of the situation where the controlled device includes multiple controlled functions, in order to improve the response efficiency of the controlled device, when obtaining the working parameters corresponding to the function strength level value, when finding a mapping record matching the function strength level value from the mapping relationship, the working parameters of the controlled function in the turned-on state are extracted from the mapping record, that is, only the working parameters of the controlled functions in the working state in the controlled device are encapsulated into the running control instruction, thereby reducing the complexity and data volume of the instruction.
[0159] In some embodiments, when a plurality of functions are provided on the controlled device and the function supports adjusting the working state by the audio signal strength, that is, when the controlled device includes a plurality of controlled functions, for the aforementioned step S103 of constructing an operation control instruction and sending it to the controlled device, when the function strength level is encapsulated into the operation control instruction, it may further include the following steps, namely, obtaining the switch state of each controlled function in the controlled device; encapsulating the switch state of the controlled function into the operation control instruction, so that the controlled function in the turned-on state in the controlled device operates according to the working parameters corresponding to the function strength level value.
[0160] That is, the parameters carried by the operation control instruction may include not only the function strength level value calculated according to the sound signal strength, but also the switch state of each controlled function of the controlled device. When the controlled device receives the operation control instruction and reads the function strength level value and the switch state of the controlled function from it, it can determine the mapping record matching the function strength level value according to the mapping relationship between the function strength level stored in the controlled device itself and the working parameters of each controlled function, read the working parameters of the controlled function in the turned-on state from the mapping record based on the read switch state of the controlled function, and execute the corresponding controlled function according to the working parameters.
[0161] For example, the function strength level value is 4, the controlled device includes 3 controlled functions, function 1 is in the on state, and functions 2 and 3 are in the off state, which can be expressed as [1,0,0]. Then the parameters carried in the operation control instruction can be expressed as {level:4; Status:[1,0,0]}.
[0162] In the embodiment of the present invention, by encapsulating both the function strength level value and the switch state of the controlled function in the operation control instruction, the controlled device can parse the instruction more quickly and accurately and execute the corresponding operation.
[0163] In some embodiments, for the sake of user-friendly interaction, a switch control for the controlled function of the controlled device can be set and displayed on the user interaction interface of the application. Figure 4 The user interaction interface shown as an example is provided with a touch button for controlling the turning on and off of functions. The user can select the touch button through an external input device or touch to turn on or off the function associated with the button.
[0164] In the case where a switch control for the controlled device is provided on the user interaction interface, the device control method may further include the following response step for the switch control, namely, in response to a selection operation of the switch control, switching the switch state of the controlled function selected by the selection operation, and constructing a state change instruction to send to the controlled device, so that the controlled device changes the selected controlled function from a current state to a target state;
[0165] Among them, when the current state is the open state, the target state is the closed state; when the current state is the closed state, the target state is the open state.
[0166] That is, when the user performs an interactive operation (i.e., a selection operation) on the switch control of any function through the user interaction interface, in response to the selection operation, if the controlled function itself is in the on state, this selection operation will trigger the controlled function to be turned off, and if the controlled function itself is in the off state, this selection operation will trigger the controlled function to be turned on. At the same time, based on the change in the switch state of the controlled function, the selection operation synchronously triggers the application to construct a state change instruction and send it to the controlled device, so that the controlled device performs a synchronous state switch of the controlled function based on the selection operation.
[0167] In an embodiment of the present invention, by setting a switch control on the user interaction interface and performing state switching and command sending in response to the user's operation, the friendliness and convenience of user interaction are greatly improved, the operation process is simplified, the user's sense of certainty and control of operation is enhanced, and a more intelligent and convenient device control experience is brought to the user.
[0168] In some embodiments, out of consideration for protecting user privacy and ensuring the legal use of audio data, in order to be able to effectively obtain and process the audio information of the user terminal in a specific scenario, based on respect for user privacy and system security requirements, it is necessary to obtain the user's explicit authorization when obtaining the user terminal audio. Therefore, the aforementioned application also includes the following steps before obtaining the system audio of the user terminal: in response to the startup operation of the application, requesting the user terminal for permission to obtain the system audio; in response to the authorization operation for the permission to obtain the system audio, obtaining the system audio of the user terminal in real time. Among them, the startup operation of the application can be an operation in which the user opens the application and enters the user interaction interface of the program, for example, the user clicks the shortcut icon of the application to trigger the application to enter the main page, and the startup operation includes the user's click operation.
[0169] Applications running on user terminals need to request and obtain permission to access system audio, which involves the permission management of the operating system. For example, on Android, you can request the RECORD_AUDIO permission, and on iOS, you need to configure Info.plist to request microphone access permission.
[0170] In some embodiments, in order to enhance the interactive experience, the method may also include the following interactive steps: in response to the startup operation of the application, displaying the user interaction interface of the application; in response to the startup audio control device function operation of the user interaction interface, acquiring the system audio of the user terminal in real time after obtaining the system audio acquisition permission.
[0171] That is, the startup operation of the application is used to trigger the display of the user interaction interface of the program to the user on the user terminal. When it is necessary to enable the function of adjusting the working status of the controlled device according to the system audio of the terminal, the user can start the audio control device function operation through the voice control function start control set on the user interaction interface, or other quick touch gestures, thereby triggering the application to start obtaining the system audio played by the user terminal.
[0172] In this embodiment, regarding the request for the system audio acquisition permission from the user terminal as described in the above embodiment, it is also possible to request the system audio acquisition permission from the user terminal in response to the operation of starting the audio control device function, and obtain the system audio of the user terminal in real time after obtaining the system audio acquisition permission.
[0173] For example, Figure 4 The user interaction interface shown is provided with a "Start Resonance" button, which is used to trigger the function of adjusting the working state of the controlled device according to the system audio of the terminal. The user clicks the "Start Resonance" button for the controlled device, and the application responds to the click operation. The application starts to obtain the system audio and generates a control instruction. The startup operation may include the click to start the resonance button operation. It can be understood that the present invention does not limit the timing of requesting the permission to obtain the system audio, and it can be set according to actual needs.
[0174] In an embodiment of the present invention, by responding to the startup operation of the application, the user interaction interface is immediately displayed, allowing the user to quickly enter and understand the functions and operating methods of the application. Furthermore, by executing the operation of starting the audio control device function, the application is triggered to start obtaining the system audio played by the user terminal, thereby improving the user's operation convenience and usage experience, and enhancing the layered sense of interface interaction.
[0175] Exemplary Devices
[0176] After introducing the method of the exemplary embodiment of the present invention, next, refer to Figure 5 A device according to an exemplary embodiment of the present invention is described.
[0177] The implementation process of the functions and effects of each module in the following device is specifically described in the implementation process of the corresponding steps in the above method, which will not be repeated here. For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can be referred to the partial description of the method embodiment.
[0178] Figure 5 A device control apparatus according to an embodiment of the present invention is schematically shown, which is applied to an application installed on a user terminal; the apparatus comprises:
[0179] The audio acquisition and strength calculation module 501 is used to acquire the system audio played by the user terminal in real time and determine the sound signal strength within a set frequency range in the system audio;
[0180] Strength level conversion module 502, used to convert the sound signal strength into a function strength level value of the controlled device;
[0181] The instruction construction and sending module 503 is used to construct an operation control instruction according to the functional strength level value and send it to the controlled device; the operation control instruction is used to instruct the controlled device to operate according to the working parameters corresponding to the functional strength level value.
[0182] In some embodiments, the intensity level conversion module is specifically used to:
[0183] Acquiring a sensitivity parameter; the sensitivity parameter is used to adjust the response degree of the controlled device to the change of the sound signal intensity;
[0184] The intensity of the sound signal is adjusted according to the sensitivity parameter to obtain the adjusted intensity and use it as the exponential value of the exponential transformation;
[0185] The functional strength level value is obtained by performing exponential transformation based on a preset base value and the exponential value; the base value is greater than 1.
[0186] In some embodiments, the apparatus further comprises:
[0187] When the sound signal strength is less than a set minimum strength value, updating the sound signal strength to the minimum strength value;
[0188] When the sound signal strength is greater than a set maximum strength value, the sound signal strength is updated to the maximum strength value.
[0189] In some embodiments, the audio acquisition and intensity calculation module is specifically used for:
[0190] For a system audio segment of a set time window length, obtaining a power value at each discrete frequency point in the system audio segment through spectrum analysis;
[0191] Determine a target frequency point within the set frequency range from the discrete frequency points, and obtain an average value of power values of all the target frequency points;
[0192] The average value is converted into a decibel value as the sound signal intensity.
[0193] In some embodiments, the instruction structure sending module is specifically used to:
[0194] According to a preset instruction format, the functional strength level value is encapsulated into an operation control instruction;
[0195] Or, according to the pre-stored mapping relationship between the function strength level of the controlled device and the working parameters of the controlled function, the working parameters matching the function strength level value are obtained; and the working parameters are encapsulated into operation control instructions.
[0196] In some embodiments, the controlled device includes multiple controlled functions; each mapping record of the mapping relationship includes a function strength level value and corresponding working parameters of each of the multiple controlled functions; the instruction structure sending module, when used to obtain working parameters matching the function strength level value, includes:
[0197] According to the on / off state of each controlled function recorded locally, determining the controlled function in the on state;
[0198] Searching for a target mapping record matching the functional strength level value from the mapping relationship;
[0199] The operating parameters of the controlled function in the turned-on state are obtained from the target mapping record as the operating parameters of the function intensity level value.
[0200] In some embodiments, the instruction structure sending module is specifically used to:
[0201] Obtaining the switch status of each controlled function in the controlled device;
[0202] The switch state of the controlled function is encapsulated into the operation control instruction, so that the controlled function in the turned-on state in the controlled device operates according to the working parameters corresponding to the function strength level value.
[0203] In some embodiments, the user interaction interface of the application displays a switch control of the controlled function of the controlled device; the apparatus further comprises:
[0204] In response to the selection operation of the switch control, the switch state of the controlled function selected by the selection operation is switched, and a state change instruction is constructed and sent to the controlled device, so that the controlled device changes the selected controlled function from a current state to a target state;
[0205] Among them, when the current state is the open state, the target state is the closed state; when the current state is the closed state, the target state is the open state.
[0206] In some embodiments, the apparatus further comprises:
[0207] In response to the start-up operation of the application, requesting the user terminal for permission to obtain system audio;
[0208] In response to the authorization operation of the system audio acquisition authority, the system audio of the user terminal is acquired in real time.
[0209] In some embodiments, the apparatus further comprises:
[0210] In response to a startup operation of the application, displaying a user interaction interface of the application;
[0211] In response to the operation of starting the audio control device function on the user interaction interface, the system audio of the user terminal is acquired in real time after obtaining the system audio acquisition authority.
[0212] Exemplary Media
[0213] After introducing the method and apparatus of the exemplary embodiment of the present invention, next, reference is made to Figure 6 A readable storage medium according to an exemplary embodiment of the present invention is described.
[0214] In this exemplary embodiment, the above method can be implemented by a program product, such as a portable compact disk read-only memory (CD-ROM) and including program code, and can be run on a device, such as a personal computer. However, the program product of the present invention is not limited to this. In this document, a readable storage medium can be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, an apparatus or a device.
[0215] The program product may use any combination of one or more readable media. The readable medium may be a readable signal medium or a readable storage medium. The readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0216] Computer readable signal media may include data signals propagated in baseband or as part of a carrier wave, in which readable program code is carried. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Readable signal media may also be any readable medium other than a readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0217] The program code contained on the readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wired, optical cable, RE, etc., or any suitable combination of the foregoing.
[0218] Program code for performing the operations of the present invention may be written in any combination of one or more programming languages, including object-oriented programming languages such as Java, C++, etc., and conventional procedural programming languages such as C or similar programming languages. The program code may be executed entirely on the user computing device, partially on the user computing device, partially on a remote computing device, or entirely on a remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computing device (e.g., using an Internet service provider to connect through the Internet).
[0219] Exemplary Computing Devices
[0220] After introducing the method, apparatus and medium of the exemplary embodiments of the present invention, next, reference is made to Figure 7 A computing device according to an exemplary embodiment of the present invention is described. Figure 7 The computing device 700 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0221] like Figure 7 As shown, the computing device 700 is in the form of a general computing device. The components of the computing device 700 may include but are not limited to: at least one processing unit 701, at least one storage unit 702, and a bus 703 connecting different system components (including the processing unit 701 and the storage unit 702).
[0222] The bus 703 includes a data bus, a control bus, and an address bus.
[0223] The storage unit 702 may include a readable medium in the form of a volatile memory, such as a random access memory (RAM) 7021 and / or a cache memory 7022 , and may further include a readable medium in the form of a non-volatile memory, such as a read-only memory (ROM) 7023 .
[0224] The storage unit 702 may also include a program / utility 7025 having a set (at least one) of program modules 7024, such program modules 7024 including but not limited to: an operating system, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment.
[0225] Computing device 700 may also communicate with one or more external devices 704 (eg, keyboards, pointing devices, etc.).
[0226] Such communication may be performed via input / output (I / O) interface 705. In addition, computing device 700 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) via network adapter 706. Figure 7 As shown, network adapter 706 communicates with other modules of computing device 700 via bus 703. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with computing device 700, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0227] Although the spirit and principle of the present invention have been described with reference to several specific embodiments, it should be understood that the present invention is not limited to the disclosed specific embodiments, and the division of various aspects does not mean that the features in these aspects cannot be combined to benefit, and such division is only for the convenience of expression. The present invention is intended to cover various modifications and equivalent arrangements included in the spirit and scope of the attached claims.
Claims
1. A device control method, characterized in that: Applied to an application installed on a user terminal; the method comprises: Acquire the system audio played by the user terminal in real time, and determine the sound signal strength within a set frequency range in the system audio; Converting the sound signal strength into a functional strength level value of the controlled device; According to the functional strength level value, an operation control instruction is constructed and sent to the controlled device; the operation control instruction is used to instruct the controlled device to operate according to the working parameters corresponding to the functional strength level value.
2. The method according to claim 1, characterized in that The step of converting the sound signal strength into a functional strength level value of the controlled device includes: Acquiring a sensitivity parameter; the sensitivity parameter is used to adjust the response degree of the controlled device to the change of the sound signal intensity; The intensity of the sound signal is adjusted according to the sensitivity parameter to obtain the adjusted intensity and use it as the exponential value of the exponential transformation; The functional strength level value is obtained by performing exponential transformation based on a preset base value and the exponential value; the base value is greater than 1.
3. The method according to claim 2, characterized in that The method further comprises: When the sound signal strength is less than a set minimum strength value, updating the sound signal strength to the minimum strength value; When the sound signal strength is greater than a set maximum strength value, the sound signal strength is updated to the maximum strength value.
4. The method according to claim 1, characterized in that The determining the strength of the sound signal within the set frequency range in the system audio includes: For a system audio segment of a set time window length, obtaining a power value at each discrete frequency point in the system audio segment through spectrum analysis; Determine a target frequency point within the set frequency range from the discrete frequency points, and obtain an average value of power values of all the target frequency points; The average value is converted into a decibel value as the sound signal intensity.
5. The method according to claim 1, characterized in that The step of constructing an operation control instruction according to the function strength level value and sending the instruction to the controlled device includes: According to a preset instruction format, the function strength level value is encapsulated into an operation control instruction; or, According to the pre-stored mapping relationship between the function strength level of the controlled device and the working parameters of the controlled function, the working parameters matching the function strength level value are obtained; and the working parameters are encapsulated into operation control instructions.
6. The method according to claim 5, characterized in that The controlled device includes a plurality of controlled functions; each mapping record of the mapping relationship includes a function strength level value and corresponding working parameters of the plurality of controlled functions; The obtaining of the working parameters matching the functional intensity level value comprises: Determine the controlled function that is in the on state according to the on / off state of each controlled function recorded locally; Searching for a target mapping record matching the functional strength level value from the mapping relationship; The operating parameters of the controlled function in the turned-on state are obtained from the target mapping record as the operating parameters of the function intensity level value.
7. The method according to claim 1, characterized in that The method further comprises: In response to the start-up operation of the application, requesting the user terminal for permission to obtain system audio; In response to the authorization operation of the system audio acquisition authority, the system audio of the user terminal is acquired in real time.
8. A device control device, characterized in that: Applicable to an application installed on a user terminal; the device comprises: An audio acquisition and strength calculation module, used to acquire the system audio played by the user terminal in real time and determine the sound signal strength within a set frequency range in the system audio; An intensity level conversion module, used to convert the intensity of the sound signal into a functional intensity level value of the controlled device; An instruction construction and sending module is used to construct an operation control instruction according to the functional strength level value and send it to the controlled device; the operation control instruction is used to instruct the controlled device to operate according to the working parameters corresponding to the functional strength level value.
9. A readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
10. A computing device, characterized in that: include: Processor, memory; The memory is used to store computer programs; The processor is configured to execute the method according to any one of claims 1 to 7 by calling the computer program.