Method and device for detecting rotation of rotating shaft, foldable electronic equipment and storage medium

By automatically comparing the similarity between the hinge rotation audio and the preset abnormal audio in foldable electronic devices, the problem of low manual detection accuracy is solved, and more efficient and accurate hinge rotation detection is achieved.

CN120600042APending Publication Date: 2025-09-05HONOR DEVICE CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410232524.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-09-05

AI Technical Summary

Technical Problem

The existing technology for detecting the rotation of the hinge of a foldable electronic device has low accuracy and mainly relies on manual listening to the rotation audio, which is greatly affected by individual differences, resulting in insufficient detection accuracy.

Method used

By obtaining the rotation audio of the shaft in different states and using preset abnormal audio for audio similarity comparison, it is automatically determined whether the shaft is rotating normally. Combined with audio noise reduction processing and receiver collection, it reduces environmental noise interference.

Benefits of technology

The accuracy of shaft rotation detection is improved, the detection cost is reduced, human errors are reduced, and the normal operation of the shaft is ensured.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120600042A_ABST
    Figure CN120600042A_ABST
Patent Text Reader

Abstract

The invention discloses a rotating shaft rotation detection method and device, foldable electronic equipment and a storage medium, and the method is applied to the foldable electronic equipment, and comprises the steps: obtaining a rotation audio of a to-be-tested rotating shaft of the foldable electronic equipment in a process of rotating from a first state to a second state, the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state; determining the audio similarity between the rotation audio and a preset abnormal audio, wherein the preset abnormal audio is the audio acquired in advance in the process of rotating the abnormal rotation shaft from the first state to the second state; and determining whether the to-be-tested rotating shaft normally rotates according to the audio similarity. According to the method, when rotation detection is performed on the to-be-tested rotating shaft, whether the to-be-tested rotating shaft normally rotates or not is judged according to the acquired audio similarity between the rotation audio of the to-be-tested rotating shaft and the preset abnormal audio, and the detection accuracy of rotation detection on the to-be-tested rotating shaft is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of foldable electronic devices, and in particular to a method and device for detecting shaft rotation, a foldable electronic device, and a storage medium. Background Art

[0002] Foldable electronic devices are those that can be folded or unfolded, such as foldable phones, foldable tablets, and foldable laptops. Foldable electronic devices generally consist of a body, a flexible display mounted on the body, and a hinge. The body can be folded or unfolded via the hinge, while the flexible display can bend along with the body by bending its flexible deformable area.

[0003] When a foldable electronic device is being folded or unfolded, the hinge is prone to jamming. In order to ensure the normal use of the foldable electronic device, it is usually necessary to perform rotation detection on the hinge.

[0004] Currently, the rotation detection of the shaft is mainly carried out by manually listening to the rotation audio during the rotation process of the shaft, and manually judging whether the shaft rotates normally based on the rotation audio. Due to individual differences, the accuracy of manual listening detection is low, resulting in low detection accuracy of the shaft rotation detection. Summary of the Invention

[0005] In view of this, embodiments of the present application provide a method and device for detecting shaft rotation, a foldable electronic device, and a storage medium to overcome the above problems of the prior art.

[0006] In a first aspect, an embodiment of the present application provides a method for detecting shaft rotation, which is applied to a foldable electronic device. The method for detecting shaft rotation includes: obtaining rotation audio of a tested shaft of the foldable electronic device during a process of rotating from a first state to a second state, wherein the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state; determining the audio similarity between the rotation audio and a preset abnormal audio, wherein the preset abnormal audio is the pre-collected audio of the abnormal shaft during the process of rotating from the first state to the second state; and determining whether the tested shaft rotates normally based on the audio similarity.

[0007] The solution provided by the present application compares the rotation audio of the shaft to be tested with a preset abnormal audio when performing rotation detection on the shaft to be tested, obtains the audio similarity between the rotation audio of the shaft to be tested and the preset abnormal audio, and judges whether the shaft to be tested rotates normally based on the audio similarity between the two. Since it is no longer judged whether the shaft rotates normally by manual listening, but the rotation audio of the shaft to be tested is compared with a unified reference standard (preset abnormal audio) to judge whether the shaft rotates normally, the problem of low accuracy of the judgment process due to differences in the human body is avoided, thereby improving the detection accuracy of the rotation detection of the shaft to be tested.

[0008] Among them, in some optional embodiments, obtaining the rotation audio of the tested shaft of the foldable electronic device during the process of rotating from a first state to a second state includes: collecting the first ambient audio of the environment in which the tested shaft is located in the first state; collecting the first test audio during the process of rotating from the first state to the second state; performing audio noise reduction processing on the first test audio according to the first ambient audio to obtain the rotation audio.

[0009] The solution provided in this embodiment performs audio noise reduction processing on the first test audio based on the first environmental audio, effectively filtering out the environmental noise audio in the first test audio and reducing the audio distortion of the rotation audio.

[0010] Among them, in some optional embodiments, collecting the first ambient audio of the environment in which the tested shaft is located in the first state includes: collecting the first ambient audio of the environment in which the tested shaft is located in the first state through the first sound receiver of the foldable electronic device; collecting the first test audio of the tested shaft during the process of rotating from the first state to the second state includes: collecting the first test audio of the tested shaft during the process of rotating from the first state to the second state through the second sound receiver of the foldable electronic device.

[0011] The solution provided in this embodiment realizes the collection of audio during the rotation detection of the test shaft based on the first microphone and the second microphone of the foldable electronic device, without the need for additional audio collection equipment, thereby reducing the detection cost of the rotation detection of the test shaft.

[0012] Among them, in some optional embodiments, the first ambient audio of the environment in which the tested hinge is located in the first state is collected by the first microphone of the foldable electronic device, including: when the on time of the first microphone in the on state reaches a preset time, the first microphone is controlled to be in the off state to obtain the first ambient audio.

[0013] The solution provided in this embodiment realizes controlling the first microphone to collect the first ambient audio according to the activation time of the first microphone. The collected first ambient audio better matches the actual environment, thereby improving the collection accuracy of the first ambient audio.

[0014] Among them, in some optional embodiments, when the first sound receiver is in the on state for a duration that reaches a preset duration, the first sound receiver is controlled to be in the off state. Before obtaining the first ambient audio, the method for detecting the rotation of the shaft includes: upon receiving a detection instruction, controlling the first sound receiver to be in the on state; determining whether the shaft to be tested is in the first state; and when the first sound receiver is in the on state for a duration that reaches a preset duration, controlling the first sound receiver to be in the off state to obtain the first ambient audio, including: when it is determined that the shaft to be tested is in the first state and the on state for a duration that reaches the preset duration, controlling the first sound receiver to be in the off state to obtain the first ambient audio.

[0015] The solution provided in this embodiment realizes that when it is determined that the tested shaft is in the first state, the first microphone is controlled to collect the first ambient audio according to the activation time of the first microphone. The collected first ambient audio is the ambient audio when the foldable electronic device is in a stationary state, thereby improving the collection accuracy of the first ambient audio.

[0016] Among them, in some optional embodiments, the first test audio of the tested shaft during the process of rotating from the first state to the second state is collected by the second receiver of the foldable electronic device, including: controlling the second receiver to be in the on state; when it is determined that the tested shaft rotates from the first state to the second state, controlling the second receiver to be in the off state to obtain the first test audio.

[0017] The solution provided in this embodiment is that when it is determined that the shaft to be tested has rotated from the first state to the second state, the shaft to be tested has completed the rotation process. At this time, the second microphone is controlled to be turned off to obtain the first test audio, thereby avoiding controlling the second microphone to collect audio when the shaft to be tested has completed the rotation process, thereby improving the collection accuracy of the first test audio.

[0018] Among them, in some optional embodiments, before controlling the second microphone to be in the on state, the method for detecting the rotation of the shaft also includes: determining whether the shaft to be tested enters the second state from the first state; controlling the second microphone to be in the on state includes: when it is determined that the shaft to be tested enters the second state from the first state, controlling the second microphone to be in the on state.

[0019] The solution provided in this embodiment realizes controlling the second microphone to start receiving sound when detecting that the tested shaft is triggered to rotate in the first state, avoiding controlling the second microphone to start receiving sound when the tested shaft is in a stationary state, and improving the control accuracy of the second microphone.

[0020] Among them, in some optional embodiments, determining whether the shaft to be tested enters the second state from the first state includes: obtaining the shaft signal of the shaft to be tested; matching the shaft signal with the preset rotation signal to obtain the signal matching degree; when the signal matching degree is greater than or equal to the signal matching degree threshold, determining that the shaft to be tested enters the second state from the first state.

[0021] The solution provided by this embodiment realizes the determination of the rotational opening state of the rotating shaft to be tested according to the rotating shaft signal of the rotating shaft to be tested, thereby improving the determination accuracy of the rotational opening state of the rotating shaft to be tested.

[0022] Among them, in some optional embodiments, when it is determined that the shaft to be tested rotates from the first state to the second state, the second receiver is controlled to be in the off state, and before the first test audio is obtained, the shaft rotation detection method also includes: obtaining the current expansion angle of the shaft to be tested; and determining that the shaft to be tested rotates from the first state to the second state based on the current expansion angle.

[0023] The solution provided in this embodiment realizes the judgment of whether the rotating shaft to be tested has completed the rotation process based on the current expansion angle of the rotating shaft to be tested, thereby improving the judgment accuracy of whether the rotating shaft to be tested has completed the rotation process.

[0024] Among them, in some optional embodiments, before determining the audio similarity between the rotation audio and the preset abnormal audio, the method for detecting the rotation of the shaft also includes: determining the abnormal audio features of the preset abnormal audio; determining the audio similarity between the rotation audio and the preset abnormal audio, including: determining the rotation audio features of the rotation audio; determining the similarity between the rotation audio features and the abnormal audio features according to the Euclidean distance similarity calculation method, and determining the similarity as the audio similarity between the rotation audio and the preset abnormal audio.

[0025] The solution provided in this embodiment realizes the calculation of the audio similarity between the rotation audio and the preset abnormal audio based on the Euclidean distance similarity calculation method, thereby improving the calculation accuracy of the audio similarity.

[0026] Among them, in some optional embodiments, the method for detecting shaft rotation also includes: collecting a second ambient audio of the environment in which the abnormal shaft is located in the first state; collecting a second test audio during the process of the abnormal shaft rotating from the first state to the second state; and performing audio noise reduction processing on the second test audio based on the second ambient audio to obtain a preset abnormal audio.

[0027] The solution provided in this embodiment performs audio noise reduction processing on the second test audio based on the second environmental audio, effectively filtering out the environmental noise audio in the second test audio, and improving the accuracy of obtaining the preset abnormal audio.

[0028] Among them, in some optional embodiments, before the second test audio is subjected to audio noise reduction processing according to the second environmental audio to obtain the preset abnormal audio, the method for detecting the rotation of the shaft also includes: recording the rotation time of the abnormal rotation of the abnormal shaft; audio sampling the second test audio according to the rotation time to obtain the third test audio; performing audio noise reduction processing on the second test audio according to the second environmental audio to obtain the preset abnormal audio, including: performing audio noise reduction processing on the third test audio according to the second environmental audio to obtain the preset abnormal audio.

[0029] The solution provided in this embodiment implements audio sampling of the rotation process audio of the abnormal shaft based on the abnormal rotation time of the abnormal shaft, and obtains the audio when the abnormal shaft rotates abnormally, ensuring that the preset abnormal audio is obtained with high accuracy.

[0030] Among them, in some optional embodiments, determining the rotational audio features of the rotational audio includes: performing Fourier transform processing on the rotational audio to obtain a rotational audio spectrogram; and performing audio feature extraction on the rotational audio spectrogram to obtain the rotational audio features.

[0031] The solution provided in this embodiment obtains rotational audio features by performing Fourier transform processing and audio feature extraction on the rotational audio, thereby improving the accuracy of obtaining the rotational audio features.

[0032] In a second aspect, an embodiment of the present application provides a device for detecting shaft rotation, which is applied to a foldable electronic device. The device for detecting shaft rotation includes: an audio acquisition module for acquiring rotation audio of a tested shaft of the foldable electronic device during rotation from a first state to a second state, wherein the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state; a first determination module for determining the audio similarity between the rotation audio and a preset abnormal audio, wherein the preset abnormal audio is the pre-collected audio of the abnormal shaft during rotation from the first state to the second state; and a second determination module for determining whether the tested shaft rotates normally based on the audio similarity.

[0033] In a third aspect, an embodiment of the present application provides a foldable electronic device, which includes: one or more processors, and a memory; the memory is coupled to the one or more processors, the memory is used to store computer program code, the computer program code includes computer instructions, and one or more processors call the computer instructions to enable the foldable electronic device to execute the method for detecting the rotation of the shaft provided in the first aspect above.

[0034] In a fourth aspect, an embodiment of the present application provides a chip system, which is applied to a foldable electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the foldable electronic device to execute the shaft rotation detection method provided in the first aspect above.

[0035] In some optional embodiments, the chip system also includes a memory, and the memory is connected to one or more processors through circuits or wires.

[0036] In some optional embodiments, the chip system also includes a communication interface.

[0037] In a fifth aspect, an embodiment of the present application provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a foldable electronic device, the foldable electronic device executes the method for detecting the rotation of the shaft provided in the first aspect above.

[0038] In a sixth aspect, an embodiment of the present application provides a computer program product. When the computer program product is run on a foldable electronic device, it enables the foldable electronic device to execute the method for detecting the rotation of the rotating shaft provided in the first aspect above.

[0039] It can be understood that the beneficial effects of the second to sixth aspects mentioned above can be found in the relevant description of the first aspect mentioned above, and will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0041] Figure 1 A structural schematic diagram of a foldable electronic device provided in an embodiment of the present application is shown.

[0042] Figure 2 A structural diagram of a software system for a foldable electronic device provided in an embodiment of the present application is shown.

[0043] Figure 3 A schematic flow chart of a method for detecting shaft rotation provided in an embodiment of the present application is shown.

[0044] Figure 4 A flow chart of a method for obtaining audio similarity in a method for detecting shaft rotation provided in an embodiment of the present application is shown.

[0045] Figure 5 A schematic diagram of a flow chart of a method for detecting shaft rotation provided in an embodiment of the present application in an application scenario is shown.

[0046] Figure 6 Another flow chart of the method for detecting shaft rotation provided in an embodiment of the present application is shown.

[0047] Figure 7 A flow chart of a method for obtaining rotational audio in a method for detecting shaft rotation provided in an embodiment of the present application is shown.

[0048] Figure 8 A structural block diagram of a shaft rotation detection device provided in an embodiment of the present application is shown.

[0049] Figure 9 A schematic diagram of the hardware structure of a foldable electronic device provided in an embodiment of the present application is shown.

[0050] Figure 10 A functional block diagram of a foldable electronic device provided in an embodiment of the present application is shown. DETAILED DESCRIPTION

[0051] The embodiments of the present application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are only used to explain the present application and are not to be construed as limiting the present application.

[0052] The disclosure below provides many different embodiments or examples for implementing different structures of the present application. In order to simplify the disclosure of the present application, the components and settings of specific examples are described below. Of course, these are merely examples and are not intended to limit the present application. In addition, the present application may repeat reference numbers and / or reference letters in different examples. Such repetition is for the purpose of simplicity and clarity and does not in itself indicate the relationship between the various embodiments and / or settings discussed.

[0053] Foldable electronic devices are those that can be folded or unfolded, such as foldable phones, foldable tablets, and foldable laptops. Foldable electronic devices generally consist of a body, a flexible display mounted on the body, and a hinge. The body can be folded or unfolded via the hinge, while the flexible display can bend along with the body by bending its flexible deformable area.

[0054] like Figure 1 As shown, it shows a decomposition diagram of a foldable electronic device, which includes a body 10, a flexible display screen 20 and a hinge 30. The flexible display screen 20 and the hinge 30 are installed on the body 10, and the body 10 provides installation support for the flexible display screen 20 and the hinge 30.

[0055] The hinge 30 comprises a base, two swing arms, and two door panels, with one swing arm corresponding to each door panel. The two swing arms are rotatably connected to the base on either side, while each swing arm is movably connected to a door panel on the same side. The two door panels are movably connected to the body 10. The body 10 drives the swing arms to rotate relative to the base, allowing the two door panels to move relative to the swing arms. When the hinge 30 is deployed, the two door panels support the two sides of the flexible display 20's bendable portion.

[0056] Foldable electronic devices are prone to abnormal hinge jamming during folding or unfolding. To ensure the lifespan of these devices, hinge rotation testing is often necessary. For example, a door jam can cause the swing arm to rotate abnormally relative to the base.

[0057] Currently, the rotation detection of the shaft is mainly carried out by manually listening to the rotation audio during the rotation of the shaft, and manually judging whether the shaft rotates normally based on the rotation audio. Due to individual differences, the accuracy of manual listening detection is low, resulting in low detection accuracy of the shaft rotation detection.

[0058] In response to the above problems, in the detection method and device for shaft rotation provided by the embodiments of the present application, the detection method for shaft rotation is applied to a foldable electronic device, by obtaining the rotation audio of the tested shaft of the foldable electronic device during the process of rotating from a first state to a second state, the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state, and determining the audio similarity between the rotation audio and the preset abnormal audio, the preset abnormal audio is the audio collected in advance during the process of the abnormal shaft rotating from the first state to the second state, and determining the tested shaft according to the audio similarity. Whether the shaft rotates normally, when the rotation detection of the tested shaft is carried out, the rotation audio of the tested shaft is compared with the preset abnormal audio, and the audio similarity between the rotation audio of the tested shaft and the preset abnormal audio is obtained, and whether the tested shaft rotates normally is judged according to the audio similarity between the two. Since it is no longer judged by manual listening whether the shaft rotates normally, but the rotation audio of the tested shaft is compared with a unified reference standard (preset abnormal audio) to judge whether the shaft rotates normally, the problem of low accuracy of the judgment process due to human body differences is avoided, thereby improving the detection accuracy of the rotation detection of the tested shaft.

[0059] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application.

[0060] Foldable electronic devices may include various terminal devices, which may also be referred to as terminal (Terminal), user equipment (User equipment, UE), mobile station (Mobile station, MS), mobile terminal (Mobile Terminal, MT), etc.

[0061] The terminal device may be a mobile phone, a robot vacuum, a drone, a smart TV, a wearable device, a personal digital assistant (PDA), a computer with wireless transceiver capabilities, a virtual reality (VR) terminal device, an augmented reality (AR) terminal device, a wireless terminal used in industrial control, a wireless terminal used in self-driving, a wireless terminal used in remote medical surgery, a wireless terminal used in smart grids, a wireless terminal used in transportation safety, a wireless terminal used in smart cities, a wireless terminal used in smart homes, etc. The terminal device type is not limited here and can be set according to actual needs.

[0062] The software system of a foldable electronic device can adopt a layered architecture, an event-driven architecture, a micro-kernel architecture, a microservice architecture, or a cloud architecture. The embodiment of the present application takes the Android system with a layered architecture as an example to illustrate the software structure of a foldable electronic device.

[0063] See also Figure 2 , which shows a schematic diagram of the software system structure of a foldable electronic device provided by one embodiment of the present application. The software system includes several layers, each with a clear role and division of labor, and communication between layers via software interfaces. In some embodiments, the Android system is divided into four layers: application layer, application framework layer, system library layer, and kernel layer, from top to bottom.

[0064] The application layer may include a series of applications. For example, the application layer may include a recording application, a camera application, a gallery application, a call application, a Wireless Local Area Networks (WLAN) application, a video application, a Media Provider application, a FUSE (Filesystem in Userspace) file system application, etc.

[0065] Among them, the recording application can be used to collect environmental audio and test audio during the rotation process of the tested shaft of the foldable electronic device.

[0066] Media Provider is used to create multimedia files in the FUSE file system or access multimedia files in the FUSE file system. Each application in the application layer can create multimedia files in the FUSE file system through the MediaProvider or access multimedia files in the FUSE file system through the MediaProvider.

[0067] The FUSE file system is used to store the multimedia files that the media provider creates. Of course, in other embodiments, the FUSE file system also can be used to store other data.

[0068] The application framework layer provides an application programming interface (API) and programming framework for applications in the application layer. The application framework layer includes some predefined functions. For example, the application framework layer may include a window manager, content provider, resource manager, view system, package management service (PMS), and activity management service (AMS).

[0069] The window manager is used to manage window programs. The window manager can obtain the display size, determine whether there is a status bar, lock the screen, take screenshots, etc.

[0070] Content providers are used to store and retrieve data and make it accessible to applications. Data can include videos, images, audio, calls made and received, browsing history and bookmarks, phone books, etc.

[0071] The view system includes visual controls, such as those for displaying text and images. The view system is used to build applications. A display interface can consist of one or more views. For example, a display interface containing a text notification icon might include a view for displaying text and a view for displaying images.

[0072] The resource manager provides various resources for applications, such as localized strings, icons, images, layout files, video files, and so on.

[0073] The Package Manager service, as a package manager, is responsible for installing, managing, and uninstalling applications on Android devices. It scans designated directories on the system for files ending in APK, parses these files, and extracts all application information, storing it in packages.xml.

[0074] When a new application is installed, the package management service will identify all components of the application (such as activities, services, and broadcast receivers) and assign corresponding permissions to these components. At the same time, the package management service also monitors the status of installed applications to ensure the integrity and security of the applications.

[0075] The package management service also manages the application's DE (Device Encrypted) and CE (Credential Encrypted) data. The DE data key is only accessible after the system has performed a verified boot. The CE directory encrypts data using a key associated with a user's authentication method (e.g., pattern, password, etc.), which is only accessible after the user has authenticated.

[0076] The CE directory of the application may include the original uid of the application. The package management service is used to execute the DE data and CE data of the recording application in this embodiment.

[0077] The Activity Management Service, as the activity manager service, is primarily responsible for managing and tracking the activity tasks and lifecycles of all applications. When an application is opened, the Activity Management Service starts the application's process and allocates processor resources and memory to it. When the application is no longer in the foreground or background, or when the system runs low on memory, the Activity Management Service terminates or kills the application's process.

[0078] For example, the Activity Management Service can be responsible for managing and tracking the activity tasks and lifecycle of a recording application. When the recording application is opened, the Activity Management Service starts the recording application process and allocates processor resources and memory to the recording application to capture the ambient audio and folding audio of the foldable electronic device during folding. When the recording application is no longer in the foreground or background, or when the system is low on memory, the Activity Management Service terminates or kills the recording application process.

[0079] System libraries may include Surface Manager, Media Libraries, Android Rruntime, etc.

[0080] The Android runtime consists of core libraries and a virtual machine (VM). The Android runtime is responsible for scheduling and management of the Android system. The core libraries consist of two parts: one containing the Java language's callable functions and the other the Android core library. The application layer and the application framework layer run in the VM. The VM executes the Java files in the application and framework layers as binary files. The VM is responsible for managing object lifecycles, stack management, thread management, security and exception management, and garbage collection.

[0081] The surface manager is used to manage the display subsystem and provide fusion of 2D and 3D layers for multiple applications.

[0082] The media library supports playback and recording of a variety of common audio and video formats, as well as static image files. The media library can support a variety of audio and video encoding formats, such as MPEG4, H.264, MP3, AAC, AMR, JPG, PNG, etc.

[0083] The kernel layer can include recording driver, display driver, Wi-Fi driver, Bluetooth driver, camera driver and other modules.

[0084] The recording driver is used to drive a recording application to collect ambient audio and test audio during the rotation of the tested shaft of the foldable electronic device.

[0085] It is understandable that Figure 2 The layers in the illustrated software structure and the components contained in each layer do not constitute a specific limitation on foldable electronic devices. In other embodiments of the present application, the foldable electronic device may include more or fewer layers than shown, and each layer may include more or fewer components, and this application does not limit this.

[0086] It should be noted that although the embodiment of the present application is described using the Android system as an example, its basic principles are also applicable to Foldable electronic devices based on operating systems such as Harmony.

[0087] See also Figure 3 , which shows a flow chart of a method for detecting shaft rotation provided by an embodiment of the present application. In a specific embodiment, the method for detecting shaft rotation can be applied to foldable electronic devices. The following takes foldable electronic devices as an example. Figure 3 The process shown in FIG. 1 is described in detail. The method for detecting the rotation of the rotating shaft may include the following steps S110 to S130.

[0088] Step S110: Obtaining rotation audio of the tested rotating shaft of the foldable electronic device during the process of rotating from the first state to the second state.

[0089] In an embodiment of the present application, when a user needs to perform a rotation detection on a rotating shaft to be tested of a foldable electronic device, a detection instruction can be sent to the foldable electronic device. The foldable electronic device receives and responds to the detection instruction to obtain the rotation audio of the rotating shaft to be tested during the process of rotating from a first state to a second state.

[0090] The first state and the second state are two different states of the rotating shaft to be tested, the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state.

[0091] In some embodiments, when a user needs to perform a rotation detection on a shaft to be tested of a foldable electronic device, a detection instruction can be sent to the foldable electronic device. The foldable electronic device receives and responds to the detection instruction, collects the first ambient audio of the environment in which the shaft to be tested is located in the first state, and collects the first test audio during the process of the shaft to be tested rotating from the first state to the second state, and performs audio noise reduction processing on the first test audio based on the first ambient audio to obtain rotation audio, thereby realizing audio noise reduction processing on the first test audio based on the first ambient audio, effectively filtering out the ambient noise audio in the first test audio, and reducing the audio distortion of the rotation audio.

[0092] Specifically, the foldable electronic device may include a first microphone and a second microphone. The first microphone and the second microphone may be arranged on a body, and the body may provide mounting support for the first microphone and the second microphone.

[0093] When a user needs to perform a rotation detection on a shaft to be tested of a foldable electronic device, a detection instruction can be sent to the foldable electronic device. The foldable electronic device receives and responds to the detection instruction, collects the first ambient audio of the environment in which the shaft to be tested is in the first state through the first microphone, and collects the first test audio during the process of the shaft to be tested rotating from the first state to the second state through the second microphone, and performs audio noise reduction processing on the first test audio based on the first ambient audio to obtain rotation audio. This realizes the collection of audio during the detection process of the rotation detection of the shaft to be tested based on the first microphone and the second microphone of the foldable electronic device, without the need for additional configuration of audio collection equipment, thereby reducing the detection cost of the rotation detection of the shaft to be tested.

[0094] It should be noted that the first microphone and the second microphone may be the same microphone, that is, the foldable electronic device may be provided with only one microphone, which is not limited here.

[0095] As an embodiment, the first state is a flattened state, the second state is a folded state, the rotation detection is a folding detection, the first ambient audio includes a first sub-ambient audio, the first test audio includes a first sub-test audio, and the rotation audio includes a first sub-rotation audio.

[0096] When a user needs to perform a folding test on the tested hinge of a foldable electronic device, a detection instruction can be sent to the foldable electronic device. The foldable electronic device receives and responds to the detection instruction, collects the first sub-environmental audio of the environment in which the tested hinge is in a flattened state through a first microphone, and collects the first sub-test audio of the tested hinge in the process of rotating from the flattened state to the folded state through a second microphone, and performs audio noise reduction processing on the first sub-test audio based on the first sub-environmental audio to obtain a first sub-rotation audio.

[0097] As an embodiment, the first state is a folded state, the second state is a flattened state, the rotation detection is an unfolding detection, the first ambient audio includes the second sub-ambient audio, the first test audio includes the second sub-test audio, and the rotation audio includes the second sub-rotation audio.

[0098] When a user needs to perform an unfolding test on the tested shaft of a foldable electronic device, a detection instruction can be sent to the foldable electronic device. The foldable electronic device receives and responds to the detection instruction, collects the second sub-environmental audio of the environment in which the tested shaft is in the folded state through the first microphone, and collects the second sub-test audio of the tested shaft in the process of rotating from the folded state to the flattened state through the second microphone, and performs audio noise reduction processing on the second sub-test audio based on the second sub-environmental audio to obtain the second sub-rotation audio.

[0099] In some embodiments, the foldable electronic device may be provided with an input panel. When the user needs to perform a rotation detection on the tested rotating shaft of the foldable electronic device, the user may input a detection instruction on the input panel of the foldable electronic device, for example, by handwriting the detection instruction on the input panel of the foldable electronic device, or by pressing a key on the input panel of the foldable electronic device. The foldable electronic device receives the detection instruction through the input panel.

[0100] In some embodiments, the foldable electronic device can be provided with a voice recognition module. When a user needs to perform a rotation detection on the tested shaft of the foldable electronic device, a voice message can be sent within the voice collection range of the voice recognition module. The voice recognition module collects the voice message sent by the user and performs voice recognition on the collected voice message to obtain a voice recognition result. When it is determined that the voice recognition result contains a keyword for instructing to perform a rotation detection on the tested shaft, for example, the keyword is "rotation detection", or for example, the keywords are "rotation" and "detection", etc., it is determined that the detection instruction has been received.

[0101] As an example, the voice message sent by the user is: perform rotation detection on the shaft to be tested, and the voice recognition result includes the keyword "rotation detection", then it is determined that the detection instruction is received.

[0102] In some embodiments, when a user needs to perform a rotation test on the tested shaft of a foldable electronic device, a detection instruction can be sent to the client. The client receives and responds to the detection instruction, forwards the detection instruction to the foldable electronic device through the network, and the foldable electronic device receives the detection instruction forwarded by the client.

[0103] The client is connected to the foldable electronic device via a network and exchanges data with the foldable electronic device via the network. The client can be any of a mobile client (e.g., a mobile phone client, a personal digital assistant (PDA) client, a tablet personal computer (Tablet PC) client, a laptop client, a smart watch client, a smart bracelet client, or a wearable client) or a fixed client (e.g., a desktop computer client, a smart panel client, etc.). The client type is not limited here and can be set according to actual needs.

[0104] The network can be any one of a ZigBee network, a Bluetooth (BT) network, a Wireless Fidelity (Wi-Fi) network, a Thread network, a Long Range Radio (LoRa) network, a Low-Power Wide-Area Network (LPWAN), an infrared network, a Narrow Band Internet of Things (NB-IoT), a Controller Area Network (CAN), a Digital Living Network Alliance (DLNA) network, a Wide Area Network (WAN), a Local Area Network (LAN), a Metropolitan Area Network (MAN) or a Wireless Personal Area Network (WPAN), etc. The type of network is not limited here and can be set according to actual needs.

[0105] Step S120: Determine the audio similarity between the rotation audio and the preset abnormal audio.

[0106] In an embodiment of the present application, after the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, the audio similarity between the rotation audio and the preset abnormal audio can be determined.

[0107] Among them, the preset abnormal audio is the audio collected in advance during the process of the abnormal shaft rotating from the first state to the second state. The foldable electronic device equipped with the abnormal shaft and the foldable electronic device equipped with the shaft to be tested have exactly the same device structure and device function.

[0108] Specifically, after the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can determine the abnormal audio characteristics of the preset abnormal audio, and determine the rotation audio characteristics of the rotation audio, and determine the similarity between the rotation audio characteristics and the abnormal audio characteristics according to the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio, thereby realizing the calculation of the audio similarity between the rotation audio and the preset abnormal audio based on the Euclidean distance similarity calculation method, and improving the calculation accuracy of the audio similarity.

[0109] The rotation audio features may include rotation Mel-scale Frequency Cepstral Coefficients (MFCC) features and rotation spectrum chroma (Chroma) features, and the abnormal audio features may include abnormal MFCC features and abnormal Chroma features, etc., which are not limited here.

[0110] The foldable electronic device can perform Fourier transform processing on the preset abnormal audio to obtain an abnormal audio spectrogram, and perform audio feature extraction on the abnormal audio spectrogram to obtain abnormal audio features. By performing Fourier transform processing and audio feature extraction on the preset abnormal audio in succession, the accuracy of obtaining abnormal audio features is improved.

[0111] The foldable electronic device can perform Fourier transform processing on the rotational audio to obtain a rotational audio spectrogram, and perform audio feature extraction on the rotational audio spectrogram to obtain rotational audio features. By performing Fourier transform processing and audio feature extraction on the rotational audio in sequence, the accuracy of obtaining the rotational audio features is improved.

[0112] As an implementation method, the rotation audio feature is a rotation MFCC feature, and the abnormal audio feature is an abnormal MFCC feature. After the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can perform Fourier transform processing on the preset abnormal audio and the rotation audio respectively to obtain an abnormal audio spectrogram and a rotation audio spectrogram, and perform audio feature extraction on the abnormal audio spectrogram to obtain abnormal MFCC features, and perform audio feature extraction on the rotation audio spectrogram to obtain rotation MFCC features, and calculate the similarity between the abnormal MFCC features and the rotation MFCC features based on the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio.

[0113] As an implementation method, the rotation audio feature is a rotation Chroma feature, and the abnormal audio feature is an abnormal Chroma feature. After the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can perform Fourier transform processing on the preset abnormal audio and the rotation audio respectively to obtain an abnormal audio spectrogram and a rotation audio spectrogram, and perform audio feature extraction on the abnormal audio spectrogram to obtain an abnormal Chroma feature, and perform audio feature extraction on the rotation audio spectrogram to obtain a rotation Chroma feature, and calculate the similarity between the abnormal Chroma feature and the rotation Chroma feature based on the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio.

[0114] In some embodiments, after the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can collect the second ambient audio of the environment in which the abnormal shaft is located in the first state, and collect the second test audio of the abnormal shaft during the process of rotating from the first state to the second state, and perform audio noise reduction processing on the second test audio based on the second ambient audio to obtain the preset abnormal audio, and determine the abnormal audio features of the preset abnormal audio, and determine the rotation audio features of the rotation audio, and determine the similarity between the rotation audio features and the abnormal audio features based on the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio, thereby realizing audio noise reduction processing of the second test audio based on the second ambient audio, effectively filtering out the ambient noise audio in the second test audio, and improving the accuracy of obtaining the preset abnormal audio.

[0115] In some embodiments, after the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can collect the second environmental audio of the environment in which the abnormal shaft is located in the first state, and collect the second test audio of the abnormal shaft during the process of rotating from the first state to the second state, record the rotation time of the abnormal rotation of the abnormal shaft, and perform audio sampling on the second test audio according to the rotation time to obtain a third test audio, and perform audio noise reduction processing on the third test audio according to the second environmental audio to obtain a preset abnormal audio, and determine the abnormal audio features of the preset abnormal audio, and determine the rotation audio features of the rotation audio, and determine the similarity between the rotation audio features and the abnormal audio features according to the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio, thereby realizing audio sampling of the rotation process audio of the abnormal shaft based on the abnormal rotation time of the abnormal rotation of the abnormal shaft, and obtaining the audio when the abnormal shaft rotates abnormally, thereby ensuring that the preset abnormal audio is obtained with high accuracy.

[0116] The abnormal shaft rotates abnormally for a portion of time during the process of rotating from the first state to the second state, and the rotation time is the time during which the abnormal shaft rotates abnormally during the process of rotating from the first state to the second state.

[0117] In some embodiments, after the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can obtain the second test audio during the process of the abnormal shaft rotating from the first state to the second state and the rotation time of the abnormal rotation of the abnormal shaft, and perform audio sampling on the second test audio according to the rotation time to obtain the preset abnormal audio, and determine the abnormal audio features of the preset abnormal audio, and determine the rotation audio features of the rotation audio, and determine the similarity between the rotation audio features and the abnormal audio features according to the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio.

[0118] In some embodiments, after the foldable electronic device obtains the rotation audio of the tested shaft during the process of rotating from the first state to the second state, it can obtain the preset abnormal audio during the process of the abnormal shaft rotating from the first state to the second state, and determine the abnormal audio features of the preset abnormal audio and the rotation audio features of the rotation audio, and determine the similarity between the rotation audio features and the abnormal audio features based on the Euclidean distance similarity calculation method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio.

[0119] As an embodiment, the foldable electronic device pre-stores a preset abnormal audio during the process of the abnormal shaft rotating from the first state to the second state, and the foldable electronic device can read the pre-stored preset abnormal audio.

[0120] As an embodiment, the server pre-stores preset abnormal audio during the process of the abnormal shaft rotating from the first state to the second state. The server is connected to the foldable electronic device through a network and interacts with the foldable electronic device through the network.

[0121] The foldable electronic device can send an acquisition instruction to the server via the network. The server receives and responds to the acquisition instruction and sends the pre-stored preset abnormal audio to the foldable electronic device via the network. The foldable electronic device receives the preset abnormal audio returned by the server.

[0122] Among them, the server can be an independent physical server, or a server cluster or distributed system composed of multiple physical servers. It can also be a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDN), big data, and artificial intelligence platforms. The type of server is not limited here and can be set according to actual needs.

[0123] It should be noted that, in other embodiments, abnormal audio features of preset abnormal audio are pre-stored in the foldable electronic device or the server, and the foldable electronic device can read or directly obtain the abnormal audio features from the server.

[0124] In one application scenario, such as Figure 4 As shown, the foldable electronic device pre-stores abnormal audio features of preset abnormal audio, and the method for obtaining audio similarity may include steps S201 to S203.

[0125] Step S201: Perform Fourier transform processing on the rotating audio to obtain a rotating audio spectrogram.

[0126] Step S202: extracting audio features from the rotation audio spectrogram to obtain rotation audio features.

[0127] Step S203: Calculate the audio similarity between the rotation audio feature and the abnormal audio feature based on the Euclidean distance similarity calculation method.

[0128] As an example, the rotation audio feature is x and the abnormal audio feature is y. The audio feature Euclidean distance d(x, y) can be calculated based on the rotation audio feature x and the abnormal audio feature y, and the similarity sim(x, y) between the rotation audio feature x and the abnormal audio feature y can be calculated based on the audio feature Euclidean distance d(x, y), sim(x, y) = 1 / (1+d(x, y)), and the similarity sim(x, y) is determined as the audio similarity.

[0129] Among them, the value range of audio similarity sim(x, y) is (0, 1], the audio feature Euclidean distance d(x, y) is inversely proportional to the audio similarity sim(x, y), the larger the audio feature Euclidean distance d(x, y), the smaller the audio similarity sim(x, y), and the smaller the audio feature Euclidean distance d(x, y), the larger the audio similarity sim(x, y).

[0130] Step S130: determining whether the tested shaft rotates normally according to the audio similarity.

[0131] In an embodiment of the present application, after the foldable electronic device determines the audio similarity between the rotation audio and the preset abnormal audio, it can determine whether the tested shaft rotates normally based on the audio similarity. This enables, when performing rotation detection on the tested shaft, to judge whether the tested shaft rotates normally based on the obtained audio similarity between the rotation audio of the tested shaft and the preset abnormal audio. This avoids the user judging whether the tested shaft rotates normally based on the rotation audio manually heard during the rotation process of the tested shaft, thereby improving the detection accuracy of the rotation detection of the tested shaft.

[0132] When the audio similarity is greater than or equal to the preset audio similarity threshold, it is determined that the tested shaft rotates abnormally; when the audio similarity is less than the preset audio similarity threshold, it is determined that the tested shaft rotates normally.

[0133] Among them, the preset audio similarity threshold can be used to characterize the minimum audio similarity between the rotation audio and the preset abnormal audio. The preset audio similarity threshold can be a similarity pre-set by the user, or it can be a similarity automatically generated by the foldable electronic device based on the process of multiple rotation detections of the test shaft, etc. The setting method of the preset audio similarity threshold is not limited here, and it can be set according to actual needs.

[0134] In some embodiments, when the foldable electronic device determines that the tested shaft rotates abnormally based on audio similarity, an abnormal alarm message can be generated. The abnormal alarm message is used to remind the user to process the tested shaft in a timely manner, thereby improving the user's detection experience of rotation detection of the tested shaft.

[0135] Among them, the abnormal alarm information can be at least any one of sound abnormal alarm information, light abnormal alarm information or text abnormal alarm information, etc. The type of abnormal alarm information is not limited here and can be set according to actual needs.

[0136] In some embodiments, when the foldable electronic device determines that the tested shaft rotates abnormally based on audio similarity, an abnormal detection report can be generated and sent to a service platform. The service platform receives and stores the abnormal detection report so that the user can trace the rotation detection record of the tested shaft based on the abnormal detection report, thereby improving the user's detection experience of the rotation detection of the tested shaft.

[0137] In one application scenario, such as Figure 5 As shown, the process of performing rotation detection on the rotating shaft to be tested may include steps S301 to S307.

[0138] Step S301: obtaining a preset abnormal audio during the process of the abnormal shaft rotating from the first state to the second state.

[0139] Step S302: Obtaining the rotation audio of the tested shaft during the process of rotating from the first state to the second state.

[0140] Step S303: Determine the rotational audio features of the rotational audio and the abnormal audio features of the preset abnormal audio.

[0141] Step S304: Determine the similarity between the rotation audio feature and the abnormal audio feature according to the Euclidean distance similarity method, and determine the similarity as the audio similarity between the rotation audio and the preset abnormal audio.

[0142] Step S305: judging whether the tested shaft rotates normally according to the audio similarity.

[0143] When the audio similarity is greater than or equal to the preset audio similarity threshold, it is determined that the tested shaft rotates abnormally, and step S306 is executed;

[0144] When the audio similarity is less than the preset audio similarity threshold, it is determined that the tested shaft rotates normally, and step S307 is executed.

[0145] Step S306: Outputting the abnormal rotation detection result.

[0146] Step S307: Output the normal rotation detection result.

[0147] This embodiment provides a solution, which obtains the rotation audio of the tested shaft of a foldable electronic device during the process of rotating from a first state to a second state, where the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state, and determines the audio similarity between the rotation audio and a preset abnormal audio, where the preset abnormal audio is the pre-collected audio during the process of the abnormal shaft rotating from the first state to the second state, and determines whether the tested shaft rotates normally based on the audio similarity. This achieves that when performing rotation detection on the tested shaft, whether the tested shaft rotates normally is judged based on the audio similarity between the obtained rotation audio of the tested shaft and the preset abnormal audio, thereby avoiding the user judging whether the tested shaft rotates normally based on the rotation audio manually heard during the rotation of the tested shaft, thereby improving the detection accuracy of the rotation detection of the tested shaft.

[0148] See also Figure 6 , which shows a flow chart of a method for detecting shaft rotation provided by another embodiment of the present application. In a specific embodiment, the method for detecting shaft rotation can be applied to foldable electronic devices. The following takes foldable electronic devices as an example. Figure 6 The process shown in FIG. 1 is described in detail. The method for detecting the rotation of the rotating shaft may include the following steps S410 to S460.

[0149] Step S410: When the on time of the first sound receiver reaches a preset time, the first sound receiver is controlled to be off to obtain the first ambient audio.

[0150] In this embodiment, when the user needs to perform a rotation detection on the tested shaft of the foldable electronic device, a detection instruction can be sent to the foldable electronic device. The foldable electronic device receives and responds to the detection instruction, controls the first receiver to be in an on state, and when the on time of the first receiver in the on state reaches a preset time, controls the first receiver to be in an off state to obtain the first ambient audio, thereby realizing the control of the first receiver to collect the first ambient audio according to the on time of the first receiver. The collected first ambient audio is more consistent with the actual environment, thereby improving the collection accuracy of the first ambient audio.

[0151] Among them, the preset time length can be a time length set in advance by the user, or it can be a time length automatically generated by the foldable electronic device based on the process of multiple rotation detections of the test shaft, etc. The setting method of the preset time length is not limited here, and it can be set according to actual needs.

[0152] In some embodiments, when a user needs to perform a rotation detection on a rotating shaft to be tested of a foldable electronic device, a detection instruction can be sent to the foldable electronic device. When the foldable electronic device receives the detection instruction, it controls the first receiver to be in an on state and determines whether the rotating shaft to be tested is in a first state. When it is determined that the rotating shaft to be tested is in the first state and the on-time of the first receiver in the on state reaches a preset time, the first receiver is controlled to be in an off state to obtain the first ambient audio. This realizes that when it is determined that the rotating shaft to be tested is in the first state, the first receiver is controlled to collect the first ambient audio according to the on-time of the first receiver. The collected first ambient audio is the ambient audio when the foldable electronic device is in a stationary state, which improves the collection accuracy of the first ambient audio.

[0153] Among them, the foldable electronic device may also include a gyroscope sensor, which is arranged on the body. The body provides installation support for the gyroscope sensor, and the gyroscope sensor is used to collect the expansion angle of the tested shaft.

[0154] The foldable electronic device can control the gyroscope sensor to collect the expansion angle of the rotating shaft to be tested, obtain the initial expansion angle, and determine whether the rotating shaft to be tested is in the first state according to the initial expansion angle.

[0155] When the initial deployment angle is within the first preset angle range, it is determined that the rotating shaft to be tested is in the first state; when the initial deployment angle is not within the first preset angle range, it is determined that the rotating shaft to be tested is not in the first state.

[0156] The first preset angle range can be used to represent the preset angle range of the tested shaft in the first state. The first preset angle range can be an angle range pre-set by the user, or it can be an angle range automatically generated by the foldable electronic device based on multiple rotation detection processes of the tested shaft, etc.

[0157] Step S420: Control the second microphone to be in an on state.

[0158] In this embodiment, the foldable electronic device can control the second sound receiver to be in an on state so that the second sound receiver can collect audio during the process of the tested shaft rotating from the first state to the second state.

[0159] In some embodiments, the foldable electronic device can determine whether the shaft to be tested enters the second state from the first state, and when it is determined that the shaft to be tested enters the second state from the first state, control the second receiver to be in the on state, thereby realizing that the second receiver is controlled to start receiving sound when it is detected that the shaft to be tested is triggered to rotate in the first state, avoiding controlling the second receiver to start receiving sound when the shaft to be tested is in a stationary state, and improving the control accuracy of the second receiver.

[0160] Among them, the foldable electronic device can obtain the shaft signal of the shaft to be tested, match the shaft signal with the preset rotation signal, obtain the signal matching degree, and determine whether the shaft to be tested enters the second state from the first state based on the signal matching degree, thereby realizing the judgment of the rotation start state of the shaft to be tested based on the shaft signal of the shaft to be tested, and improving the judgment accuracy of the rotation start state of the shaft to be tested.

[0161] When the signal matching degree is greater than or equal to the signal matching degree threshold, it is determined that the tested shaft enters the second state from the first state; when the signal matching degree is less than the signal matching degree threshold, it is determined that the tested shaft does not enter the second state from the first state.

[0162] The rotation shaft signal is a signal for controlling the operation of the rotation shaft. The rotation shaft signal can be generated based on the control instruction received by the foldable electronic device for controlling the operation of the rotation shaft to be tested.

[0163] The signal matching threshold is used to characterize the minimum signal matching when the tested shaft enters the second state from the first state. The signal matching threshold can be a signal matching preset by the user, or it can be a signal matching automatically generated by the foldable electronic device based on multiple rotation detection processes of the tested shaft. The setting method of the signal matching threshold is not limited here, and can be set according to actual needs.

[0164] Step S430: When it is determined that the tested shaft rotates from the first state to the second state, the second microphone is controlled to be in the off state to obtain the first test audio.

[0165] In this embodiment, when the foldable electronic device determines that the shaft to be tested rotates from the first state to the second state, the second microphone is controlled to be in the closed state to obtain the first test audio. When it is determined that the shaft to be tested rotates from the first state to the second state, the shaft to be tested completes the rotation process. At this time, the second microphone is turned off to obtain the first test audio, which avoids controlling the second microphone to collect audio when the shaft to be tested has completed the rotation process, thereby improving the collection accuracy of the first test audio.

[0166] In some embodiments, after the foldable electronic device controls the second receiver to be in an on state, it can obtain the current expansion angle of the shaft to be tested, and determine whether the shaft to be tested rotates from the first state to the second state based on the current expansion angle. When it is determined that the shaft to be tested rotates from the first state to the second state based on the current expansion angle, the second receiver is controlled to be in an off state to obtain the first test audio, thereby realizing the judgment of whether the shaft to be tested has completed the rotation process based on the current expansion angle of the shaft to be tested, and turning off the second receiver when the shaft to be tested completes the rotation process, thereby improving the control accuracy of the second receiver.

[0167] If the current deployment angle is within the second preset angle range, it is determined that the tested shaft rotates from the first state to the second state; if the current deployment angle is not within the second preset angle range, it is determined that the tested shaft does not rotate from the first state to the second state.

[0168] Among them, the foldable electronic device can control the gyroscope sensor to test the expansion angle of the tested shaft to obtain the current expansion angle.

[0169] The second preset angle range can be used to represent the preset angle range of the tested shaft in the second state. The second preset angle range can be an angle range pre-set by the user, or it can be an angle range automatically generated by the foldable electronic device based on multiple rotation detection processes of the tested shaft, etc.

[0170] Step S440: performing audio noise reduction processing on the first test audio according to the first ambient audio to obtain rotation audio.

[0171] Step S450: Determine the audio similarity between the rotation audio and the preset abnormal audio.

[0172] Step S460: Determine whether the tested shaft rotates normally based on the audio similarity.

[0173] In this embodiment, step S440, step S450 and step S460 can refer to the contents of the corresponding steps in the above embodiments, and will not be repeated here.

[0174] In some embodiments, when the foldable electronic device determines that the shaft to be tested is not in the first state, a first prompt message can be generated. The first prompt message is used to prompt the user to control the shaft to be tested to be in the first state, thereby improving the user's detection experience of rotating the shaft to be tested.

[0175] Among them, the first prompt information can be at least any one of the first sound prompt information, the first light prompt information or the first text prompt information, etc. The type of the first prompt information is not limited here and can be set according to actual needs.

[0176] In some embodiments, when the foldable electronic device determines that the shaft to be tested has not entered the second state from the first state, a second prompt message can be generated. The second prompt message is used to prompt the user to control the shaft to be tested to enter the second state from the first state, thereby improving the user's detection experience of rotating the shaft to be tested.

[0177] Among them, the second prompt information can be at least any one of the second sound prompt information, the second light prompt information or the second text prompt information, etc. The type of the second prompt information is not limited here and can be set according to actual needs.

[0178] In some embodiments, when the foldable electronic device determines that the shaft to be tested has not rotated from the first state to the second state, a third prompt message can be generated. The third prompt message is used to prompt the user to control the shaft to be tested to rotate from the first state to the second state, thereby improving the user's detection experience of performing rotation detection on the shaft to be tested.

[0179] Among them, the third prompt information can be at least any one of a third sound prompt information, a third light prompt information or a third text prompt information, etc. The type of the third prompt information is not limited here and can be set according to actual needs.

[0180] In one application scenario, the first state is a flat state, the second state is a folded state, and the rotation detection is a folding detection, such as Figure 7 As shown, the method for obtaining rotation audio during the folding detection process may include steps S501 to S512.

[0181] Step S501: Receive a detection instruction.

[0182] Step S502: In response to the detection instruction, the first microphone is controlled to be in an on state.

[0183] Step S503: Determine whether the rotating shaft to be tested is in a flattened state.

[0184] When it is determined that the rotating shaft to be tested is not in the flattened state, step S504 is executed.

[0185] When it is determined that the rotating shaft to be tested is in the flattened state, step S505 is executed.

[0186] Step S504: Generate the first prompt information, and return to execute step S502.

[0187] The first prompt information is used to prompt the user to control the rotating shaft to be tested to be in a flat state.

[0188] Step S505: When the duration of the first microphone being in the on state reaches a preset duration, the first microphone is controlled to be in the off state to obtain the first ambient audio of the environment in which the shaft to be tested is located.

[0189] Step S506: Determine whether the rotating shaft to be tested has entered the folded state from the flattened state.

[0190] When it is determined that the rotating shaft to be tested does not enter the folded state from the flat state, step S507 is executed;

[0191] When it is determined that the rotating shaft to be tested enters the folded state from the flattened state, step S508 is executed.

[0192] Step S507: Generate second prompt information, and return to execute step S506.

[0193] The second prompt information is used to prompt the user to control the rotating shaft to be tested to enter a folded state from a flattened state.

[0194] Step S508: Control the second microphone to be in an on state.

[0195] Step S509: Determine whether the rotating shaft to be tested is rotated from the flat state to the folded state.

[0196] When it is determined that the rotating shaft to be tested has not rotated from the flat state to the folded state, step S510 is executed;

[0197] When it is determined that the tested rotating shaft rotates from the flat state to the folded state, step S511 is executed.

[0198] Step S510: Generate third prompt information, and return to execute step S508.

[0199] The third prompt information is used to prompt the user to control the rotating shaft to be tested to rotate from the flattened state to the folded state.

[0200] Step S511: controlling the second microphone to be in a closed state to obtain a first test audio.

[0201] Step S512: performing audio noise reduction processing on the first test audio according to the first ambient audio to obtain rotation audio.

[0202] This embodiment provides a solution, when the first microphone is in the on state for a period of time that reaches a preset period of time, the first microphone is controlled to be in the off state to obtain the first environmental audio, and the second microphone is controlled to be in the on state, and when it is determined that the shaft to be tested rotates from the first state to the second state, the second microphone is controlled to be in the off state to obtain the first test audio, and the first test audio is subjected to audio noise reduction processing according to the first environmental audio to obtain the rotation audio, and the audio similarity between the rotation audio and the preset abnormal audio is determined, and whether the shaft to be tested rotates normally is determined according to the audio similarity, thereby achieving the goal of detecting the rotation of the shaft to be tested. When the shaft is rotated, the rotation audio of the tested shaft is compared with the preset abnormal audio to obtain the audio similarity between the rotation audio of the tested shaft and the preset abnormal audio, and whether the tested shaft rotates normally is judged based on the audio similarity between the two. Since it is no longer judged by manual listening whether the shaft rotates normally, but the rotation audio of the tested shaft is compared with a unified reference standard (preset abnormal audio) to judge whether the shaft rotates normally, the problem of low accuracy of the judgment process due to human body differences is avoided, thereby improving the detection accuracy of the rotation detection of the tested shaft.

[0203] Furthermore, the first microphone is controlled to collect the first ambient audio based on the duration of its on-state. When the duration of the first microphone's on-state reaches a preset duration, the first microphone is controlled to be in an off-state to obtain the first ambient audio. This ensures that the collected first ambient audio better matches the actual environment, thereby improving the accuracy of collecting the first ambient audio. When it is determined that the shaft to be tested rotates from the first state to the second state, the second microphone is controlled to be in an off-state to obtain the first test audio. That is, when the shaft to be tested completes its rotation process, the second microphone is turned off to obtain the first test audio. This avoids controlling the second microphone to collect audio even after the shaft to be tested has completed its rotation process, thereby improving the accuracy of collecting the first test audio.

[0204] See also Figure 8 , which shows a shaft rotation detection device 600 provided by an embodiment of the present application. The shaft rotation detection device 600 can be applied to foldable electronic devices. The following takes foldable electronic devices as an example. Figure 8 The shaft rotation detection device 600 shown in FIG. 1 is described in detail. The shaft rotation detection device 600 may include an audio acquisition module 610 , a first determination module 620 , and a second determination module 630 .

[0205] The audio acquisition module 610 can be used to obtain the rotation audio of the tested shaft of the foldable electronic device during the process of rotating from a first state to a second state, where the first state can be a flattened state and the second state can be a folded state, or the first state can be a folded state and the second state can be a flattened state; the first determination module 620 can be used to determine the audio similarity between the rotation audio and the preset abnormal audio, where the preset abnormal audio can be the audio of the abnormal shaft collected in advance during the process of rotating from the first state to the second state; the second determination module 630 can be used to determine whether the tested shaft rotates normally based on the audio similarity.

[0206] In some implementations, the audio acquisition module 610 may include a first acquisition submodule, a second acquisition submodule, and a first processing submodule.

[0207] The first acquisition submodule can be used to collect the first ambient audio of the environment in which the tested rotating shaft is located in the first state; the second acquisition submodule can be used to collect the first test audio during the process of the tested rotating shaft rotating from the first state to the second state; the first processing submodule can be used to perform audio noise reduction processing on the first test audio based on the first ambient audio to obtain rotation audio.

[0208] In some embodiments, the first acquisition submodule may include a first acquisition unit, and the second acquisition submodule may include a second acquisition unit.

[0209] The first acquisition unit can be used to collect the first ambient audio of the environment in which the tested shaft is located in the first state through the first microphone of the foldable electronic device; the second acquisition unit can be used to collect the first test audio of the tested shaft in the process of rotating from the first state to the second state through the second microphone of the foldable electronic device.

[0210] In some embodiments, the first acquisition unit may include a first control subunit.

[0211] The first control subunit may be configured to control the first sound receiver to be in an off state when the on time duration of the first sound receiver in the on state reaches a preset time duration, so as to obtain the first ambient audio.

[0212] In some embodiments, the shaft rotation detection device 600 may further include a control module and a third determination module.

[0213] The control module can be used to control the first control subunit to be in the off state when the on time of the first receiver in the on state reaches a preset time, and to control the first receiver to be in the on state when receiving the detection instruction before obtaining the first ambient audio; the third determination module can be used to determine whether the shaft to be tested is in the first state.

[0214] In some embodiments, the first control subunit includes a first control sub-subunit.

[0215] The first control sub-subunit can be used to control the first sound receiver to be in the off state to obtain the first ambient audio when it is determined that the tested shaft is in the first state and the on time of the first sound receiver in the on state reaches a preset time.

[0216] In some embodiments, the second acquisition unit may include a second control subunit and a third control subunit.

[0217] The second control subunit can be used to control the second microphone to be in the on state; the third control subunit can be used to control the second microphone to be in the off state when it is determined that the tested shaft rotates from the first state to the second state to obtain the first test audio.

[0218] In some embodiments, the shaft rotation detection device 600 may further include a fourth determination module.

[0219] The fourth determining module may be configured to determine whether the rotating shaft to be tested enters the second state from the first state before the second control subunit controls the second microphone to be in the on state.

[0220] In some embodiments, the second control subunit may include a second control sub-subunit.

[0221] The second control sub-subunit may be configured to control the second receiver to be in the on state when it is determined that the rotating shaft to be tested enters the second state from the first state.

[0222] In some implementations, the fourth determination module may include an acquisition submodule, a matching submodule, and a first determination submodule.

[0223] The acquisition submodule can be used to obtain the shaft signal of the shaft to be tested; the matching submodule can be used to match the shaft signal with the preset rotation signal to obtain the signal matching degree; the first determination submodule can be used to determine that the shaft to be tested enters the second state from the first state when the signal matching degree is greater than or equal to the signal matching degree threshold.

[0224] In some embodiments, the shaft rotation detection device 600 may further include an angle acquisition module and a fifth determination module.

[0225] The angle acquisition module can be used to control the second receiver to be in the off state when it is determined that the shaft to be tested rotates from the first state to the second state, and obtain the current expansion angle of the shaft to be tested before obtaining the first test audio; the fifth determination module can be used to determine that the shaft to be tested rotates from the first state to the second state based on the current expansion angle.

[0226] In some embodiments, the shaft rotation detection device 600 may further include a sixth determination module.

[0227] The sixth determination module may be used to determine abnormal audio features of the preset abnormal audio before the first determination module 620 determines the audio similarity between the rotation audio and the preset abnormal audio.

[0228] In some implementations, the first determining module 620 may include a second determining submodule and a third determining submodule.

[0229] The second determination submodule can be used to determine the rotation audio features of the rotation audio; the third determination submodule can be used to determine the similarity between the rotation audio features and the abnormal audio features according to the Euclidean distance similarity calculation method, and the similarity is determined as the audio similarity between the rotation audio and the preset abnormal audio.

[0230] In some embodiments, the shaft rotation detection device 600 may further include a first acquisition module, a second acquisition module, and a processing module.

[0231] The first acquisition module can be used to collect the second ambient audio of the environment in which the abnormal shaft is located in the first state; the second acquisition module can be used to collect the second test audio of the abnormal shaft in the process of rotating from the first state to the second state; the processing module can be used to perform audio noise reduction processing on the second test audio according to the second ambient audio to obtain the preset abnormal audio.

[0232] In some embodiments, the shaft rotation detection device 600 may further include a recording module and a sampling module.

[0233] The recording module can be used to process the second test audio according to the second environmental audio, and record the rotation time of the abnormal shaft before obtaining the preset abnormal audio; the sampling module can be used to perform audio sampling on the second test audio according to the rotation time to obtain the third test audio.

[0234] In some embodiments, the processing module may include a second processing sub-module.

[0235] The second processing submodule can be used to perform audio noise reduction processing on the third test audio according to the second environmental audio to obtain a preset abnormal audio.

[0236] In some implementations, the second determining submodule may include a processing unit and an extracting unit.

[0237] The processing unit can be used to perform Fourier transform processing on the rotating audio to obtain a rotating audio spectrogram; the extraction unit can be used to perform audio feature extraction on the rotating audio spectrogram to obtain rotating audio features.

[0238] This embodiment provides a solution that obtains rotational audio of a rotating shaft to be tested of a foldable electronic device during rotation from a first state to a second state, where the first state is a flattened state and the second state is a folded state, or where the first state is a folded state and the second state is a flattened state, and determines the audio similarity between the rotational audio and a preset abnormal audio, where the preset abnormal audio is pre-collected audio of the abnormal rotating shaft during rotation from the first state to the second state. Based on the audio similarity, the solution determines whether the rotating shaft to be tested rotates normally. This solution achieves the goal of comparing the rotational audio of the rotating shaft to be tested with the preset abnormal audio during rotation detection of the rotating shaft to be tested, obtaining the audio similarity between the rotational audio of the rotating shaft to be tested and the preset abnormal audio, and determining whether the rotating shaft to be tested rotates normally based on the audio similarity between the two. Since the determination of whether the rotating shaft rotates normally is no longer based on human listening, but rather on comparing the rotational audio of the rotating shaft to be tested with a unified reference standard (the preset abnormal audio) to determine whether the rotating shaft rotates normally, the problem of low accuracy in the determination process due to human differences is avoided, thereby improving the detection accuracy of the rotation detection of the rotating shaft to be tested.

[0239] It should be noted that the various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from the other embodiments. The same or similar parts between the various embodiments can be referred to in detail. For the device embodiments, since they are basically similar to the method embodiments, the description is relatively simple. For the relevant parts, refer to the partial description of the method embodiments. Any processing method described in the method embodiment can be implemented by the corresponding processing module in the device embodiment, and will not be repeated in detail in the device embodiment.

[0240] In addition, the functional modules in the various embodiments of the present application may be integrated into a processing module, or each module may exist physically separately, or two or more modules may be integrated into a single module. The above-mentioned integrated modules may be implemented in the form of hardware or software functional modules.

[0241] See also Figure 9 , which shows a schematic diagram of the hardware structure of a foldable electronic device 700 provided by an embodiment of the present application. Figure 9As shown, the foldable electronic device 700 may include a processor 710, an external memory interface 720, an internal memory 721, a Universal Serial Bus (USB) interface 730, a charging management module 740, a power management module 741, a battery 742, an antenna 1, an antenna 2, a mobile communication module 750, a wireless communication module 760, an audio module 770, a speaker 770A, a receiver 770B, a microphone 770C, an earphone interface 770D, a sensor module 780, a button 790, a motor 791, an indicator 792, a camera 793, a display screen 794, and a subscriber identification module (SIM) card interface 795, etc. Among them, the sensor module 780 may include a pressure sensor 780A, a gyroscope sensor 780B, an air pressure sensor 780C, a magnetic sensor 780D, an acceleration sensor 780E, a distance sensor 780F, a proximity light sensor 780G, a fingerprint sensor 780H, a temperature sensor 780J, a touch sensor 780K, an ambient light sensor 780L, a bone conduction sensor 780M, etc.

[0242] It should be understood that the structures illustrated in the embodiments of the present application do not constitute a specific limitation on the foldable electronic device 700. In other embodiments of the present application, the foldable electronic device 700 may include more or fewer components than shown, or may combine or separate certain components, or arrange the components differently. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.

[0243] For example, Figure 9 The processor 710 shown may include one or more processing units, for example, the processor 710 may include an application processor (AP), a modem processor, a graphics processor (GPU), an image signal processor (ISP), a controller, a memory, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural network processor (NPU), etc. The different processing units may be independent devices or integrated into one or more processors.

[0244] The AP may be used to control and manage a recording application. For example, the AP may control the recording application to collect ambient audio and test audio during the rotation of the tested shaft of the foldable electronic device 700.

[0245] The controller can be the nerve center and command center of the foldable electronic device 700. The controller can generate operation control signals based on instruction operation codes and timing signals to complete the control of instruction fetching and execution.

[0246] Processor 710 may also include a memory for storing instructions and data. In some embodiments, the memory in processor 710 is a cache memory. This memory can store instructions or data that have just been used or are being recycled by processor 710. If processor 710 needs to use the same instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor 710 latency, and thus improves system efficiency.

[0247] In some embodiments, the processor 710 may include one or more interfaces. The interfaces may include an Inter-Integrated Circuit (I2C) interface, an Inter-Integrated Circuit Sound (I2S) interface, a Pulse Code Modulation (PCM) interface, a Universal Asynchronous Receiver / Transmitter (UART) interface, a Mobile Industry Processor Interface (MIPI), a General Purpose Input / Output (GPIO) interface, a Subscriber Identity Module (SIM) interface, and / or a Universal Serial Bus (USB) interface.

[0248] In some embodiments, the I2S interface can be used for audio communication. The processor 710 can include multiple I2S buses. The processor 710 can be coupled to the audio module 770 via the I2S bus to enable communication between the processor 710 and the audio module 770.

[0249] In some embodiments, the audio module 770 can transmit audio signals to the wireless communication module 760 through the I2S interface to implement the function of answering calls through a Bluetooth headset.

[0250] In some embodiments, the PCM interface can also be used for audio communication, sampling, quantizing and encoding analog signals. The audio module 770 and the wireless communication module 760 can be coupled via a PCM bus interface.

[0251] In some embodiments, the audio module 770 can also transmit audio signals to the wireless communication module 760 via the PCM interface to implement the function of answering calls through a Bluetooth headset. It should be understood that both the I2S interface and the PCM interface can be used for audio communication.

[0252] It should be understood that the interface connection relationship between the modules illustrated in the embodiment of the present application is merely an illustrative illustration and does not constitute a structural limitation on the foldable electronic device 700. In other embodiments of the present application, the foldable electronic device 700 may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.

[0253] Foldable electronic device 700 implements display functionality through a GPU, display screen 794, and an application processor. A GPU is a microprocessor for image processing that connects display screen 794 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 710 may include one or more GPUs that execute program instructions to generate or modify display information.

[0254] Display screen 794 is used to display images, videos, etc. Display screen 794 includes a display panel. The display panel can be a liquid crystal display (LCD), organic light emitting diode (OLED), active-matrix organic light emitting diode (AMOLED), flexible light emitting diode (FLED), mini-LED, micro-LED, micro-OLED, quantum dot light emitting diode (QLED), etc. In some embodiments, foldable electronic device 700 may include one or N display screens 794, where N is a positive integer greater than 1.

[0255] The external memory interface 720 can be used to connect an external memory card, such as a Secure Digital (SD) card, to expand the storage capacity of the foldable electronic device 700. The external memory card communicates with the processor 710 via the external memory interface 720 to implement data storage functions. For example, files such as captured audio, captured images, and videos can be saved on the external memory card.

[0256] The internal memory 721 can be used to store computer executable program codes, and the executable program codes include instructions. The processor 710 executes various functional applications and data processing of the foldable electronic device 700 by running the instructions stored in the internal memory 721. The internal memory 721 may include a program storage area and a data storage area. Among them, the program storage area can store an operating system, an application required for at least one function (such as an audio acquisition function, an image shooting function, etc.), etc. The data storage area can store data (such as audio data, image data) created during the use of the foldable electronic device 700, etc. In addition, the internal memory 721 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, a universal flash memory (UFS), etc.

[0257] See also Figure 10 , which shows a functional block diagram of a foldable electronic device 800 according to an embodiment of the present application. Figure 10 As shown, the foldable electronic device 800 includes: one or more processors 810 ( Figure 10 Only one processor is shown in the figure) and a memory 820, the memory 820 is coupled to one or more processors 810, the memory 820 is used to store computer program code 830, the computer program code 830 includes computer instructions, and one or more processors 810 call the computer instructions to enable the foldable electronic device 800 to implement the steps in any of the above methods.

[0258] Those skilled in the art will understand that Figure 10 This is merely an example of the foldable electronic device 800 and does not constitute a limitation on the foldable electronic device 800. In practice, the foldable electronic device 800 may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, it may also include input and output devices, network access devices, etc.

[0259] The processor 810 may be a central processing unit (CPU), other general-purpose processors, a digital signal processor (DSP), an application-specific integrated circuit (ASIC), a field programmable gate array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0260] In some embodiments, the memory 820 may be an internal storage unit of the foldable electronic device 800, such as a hard disk or memory of the foldable electronic device 800. In other embodiments, the memory 820 may also be an external storage device of the foldable electronic device 800, such as a plug-in hard disk equipped on the foldable electronic device 800, a Smart Media Card (SMC), a Secure Digital (SD) card, a Flash Card, etc. Optionally, the memory 820 may include both an internal storage unit of the foldable electronic device 800 and an external storage device. The memory 820 is used to store an operating system, application programs, a boot loader, data, and other programs, such as program code of a computer program. The memory 820 may also be used to temporarily store data that has been output or is about to be output.

[0261] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of this application. Their specific functions and technical effects can be found in the method embodiment section and will not be repeated here.

[0262] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the above-mentioned device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0263] An embodiment of the present application also provides a chip system, which is applied to a foldable electronic device. The chip system includes one or more processors, and the one or more processors are used to call computer instructions to enable the foldable electronic device to implement the steps of any of the above methods.

[0264] In some embodiments, the chip system further includes a memory, which is connected to one or more processors via circuits or wires.

[0265] In some embodiments, the chip system further includes a communication interface.

[0266] An embodiment of the present application also provides a computer-readable storage medium, which includes instructions. When the instructions are executed on a foldable electronic device, the foldable electronic device implements the methods described in the above-mentioned various method embodiments.

[0267] An embodiment of the present application also provides a computer program product. When the computer program product is run on a foldable electronic device, the foldable electronic device executes the above-mentioned related steps to implement the methods described in the above-mentioned various method embodiments.

[0268] If the above-mentioned integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, it can implement the steps of the above-mentioned various method embodiments. Among them, the computer program includes computer program code, which can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device that can carry the computer program code to the camera / foldable electronic device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electric carrier signal, a telecommunication signal and a software distribution medium. For example, a USB flash drive, a mobile hard disk, a magnetic disk or an optical disk. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electric carrier signals and telecommunication signals.

[0269] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.

[0270] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0271] In the embodiments provided in this application, it should be understood that the disclosed devices / equipment and methods can be implemented in other ways. For example, the device / equipment embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.

[0272] The units described above as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0273] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or collections thereof.

[0274] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0275] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0276] References to "one embodiment" or "some embodiments" in this specification mean that a particular feature, structure, or characteristic described in conjunction with that embodiment is included in one or more embodiments of the present application. Thus, phrases such as "in one embodiment," "in some implementations," "in other embodiments," and "in yet other embodiments" appearing in various places in this specification do not necessarily refer to the same embodiment, but rather mean "one or more but not all embodiments," unless otherwise specifically emphasized. The terms "including," "comprising," "having," and variations thereof all mean "including but not limited to," unless otherwise specifically emphasized.

[0277] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.

Claims

1. A method for detecting shaft rotation, characterized in that: Applied to a foldable electronic device, the method includes: Obtaining rotational audio of a tested rotating shaft of the foldable electronic device during a process of rotating from a first state to a second state, wherein the first state is a flattened state and the second state is a folded state, or the first state is a folded state and the second state is a flattened state; Determining an audio similarity between the rotation audio and a preset abnormal audio, where the preset abnormal audio is pre-collected audio during the process of the abnormal shaft rotating from the first state to the second state; Determine whether the tested shaft rotates normally according to the audio similarity.

2. The method according to claim 1, characterized in that The obtaining of the rotation audio of the tested rotating shaft of the foldable electronic device during the process of rotating from the first state to the second state includes: collecting first ambient audio of the environment in which the rotating shaft to be tested is located in the first state; collecting a first test audio during the process of the tested rotating shaft rotating from the first state to the second state; Audio noise reduction processing is performed on the first test audio according to the first environmental audio to obtain the rotation audio.

3. The method according to claim 2, characterized in that The collecting of the first ambient audio of the environment in which the tested rotating shaft is located in the first state includes: collecting, by a first microphone of the foldable electronic device, first ambient audio of the environment in which the rotating shaft to be tested is located in the first state; The collecting of the first test audio of the tested rotating shaft during the process of rotating from the first state to the second state includes: A first test audio is collected by a second microphone of the foldable electronic device during the process of the tested rotating shaft rotating from the first state to the second state.

4. The method according to claim 3, characterized in that The collecting, by the first sound receiver of the foldable electronic device, first ambient audio of the environment in which the tested rotating shaft is located in the first state includes: When the first sound receiver is in the on state for a time period that reaches a preset time period, the first sound receiver is controlled to be in the off state to obtain the first ambient audio.

5. The method according to claim 4, characterized in that When the first sound receiver is in the on state for a duration that reaches a preset duration, controlling the first sound receiver to be in the off state before obtaining the first ambient audio, the method includes: When receiving a detection instruction, controlling the first microphone to be in an on state; determining whether the rotating shaft to be tested is in the first state; and When the first sound receiver is in the on state for a duration that reaches a preset duration, controlling the first sound receiver to be in the off state to obtain the first ambient audio includes: When it is determined that the tested shaft is in the first state and the on-time of the first sound receiver in the on-state reaches a preset time, the first sound receiver is controlled to be in the off-state to obtain the first environmental audio.

6. The method according to any one of claims 3 to 5, characterized in that The collecting, by the second sound receiver of the foldable electronic device, a first test audio during the process of the tested rotating shaft rotating from the first state to the second state, includes: Controlling the second radio to be in an on state; When it is determined that the tested rotating shaft rotates from the first state to the second state, the second sound receiver is controlled to be in a closed state to obtain the first test audio.

7. The method according to claim 6, characterized in that Before controlling the second radio receiver to be in the on state, the method further includes: determining whether the rotating shaft to be tested enters the second state from the first state; The controlling the second radio receiver to be in an on state includes: When it is determined that the rotating shaft to be tested enters the second state from the first state, the second sound receiver is controlled to be in the on state.

8. The method according to claim 7, characterized in that The determining whether the rotating shaft to be tested enters the second state from the first state includes: Acquiring a shaft signal of the shaft to be tested; Matching the shaft signal with a preset rotation signal to obtain a signal matching degree; When the signal matching degree is greater than or equal to a signal matching degree threshold, it is determined that the rotating shaft to be tested enters the second state from the first state.

9. The method according to any one of claims 6 to 8, characterized in that When it is determined that the tested rotating shaft rotates from the first state to the second state, the second receiver is controlled to be in a closed state, and before the first test audio is obtained, the method further includes: Obtaining the current expansion angle of the rotating shaft to be tested; The rotation of the rotating shaft to be tested from the first state to the second state is determined according to the current deployment angle.

10. The method according to any one of claims 1 to 9, characterized in that Before determining the audio similarity between the rotation audio and the preset abnormal audio, the method further includes: determining abnormal audio features of preset abnormal audio; The determining of the audio similarity between the rotation audio and the preset abnormal audio includes: determining a rotational audio feature of the rotational audio; According to the Euclidean distance similarity calculation method, the similarity between the rotation audio feature and the abnormal audio feature is determined, and the similarity is determined as the audio similarity between the rotation audio and the preset abnormal audio.

11. The method according to claim 10, characterized in that The method further comprises: collecting a second ambient audio of an environment in which the abnormal rotating shaft is located in the first state; collecting a second test audio of the abnormal rotating shaft during the process of rotating from the first state to the second state; Audio noise reduction processing is performed on the second test audio according to the second environmental audio to obtain the preset abnormal audio.

12. The method according to claim 11, characterized in that Before performing audio noise reduction processing on the second test audio according to the second environmental audio to obtain the preset abnormal audio, the method further includes: Recording the abnormal rotation time of the abnormal rotation shaft; sampling the second test audio according to the rotation time to obtain a third test audio; The performing audio noise reduction processing on the second test audio according to the second environmental audio to obtain the preset abnormal audio includes: Audio noise reduction processing is performed on the third test audio according to the second environmental audio to obtain the preset abnormal audio.

13. The method according to any one of claims 10 to 12, characterized in that The determining of the rotational audio feature of the rotational audio includes: Performing Fourier transform processing on the rotation audio to obtain a rotation audio spectrogram; Audio feature extraction is performed on the rotation audio spectrogram to obtain rotation audio features.

14. A device for detecting shaft rotation, characterized in that: Applied to foldable electronic devices, the device comprises: an audio acquisition module, configured to acquire rotational audio of the tested rotating shaft of the foldable electronic device during a process of rotating from a first state to a second state, wherein the first state is a flattened state and the second state is a folded state, or wherein the first state is a folded state and the second state is a flattened state; a first determining module, configured to determine an audio similarity between the rotation audio and a preset abnormal audio, wherein the preset abnormal audio is pre-collected audio during the process of the abnormal shaft rotating from the first state to the second state; The second determining module is configured to determine whether the rotating shaft to be tested rotates normally according to the audio similarity.

15. A foldable electronic device, characterized in that: The foldable electronic device includes: one or more processors and a memory; The memory is coupled to the one or more processors, and the memory is used to store computer program code, where the computer program code includes computer instructions. The one or more processors call the computer instructions to enable the foldable electronic device to perform the method according to any one of claims 1 to 13.

16. A computer-readable storage medium, characterized in that The computer-readable storage medium comprises instructions, which, when executed on a foldable electronic device, enable the foldable electronic device to perform the method according to any one of claims 1 to 13.