Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
It should be understood that the term "and/or" as used herein is merely one type of association that describes an associated object, meaning that three relationships may exist, e.g., a and/or B may mean: a exists alone, A and B exist simultaneously, and B exists alone. In addition, the character "/" herein generally indicates that the former and latter related objects are in an "or" relationship.
The word "if" as used herein may be interpreted as "at … …" or "when … …" or "in response to a determination" or "in response to a detection", depending on the context. Similarly, the phrases "if determined" or "if detected (a stated condition or event)" may be interpreted as "when determined" or "in response to a determination" or "when detected (a stated condition or event)" or "in response to a detection (a stated condition or event)", depending on the context.
Fig. 1 is a flowchart of a first embodiment of a capacitance detection method according to the present invention, and as shown in fig. 1, an execution main body of the capacitance detection method according to the embodiment of the present invention is a capacitance detection device, and the capacitance detection device may be a personal computer, a personal digital assistant, a wireless handheld device, a tablet computer, a mobile phone, and the like having an NFC communication function. On which an application program or software for cooperating with the capacitance detection method provided by the embodiment of the present invention is installed. The capacitance detection method provided by the present embodiment includes the following steps.
Step 101, communicating with at least one NFC smart card according to a capacitance detection software communication protocol.
And 102, detecting whether the capacitance of at least one NFC intelligent card is qualified or not according to a capacitance detection software communication protocol.
Specifically, in this embodiment, the capacitance detection software communication protocol may be downloaded through the input interface of the capacitance detection device. The capacitance detection software communication protocol may be in the form of a program. The principle and the process of carrying out at least one capacitance detection are defined in the capacitance detection software communication protocol. The capacitance detection device can complete the detection of whether the capacitance of at least one NFC smart card is qualified or not by executing the capacitance detection software communication protocol.
The description is made in conjunction with steps 101-102. Specifically, in this embodiment, according to the communication protocol of the capacitance detection software, the capacitance detection device is enabled to communicate with at least one NFC smart card at the same time. The length and the opportunity of communicating are defined in the capacitance detection software communication protocol, namely, the capacitance detection device is not communicated all the time to charge the NFC intelligent card when communicating with at least one NFC intelligent card, but after communicating for a period of time, the communication connection can be recovered after the communication connection is interrupted, so that the capacitance in the NFC intelligent card has both the charging process and the discharging process, and whether the capacitance of each NFC intelligent card is qualified or not is detected.
In this embodiment, when the capacitance detection device communicates with at least one NFC smart card, the capacitance detection device sends a carrier signal to the at least one NFC smart card, so that the NFC smart card receives the carrier signal to supply power to the circuit module of the entire NFC smart card, and transmits the corresponding capacitance detection parameter to the NFC smart card. After the capacitor detection device interrupts communication with at least one NFC smart card, the capacitor in each NFC smart card discharges to ensure that the voltage in the NFC smart card keeps a stable state. After communication is interrupted for a period of time, the capacitance detection device sends carrier recovery communication to the NFC intelligent card again, after the capacitance detection device receives a carrier signal sent from the NFC intelligent card, the carrier signal is decoded and demodulated, and corresponding parameters for capacitance detection are obtained from the carrier signal. And then whether the capacitor of the corresponding NFC intelligent card is qualified or not is judged according to the parameter for capacitor detection in each NFC intelligent card.
And 103, outputting a detection result of whether the capacitance of the at least one NFC smart card is qualified.
Specifically, in this embodiment, a mode of outputting a detection result of whether the capacitance of the at least one NFC smart card is qualified is not limited, and may be, for example, a display screen, an indicator light, voice, or a mode combining at least two types of signals.
According to the capacitance detection method provided by the embodiment, communication is performed with at least one NFC smart card according to a capacitance detection software communication protocol; detecting whether the capacitance of at least one NFC intelligent card is qualified or not according to a capacitance detection software communication protocol; and outputting a detection result of whether the capacitance of the at least one NFC smart card is qualified. Because whether the capacitor of each NFC intelligent card is qualified or not is detected by adopting a communication mode with at least one NFC intelligent card, the capacitor is prevented from being detected in a contact charging mode, and the operation is simplified. And the capacitors of a plurality of NFC intelligent cards can be detected simultaneously, and the method is suitable for application of mass production detection.
Fig. 2 is a flowchart of a second embodiment of the capacitance detection method of the present invention, and as shown in fig. 2, the capacitance detection method provided in this embodiment is further detailed in steps 101 to 103 on the basis of the first embodiment of the capacitance detection method of the present invention, and then the capacitance detection method provided in this embodiment includes the following steps.
And step 201, establishing communication connection with the searched at least one NFC smart card.
It should be noted that, in the present embodiment, steps 201 to 206 are further detailed for steps 101-102 in the first embodiment of the capacitance detection method of the present invention.
In this embodiment, before detecting at least one NFC smart card, the NFC smart card is placed near the capacitance detection device, so that the capacitance detection device can search for the NFC smart card and establish NFC communication connection with the NFC smart card.
Specifically, in this embodiment, the capacitance detection device includes an NFC read-write module, where the NFC read-write module includes at least one NFC read-write unit, and each NFC read-write unit includes: NFC antenna and NFC read-write control unit. In this embodiment, the at least one NFC read-write unit may be turned on, and the NFC read-write control unit in the at least one NFC read-write unit controls the NFC antenna to operate in the reader-writer mode. And searching the NFC smart card, and establishing communication connection with the searched corresponding NFC smart card.
Step 202, sending a first carrier signal to at least one NFC smart card, where the first carrier signal carries an instruction for writing a static variable, so as to write the static variable into the at least one NFC smart card.
Specifically, in this embodiment, each NFC antenna sends a first carrier signal to a corresponding NFC smart card, where the first carrier signal is a carrier signal after code modulation, and the first carrier signal carries an instruction for writing a static variable, so that the NFC smart card receives the first carrier signal, and a smart card control module in the NFC smart card performs decoding and demodulation, and after determining that the instruction in the first carrier signal is the instruction for writing the static variable, writes the static variable into a smart card storage module, and stores the static variable.
The static variable is a constant, and the value of the static variable cannot be changed under the condition that a circuit module of the NFC smart card normally works.
And step 203, interrupting the communication connection with the at least one NFC smart card until the communication connection with the at least one NFC smart card is recovered after a preset time period.
Specifically, in this embodiment, the communication connection with the at least one NFC smart card is interrupted until a preset time period, and if the capacitor in the NFC smart card is qualified, the circuit module in the NFC smart card is discharged, so that the circuit module of the NFC smart card is still in a normal operating state. The value of the static variable written into the storage module of the smart card cannot be changed, if the capacitor in the NFC smart card is unqualified, the circuit module in the NFC smart card cannot be discharged or the discharge time is short, so that the circuit module of the NFC smart card cannot be in a normal working state within a preset time period, after the NFC smart card stops working, when communication is recovered again, the static variable can be initialized, and the read and written static variables can be inconsistent. In this embodiment, after communication connection with at least one NFC smart card is recovered, and after the NFC smart card receives a carrier signal, an NFC antenna unit in an NFC antenna module in the NFC smart card receives the carrier signal, and an electric energy capture unit captures electric energy from the received carrier signal to supply power to a circuit structure of the entire NFC smart card, and if a capacitor in the NFC smart card is a qualified capacitor, the electric energy is received, and the capacitor is charged.
Wherein the preset time period is calculated according to the capacitance value of the capacitor. The capacitor in the NFC intelligent card can be ensured to provide stable power supply for the circuit module in the NFC intelligent card within the preset time period.
And 204, sending a second carrier signal to the at least one NFC smart card, wherein the second carrier signal carries an instruction for reading the static variable, so that the at least one NFC smart card reads the static variable.
Specifically, in this embodiment, after the communication connection with the at least one NFC smart card is recovered, a second carrier signal is sent to the at least one NFC smart card, the second carrier signal is a carrier signal after the device control module performs coding modulation, and the second carrier signal carries an instruction for reading a static variable, so that after the NFC antenna module of the NFC smart card receives the second carrier signal, the smart card control module performs decoding demodulation on the second carrier signal, and after it is determined that the instruction in the second carrier signal is an instruction for reading a static variable, reads the static variable from the storage module, and codes and modulates the static variable into a third carrier signal, and sends the third carrier signal to the capacitance detection device through the NFC antenna module.
Step 205, receiving a third carrier signal sent by at least one NFC smart card, where the third carrier signal carries a static variable read from the NFC smart card.
Specifically, after the NFC antenna in the capacitance detection device receives the third carrier signal, the device control module decodes and demodulates the third carrier signal to obtain the static variable read from the NFC smart card and carried in the third carrier signal.
Step 206, determining whether the static variable written into the at least one NFC smart card is consistent with the static variable read from the corresponding NFC smart card, if yes, performing step 207, otherwise, performing step 208.
And step 207, determining that the capacitor corresponding to the NFC smart card is qualified.
And step 208, determining that the capacitor corresponding to the NFC smart card is unqualified.
It should be noted that steps 206-208 are further refinements of step 102 in the first embodiment of the capacitance detection method of the present invention.
Further, the description is made in connection with steps 206-208. In this embodiment, a first device determining unit in a device control module in the capacitance detecting device determines whether a static variable written in to at least one NFC smart card is consistent with a static variable read from a corresponding NFC smart card, and if the static variable written in to the NFC smart card is consistent with the static variable read from the corresponding NFC smart card, it indicates that, until a preset time period, communication connection with the at least one NFC smart card is interrupted, a capacitor in the NFC smart card can normally discharge, and the discharge time satisfies a capacitance value of the capacitor, and it can be ensured that a stable voltage can be provided for a circuit module in the NFC smart card in the preset time period, and it is determined that the capacitor corresponding to the NFC smart card is qualified. If the static variable written into the NFC intelligent card is inconsistent with the static variable read from the corresponding NFC intelligent card, the fact that the capacitor in the NFC intelligent card cannot normally discharge or the discharge time does not meet the capacitance value of the capacitor is indicated, the fact that stable voltage is provided for a circuit module in the NFC intelligent card within a preset time period cannot be guaranteed, and the fact that the capacitor corresponding to the NFC intelligent card is unqualified is determined.
And step 209, outputting a detection result of whether the capacitance of the at least one NFC smart card is qualified.
Further, in this embodiment, the detection result of whether the capacitor is qualified is output through one or more of a display, an indicator light, and a voice.
Specifically, when the display outputs the detection result of whether the capacitor is qualified, the unqualified result and the qualified result of the capacitor detection can be respectively displayed through 0 and 1. When the detection result of whether the capacitor is qualified or not is output through the indicator lamp, the unqualified result and the qualified result of the capacitor detection can be respectively represented through the red lamp and the green lamp. When the detection result of whether the capacitor is qualified is output through voice, the detection result of whether the capacitor is qualified or not can be played through the loudspeaker.
And when the detection result of whether the capacitor is qualified or not is output in any of a plurality of modes of a display, an indicator light and voice, the detection result of whether the capacitor is qualified or not is output in a plurality of selected modes.
The capacitance detection method provided in this embodiment, according to a capacitance detection software communication protocol, establishes a communication connection with at least one NFC smart card that is searched, sends a first carrier signal to the at least one NFC smart card, where the first carrier signal carries an instruction to write a static variable, so that the at least one NFC smart card writes the static variable, interrupts the communication connection with the at least one NFC smart card until a preset time period, resumes the communication connection with the at least one NFC smart card, sends a second carrier signal to the at least one NFC smart card, where the second carrier signal carries an instruction to read the static variable, so that the at least one NFC smart card reads the static variable, receives a third carrier signal sent by the at least one NFC smart card, where the third carrier signal carries the static variable read from the NFC smart card, and determines whether the static variable written to the at least one NFC smart card and the static variable read from the corresponding NFC smart card are consistent, and if so, determining that the capacitor corresponding to the NFC intelligent card is qualified, otherwise, determining that the capacitor corresponding to the NFC intelligent card is unqualified, and outputting a detection result whether the capacitor of at least one NFC intelligent card is qualified. Not only can the simplified operation, can detect the electric capacity of a plurality of NFC smart cards simultaneously, be fit for the application that mass production detected to whether can be qualified to electric capacity effectively detect, improved the accuracy that detects.
Fig. 3 is a flowchart of a third embodiment of the capacitance detection method of the present invention, and the capacitance detection method provided in this embodiment is based on the second embodiment of the capacitance detection method of the present invention, and further includes a step of determining whether an abnormality occurs in a capacitance detection process in the capacitance detection process, and a step of selecting a number of detected capacitances through a user input interface by a user. The capacitance detection method provided by the present embodiment includes the following steps.
At least one NFC reader unit, selected by a user via a user input interface, for communicating with at least one NFC smartcard is received, step 301.
Specifically, in this embodiment, the user input interface includes: keys, buttons or virtual keys, selection wheels or other input interfaces that may be used for operational control. The user input interface comprises a user selection switch, at least one NFC reading unit which is selected by a user through the user selection switch and communicates with at least one NFC smart card is received, and the selection of the capacitance detection number is realized through the selection of the NFC reading unit.
Step 302, receiving a start instruction of a user through a user input interface power switch and a capacitance detection switch, and starting capacitance detection.
In this embodiment, the user input interface further includes: a power switch and a capacitance detection start switch. And starting the power supply module through the power switch to supply power for the capacitance detection device. And starting the capacitance detection device through the capacitance detection starting switch, executing the capacitance detection method, and carrying out capacitance detection.
Step 303, determining whether a communication connection is successfully established with the searched at least one NFC smart card, if so, executing step 304, otherwise, executing step 313.
Step 304, sending a first carrier signal to the at least one NFC smart card, where the first carrier signal carries an instruction for writing a static variable, so as to write the static variable into the at least one NFC smart card.
Further, in this embodiment, after the NFC antenna of the at least one NFC reading unit completes the search of the at least one NFC smart card, a communication connection is established with the corresponding NFC smart card, and it is determined whether the communication connection is successfully established with the at least one NFC smart card that has been searched, if so, a first carrier signal is sent to the at least one NFC smart card, where the first carrier signal carries an instruction for writing a static variable in order to write the static variable in the at least one NFC smart card, and otherwise, an abnormal operating state of capacitance detection is output.
In step 305, it is determined whether the NFC smart card successfully writes the static variable, if yes, step 306 is executed, otherwise, step 313 is executed.
And step 306, interrupting the communication connection with the at least one NFC smart card until the communication connection with the at least one NFC smart card is recovered after a preset time period.
Further, in this embodiment, whether the written-in static variable exists in the storage module may be determined by the smart card control module of the NFC smart card, and whether the writing of the static variable by the NFC smart card is successful is determined by sending a message indicating success or failure of writing the static variable to the capacitance detection device, and if it is determined that the writing of the static variable by the NFC smart card is successful, the communication connection with the at least one NFC smart card is interrupted until the communication connection with the at least one NFC smart card is recovered after a preset time period, otherwise, an abnormal operating state of capacitance detection is output.
The writing of the static variable success message to the capacitance detection device can be performed in a manner that the message carries zero, and the writing of the static variable failure message to the capacitance detection device can be performed in a manner that the message carries non-zero.
Step 307, sending a second carrier signal to the at least one NFC smart card, where the second carrier signal carries an instruction for reading the static variable, so that the at least one NFC smart card reads the static variable.
308, receiving a third carrier signal sent by at least one NFC smart card, judging whether the static variable is successfully read from the NFC smart card, if so, executing step 309, otherwise, executing step 313
Further, a third carrier signal sent by the at least one NFC smart card is received, the device control module decodes and demodulates the third carrier signal, and if the third carrier signal carries the static variable read from the NFC smart card, it indicates whether the static variable read from the NFC smart card is successful, and determines whether the static variable written into the at least one NFC smart card is consistent with the static variable read from the corresponding NFC smart card. Otherwise, outputting the abnormal working state detected by the capacitor.
Step 309, determining whether the static variable written into the at least one NFC smart card is consistent with the static variable read from the corresponding NFC smart card, if yes, performing step 310, otherwise, performing step 311.
It should be noted that, step 303, step 305, and step 308 are steps of determining whether the capacitance detection process is abnormal, and if the capacitance detection process is abnormal, outputting an abnormal operating state of the capacitance detection, otherwise, outputting a normal operating state of the capacitance detection.
And step 310, determining that the capacitor of the corresponding NFC smart card is qualified.
And 311, determining that the capacitor corresponding to the NFC smart card is unqualified.
In this embodiment, the implementation manners of steps 309 to 311 are the same as the implementation manners of steps 206 to 208 in the second embodiment of the capacitance detection method of the present invention, and are not described in detail herein.
And step 312, outputting a detection result of whether the capacitor of the at least one NFC smart card is qualified or not in the normal working state of the capacitor detection.
And 313, outputting the abnormal working state of the capacitor detection.
Further, in this embodiment, the detection result of whether the capacitor is qualified or not and the normal or abnormal working state of the capacitor detection are output through one or more modes of a display, an indicator light and voice.
Specifically, in this embodiment, the detection result of whether the output capacitor of the display is qualified and the normal or abnormal working state of the capacitor detection are specifically: and if the capacitance detection process is normal, directly displaying the detection result of the unqualified capacitor and the detection result of the qualified capacitor through 0 and 1 respectively. If the capacitance detection is abnormal, a 'fall' is displayed to indicate the abnormal working state of the capacitance detection. The detection result of whether the output capacitor is qualified or not by adopting the indicator lamp and the normal or abnormal working state of the capacitor detection are specifically as follows: one or two indicator lamps can be adopted to output a detection result of whether the capacitor is qualified and a normal or abnormal working state of the capacitor detection, when one indicator lamp is adopted, if the capacitor detection is abnormal, a user is reminded in a red lamp flashing mode, if the capacitor detection is normal, the indicator lamp does not flash, and the red lamp and the green lamp respectively represent the detection result of the capacitor which is unqualified and the qualified detection result; when two indicator lights are adopted, one indicator light respectively represents the working state of capacitance detection through the red light and the green light, and the other indicator light respectively represents the unqualified detection result and the qualified detection result of the capacitance through the red light and the green light. And a voice mode is adopted, and the working state of the capacitance detection and the detection result of the capacitance are prompted to a user in a mode of playing voice through a loudspeaker.
According to the capacitance detection method provided by the embodiment, at least one NFC reading unit which is selected by a user through a user input interface and communicates with at least one NFC intelligent card is received, the detected number of the NFC intelligent cards can be automatically selected, whether the communication connection established with the at least one searched NFC intelligent card is successful or not is judged, whether the static variable written in by the NFC intelligent card is successful or not is judged, whether the static variable read from the NFC intelligent card is successful or not is judged, if the static variable is unsuccessful, the abnormal working state of capacitance detection is output, otherwise, the normal working state of the capacitance detection is output, when the capacitance detection is abnormal, a prompt can be given to the user, and then the capacitance detection device can be maintained in time.
Fig. 4 is a flowchart of a fourth embodiment of the capacitance detection method of the present invention, and as shown in fig. 4, an execution main body of the present embodiment is an NFC smart card, and the capacitance detection method provided in the present embodiment includes the following steps.
Step 401, storing the read-write communication protocol and the written capacitance detection parameters.
Specifically, in this embodiment, the read-write communication protocol may be stored in a form of a program, and the read-write communication protocol defines a principle and a flow for reading and writing. The read-write communication protocol corresponds to a capacitance detection software communication protocol in a device memory module in the capacitance detection device.
And 402, controlling the NFC antenna module to communicate with the capacitance detection device according to the read-write communication protocol.
Specifically, in this embodiment, by executing the read-write communication protocol, the NFC antenna module may be controlled to communicate with the capacitance detection device, and in the process of communicating with the capacitance detection device, read-write of a parameter of capacitance detection is completed, the parameter of capacitance detection is stored, and the parameter of capacitance detection is transmitted, so that the capacitance detection device detects whether the capacitance is qualified according to the parameter of capacitance detection.
In the capacitance detection method provided by this embodiment, the read-write communication protocol and the written capacitance detection parameters are stored; and controlling the NFC antenna module to communicate with the capacitance detection device according to the read-write communication protocol. Because whether the capacitor of each NFC intelligent card is qualified or not is detected by adopting a communication mode with the NFC intelligent cards, the detection of the capacitor is avoided by a contact charging mode, and the operation is simplified. And the capacitors of a plurality of NFC intelligent cards can be detected simultaneously, and the method is suitable for application of mass production detection.
Fig. 5 is a flowchart of a fifth embodiment of the capacitance detection method of the present invention, and as shown in fig. 5, the capacitance detection method provided in this embodiment further refines step 102 on the basis of the fourth embodiment of the capacitance detection method of the present invention, so that the capacitance detection method provided in this embodiment includes the following steps.
Step 501, storing a read-write communication protocol.
In this embodiment, the implementation manner of step 501 is the same as the implementation manner of step 401 in the fourth embodiment of the capacitance detection method of the present invention, and details are not repeated here.
Step 502, establishing a communication connection with a capacitance detection device.
It should be noted that, in this embodiment, steps 502 to 508 are further detailed for step 402 in the fourth embodiment of the capacitance detection method of the present invention.
Step 503, receiving the first carrier signal sent by the capacitance detection device, and capturing electric energy from the first carrier signal to supply power to the NFC smart card.
Further, in this embodiment, after establishing the NFC communication connection with the capacitance detection device, the carrier signal sent by the NFC antenna in a certain NFC read-write unit of the capacitance detection device is received, and first the carrier signal is received, the electric energy capture unit of the NFC antenna module captures electric energy through the first carrier signal to supply power to each circuit module of the NFC smart card, and if the capacitance of the NFC smart card is a qualified capacitance, in a process of supplying power to each circuit module of the NFC smart card, it is ensured that each circuit module is in a normal operating state.
And step 504, decoding and demodulating the first carrier signal, and writing the static variable into the smart card storage module according to the instruction for writing the static variable carried in the first carrier signal.
Further, in this embodiment, the first carrier signal is a signal subjected to code modulation, and the first carrier signal carries an instruction for writing a static variable, so that the smart card control module of the NFC smart card decodes and demodulates the first carrier signal to obtain the control instruction, and if the control instruction is an instruction for writing a static variable, writes the static variable into the storage module, and stores the static variable.
And 505, interrupting the communication connection with the capacitance detection device, and discharging the capacitance within the interrupted preset time period until the communication connection with the capacitance detection device is restored.
Further, in this embodiment, if it is monitored that the capacitance detection device does not send the first carrier signal any more, it is indicated that the communication connection with the capacitance detection device is interrupted, and in order to ensure normal operation of the NFC smart card, if the capacitance in the NFC smart card is a qualified capacitance, the capacitance is discharged within a preset time period during which the communication connection is interrupted to ensure stable power supply for the circuit module. And if the condition that the capacitance detection device recovers the communication connection is monitored, the electric energy capturing unit supplies power to the circuit module of the NFC intelligent card again.
The preset time period is calculated through the capacitance value of the capacitor.
And step 506, receiving a second carrier signal sent by the capacitance detection device, and capturing electric energy from the second carrier signal to supply power to the NFC smart card.
And 507, decoding and demodulating the second carrier signal, and reading the static variable from the smart card storage module according to the instruction for reading the static variable carried in the second carrier signal.
And step 508, carrying the read static variable in a third carrier signal, performing code modulation on the third carrier signal, and sending the third carrier signal to the capacitance detection device.
Further, the description is made in connection with steps 506 to 508. In this embodiment, after the NFC smart card recovers the communication connection with the capacitance detection device, a second carrier signal sent by the capacitance detection device is received, where the second carrier signal is a signal after code modulation, a smart card control module of the NFC smart card decodes and demodulates the second carrier signal to obtain a control instruction in the second carrier signal, if it is determined that the control instruction is a command to read a static variable, a static variable is read from a storage module, the read static variable is carried in a third carrier signal, the code modulation is performed on the third carrier signal, and the control instruction is sent to an NFC antenna corresponding to an NFC reading unit corresponding to the capacitance detection device, so that the device control module in the capacitance detection device compares the static variable written into at least one NFC smart card with the static variable read from the corresponding NFC smart card, and determines whether the static variable written into the NFC smart card and the static variable read from the corresponding NFC smart card are consistent to detect the corresponding NFC smart card Whether the capacitance of the energy card is qualified or not.
The capacitance detection method provided by this embodiment establishes a communication connection with a capacitance detection device through a storage read-write communication protocol, receives a first carrier signal sent by the capacitance detection device, captures electrical energy from the first carrier signal to power an NFC smart card, decodes and demodulates the first carrier signal, writes a static variable into a smart card storage module according to an instruction for writing the static variable carried in the first carrier signal, interrupts the communication connection with the capacitance detection device, discharges a capacitor within an interrupted preset time period until the communication connection with the capacitance detection device is restored, receives a second carrier signal sent by the capacitance detection device, captures electrical energy from the second carrier signal to power the NFC smart card, decodes and demodulates the second carrier signal, reads the static variable from the smart card storage module according to an instruction for reading the static variable carried in the second carrier signal, the static variable that will read carries in the third carrier signal, carries out code modulation to the third carrier signal, sends for electric capacity detection device, not only can the simplified operation, can detect the electric capacity of a plurality of NFC smart cards simultaneously, is fit for the application that mass production detected to whether can be qualified to the electric capacity and effectively detect, improved the accuracy that detects.
Fig. 6 is a flowchart of a sixth embodiment of the capacitance detection method of the present invention, and as shown in fig. 6, the capacitance detection method provided in this embodiment further includes a step of determining whether writing of the static variable is successful on the basis of the fifth embodiment of the capacitance detection method of the present invention, and then the capacitance detection method provided in this embodiment includes the following steps.
Step 601, storing a read-write communication protocol.
Step 602, establishing a communication connection with a capacitance detection device.
Step 603, receiving the first carrier signal sent by the capacitance detection device, and capturing electric energy from the first carrier signal to supply power to the NFC smart card.
And step 604, decoding and demodulating the first carrier signal, and writing the static variable into a storage module according to the instruction for writing the static variable carried in the first carrier signal.
In this embodiment, the implementation manners of steps 601 to 604 are the same as the implementation manners of steps 501 to 504 in the first embodiment of the capacitance detection method of the present invention, and are not described in detail herein.
Step 605, determine whether the writing of the static variable is successful, if yes, execute step 606, otherwise execute step 607.
Step 606, sending a message that writing the static variable is successful to the capacitance detection device.
After step 606 is performed, step 608 is performed.
Step 607, sending a message that writing the static variable fails to the capacitance detection device.
After step 607 is executed, the process ends.
Further, in this embodiment, whether writing the static variable is successful is determined, and if it is determined that writing the static variable is successful, a message that writing the static variable is successful is sent to the capacitance detection device; and if the static variable writing fails, sending a message of the failure of the static variable writing to the capacitance detection device, so that the capacitance detection device judges the working state of the capacitance detection according to the received message of the failure of the static variable writing or the message of the success of the static variable writing.
And 608, interrupting the communication connection with the capacitance detection device, and discharging the capacitance within the interrupted preset time period until the communication connection with the capacitance detection device is restored.
And step 609, receiving a second carrier signal sent by the capacitance detection device, and capturing electric energy from the second carrier signal to supply power to the NFC smart card.
And step 610, decoding and demodulating the second carrier signal, and reading the static variable from the storage module according to the instruction for reading the static variable carried in the second carrier signal.
And 611, carrying the read static variable in a third carrier signal, performing code modulation on the third carrier signal, and sending the third carrier signal to the capacitance detection device.
In this embodiment, the implementation manners of step 609 to step 611 are the same as the implementation manners of step 505 to step 508 in the fifth embodiment of the capacitance detection method of the present invention, and are not described in detail here.
In the capacitance detection method provided in this embodiment, whether writing of the static variable is successful is determined, and if yes, a message that writing of the static variable is successful is sent to the capacitance detection device. Otherwise, sending a message of failure in writing the static variable to the capacitance detection device. The capacitor detection device can judge the working state of capacitor detection according to the message of success or failure of writing the static variable, and can give a prompt to a user when the capacitor detection is abnormal, so that the capacitor detection device can be maintained in time.
Those of ordinary skill in the art will understand that: all or a portion of the steps of implementing the above-described method embodiments may be performed by hardware associated with program instructions. The foregoing program may be stored in a readable storage medium. When executed, the program performs steps comprising the method embodiments described above; and the aforementioned storage medium includes: various media that can store program codes, such as ROM, RAM, magnetic or optical disks.
Fig. 7 is a schematic structural diagram of a capacitance detection device according to a first embodiment of the present invention, and as shown in fig. 7, the capacitance detection device according to the present embodiment includes: a device control module 71, an NFC read-write module 72 connected to the device control module 71, and an output module 73.
The NFC read-write module 72 is configured to communicate with at least one NFC smart card according to a capacitance detection software communication protocol. And the device control module 71 is configured to control the NFC read-write module to communicate with the at least one NFC smart card according to the capacitance detection software communication protocol and detect whether the capacitance of the at least one NFC smart card is qualified. And the output module 73 is configured to output a detection result of whether the capacitance of the at least one NFC smart card is qualified.
Specifically, in this embodiment, the NFC read-write module 72 and the device control module 71 may be configured as two independent circuit modules, or may be configured as a single circuit module sharing a part of the circuit, and may be implemented by only using an integrated circuit, or by using an integrated circuit and a discrete device, or by using an integrated circuit and a single chip microcomputer, to construct functions of the whole circuit. The output module 73 may include a display, an indicator light, a speaker, and the like.
The capacitance detection apparatus provided in this embodiment may implement the technical solution of the method embodiment shown in fig. 1, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 8 is a schematic structural diagram of a second embodiment of the capacitance detection device of the present invention, and as shown in fig. 8, the capacitance detection device provided in this embodiment further includes an input module 81 and a power module 82 on the basis of the first embodiment of the capacitance detection device of the present invention.
Further, the power module 82 is electrically connected to the input module 81, the NFC read-write module 72, the device control module 71, and the output module 73, respectively.
The power module 82 is configured to supply power to the input module 81, the NFC read-write module 72, the device control module 71, and the output module 73.
Further, the NFC read-write module 72 includes: at least one NFC read-write unit 721, each NFC read-write unit 721 includes: the NFC antenna 721a and the NFC read-write control unit 721b are electrically connected, and the NFC antenna 721a and the NFC read-write control unit 721b are electrically connected. Of these, only two NFC read-write units 721 are illustrated in fig. 8.
Wherein NFC antenna 721a is configured to: under the control of the NFC read-write control unit 721b, establishing a communication connection with the at least one searched NFC smart card, and sending a first carrier signal to the at least one NFC smart card, where the first carrier signal carries an instruction for writing a static variable, so as to write the static variable into the at least one NFC smart card; interrupting the communication connection with the at least one NFC smart card until the communication connection with the at least one NFC smart card is recovered after a preset time period; sending a second carrier signal to at least one NFC smart card, wherein the second carrier signal carries an instruction for reading a static variable, so that the at least one NFC smart card reads the static variable; and receiving a third carrier signal sent by at least one NFC smart card, wherein the third carrier signal carries the static variable read from the NFC smart card. And an NFC read-write control unit 721b, configured to control the NFC antenna to communicate with the corresponding NFC smart card.
Further, the device control module 71 includes: a device control unit 711, a device storage unit 712, and a first device judgment unit 713.
The device control unit 711 is electrically connected to the device storage unit 712 and the first device judgment unit 713.
Wherein the device control unit 711 is configured to: the capacitance detection software communication protocol input by the input module 81 is received, stored in the device storage unit 712, and controls the NFC read-write module 72 to communicate with at least one NFC smart card according to the capacitance detection software communication protocol. A device storage unit 712 for storing a capacitance detection software communication protocol. A first device determination unit 713 configured to determine whether the static variable written to the at least one NFC smart card and the static variable read from the corresponding NFC smart card are consistent; if the static variable written into the NFC smart card is consistent with the static variable read from the corresponding NFC smart card, determining that the capacitor of the corresponding NFC smart card is qualified; and if the static variable written into the NFC smart card is inconsistent with the static variable read from the corresponding NFC smart card, determining that the capacitor corresponding to the NFC smart card is unqualified.
Further, the input module 81 includes: a capacitance detection software communication protocol interface 811, and a user input interface 812. The user input interface 812 includes a user selection switch 812 a.
The capacitance detection software communication protocol interface 811 is configured to: inputting a capacitance detection software communication protocol. User selection switch 812a is used to: at least one NFC reading unit 721 in communication with the at least one NFC smartcard is received, selected by the user via the user input interface.
Further, the user input interface 812 further includes: a power switch 812b and a capacitance detection start switch 812 c.
The power switch 812b is electrically connected to the power module 81, and the capacitance detection start switch 812c is electrically connected to the device control module 71.
The power switch 812b is used to: the power supply module 81 is activated so that the power supply module 81 supplies power to the input module 81, the NFC read-write module 72, the device control module 71, and the output module 73. Capacitance detection start switch 812c is used to: the capacitance detection device is activated.
Further, the device control module 71 further includes: a second device judgment unit 714.
Wherein the second device determining unit 714 is configured to: and judging whether the capacitance detection process is abnormal or not. Accordingly, the output module 74 is further configured to output the detected normal or abnormal operation status of the capacitor.
Further, the second device determining unit 714 is specifically configured to: judging whether the communication connection established with the searched at least one NFC smart card is successful or not; judging whether the NFC intelligent card successfully writes the static variable; and judging whether the static variable is successfully read from the NFC smart card.
Further, the output module may include any one or more of a display, an indicator light, and a speaker.
The capacitance detection apparatus provided in this embodiment may implement the technical solutions of the method embodiments shown in fig. 2 and fig. 3, and the implementation principles and technical effects are similar, which are not described herein again.
Fig. 9 is a schematic structural diagram of an NFC smart card according to an embodiment of the present invention, and as shown in fig. 9, the NFC smart card provided in this embodiment includes: a smart card control module 91, and a storage module 92 and an NFC antenna module 93 connected to the smart card control module 91.
Wherein the storage module 92 is configured to: and storing the read-write communication protocol and the written capacitance detection parameters. The NFC antenna module 93 is configured to: communicating with a capacitance detection device. The smart card control module 91 is configured to: and controlling the NFC antenna module to communicate with the capacitance detection device according to the read-write communication protocol.
Specifically, in this embodiment, the NFC antenna module 93 and the smart card control module 91 may be configured as two independent circuit modules, or may be configured as a single circuit module sharing a part of a circuit, and the functions of the whole circuit may be configured in an implementation manner of only using an integrated circuit, or in an implementation manner of combining an integrated circuit and a discrete device, or in an implementation manner of combining an integrated circuit and a single chip microcomputer. The memory module 92 may be implemented by using a nonvolatile memory device such as an EEPROM, an EPROM, a FLASH, a ferroelectric memory, or a phase change memory, or may be implemented by using a combination of one or more of a volatile memory such as a register, a temporary memory, and a RAM, and at least one of the above nonvolatile memories.
The NFC smart card provided in this embodiment may execute the technical solution of the method embodiment shown in fig. 4, and the implementation principle and the technical effect are similar, which are not described herein again.
Fig. 10 is a schematic structural diagram of an NFC smart card according to a second embodiment of the present invention, and as shown in fig. 10, the NFC smart card according to this embodiment further includes the following features based on the first embodiment of the NFC smart card according to the present invention.
Further, the NFC antenna module 93 includes: a power acquisition unit 931 and an NFC antenna unit 932. The smart card control module 91 includes: the smartcard control unit 911.
NFC antenna unit 932 is configured to: establishing a communication connection with a capacitance detection device; and receiving a first carrier signal sent by the capacitance detection device. The electric energy capturing unit 931 is configured to: power is captured from a first carrier signal received by the NFC antenna unit to power the NFC smart card. The smartcard control unit 911 is configured to: the first carrier signal is decoded and demodulated, and the static variable is written into the storage module 92 according to the instruction for writing the static variable carried in the first carrier signal. NFC antenna unit 932 is also configured to: and receiving a second carrier signal sent by the capacitance detection device. The power capturing unit 931 is also configured to: capturing power from the second carrier signal received by the NFC antenna unit to power the NFC smart card. The smartcard control unit 911 is further adapted to: decoding and demodulating the second carrier signal, and reading the static variable from the storage module 92 according to the instruction for reading the static variable carried in the second carrier signal; and carrying the read static variable in a third carrier signal, and carrying out coding modulation on the third carrier signal. NFC antenna unit 932 is also configured to: and sending the code-modulated third carrier signal to the capacitance detection device.
Further, the smart card control module 91 further includes: a smart card determination unit 912.
The smart card determining unit 912 is configured to: and judging whether the static variable is successfully written. NFC antenna unit 932 is also configured to: if the static variable is determined to be successfully written, sending a message that the static variable is successfully written to the capacitance detection device; and if the static variable is determined to fail to be written, sending a message of failure in writing the static variable to the capacitance detection device.
The NFC smart card provided in this embodiment may execute the technical solutions of the method embodiments shown in fig. 5 and fig. 6, and the implementation principles and technical effects are similar, and are not described herein again.
Finally, it should be noted that: the above embodiments are only used to illustrate the technical solution of the present invention, and not to limit the same; while the invention has been described in detail and with reference to the foregoing embodiments, it will be understood by those skilled in the art that: the technical solutions described in the foregoing embodiments may still be modified, or some or all of the technical features may be equivalently replaced; and the modifications or the substitutions do not make the essence of the corresponding technical solutions depart from the scope of the technical solutions of the embodiments of the present invention.