Circuit card detection method and device and computer equipment
By determining the frame range based on the non-periodic fluctuation signal duration and calculating the number of peaks and troughs, the problem of circuit card detection delay and storage space in contactless card swiping systems is solved, and more efficient and accurate detection effects are achieved.
Patent Information
- Application Number
- CN202411376889.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-30
- Publication Date
- 2025-02-28
AI Technical Summary
The existing contactless card swiping system has a large delay when detecting circuit cards and has large storage space requirements, which affects the efficiency and accuracy of the system.
By acquiring the detected fluctuation signal, the range of each frame is determined based on the duration of the non-periodic fluctuation signal, the average amplitude of each frame is calculated, and the average amplitude of the current frame and the previous frame are compared to detect the peaks and troughs in the signal. Set a preset number of peaks and troughs thresholds to ensure that the circuit card is considered to be successfully detected only if a sufficient number of peaks and troughs is detected.
It improves the flexibility and accuracy of circuit card detection, reduces detection delay, optimizes the use of storage space, and enhances the reliability of the system.
Smart Images

Figure 00000000_0000_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of computer technology, and in particular to a circuit card detection method, device, and computer equipment. Background Art
[0002] With the advancement of technology, many contact card swipe systems have gradually developed into contactless card swipe systems. Traditional contact card swipe systems require users to insert or slide the card through the card reader, which not only easily causes card wear, but may also cause card reader failure. The contactless card swipe system allows users to complete authentication by simply bringing the card close to the card reader without directly touching the device, greatly improving the convenience and safety of use. The contactless card swipe system needs to first detect whether there is a card, and then identify the card after detecting the presence of the card.
[0003] In the related art, an offline card detection scheme is used to detect whether a card is present. When the card reader detects a signal change, the track data is sampled through an analog-to-digital converter and the sampled data is stored in a buffer. When the amount of data in the buffer reaches a certain amount, an interrupt is triggered, and then the upper-level software performs a comprehensive analysis of the data to determine whether a card is present. There is a large card detection delay and a large storage space requirement. Summary of the invention
[0004] Based on this, it is necessary to provide a circuit card detection method, device, and computer equipment to address the above technical issues.
[0005] In a first aspect, the present application provides a circuit card detection method. The method comprises:
[0006] Acquire the detected fluctuation signal, and determine the range of each frame based on the duration of the non-periodic fluctuation signal in the detected fluctuation signal;
[0007] Obtaining a first amplitude average value within a current frame range and a second amplitude average value within a previous frame range, and when the first amplitude average value is greater than the second amplitude average value, changing the identifier of the current frame to a preset identifier;
[0008] Obtaining an identifier of a previous frame, and when the identifier of the previous frame is different from the identifier of the current frame, and the second amplitude average value of the previous frame is greater than a preset peak threshold, or less than a preset trough threshold, calculating the number of corresponding peaks or troughs;
[0009] When the sum of the number of the peaks and the number of the troughs is greater than a preset threshold value of the number of peaks and troughs, the circuit card detection is successful.
[0010] In one embodiment, the calculation of each frame range includes:
[0011] Acquire a non-periodic fluctuation signal from the detected fluctuation signal, acquire the fluctuation duration of the non-periodic fluctuation signal, and determine the number of sampling points based on the fluctuation duration;
[0012] The range of each frame is determined based on the number of sampling points.
[0013] In one embodiment, after calculating the number of corresponding peaks or troughs, the method further includes:
[0014] When a peak or trough is detected, the number of input data begins to be counted;
[0015] When the next trough or peak is detected, the counting stops and the current count value is saved;
[0016] The count value is the distance between adjacent peaks and valleys;
[0017] or,
[0018] After obtaining the first wave peak or wave trough, the method further comprises:
[0019] Start the timer;
[0020] After the timing duration reaches a preset timeout threshold, if the sum of the number of peaks and the number of troughs is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal;
[0021] Before the timing duration reaches the preset timeout threshold, if the sum of the number of peaks and the number of troughs is greater than the preset threshold of the number of peaks and troughs, a circuit card detection success signal is sent.
[0022] In one embodiment, the determination of the preset peak threshold and the preset trough threshold includes:
[0023] Obtaining the calculation range of each frame;
[0024] The threshold of the preset peak and the threshold of the preset trough become smaller as the calculation range of each frame becomes larger.
[0025] In a second aspect, the present application further provides a circuit card detection device, the device comprising:
[0026] A first acquisition module, configured to acquire the detected fluctuation signal, and determine the range of each frame based on the duration of the non-periodic fluctuation signal in the detected fluctuation signal;
[0027] A second acquisition module is used to acquire a first amplitude average value within a current frame range and a second amplitude average value within a previous frame range, and when the first amplitude average value is greater than the second amplitude average value, change the identifier of the current frame to a preset identifier;
[0028] A counting module, used for obtaining an identifier of a previous frame, and when the identifier of the previous frame is different from the identifier of the current frame, and when the second amplitude average value of the previous frame is greater than a preset peak threshold, or less than a preset trough threshold, calculating the number of corresponding peaks or troughs;
[0029] The detection module is used to detect that the circuit card is detected successfully when the sum of the number of the peaks and the number of the troughs is greater than a preset threshold value of the number of peaks and troughs.
[0030] In one embodiment, the calculation of each frame range includes:
[0031] Acquire a non-periodic fluctuation signal from the detected fluctuation signal, acquire the fluctuation duration of the non-periodic fluctuation signal, and determine the number of sampling points based on the fluctuation duration;
[0032] The range of each frame is determined based on the number of sampling points.
[0033] In one embodiment, after calculating the number of corresponding peaks or troughs, the device further comprises:
[0034] When a peak or trough is detected, the number of input data begins to be counted;
[0035] When the next trough or peak is detected, the counting stops and the current count value is saved;
[0036] The count value is the distance between adjacent peaks and valleys;
[0037] or,
[0038] After obtaining the first wave crest or wave trough, the device further comprises:
[0039] Start the timer;
[0040] After the timing duration reaches a preset timeout threshold, if the sum of the number of peaks and the number of troughs is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal;
[0041] Before the timing duration reaches the preset timeout threshold, if the sum of the number of peaks and the number of troughs is greater than the preset threshold of the number of peaks and troughs, a circuit card detection success signal is sent.
[0042] In one embodiment, the determination of the preset peak threshold and the preset trough threshold includes:
[0043] Obtaining the calculation range of each frame;
[0044] The threshold of the preset peak and the threshold of the preset trough become smaller as the calculation range of each frame becomes larger.
[0045] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the circuit card detection method when executing the computer program.
[0046] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the circuit card detection method when executed by a processor.
[0047] In a fifth aspect, the present disclosure further provides a computer program product, wherein the computer program product comprises a computer program, and when the computer program is executed by a processor, the steps of the circuit card detection method are implemented.
[0048] The above circuit card detection method has at least the following beneficial effects:
[0049] The embodiment scheme provided by the present disclosure determines the range of each frame according to the duration of the non-periodic fluctuation signal, which can adapt to different types of signals and improve the flexibility of detection. By calculating the average amplitude of each frame and comparing the average amplitude of the current frame with the previous frame, the peaks and troughs in the signal can be accurately detected. The peak threshold and the trough threshold can be configured according to the actual application scenario, so that the detection result is more accurate. By setting the preset peak and trough number thresholds, it can be ensured that the circuit card detection is considered successful only when a sufficient number of peaks and troughs are detected, thereby improving the reliability and accuracy of the detection.
[0050] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.
[0052] FIG1 is a diagram showing an application environment of a circuit card detection method according to an embodiment;
[0053] Figure 2 is a schematic flow chart of a circuit card detection method in one embodiment;
[0054] Figure 3 A schematic diagram of a signal curve in an embodiment;
[0055] Figure 4 A schematic diagram of a common waveform of a fluctuation signal in an embodiment;
[0056] Figure 5 is a structural block diagram of a circuit card detection device in one embodiment;
[0057] FIG6 is a diagram showing the internal structure of a computer device in one embodiment;
[0058] FIG. 7 is a diagram showing the internal structure of a server in an embodiment. DETAILED DESCRIPTION
[0059] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.
[0060] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.
[0061] The embodiment of the present disclosure provides a circuit card detection method, which can be applied in the application environment shown in Figure 1. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.
[0062] In some embodiments of the present disclosure, Figure 2 As shown, a circuit card detection method is provided, and the method is applied to the server in FIG1 to process the fluctuation signal as an example for explanation. It can be understood that the method can be applied to the server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In a specific embodiment, the method can include the following steps:
[0063] S202: Acquire the detected fluctuation signal, and determine the range of each frame based on the duration of the non-periodic fluctuation signal in the detected fluctuation signal.
[0064] The effective signal curve of a circuit card usually refers to the signal waveform received when the card reader detects a valid card. The characteristics of the effective signal curve depend on the card type. Generally, the effective signal of a circuit card will present a regular signal curve with obvious peaks and valleys, such as sine signals, cosine signals, square wave signals, etc. In the case of some IC cards (Integrated Circuit Cards) that are severely worn, have weak magnetism, or have interference signals, the waveform will have non-periodic random fluctuations, some of which are large and some are small, such as Figure 3 The non-periodic fluctuation signal in the box, Figure 3 FIG. 4 is a schematic diagram of a signal curve in an embodiment.
[0065] Non-periodic fluctuation signals may affect the judgment of peaks and troughs. A low-pass filter can be used for filtering and smoothing to remove non-periodic fluctuation signals and retain the basic trend of fluctuation signals. In the embodiment of the present disclosure, the range of each frame can be determined according to the duration of the non-periodic fluctuation signal in the detected fluctuation signal. The longer the duration of the non-periodic fluctuation signal, the larger the range of each frame. "Frame" refers to a data set within a time period in signal processing. Each frame can be regarded as a continuous sequence of signal samples. By processing these frames, the characteristics of the fluctuation signal can be more easily analyzed. Selecting a suitable frame range helps to detect circuit card signals more accurately. If the frame range is too small, it may not be able to effectively filter out noise; if the frame range is too large, although it can better smooth the fluctuation signal, it may blur the detailed features of the signal and even change the true shape of the fluctuation signal.
[0066] S204: Obtain a first amplitude average value within the current frame range and a second amplitude average value within the previous frame range, and when the first amplitude average value is greater than the second amplitude average value, change the identifier of the current frame to a preset identifier.
[0067] The peaks and troughs can be judged based on the monotonicity of the waveform. Figure 4 Schematic diagram of a common waveform of a fluctuation signal in an embodiment. Comparing the first amplitude average value B within the current frame range and the second amplitude average value A within the previous frame range, when B is greater than A, the identifier of the current frame can be changed to a preset identifier 1, and when B is less than A, the identifier of the current frame can be changed to a preset identifier 0.
[0068] S206: Obtain the identifier of the previous frame, and when the identifier of the previous frame is different from the identifier of the current frame, and the second amplitude average value of the previous frame is greater than a preset peak threshold, or less than a preset trough threshold, calculate the corresponding number of peaks or troughs.
[0069] If the identifier of the current frame is not equal to the identifier of the previous frame, and the amplitude of the previous frame is greater than the peak threshold or less than the trough threshold, it means that a peak or trough has appeared, and the corresponding number of peaks or troughs is calculated. Figure 4 As shown in the figure, if the first amplitude average value B in the current frame range is greater than the second amplitude average value A in the previous frame range, the current frame is marked as 1, and the previous frame is marked as 0. If the two are different and the second amplitude average value A in the previous frame is less than the preset trough threshold, it means that a trough appeared in the previous frame, and the total number of peaks and troughs is increased by 1. The preset peak threshold and the preset trough threshold can be configured by observing the waveform data of the actual scene. Because the supported magnetic cards are different, the peak or trough values of the waveform may differ greatly.
[0070] S208: When the sum of the number of the peaks and the number of the troughs is greater than a preset threshold value of the number of peaks and troughs, the circuit card detection is successful.
[0071] The number of peaks and troughs detected above is counted. When the sum of the number of peaks and troughs is greater than the preset threshold of the number of peaks and troughs, it is considered that the card detection is successful and an interrupt signal is generated. The interrupt signal is configured according to the actual application needs. The interrupt signal threshold is triggered based on the preset number of peaks and preset number of troughs. The larger the interrupt signal threshold, the stricter the card judgment is, and the more difficult it is for noise interference to falsely trigger the interrupt. However, it cannot be too large, because there are not many peaks and troughs in the fast card swiping scenario, and a too large threshold will result in failure to trigger the interrupt and missed detection.
[0072] In the above circuit card detection method, the range of each frame is determined according to the duration of the non-periodic fluctuation signal, which can adapt to different types of signals and improve the flexibility of detection. By calculating the average amplitude of each frame and comparing the average amplitude of the current frame with the previous frame, the peaks and troughs in the signal can be accurately detected. The peak threshold and the trough threshold can be configured according to the actual application scenario to make the detection result more accurate. By setting the preset peak and trough number threshold, it can be ensured that the circuit card detection is successful only when a sufficient number of peaks and troughs are detected, thereby improving the reliability and accuracy of the detection.
[0073] In some embodiments of the present disclosure, the calculation of each frame range includes:
[0074] Acquire a non-periodic fluctuation signal from the detected fluctuation signal, acquire the fluctuation duration of the non-periodic fluctuation signal, and determine the number of sampling points based on the fluctuation duration;
[0075] The range of each frame is determined based on the number of sampling points.
[0076] Obtain the non-periodic fluctuation signal in the detected fluctuation signal, obtain the fluctuation duration of the non-periodic fluctuation signal, determine the number of sampling points based on the fluctuation duration, and constitute the window size, that is, determine the range of each frame based on the number of sampling points. For each window, calculate the arithmetic mean of all sample values therein, and use this average value to replace the original data point at the center of the window. The window moves point by point on the signal (or moves in a step size of 1) to constitute the range of the next frame. After each movement, recalculate the average value in the window and replace the value of the center point as the amplitude average value.
[0077] In some embodiments of the present disclosure, after calculating the number of corresponding peaks or troughs, the method further includes:
[0078] When a peak or trough is detected, the number of input data begins to be counted;
[0079] When the next trough or peak is detected, the counting stops and the current count value is saved;
[0080] The count value is the distance between adjacent peaks and valleys.
[0081] After a peak or trough is detected, the number of input data starts to be counted, and the calculation stops when the next trough or peak is detected. The saved count value is the distance between adjacent peaks and troughs. The input data can be the number of sampling points, distance sequence data points, etc. between two adjacent peaks or troughs, which are used to represent the distance between peaks and troughs. Subsequent algorithms such as card decoding, card swiping speed judgment, and noise interference judgment can all use this distance information for auxiliary judgment.
[0082] In some embodiments of the present disclosure, after obtaining the first peak or trough, the method further includes:
[0083] Start the timer;
[0084] After the timing duration reaches a preset timeout threshold, if the sum of the number of peaks and the number of troughs is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal.
[0085] Sometimes, some interference noise amplitudes are large, exceeding the peak and trough thresholds, or the card signal appears for a very short time and is not a truly continuous valid signal. These signals exceed the peak and trough thresholds and trigger some counters, such as peak and trough number counts, peak and trough spacing counts, etc. These invalid counts will increase chip power consumption on the one hand, and lead to erroneous counting results on the other hand, which will affect the judgment of subsequent modules. A timeout judgment can be added, and the timeout count starts after the first peak or trough is detected. After the timing duration reaches the preset timeout threshold, if the sum of the peak and trough numbers is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal.
[0086] In some embodiments of the present disclosure, the method further includes:
[0087] Before the timing duration reaches the preset timeout threshold, if the sum of the number of peaks and the number of troughs is greater than the preset threshold of the number of peaks and troughs, a circuit card detection success signal is sent.
[0088] Before the timing reaches the preset timeout threshold, if the sum of the peaks and the troughs is greater than the preset peak and trough threshold, it means that the current signal quality is good and a circuit card detection success signal is sent.
[0089] In some embodiments of the present disclosure, the determination of the preset peak threshold and the preset trough threshold includes:
[0090] Obtaining the calculation range of each frame;
[0091] The threshold of the preset peak and the threshold of the preset trough become smaller as the calculation range of each frame becomes larger.
[0092] The number of sampling points is determined based on the duration of the non-periodic fluctuation signal, and the calculation range of each frame is determined based on the number of sampling points. The longer the duration of the non-periodic fluctuation signal is, the more sampling points there are, and the calculation range of each frame, that is, the window size, can be expanded. The larger the window, the more obvious the waveform smoothing effect, and the preset peak threshold and preset trough threshold are correspondingly reduced.
[0093] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.
[0094] Based on the same inventive concept, the embodiment of the present disclosure also provides a circuit card detection device for implementing the circuit card detection method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the circuit card detection device embodiment provided below can refer to the limitations of the circuit card detection method above, and will not be repeated here.
[0095] The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method described in the embodiments of this specification and is combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of the present disclosure is as described in the following embodiments. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.
[0096] In one embodiment, Figure 5As shown, a circuit card detection device 500 is provided, and the device may be the aforementioned server, or a module, component, device, unit, etc. integrated in the server. The device 500 may include:
[0097] A first acquisition module 502 is used to acquire the detected fluctuation signal and determine the range of each frame based on the duration of the non-periodic fluctuation signal in the detected fluctuation signal;
[0098] A second acquisition module 504 is used to acquire a first amplitude average value within a current frame range and a second amplitude average value within a previous frame range, and when the first amplitude average value is greater than the second amplitude average value, change the identifier of the current frame to a preset identifier;
[0099] The counting module 506 is used to obtain the identifier of the previous frame, and when the identifier of the previous frame is different from the identifier of the current frame, and the second amplitude average value of the previous frame is greater than a preset peak threshold, or less than a preset trough threshold, calculate the number of corresponding peaks or troughs;
[0100] The detection module 508 is configured to detect that the circuit card is detected successfully when the sum of the number of the peaks and the number of the troughs is greater than a preset threshold value of the number of peaks and troughs.
[0101] In one embodiment, the calculation of each frame range includes:
[0102] Acquire a non-periodic fluctuation signal from the detected fluctuation signal, acquire the fluctuation duration of the non-periodic fluctuation signal, and determine the number of sampling points based on the fluctuation duration;
[0103] The range of each frame is determined based on the number of sampling points.
[0104] In one embodiment, after calculating the number of corresponding peaks or troughs, the device further comprises:
[0105] When a peak or trough is detected, the number of input data begins to be counted;
[0106] When the next trough or peak is detected, the counting stops and the current count value is saved;
[0107] The count value is the distance between adjacent peaks and valleys.
[0108] In one embodiment, after obtaining the first peak or trough, the device further comprises:
[0109] Start the timer;
[0110] After the timing duration reaches a preset timeout threshold, if the sum of the number of peaks and the number of troughs is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal.
[0111] In one embodiment, the device further comprises:
[0112] Before the timing duration reaches the preset timeout threshold, when the sum of the number of peaks and the number of troughs is greater than the preset peak and trough number threshold, a circuit card detection success signal is sent.
[0113] In one embodiment, the determination of the preset peak threshold and the preset trough threshold includes:
[0114] Obtaining the calculation range of each frame;
[0115] The threshold of the preset peak and the threshold of the preset trough become smaller as the calculation range of each frame becomes larger.
[0116] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.
[0117] Each module in the circuit card detection device can be implemented in whole or in part by software, hardware, or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute operations corresponding to each module.
[0118] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be shown in FIG6 . The computer device includes a processor, a memory, and a network interface connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. 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, a computer program, and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store fluctuation signals. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, a circuit card detection method is implemented.
[0119] In one embodiment, a computer device is provided, which may be a terminal, and its internal structure diagram may be shown in FIG7. 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. 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. 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 implemented through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a circuit card detection method is implemented. The display screen of the computer device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device may be a touch layer covered on the display screen, or a key, a trackball or a touch pad set on the housing of the computer device, or an external keyboard, touch pad or mouse, etc.
[0120] Those skilled in the art will understand that the structures shown in FIG. 6 and FIG. 7 are merely block diagrams of partial structures related to the scheme of the present disclosure, and do not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figures, or combine certain components, or have a different arrangement of components.
[0121] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.
[0122] In one embodiment, a computer program product is provided, including a computer program, which implements the method described in any embodiment of the present disclosure when executed by a processor.
[0123] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.
[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above 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.
[0125] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.
Claims
1. A circuit card detection method, characterized in that: The method comprises: Acquire the detected fluctuation signal, and determine the range of each frame based on the duration of the non-periodic fluctuation signal in the detected fluctuation signal; Obtaining a first amplitude average value within a current frame range and a second amplitude average value within a previous frame range, and when the first amplitude average value is greater than the second amplitude average value, changing the identifier of the current frame to a preset identifier; Obtaining an identifier of a previous frame, and when the identifier of the previous frame is different from the identifier of the current frame, and the second amplitude average value of the previous frame is greater than a preset peak threshold, or less than a preset trough threshold, calculating the number of corresponding peaks or troughs; When the sum of the number of the peaks and the number of the troughs is greater than a preset threshold value of the number of peaks and troughs, the circuit card detection is successful.
2. The method according to claim 1, characterized in that The calculation of each frame range includes: Acquire a non-periodic fluctuation signal from the detected fluctuation signal, acquire the fluctuation duration of the non-periodic fluctuation signal, and determine the number of sampling points based on the fluctuation duration; The range of each frame is determined based on the number of sampling points.
3. The method according to claim 1, characterized in that After calculating the number of corresponding peaks or troughs, the method further includes: When a peak or trough is detected, the number of input data begins to be counted; When the next trough or peak is detected, the counting stops and the current count value is saved; The count value is the distance between adjacent peaks and valleys; or, After obtaining the first wave peak or wave trough, the method further comprises: Start the timer; After the timing duration reaches a preset timeout threshold, if the sum of the number of peaks and the number of troughs is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal; Before the timing duration reaches the preset timeout threshold, if the sum of the number of peaks and the number of troughs is greater than the preset peak and trough number threshold, a circuit card detection success signal is sent.
4. The method according to claim 1, characterized in that: The determination of the preset peak threshold and the preset trough threshold includes: Obtaining the calculation range of each frame; The threshold of the preset peak and the threshold of the preset trough become smaller as the calculation range of each frame becomes larger.
5. A circuit card detection device, characterized in that: The device comprises: A first acquisition module, configured to acquire the detected fluctuation signal, and determine the range of each frame based on the duration of the non-periodic fluctuation signal in the detected fluctuation signal; A second acquisition module is used to acquire a first amplitude average value within a current frame range and a second amplitude average value within a previous frame range, and when the first amplitude average value is greater than the second amplitude average value, change the identifier of the current frame to a preset identifier; A counting module, used for obtaining an identifier of a previous frame, and when the identifier of the previous frame is different from the identifier of the current frame, and when the second amplitude average value of the previous frame is greater than a preset peak threshold, or less than a preset trough threshold, calculating the number of corresponding peaks or troughs; The detection module is used to detect that the circuit card is detected successfully when the sum of the number of the peaks and the number of the troughs is greater than a preset threshold value of the number of peaks and troughs.
6. The device according to claim 5, characterized in that The calculation of each frame range includes: Acquire a non-periodic fluctuation signal from the detected fluctuation signal, acquire the fluctuation duration of the non-periodic fluctuation signal, and determine the number of sampling points based on the fluctuation duration; The range of each frame is determined based on the number of sampling points.
7. The device according to claim 5, characterized in that After calculating the number of corresponding peaks or troughs, the device further includes: When a peak or trough is detected, the number of input data begins to be counted; When the next trough or peak is detected, the counting stops and the current count value is saved; The count value is the distance between adjacent peaks and valleys; or, After obtaining the first wave crest or wave trough, the device further comprises: Start the timer; After the timing duration reaches a preset timeout threshold, if the sum of the number of peaks and the number of troughs is less than or equal to the preset peak and trough number threshold, the detected fluctuation signal is marked as an invalid signal; Before the timing duration reaches the preset timeout threshold, if the sum of the number of peaks and the number of troughs is greater than the preset peak and trough number threshold, a circuit card detection success signal is sent.
8. The device according to claim 5, characterized in that The determination of the preset peak threshold and the preset trough threshold includes: Obtaining the calculation range of each frame; The threshold of the preset peak and the threshold of the preset trough become smaller as the calculation range of each frame becomes larger.
9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.