A method and system for gun inspection status based on voiceprint detection
Through the method based on voiceprint detection, the voiceprint characteristics during the gun inspection process are extracted, the abnormal values and weights of the gun are calculated, the degree of failure is evaluated and the alarm is issued, which solves the potential safety hazards caused by inaccurate gun detection in the existing technology and achieves Effective monitoring and early warning of abnormal firearm situations.
Patent Information
- Application Number
- CN202410541385.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2025-01-24
- Estimated Expiration
- 2044-04-30
AI Technical Summary
The prior art methods for detecting guns are inaccurate, which may lead to safety hazards when subsequent use of guns.
Using sound -based detection methods, by collecting the images and sounds of the inspection personnel when testing the guns, the characteristics of the sound pattern are extracted, the abnormal values and weights of the gun are calculated, and the degree of failure of the gun is then evaluated and the police are alarm based on the degree of failure.
It can calculate the probability of abnormality in the gun during the inspection of the gun. If the probability is high, an alarm will be issued to avoid personal safety problems caused by abnormality in subsequent use of the gun.
Smart Images

Figure CN118398028B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of gun inspection and detection, and more specifically, to a method and system for detecting gun inspection status based on voiceprint. Background Art
[0002] Specialized shooting ranges or shooting clubs are places where people can legally practice and use guns. In these places, there are usually professional supervision and safety measures to ensure the safety of using guns.
[0003] However, in the current process of inspecting guns, relatively simple methods are generally used to detect guns. The detection methods are inaccurate and may cause safety hazards when using the guns later. Summary of the invention
[0004] The present invention provides a method and system for detecting gun status based on voiceprint detection, aiming to solve the problem that a relatively simple method is used in the related art to detect guns, the detection method is inaccurate, and potential safety hazards may be caused when the gun is used subsequently.
[0005] In a first aspect, the present invention provides a method for detecting a gun inspection status based on voiceprint, comprising: collecting an image of an inspector when inspecting a gun, and determining whether the inspection action of the inspector when inspecting the gun is standard; if the inspection action is standard, collecting the sound of the gun in each inspection action, and processing the sound, and proposing a voiceprint feature in the sound, wherein the voiceprint feature includes frequency and amplitude; segmenting the frequency and amplitude generated by the gun in each inspection action in sequence, wherein the frequency and amplitude obtained under the same inspection action are assigned the same segment number, and calculating the abnormal value of the gun and the weight corresponding to the gun itself, wherein the calculation formula of the abnormal value is: = ; where S represents the outlier value of guns, It represents the average value of the total amplitude value collected this time. Represents the average value of the total amplitude of the standard collected in the historical data. Indicates the total number of multi-band frequencies. Indicates Segment frequency, Indicates the first Segment frequency, Indicates the standard number collected from historical data. Segment frequency, e is expressed as the base of the natural logarithm, represents a standard normalization function; calculates the degree of failure of the gun according to the weight corresponding to the gun itself and the abnormal value; and in response to the degree of failure being greater than a preset threshold, issues an alarm.
[0006] In one embodiment, the calculation formula of the fault degree is: Y= × ; Among them, Y represents the degree of failure of the gun, S represents the abnormal value of the gun, and W represents the weight corresponding to the gun itself.
[0007] In one embodiment, the weight corresponding to the gun itself is calculated using the following formula: = ;in, represents the total time the gun is used, It indicates the time since the last maintenance of the gun, Q indicates the number of times the gun has been repaired, Represents the standard normalization function.
[0008] In one embodiment, determining whether the inspection actions of the inspector when inspecting the gun are standard includes: if the inspection actions of the inspector when inspecting the gun do not meet the standards, giving a prompt.
[0009] In one embodiment, a display unit is further included, and the prompt includes an alarm and a display of a correct inspection action on the display unit.
[0010] In one embodiment, the method further includes: in response to the fault degree being less than a preset threshold, no alarm is issued.
[0011] In one embodiment, the method further includes: collecting an image of the gun during inspection and an image of the expression of the inspector; calculating an abnormality value of the gun based on the image of the gun and the expression image; and issuing an alarm in response to the abnormality value being less than a second threshold.
[0012] In one embodiment, it further includes: in response to the abnormality level value being greater than a second threshold, no alarm is required.
[0013] In one embodiment, the abnormality degree value of the gun is calculated based on the gun image and the expression image, including: calculating the degree of damage of the gun based on the gun image; obtaining a corresponding level based on the expression image; multiplying the degree of damage by the level corresponding to the expression image to obtain an actual value, normalizing the actual value, and using the normalized value as the abnormality degree value.
[0014] In a second aspect of the present invention, a system for detecting gun status based on voiceprint is provided, comprising a processor and a memory, wherein the memory stores a computer program, and the processor executes the computer program to implement any of the above methods for detecting gun status based on voiceprint.
[0015] Beneficial effects: The present invention can calculate the probability of abnormal conditions occurring in a gun during the inspection of the gun. If the probability of abnormal conditions occurring in the gun is high, an alarm is issued to alert the staff, thereby avoiding personal safety problems caused by abnormal conditions occurring in subsequent use of the gun. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] By reading the following detailed description with reference to the accompanying drawings, the above and other objects, features and advantages of the exemplary embodiments of the present invention will become readily understood. In the accompanying drawings, several embodiments of the present invention are shown in an exemplary and non-limiting manner, and the same or corresponding reference numerals represent the same or corresponding parts, wherein:
[0017] Figure 1 is a flowchart schematically illustrating a gun detection process according to an embodiment of the present invention;
[0018] Figure 2 is a flowchart schematically showing a gun detection process according to a second embodiment of the present invention;
[0019] Figure 3 FIG. 1 is a diagram schematically showing a system structure according to an embodiment of the present invention. DETAILED DESCRIPTION
[0020] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0021] The specific embodiments of the present invention are described in detail below with reference to the accompanying drawings.
[0022] like Figure 1 As shown, step S101: collect images of the inspector when inspecting the gun, and determine whether the inspector's inspection actions when inspecting the gun are standard.
[0023] In one embodiment, an image of the inspector inspecting the gun can be captured by a camera device, which can be a camera or a video camera, etc. The captured image is then used to determine whether the inspector's inspection actions when inspecting the gun are standard. In other words, it is to detect whether the inspector has any non-standard behavior during the inspection of the gun.
[0024] In one embodiment, there are multiple inspection actions for the gun, such as: removing the magazine, installing the magazine, rotating or moving the safety switch to the unlocked position, rotating or moving the safety switch to the locked position, pulling the trigger or test firing.
[0025] Step S102: If the inspection action is standard, the sound of the gun in each inspection action is collected, and the sound is processed to extract the voiceprint features in the sound, wherein the voiceprint features include frequency and amplitude.
[0026] In one embodiment, when inspecting a gun, the inspector collects the sound of the gun in each inspection action when the inspection action standard is met, that is, when the inspection action standard is met, specifically, a sound receiving device, such as a sound collector, can be used, and the sound receiving device can be installed on the gun. When the gun is inspected, the sound emitted by the gun can be collected. Then, the collected sound is processed to extract the voiceprint features in the sound, and the voiceprint features include frequency and amplitude.
[0027] In one embodiment, if the inspection action of the inspector during the gun inspection does not meet the standard, a prompt is given. Specifically, the prompt includes issuing an alarm and displaying the correct inspection action on the display unit to remind the inspector.
[0028] Step S103: The frequency and amplitude generated by the gun in each inspection action are segmented in sequence, wherein the frequency and amplitude obtained under the same inspection action are assigned the same segment number, and the abnormal value of the gun and the weight corresponding to the gun itself are calculated.
[0029] In one embodiment, the inspection actions of the gun are inspected in a sequential order, which are disassembling the magazine, installing the magazine, rotating or moving the safety switch to the unlocked position, rotating or moving the safety switch to the locked position, pulling the trigger or test firing, etc. The sound generated by the inspection gun action is processed in sections, for example, the frequency and amplitude generated when the magazine is removed are divided into the first section, the frequency and amplitude generated when the magazine is installed are divided into the second section, the frequency and amplitude generated when the safety switch is rotated or moved to the unlocked position are divided into the third section, and the frequency and amplitude generated when the safety switch is rotated or moved to the locked position are divided into the fourth section.
[0030] In one embodiment, the calculation formula of the outlier value of a gun is:
[0031] = .
[0032] Among them, S represents the outlier value of guns, It represents the average value of the total amplitude value collected this time. Represents the average value of the total amplitude of the standard collected in the historical data. Indicates the total number of multi-band frequencies. Indicates Segment frequency, Indicates the first Segment frequency, Indicates the standard number collected from historical data. Segment frequency, e is expressed as the base of the natural logarithm, Represents the standard normalization function.
[0033] In one embodiment, the frequency and amplitude in the historical data represent the frequency and amplitude of the gun when the gun is not damaged. It represents the sum of the differences between the frequencies of each segment obtained in this inspection and the frequencies of each segment obtained in the inspection of guns in the historical data. The larger the value, the greater the difference between the gun being tested and the normal gun, which means that the gun being tested is more abnormal.
[0034] In one embodiment, the weight corresponding to the gun itself is calculated using the following formula:
[0035] = .
[0036] in, represents the total time the gun is used, It indicates the time since the last maintenance of the gun, Q indicates the number of times the gun has been repaired, Represents the standard normalization function.
[0037] In one embodiment, The larger it is, the longer the gun has been used, and the more likely the internal zero will age; Indicates the time since the last maintenance of the gun. The larger the value, the longer the gun has not been maintained, and the greater the probability of damage to the gun; and the more times the gun is repaired, the more damage the gun is likely to have, and the greater the probability of damage to the gun, the greater the weight of the gun.
[0038] Step S104: Calculate the fault degree of the gun according to the weight corresponding to the gun itself and the abnormal value.
[0039] In one embodiment, the calculation formula of the fault degree is: Y= × .
[0040] Among them, Y represents the degree of failure of the gun, S represents the abnormal value of the gun, and W represents the weight corresponding to the gun itself. The larger the abnormal value of the gun and the weight corresponding to the gun itself, the greater the degree of failure, which means that the gun is more likely to fail.
[0041] Step S105: In response to the fault degree being greater than a preset threshold, an alarm is issued.
[0042] In one embodiment, if the calculated fault degree of the gun is greater than a preset threshold, where the preset threshold can be set according to the specific situation, an alarm is issued to remind the inspector, and the inspector is asked to inspect and repair the gun later. If the calculated fault degree of the gun is less than the preset threshold, no alarm is required.
[0043] like Figure 2 As shown, in the second embodiment, the safety level of the gun can also be judged according to the gun image during inspection and the expression image of the inspector, and the specific steps are as follows:
[0044] Step S201: Collecting an image of the gun during inspection and an image of the inspector's facial expression.
[0045] In one embodiment, a shooting device is used to shoot an image of a gun and an image of the expression of the inspector, and a corresponding level is obtained according to the expression image. Specifically, the level is graded according to the facial features of the inspector. When a frowning feature appears on the face, it is graded as level 4, and when no frowning feature appears, it is graded as level 1. Because when the inspector shows a frowning expression when inspecting a gun, it means that some problems have been encountered, so as to judge some abnormalities of the gun. Then, the gun image is used to identify whether the gun itself is damaged, and the degree of damage of the gun is calculated. The greater the degree of damage, the greater the probability that the gun has an abnormality.
[0046] Step S202: Calculate the abnormality level of the gun according to the gun image and the expression image.
[0047] In one embodiment, the damage degree is multiplied by the level corresponding to the expression image to obtain an actual value, the actual value is normalized, and the normalized value is used as the abnormality degree value.
[0048] Step S203: In response to the abnormality level being greater than the second threshold, no alarm is required.
[0049] In one embodiment, if the abnormality level value is less than the second threshold value, no alarm is required; if the abnormality level value is greater than the second threshold value, an alarm is issued to prompt the inspector.
[0050] Through the above steps, the present invention can calculate the probability of abnormal conditions occurring in the gun during the inspection of the gun. If the probability of abnormal conditions occurring in the gun is high, an alarm is issued to remind the staff to avoid personal safety problems caused by abnormal conditions in subsequent use of the gun.
[0051] The present invention also provides a system for detecting gun status based on voiceprint. Figure 3As shown, the system includes a processor and a memory, wherein the memory stores computer program instructions. When the computer program instructions are executed by the processor, a method for detecting a gun status based on voiceprint according to the first aspect of the present invention is implemented.
[0052] In one embodiment, the present invention provides a computer device whose internal structure can be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities, and various varieties such as CPU, single-chip microcomputer, DSP or FPGA can be selected. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. When the computer program is executed, the steps described in the above method embodiment can be completed, such as S101-step S105. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, an operator network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a method for detecting the gun status based on voiceprint detection is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse.
[0053] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present invention, and does not constitute a limitation on the computer device of the present invention. The specific computer device may include more or less components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0054] The system also includes other components familiar to those skilled in the art, such as a communication bus and a communication interface, whose configuration and functions are known in the art and thus will not be described in detail here.
[0055] In the present invention, the aforementioned memory may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, apparatus or device. For example, a computer-readable storage medium may be any appropriate magnetic storage medium or magneto-optical storage medium, such as a resistive random access memory RRAM (Resistive Random Access Memory), a dynamic random access memory DRAM (Dynamic Random Access Memory), a static random access memory SRAM (Static Random-Access Memory), an enhanced dynamic random access memory EDRAM (Enhanced Dynamic Random Access Memory), a high-bandwidth memory HBM (High-Bandwidth Memory), a hybrid memory cube HMC (Hybrid Memory Cube), etc., or any other medium that can be used to store the required information and can be accessed by an application, a module, or both. Any such computer storage medium may be part of a device or accessible or connectable to a device. Any application or module described in the present invention may be implemented using computer-readable / executable instructions that may be stored or otherwise maintained by such a computer-readable medium.
[0056] In the description of this specification, "plurality" or "several" means at least two, such as two, three or more, etc., unless otherwise clearly defined.
[0057] The technical features of the above-described embodiments may be arbitrarily combined. To make the description concise, not all possible combinations of the technical features in the above-described embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0058] The above-mentioned embodiments only express several implementation methods of the present invention, and the description is relatively specific and detailed, but it cannot be understood as limiting the scope of the patent application. It should be pointed out that for ordinary technicians in this field, several modifications and improvements can be made without departing from the concept of the present invention, which all belong to the protection scope of the present invention.
Claims
1. A method for detecting gun status based on voiceprint, characterized in that: include: Collect images of inspectors inspecting guns to determine whether the inspectors' inspection actions are standard; If the inspection action is standard, the sound of the gun in each inspection action is collected, and the sound is processed to extract the voiceprint features in the sound, where the voiceprint features include frequency and amplitude; The frequency and amplitude generated by the gun in each test action are processed in sections according to the order of precedence, the frequency and amplitude obtained under the same test action are assigned the same section number, and the abnormal value of the gun and the weight corresponding to the gun itself are calculated. The calculation formula of the abnormal value is: = ; S represents the outlier value of guns, It represents the average value of the total amplitude value collected this time. Represents the average value of the total amplitude of the standard collected in the historical data. Indicates the total number of multi-band frequencies. Indicates Segment frequency, Indicates the first Segment frequency, Indicates the standard number collected from historical data. Segment frequency, e is expressed as the base of the natural logarithm, represents the standard normalization function; The formula for calculating the weight corresponding to the gun itself is: = ; represents the total time the gun is used, It indicates the time since the last maintenance of the gun, and Q indicates the number of times the gun has been repaired; The failure degree of the gun is calculated according to the weight corresponding to the gun itself and the abnormal value, and the calculation formula is: Y= × ; Y represents the degree of failure of the gun, Indicates the weight corresponding to the gun itself; In response to the fault degree being greater than a preset threshold, an alarm is issued.
2. The method for detecting gun status based on voiceprint according to claim 1, characterized in that: Determine whether the inspector's inspection actions during gun inspection are standard, including: If the inspection actions of the inspector when inspecting the gun do not meet the standards, a prompt will be given.
3. The method for detecting gun status based on voiceprint according to claim 2, characterized in that: A display unit is also included, and the prompt includes an alarm and a display of a correct inspection action on the display unit.
4. The method for detecting gun status based on voiceprint according to claim 1, characterized in that: Also includes: In response to the fault degree being less than a preset threshold, no alarm is issued.
5. The method for detecting gun status based on voiceprint according to claim 1, characterized in that: Also includes: Collecting images of the gun during inspection and images of the inspector's facial expressions; Calculating an abnormality value of the gun based on the gun image and the expression image; In response to the abnormality level being less than a second threshold, an alarm is issued.
6. The method for detecting gun status based on voiceprint according to claim 5, characterized in that: Also includes: In response to the abnormality level value being greater than the second threshold, no alarm is required.
7. The method for detecting gun status based on voiceprint according to claim 5, characterized in that: Calculating the abnormality value of the gun according to the gun image and the expression image, including: Calculating the degree of damage of the gun according to the gun image; Obtaining a corresponding level according to the expression image; The damage degree is multiplied by the level corresponding to the expression image to obtain an actual value, the actual value is normalized, and the normalized value is used as the abnormality degree value.
8. A system for detecting gun status based on voiceprint, comprising a processor and a memory, wherein the memory stores a computer program, characterized in that: The processor executes the computer program to implement the method for detecting the gun status based on voiceprint as described in any one of claims 1-7.
Citation Information
Patent Citations
Abnormal voice classifying method and device
CN106683687A
A bullet cabinet control method and device combining face and voiceprint recognition
CN109598111A