CN113053020A - Bill thickness detection method and device, computer equipment and storage medium - Google Patents

Bill thickness detection method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN113053020A
CN113053020A CN201911375002.8A CN201911375002A CN113053020A CN 113053020 A CN113053020 A CN 113053020A CN 201911375002 A CN201911375002 A CN 201911375002A CN 113053020 A CN113053020 A CN 113053020A
Authority
CN
China
Prior art keywords
bill
data
target
background
detected
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911375002.8A
Other languages
Chinese (zh)
Inventor
周东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Original Assignee
Shenzhen Yihua Computer Co Ltd
Shenzhen Yihua Time Technology Co Ltd
Shenzhen Yihua Financial Intelligent Research Institute
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Yihua Computer Co Ltd, Shenzhen Yihua Time Technology Co Ltd, Shenzhen Yihua Financial Intelligent Research Institute filed Critical Shenzhen Yihua Computer Co Ltd
Priority to CN201911375002.8A priority Critical patent/CN113053020A/en
Publication of CN113053020A publication Critical patent/CN113053020A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G07CHECKING-DEVICES
    • G07DHANDLING OF COINS OR VALUABLE PAPERS, e.g. TESTING, SORTING BY DENOMINATIONS, COUNTING, DISPENSING, CHANGING OR DEPOSITING
    • G07D7/00Testing specially adapted to determine the identity or genuineness of valuable papers or for segregating those which are unacceptable, e.g. banknotes that are alien to a currency
    • G07D7/16Testing the dimensions
    • G07D7/164Thickness

Abstract

The invention relates to a method for detecting bill thickness, which comprises the following steps: acquiring target background data, acquiring target bill data, and acquiring a preset background threshold and a preset bill threshold in a preset threshold set; calculating to obtain target acquisition data according to the target background data and the target bill data; judging whether the target background data meets the background requirement or not according to a preset background threshold value, and judging whether the target collected data meets the bill requirement or not according to a preset bill threshold value; and determining whether the bill to be detected is abnormal according to the judgment result. By determining whether the acquired target background data and target bill data respectively meet the background requirement and the bill requirement, the thickness data of bills can be accurately detected, and the overlapping condition of bills with different thicknesses can be fully and reliably detected, so that the bank can be prevented from being lost. In addition, a bill thickness detection device, computer equipment and a storage medium are also provided.

Description

Bill thickness detection method and device, computer equipment and storage medium
Technical Field
The invention relates to the technical field of electronic testing, in particular to a bill thickness detection method and device, computer equipment and a storage medium.
Background
With the gradual use of the bill module, in the existing business, after basic information of a customer is audited by equipment and a bank background, a bill box with a blank bill in advance sends bills with a fixed quantity, then corresponding selling information is printed through a thermal transfer printer, finally the bill box is taken out and confirmed by the customer, the background can be reserved, the transaction is completed after the confirmation is correct, and the transaction can be completed by one person simultaneously guiding and butting a plurality of equipment for simultaneous operation.
Because there are different types of tickets, for example: deposit receipt, check, business committee and the like, and the difference of the thickness of the bill is directly caused by the difference of paper or material used by different types of bills; structurally, bills with different thicknesses are required to be separated from each other by the bill separating mechanism for printing, but due to equipment aging, abrasion of a separating module and the like, a plurality of overlapped bills can be separated at a certain time, so that bill thickness data detection is inaccurate; or because the added bills are newer, a plurality of bills are easily adsorbed together and separated, and finally the problem that the bills cannot be detected out is solved. If the client takes the duplicated bills for illegal benefit acquisition without finding the duplicated bills in time, huge economic loss of the bank can be directly caused.
Disclosure of Invention
Based on the method, the device, the computer equipment and the storage medium, the thickness data of the bills can be accurately detected, and the overlapping condition of the bills with different thicknesses can be fully and reliably detected, so that the loss of the bank can be avoided.
A method of detecting the thickness of a document, the method comprising:
acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value;
calculating to obtain target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data;
judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data;
and determining whether the bill to be detected is abnormal or not according to the judgment result.
In one embodiment, the determining whether the to-be-detected bill is abnormal according to the determination result includes: when the target background data meets the background requirement and the target collection data meets the bill requirement, determining that the bill to be detected is normal; and when the target background data does not meet the background requirement or the target collection data does not meet the bill requirement, determining that the bill to be detected is abnormal.
In one embodiment, the acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, and acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in includes: acquiring background data acquired by a thickness sensor before a bill to be detected is put in the bill to be detected in real time to obtain a background data set, and acquiring bill data acquired by the thickness sensor after the bill to be detected is put in the bill to be detected in real time to obtain a bill data set; screening a plurality of background data from the background data set, and screening a plurality of bill data from the bill data set; and calculating to obtain the target background data according to the screened background data, and calculating to obtain the target bill data according to the screened bill data.
In one embodiment, the obtaining background data acquired by the thickness sensor before the bill to be detected is put in the real-time manner to obtain a background data set, and obtaining bill data acquired by the thickness sensor after the bill to be detected is put in the real-time manner to obtain a bill data set includes: acquiring a first preset distance; before a bill to be detected is placed, when the distance between the front end of the bill to be detected and the thickness sensor is a first preset distance, acquiring background data acquired by the thickness sensor in real time to obtain a background data set; acquiring a second preset distance; and after a bill to be detected is put in, when the distance between the front end of the bill to be detected and the thickness sensor is a second preset distance, acquiring bill data acquired by the thickness sensor in real time to obtain a bill data set.
In one embodiment, the calculating the target background data according to the screened background data and the calculating the target bill data according to the screened bill data includes: calculating the mean value of the screened background data, and taking the mean value of the background data as target background data; and calculating the mean value of the screened bill data, and taking the mean value of the bill data as target bill data.
In one embodiment, the calculating target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data includes: calculating a difference between the target background data and the target ticket data; and taking the difference value as the target acquisition data.
In one embodiment, the determining whether the target background data meets a background requirement according to the preset background threshold and the target background data, and determining whether the target collected data meets a bill requirement according to the preset bill threshold and the target collected data includes: acquiring a preset background error value corresponding to the preset background threshold value, and acquiring a preset bill error value corresponding to the preset bill threshold value; determining whether the target background data meets the background requirement according to the target background data, the preset background error value and the preset background threshold value; and determining whether the target acquisition data meets the bill requirement or not according to the target acquisition data, the preset bill error value and the preset bill threshold value.
In a second aspect, an embodiment of the present invention provides an apparatus for detecting a thickness of a bill, where the apparatus includes:
the acquisition module is used for acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value;
the calculation module is used for calculating to obtain target acquisition data corresponding to the to-be-detected bill according to the target background data and the target bill data;
the judging module is used for judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data;
and the detection module is used for determining whether the bill to be detected is abnormal or not according to the judgment result.
In a third aspect, an embodiment of the present invention provides a computer device, including a memory and a processor, where the memory stores a computer program, and the computer program, when executed by the processor, causes the processor to execute the following steps:
acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value;
calculating to obtain target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data;
judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data;
and determining whether the bill to be detected is abnormal or not according to the judgment result.
In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, in which a computer program is stored, and when the computer program is executed by a processor, the processor is caused to execute the following steps:
acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value;
calculating to obtain target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data;
judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data;
and determining whether the bill to be detected is abnormal or not according to the judgment result.
According to the bill thickness detection method, the bill thickness detection device, the computer equipment and the storage medium, firstly, the target background data acquired by the thickness sensor before the bill to be detected is put in is acquired, the target bill data acquired by the thickness sensor after the bill to be detected is put in is acquired, and the preset threshold value set is acquired, wherein the preset threshold value set comprises: presetting a background threshold value and a bill threshold value, then calculating to obtain target collection data corresponding to the bill to be detected according to the target background data and the target bill data, then judging whether the target background data meets the background requirement or not according to the preset background threshold value and the target background data, judging whether the target collection data meets the bill requirement or not according to the preset bill threshold value and the target collection data, and finally determining whether the bill to be detected is abnormal or not according to a judgment result. By determining whether the acquired target background data and target bill data respectively meet the background requirement and the bill requirement, the thickness data of bills can be accurately detected, and the overlapping condition of bills with different thicknesses can be fully and reliably detected, so that the bank can be prevented from being lost.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments of the present invention, and for those skilled in the art, other drawings can be obtained according to the structures shown in the drawings without creative efforts.
FIG. 1 is a flow chart of a method for detecting bill thickness in one embodiment;
FIG. 2 is a flow diagram of determining whether a ticket to be tested is abnormal in one embodiment;
FIG. 3 is a flow diagram of obtaining target background data and obtaining target ticket data, according to one embodiment;
FIG. 4 is a flow diagram of obtaining a background data set and obtaining a ticket data set in one embodiment;
FIG. 5 is a flow diagram of calculating target acquisition data in one embodiment;
FIG. 6 is a flow diagram of determining whether target background data meets background requirements and determining whether target collected data meets ticket requirements, under an embodiment;
FIG. 7 is a block diagram showing the structure of a bill thickness detecting apparatus according to an embodiment;
FIG. 8 is a block diagram of a computer device in one embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the present invention is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
As shown in fig. 1, a method for detecting the thickness of a bill is proposed, and the method for detecting the thickness of the bill can be applied to a terminal, and this embodiment is exemplified by being applied to the terminal. The method for detecting the bill thickness specifically comprises the following steps:
102, acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting background threshold and bill threshold.
The bill to be detected is the bill which needs to be detected whether the bill is abnormal or not; the thickness sensor is used for collecting corresponding data of the bill to be detected; the target background data refers to data collected by the thickness sensor before the bill to be detected enters the thickness sensor, namely, data collected by the thickness sensor when no bill medium passes through the thickness sensor. The target background data can be dynamic background data, and the dynamic background data refers to data acquired by the thickness sensor when the thickness sensor acts and no bill passes through the thickness sensor; the target bill data refers to thickness data of the bill to be detected, which is acquired by the thickness sensor after the bill to be detected enters the thickness sensor; the preset threshold set refers to a preset set of threshold values corresponding to each data acquired by the thickness sensor, and each preset threshold in the preset threshold set may be a reference threshold of each corresponding data. The preset threshold set may include: presetting a background threshold value and a bill threshold value, wherein: the preset background threshold refers to a preset critical value of target background data, and the preset bill threshold refers to a preset critical value of target collected data obtained through calculation. Obtaining target background data may be used to determine whether the thickness sensor is stable; the thickness data of the bill to be detected can be obtained by acquiring the target bill data, and whether the bill to be detected is abnormal or not can be determined according to the thickness data; a plurality of preset thresholds in the preset threshold set may be set according to requirements.
In one embodiment, when the distance between the bill to be detected and the thickness sensor is a certain distance, the thickness sensor starts to acquire target background data; when the distance from the bill to be detected to the thickness sensor is a certain distance, the thickness sensor starts to acquire the thickness data of the bill to be detected, namely the target bill data is acquired; for example, when the acquired data is target background data and target acquired data, a critical value corresponding to the target background data may be set as a preset background threshold, a critical value corresponding to the target acquired data may be set as a preset bill threshold, and a set of the obtained preset background threshold and the obtained preset bill threshold is a preset threshold set.
And 104, calculating to obtain target acquisition data corresponding to the to-be-detected bill according to the target background data and the target bill data.
The target acquisition data refers to actual thickness data corresponding to the bill to be detected. Since certain hardware difference often exists when the thickness data of the bill to be detected is acquired by using different thickness sensors, in order to eliminate the hardware difference, the actual thickness data of the bill to be detected can be obtained through calculation. In one embodiment, the actual thickness data of the bill to be detected can be calculated according to the target background data and the target bill data, that is, the target collection data is calculated. For example, a difference value between the target background data and the target bill data may be calculated, and the obtained difference value is used as target collection data, so that the collected thickness data of the bill to be detected is stable and reliable as much as possible, and the target collection data obtained through calculation may be used to determine whether the bill to be detected is abnormal.
And 106, judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data.
Wherein, the background requirement refers to a specific condition for determining whether the thickness sensor is stable; the bill requirement refers to a specific requirement for determining whether the thickness data of the bill to be detected is qualified. When the thickness sensor is used for collecting the thickness data of the bill to be detected, whether the thickness sensor is stable or not can be determined, and when the thickness sensor is stable, the thickness data of the bill to be detected is collected according to the stable thickness sensor, so that the background requirement can be set, and whether the target background data meets the background requirement or not is judged according to a preset background threshold value and the target background data; whether the thickness data of the actual bill to be detected is qualified or not can be determined according to the bill requirement, so that whether the problem of overlapping exists in the bill to be detected or not can be judged. In one embodiment, whether the target background data meets the background requirement or not can be judged according to a preset background threshold, and whether the target collected data meets the bill requirement or not can be judged according to a preset bill threshold. For example, by determining whether the target background data exceeds the preset background threshold, when the target background data does not exceed the preset background threshold, it may be determined that the target background data meets the background requirement; by judging whether the target collected data exceeds the range of the preset bill threshold value or not, when the target collected data does not exceed the range, the target collected data can be determined to meet the bill requirement.
And 108, determining whether the bill to be detected is abnormal or not according to the judgment result.
The judgment result is to judge whether the target background data meets the background requirement or not and whether the target acquisition data meets the bill requirement or not; and determining whether the bill to be detected is abnormal refers to determining whether the thickness sensor has a fault and whether the bill to be detected has a problem of overlapping. The thickness sensor corresponding to the normal bill to be detected has no fault, the bill to be detected has no problem of overlapping, and the thickness sensor corresponding to the abnormal bill to be detected has a fault, and the bill to be detected has an overlapping problem. In one embodiment, whether the bill to be detected is abnormal or not can be determined according to the judgment result. For example, when the target background data and the target collected data both meet the corresponding requirements, the bill to be detected can be determined to be normal; and when the target background data or the target collected data do not meet the corresponding requirements, determining that the bill to be detected is abnormal. Namely, when the target background data and the target collected data are both in the corresponding range, the thickness sensor can be determined to have no fault, the problem of overlapping of the bills to be detected does not exist, and the bills to be detected can be determined to be normal; when any one of the target background data and the target collected data is not in the corresponding range, the fault of the thickness sensor or the problem of overlapping of the bills to be detected can be determined, and the abnormity of the bills to be detected can be determined.
According to the bill thickness detection method, whether the acquired target background data and the target bill data respectively meet the background requirement and the bill requirement is determined, the thickness data of the bills can be accurately detected, and the overlapping condition of bills with different thicknesses can be fully and reliably detected, so that the bank can be prevented from being lost.
As shown in fig. 2, in an embodiment, the determining whether the to-be-detected bill is abnormal according to the determination result includes:
step 202, judging whether the target background data and the target collected data both meet corresponding requirements. When the target background data meets the background requirement and the target collection data meets the bill requirement, entering step 204; when the target background data does not meet the background requirement or the target collection data does not meet the ticket requirement, step 206 is entered.
The step of judging whether the target background data and the target collected data both meet the corresponding requirements refers to judging whether the target background data meets the background requirements and judging whether the target collected data meets the bill requirements. Entering a determining step 204 if and only if the target background data and the target collected data both meet corresponding requirements; when any one of the object background data and the object acquisition data does not meet the corresponding requirement, the process proceeds to the determination step 206.
And 204, determining that the bill to be detected is normal.
The step of determining that the bill to be detected is normal means that the thickness sensor is determined to be fault-free, and the problem of overlapping of the bill to be detected does not exist. The target background data meet the background requirement, and the target collection data meet the bill requirement, so that the thickness sensor corresponding to the bill to be detected is stable, the actual thickness data of the bill to be detected is qualified, the thickness sensor has no fault, the problem of overlapping of the bills to be detected does not exist, and the bill to be detected can be determined to be normal. In one embodiment, the target background data can be judged to meet the background requirement according to the preset background threshold, the target collection data can be judged to meet the bill requirement according to the preset bill threshold, and the bill to be detected is determined to be normal. For example, assuming that the target background data is 551 and the preset background threshold is 606, it may be determined that the target background data does not exceed the range of the preset background threshold, and thus it may be determined that the target background data meets the background requirement, so the thickness sensor is stable; assuming that the target collected data is 1590 and the preset bill threshold is 1595, it can be determined that the target bill data does not exceed the range of the preset bill threshold, so that it can be determined that the target collected data meets the bill requirements, and therefore, the problem of overlapping of bills to be detected does not exist. And when the target background data and the target collected data both meet corresponding requirements, determining that the bill to be detected is normal.
Step 206, determining that the bill to be detected is abnormal.
The step of determining that the bill to be detected is abnormal refers to determining that the thickness sensor has a fault or the bill to be detected has a problem of overlapping. Because the target background data do not meet the background requirement or the target collected data do not meet the bill requirement, the thickness sensor corresponding to the bill to be detected is unstable or the actual thickness data of the bill to be detected is unqualified, so that the thickness sensor has a fault or the bill to be detected has a problem of overlapping, and the abnormity of the bill to be detected can be determined. In one embodiment, the target background data which is judged to be not in accordance with the background requirement according to the preset background threshold value and the target collected data which is judged to be not in accordance with the bill requirement according to the preset bill threshold value can be obtained, so that the abnormity of the bill to be detected can be determined. For example, assuming that the target background data is 211 and the preset background threshold is 166, it may be determined that the target background data exceeds the preset background threshold, and thus it may be determined that the target background data does not meet the background requirement; assuming that the target collected data is 1917 and the preset bill threshold is 2000, it may be determined that the target bill data does not exceed the range of the preset bill threshold, and thus it may be determined that the target bill data meets the bill requirement. However, since the target background data does not meet the background requirement, the thickness sensor can be determined to have a fault, so that the abnormal condition of the bill to be detected can be determined.
In another embodiment, assuming that the target background data is 606 and the preset background threshold is 711, it may be determined that the target background data does not exceed the range of the preset background threshold, and thus it may be determined that the target background data meets the background requirement; assuming that the target collected data is 1524 and the preset bill threshold value is 1500, it can be determined that the target bill data exceeds the range of the preset bill threshold value, and thus it can be determined that the target collected data does not meet the bill requirement. Because the target bill data does not meet the background requirement, the problem of overlapping of the bills to be detected can be determined, and the abnormity of the bills to be detected can be determined. By judging whether the target background data meets the background requirement or not and judging whether the target collected data meets the bill requirement or not, when the target background data and the target collected data both meet the corresponding requirements, the thickness sensor can be determined to be fault-free and the bills to be detected have no problem of overlapping, so that the bills to be detected can be determined to be normal; when any one of the target background data and the target collected data does not meet the corresponding requirement, the fault of the thickness sensor or the problem of overlapping of the bills to be detected can be determined, and when the fault of the thickness sensor or the problem of overlapping of the bills to be detected is detected, the abnormity of the detected bills to be detected can be determined. The bill to be detected can be accurately detected without being influenced by external factors such as environment, installation precision and the like.
As shown in fig. 3, in an embodiment, the acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, and acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in includes:
and 302, acquiring background data acquired by the thickness sensor before the bill to be detected is put in the thickness sensor in real time to obtain a background data set, and acquiring bill data acquired by the thickness sensor after the bill to be detected is put in the thickness sensor in real time to obtain a bill data set.
The background data set is a set formed by a plurality of background data collected by the thickness sensor in real time before the front end of the bill to be detected reaches the thickness sensor and when the front end of the bill to be detected reaches the thickness sensor; the bill data set is a set formed by a plurality of bill data collected by the thickness sensor in real time when the front end of the bill to be detected continuously moves forward for a certain distance after contacting the thickness sensor. Because the thickness sensor collects corresponding data in real time, the thickness sensor can collect a plurality of background data and a plurality of bill data in a certain time. In one embodiment, when the distance between the bill to be detected and the thickness sensor is a certain distance, the time point at which the thickness sensor starts to collect data is set, the thickness sensor starts to collect background data, and the thickness sensor stops collecting the background data until the front end of the bill to be detected reaches the thickness sensor, so that a background data set composed of a plurality of background data can be obtained. The time point when the thickness sensor finishes collecting data can be set when the distance between the bill to be detected and the thickness sensor is a certain distance. Namely, when the front end of the bill to be detected reaches the thickness sensor and the bill to be detected continues to advance for a certain distance, the thickness sensor acquires a plurality of bill data in real time, so that a bill data set can be obtained. For example, assuming that the background data set is x, and assuming that the acquired plurality of background data are 40, 79, 118, 157, 196, 235, 274, and 313, respectively, the background data set x ═ x |40, 79, 118, 157, 196, 235, 274, and 313 }; assuming that the bill data set is w, and assuming that the collected plurality of bill data sets are 2142, 2142, 2142, 2141, 2141, 2143, 2143, the bill data set w is obtained as { w |2142, 2142, 2142, 2141, 2141, 2141, 2143, 2143 }. So that the background dataset and the ticket dataset can be obtained separately.
And 304, screening a plurality of background data from the background data set, and screening a plurality of bill data from the bill data set.
The purpose of screening out a plurality of background data from the background data set and screening out a plurality of bill data from the bill data set is to reasonably process a plurality of collected data, so that the screened-out data are all effective data as much as possible. In an embodiment, the plurality of background data in the background data set may be sorted according to a size order among the background data, and the plurality of ticket data in the ticket data set may also be sorted according to a size order among the ticket data, so as to obtain the plurality of background data after being sorted in size and the plurality of ticket data after being sorted in size, respectively. Then, the plurality of background data after being subjected to size sequencing and the plurality of bill data after being subjected to size sequencing can be reasonably processed by using a corresponding filtering algorithm, peak interference data, trough interference data and filtering 0 value data in the plurality of background data after being subjected to size sequencing are filtered, peak interference data, trough interference data and filtering 0 value data in the plurality of bill data after being subjected to size sequencing are filtered, and finally, the plurality of background data and the plurality of bill data which are left after being filtered can be screened to obtain the plurality of screened background data and the plurality of bill data. For example, assuming that the background data set x after size sorting is { x |0, 40, 79, 118, 157, 196, 235, 274, 313}, a plurality of pieces of background data in the background data set after size sorting can be reasonably processed by using a filtering algorithm, and the processed background data set x ═ { x |79, 118, 157, 196, 235, 274}, can be obtained. A plurality of background data may be filtered from the processed background data set, for example, a plurality of background data at the middle and rear stages of the background data set may be taken, and the plurality of background data obtained by filtering is 196, 235, 274; assuming that the sorted-size note data set w is { w |2140, 2141, 2141, 2142, 2142, 2142, 2142, 2142, 2143}, a plurality of note data in the sorted-size note data set may be reasonably processed using a filtering algorithm, and the processed note data set w is { w |2141, 2141, 2142, 2142, 2142 }. A plurality of pieces of ticket data may be screened from the processed ticket data set, for example, a plurality of pieces of ticket data at the middle and rear stages of the ticket data set may be screened to obtain a plurality of pieces of ticket data 2142, 2142, 2142, 2142. Therefore, the screened background data and bill data can be obtained respectively.
In another embodiment, the plurality of background data in the background data set may be sorted according to a time sequence corresponding to the collection of each background data, and the plurality of ticket data in the ticket data set may also be sorted according to a time sequence corresponding to the collection of each ticket data, so as to obtain the plurality of background data subjected to time sorting and the plurality of ticket data subjected to time sorting, respectively. Then, the corresponding filtering algorithm can be used for filtering the peak interference data, the trough interference data and the filtered 0 value data in the plurality of background data subjected to time sequencing, and the peak interference data, the trough interference data and the filtered 0 value data in the plurality of bill data subjected to time sequencing, and finally, the plurality of background data and the plurality of bill data left after filtering can be screened to obtain the plurality of screened background data and the plurality of bill data. For example, assuming that the background data set x after time sorting is { x |79, 118, 157, 196, 235, 274, 313, 352}, the plurality of pieces of background data in the background data set after time sorting may be reasonably processed using a filtering algorithm, and the plurality of pieces of background data may be obtained as x ═ x |118, 157, 196, 235, 274, 313}, and the plurality of pieces of background data may be filtered out from the processed background data set, for example, the plurality of pieces of background data at the middle and rear stages of the background data set may be taken out, and the plurality of pieces of background data may be obtained as 235, 274, 313; assuming that the time-ordered ticket data set w is { w |2142, 2142, 2142, 2141, 2141, 2140, 2140, 2143}, the plurality of pieces of ticket data in the time-ordered ticket data set may be reasonably processed using a filter algorithm, and the processed ticket data set w may be obtained as w ═ w |2142, 2142, 2142, 2141, 2141, 2140}, and the plurality of pieces of ticket data may be selected from the processed ticket data set, for example, the plurality of pieces of ticket data in the middle-to-last stage of the ticket data set may be obtained, and the plurality of pieces of ticket data may be selected as 2141, 2141, 2140. Therefore, the screened background data and bill data can be obtained respectively.
And step 306, calculating to obtain the target background data according to the screened background data, and calculating to obtain the target bill data according to the screened bill data.
In one embodiment, the target background data may be obtained by calculation according to the plurality of screened background data, and the target bill data may be obtained by calculation according to the plurality of screened bill data. For example, an average value of the plurality of screened background data may be calculated, and the obtained average value may be used as the target background data; the average value of the screened target bill data can be calculated, and the obtained average value is used as the target bill data. The starting time point for controlling the starting of the thickness sensor to collect data is obtained in real time, so that the quantity of the collected background data and the quantity of the collected bill data can be controlled; the method comprises the steps of acquiring a background data set and a bill data set in real time, and screening a plurality of background data and a plurality of bill data in the background data set and the bill data set, wherein only a plurality of background data of middle and rear sections in the processed background data set and only a plurality of bill data of middle and rear sections in the processed bill data set are selected, so that the acquired data can be more accurate; and calculating according to the screened background data and the screened bill data to respectively obtain target background data and target bill data, so that the target background data and the target bill data used for calculation are more stable and reliable.
As shown in fig. 4, in an embodiment, the acquiring background data acquired by the thickness sensor before the bill to be detected is put in real time to obtain a background data set, and acquiring bill data acquired by the thickness sensor after the bill to be detected is put in real time to obtain a bill data set includes:
step 402, a first preset distance is obtained.
The first preset distance is a first distance between the preset front end of the bill to be detected and the thickness sensor. The first preset distance may be set as required. In an embodiment, assuming that the first preset distance is D, if D is 5cm according to requirements, the first preset distance D may be 5cm, and the first preset distance is obtained.
And step 404, before a bill to be detected is placed, when the distance between the front end of the bill to be detected and the thickness sensor is a first preset distance, acquiring background data acquired by the thickness sensor in real time to obtain a background data set.
In one embodiment, when the distance between the front end of the bill to be detected and the thickness sensor is a first preset distance, the thickness sensor starts to acquire background data in real time, so that a background data set can be acquired. For example, if the first preset distance is D, before the front end of the bill to be detected reaches the thickness sensor, when the distance between the front end of the bill to be detected and the thickness sensor is D, the thickness sensor starts to acquire background data in real time, and the thickness sensor finishes acquiring the background data until the front end of the bill to be detected reaches the thickness sensor. During this time, a background data set may be obtained based on the background data collected by the thickness sensor in real time.
Step 406, a second preset distance is obtained.
The second preset distance is a second distance between the preset front end of the bill to be detected and the thickness sensor. The second preset distance may be set as desired. In an embodiment, assuming that the first preset distance is M, if M is 10cm, the second preset distance M may be 10cm, and the second preset distance may be obtained.
And step 408, after a bill to be detected is put in, when the distance between the front end of the bill to be detected and the thickness sensor is a second preset distance, acquiring bill data acquired by the thickness sensor in real time to obtain a bill data set.
In one embodiment, when the distance from the front end of the bill to be detected to the thickness sensor is a second preset distance, the thickness sensor starts to acquire the bill data in real time, so that the bill data set can be acquired. For example, if the second preset distance is M, the thickness sensor starts to acquire the bill data in real time when the front end of the bill to be detected reaches the thickness sensor, and the thickness sensor finishes acquiring the bill data until the distance after the front end of the bill to be detected enters the thickness sensor is M. During the period, the bill data set can be obtained according to the bill data acquired by the thickness sensor in real time. Acquiring corresponding background data in real time by the thickness sensor according to the first preset distance by acquiring the first preset distance and the second preset distance to obtain a background data set; and acquiring corresponding bill data in real time by the thickness sensor according to the second preset distance to obtain a bill data set. The starting point of the thickness sensor for starting to collect data can be controlled, so that the quantity of the collected data can be controlled, and the collected data are more accurate.
In one embodiment, the calculating the target background data according to the screened background data and the calculating the target bill data according to the screened bill data includes:
and calculating the mean value of the screened background data, and taking the mean value of the background data as target background data.
The calculating of the average value of the plurality of screened background data refers to calculating an average value among the plurality of screened background data. In one embodiment, the calculated average of the plurality of background data may be used as the target background data. For example, assuming that a plurality of background data obtained by screening are 157, 196, 235, 274, 313, and 352, an average value of the plurality of background data is calculated to obtain (157+196+235+274+313+352)/6 ═ 254.5, and the obtained 254.5 can be used as the target background data.
And calculating the mean value of the screened bill data, and taking the mean value of the bill data as target bill data.
The calculation of the average value of the plurality of screened bill data refers to the calculation of the average value among the plurality of screened bill data. In one embodiment, the calculated mean of the plurality of ticket data may be used as the target ticket data. For example, assuming that the plurality of pieces of bill data obtained by screening are 2140, 2140, 2141, 2141, 2141, 2142, an average value of the plurality of pieces of bill data is calculated to obtain (2140+2140+2141+2141+ 2142)/6 ═ 2140.8, and the obtained 2140.8 can be used as the target piece of bill data. The target background data can be obtained by calculating the mean value of a plurality of background data, the target bill data can be obtained by calculating the mean value of a plurality of target bill data, and the accurate target background data and the accurate target bill data can be obtained.
As shown in fig. 5, in an embodiment, the calculating target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data includes:
step 502, calculating a difference between the target background data and the target ticket data.
The difference between the target background data and the target bill data is the difference obtained by subtracting the target background data from the target bill data. Because different thickness sensors have certain equipment difference, the problem of equipment difference can be avoided by calculating the difference between target bill data and target background data to avoid inaccurate detection results caused by hardware problems. In one embodiment, assuming that the target collected data is 2141.7 and the target background data is 332.5, calculating the difference between the target ticket data and the target background data can result in: 2141.7-332.5-1808.7, the difference between them can be found to be 1808.7.
And step 504, taking the difference value as the target acquisition data.
In one embodiment, the difference between the target background data and the target ticket data may be used as the target collection data. The difference between the target background data and the target bill data can avoid inaccurate detection results caused by hardware problems, so that the difference between the target background data and the target bill data can be used as target acquisition data, and the actual thickness data of the bill to be detected can be obtained. In one embodiment, assuming that the difference between the target background data and the target sheet data is 1808.7, 1808.7 can be used as the target collected data, so that the actual sheet thickness data to be detected is 1808.7. And calculating a difference value between the target background data and the target bill data, and taking the obtained difference value as target acquisition data, thereby obtaining the actual thickness data of the bill to be detected. Hardware differences caused by different thickness sensors can be eliminated, and the acquired thickness data of the bill to be detected is stable and reliable as much as possible.
As shown in fig. 6, in an embodiment, the determining whether the target background data meets the background requirement according to the preset background threshold and the target background data, and determining whether the target collected data meets the bill requirement according to the preset bill threshold and the target collected data includes:
step 602, obtaining a preset background error value corresponding to the preset background threshold value, and obtaining a preset bill error value corresponding to the preset bill threshold value.
The preset background error value refers to an upper error range and a lower error range of a preset background threshold value; the preset bill error value refers to an upper and lower error range of a preset bill threshold value, and can also be a proportional coefficient of upper and lower floating of the preset bill threshold value. The preset background error value is set for avoiding the influence of the installation precision problem of the thickness sensor for collecting data on the detection result; the purpose of setting the preset bill error value is to avoid the influence of small differences among bills to be detected of different types on detecting whether the bills to be detected are abnormal. Setting a preset background error value according to the hardware characteristics of the thickness sensor; the preset bill error value can be set according to the actual experience threshold value of the bill thickness. In one embodiment, the preset background error value may be assumed to be 0.5 according to the thickness sensor hardware characteristics; the upper and lower floating range of the preset bill threshold value is 0.3-1.3 according to the experience threshold value of the actual bill thickness, and on the basis, the preset bill error value can be assumed to be 0.4. And respectively obtaining the preset background error value and the preset bill error value.
Step 604, determining whether the target background data meets a background requirement according to the target background data, the preset background error value and the preset background threshold.
In an embodiment, the upper and lower limit ranges of the preset background threshold may be obtained by calculation according to the preset background error value and the preset background threshold, and whether the target background data meets the background requirement may be determined according to the obtained upper and lower limit ranges of the preset background threshold and the target background data. For example, assuming that the preset background error value is 0.5 and the preset background threshold value is 508, the upper and lower limits of the preset background threshold value can be calculated to be 507.5-508.5. Assuming that the target background data is 508, the target background data is within the upper and lower limits of the preset background threshold, so that it can be determined that the target background data meets the background requirement.
In another embodiment, assuming that the preset background error value is 0.6 and the preset background threshold value is 547, the upper and lower limits of the preset background threshold value can be calculated to be 546.5-548.5. Assuming that the target background data is 586, the target background data exceeds the upper and lower limits of the preset background threshold, so that it can be determined that the target background data does not meet the background requirement.
Step 606, determining whether the target collection data meets bill requirements according to the target collection data, the preset bill error value and the preset bill threshold value.
In one embodiment, the upper and lower limit ranges of the preset bill threshold value may be obtained by calculation according to the preset bill error value and the preset bill threshold value, and whether the target collection data meets the bill requirement may be determined according to the obtained upper and lower limit ranges of the preset bill threshold value and the target collection data. For example, assuming that the preset bill error value is 0.4 and the preset bill threshold value is 1634, the upper and lower limits of the preset bill threshold value can be calculated to be 1633.6-1634.4. Assuming that the target collected data is 1633.2, the target collected data is within the upper and lower limits of the preset bill threshold, so that the target collected data can be determined to meet the bill requirement.
In another embodiment, assuming that the preset bill error value is 0.8 and the preset bill threshold value is 1518, the upper and lower limits of the preset bill threshold value can be calculated to be 1517.2-1518.8. If the target collected data is 1519, the target collected data exceeds the upper and lower limits of the preset bill threshold, so that it can be determined that the target collected data does not meet the bill requirement. By acquiring the preset background error value and the preset bill error value, the upper and lower limit ranges of the preset background threshold value and the upper and lower limit ranges of the preset bill threshold value can be obtained, so that the influence of external factors such as differences among bills of different types and installation accuracy of the thickness sensor can be avoided, the thickness data of the bill to be detected can be accurately detected, and the thickness data can be used as a basis for finally judging whether the bill to be detected is overlapped or not.
As shown in fig. 7, the embodiment of the present invention provides an apparatus for detecting thickness of a bill, the apparatus including:
an obtaining module 702, configured to obtain target background data acquired by the thickness sensor before the bill to be detected is put in, obtain target bill data acquired by the thickness sensor after the bill to be detected is put in, and obtain a preset threshold set, where the preset threshold set includes: presetting a background threshold value and a bill threshold value;
a calculating module 704, configured to calculate, according to the target background data and the target ticket data, target acquisition data corresponding to the ticket to be detected;
a judging module 706, configured to judge whether the target background data meets a background requirement according to the preset background threshold and the target background data, and judge whether the target collected data meets a bill requirement according to the preset bill threshold and the target collected data;
and the detecting module 708 is configured to determine whether the to-be-detected bill is abnormal according to the determination result.
In one embodiment, the determining whether the to-be-detected bill is abnormal according to the determination result includes: the detection module 708 is further configured to determine that the to-be-detected bill is normal when the target background data meets the background requirement and the target collection data meets the bill requirement; the detection module 708 is further configured to determine that the ticket to be detected is abnormal when the target background data does not meet the background requirement or the target collection data does not meet the ticket requirement.
In one embodiment, the acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, and acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in includes: the obtaining module 702 is further configured to obtain, in real time, background data collected by the thickness sensor before the bill to be detected is placed in the detecting module to obtain a background data set, and obtain, in real time, bill data collected by the thickness sensor after the bill to be detected is placed in the detecting module to obtain a bill data set; the obtaining module 702 is further configured to filter out a plurality of background data from the background data set, and filter out a plurality of bill data from the bill data set; the calculating module 704 is further configured to calculate to obtain the target background data according to the plurality of screened background data, and calculate to obtain the target bill data according to the plurality of screened bill data.
In one embodiment, the obtaining background data acquired by the thickness sensor before the bill to be detected is put in the real-time manner to obtain a background data set, and obtaining bill data acquired by the thickness sensor after the bill to be detected is put in the real-time manner to obtain a bill data set includes: the obtaining module 702 is further configured to obtain a first preset distance; the obtaining module 702 is further configured to, before a to-be-detected bill is placed, obtain background data acquired by the thickness sensor in real time when a distance between the front end of the to-be-detected bill and the thickness sensor is a first preset distance, so as to obtain a background data set; the obtaining module 702 is further configured to obtain a second preset distance; the obtaining module 702 is further configured to, after a to-be-detected bill is placed in the to-be-detected bill, obtain, in real time, bill data acquired by the thickness sensor when the distance between the front end of the to-be-detected bill and the thickness sensor is a second preset distance, so as to obtain a bill data set.
In one embodiment, the calculating the target background data according to the screened background data and the calculating the target bill data according to the screened bill data includes: the calculating module 704 is further configured to calculate a mean value of the screened background data, and use the mean value of the background data as target background data; the calculating module 704 is further configured to calculate a mean value of the plurality of screened bill data, and use the mean value of the plurality of bill data as target bill data.
In one embodiment, the calculating target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data includes: the calculating module 704 is further configured to calculate a difference between the target background data and the target ticket data; and taking the difference value as the target acquisition data.
In one embodiment, the determining whether the target background data meets a background requirement according to the preset background threshold and the target background data, and determining whether the target collected data meets a bill requirement according to the preset bill threshold and the target collected data includes: the obtaining module 702 is further configured to obtain a preset background error value corresponding to the preset background threshold, and obtain a preset ticket error value corresponding to the preset ticket threshold; the determining module 706 is further configured to determine whether the target background data meets a background requirement according to the target background data, the preset background error value, and the preset background threshold; the determining module 706 is further configured to determine whether the target collection data meets a bill requirement according to the target collection data, the preset bill error value, and the preset bill threshold value.
FIG. 8 is a diagram illustrating an internal structure of a computer device in one embodiment. The computer device may be a terminal. As shown in fig. 8, the computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the memory includes a non-volatile storage medium and an internal memory. The non-volatile storage medium of the computer device stores an operating system and also stores a computer program which, when executed by the processor, causes the processor to implement the method for detecting the bill thickness. The internal memory may also store a computer program that, when executed by the processor, causes the processor to perform a method of detecting a thickness of a sheet. The network interface is used for communicating with the outside. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, the method for detecting the thickness of the bill provided by the present application can be implemented in the form of a computer program, and the computer program can be run on a computer device as shown in fig. 8. The memory of the computer device can store various program templates of the detecting device for detecting the bill thickness. For example, the acquiring module 702, the calculating module 704, the determining module 706, and the detecting module 708.
A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of: acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value; calculating to obtain target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data; judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data; and determining whether the bill to be detected is abnormal or not according to the judgment result.
In one embodiment, the determining whether the to-be-detected bill is abnormal according to the determination result includes: when the target background data meets the background requirement and the target collection data meets the bill requirement, determining that the bill to be detected is normal; and when the target background data does not meet the background requirement or the target collection data does not meet the bill requirement, determining that the bill to be detected is abnormal.
In one embodiment, the acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, and acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in includes: acquiring background data acquired by a thickness sensor before a bill to be detected is put in the bill to be detected in real time to obtain a background data set, and acquiring bill data acquired by the thickness sensor after the bill to be detected is put in the bill to be detected in real time to obtain a bill data set; screening a plurality of background data from the background data set, and screening a plurality of bill data from the bill data set; and calculating to obtain the target background data according to the screened background data, and calculating to obtain the target bill data according to the screened bill data.
In one embodiment, the obtaining background data acquired by the thickness sensor before the bill to be detected is put in the real-time manner to obtain a background data set, and obtaining bill data acquired by the thickness sensor after the bill to be detected is put in the real-time manner to obtain a bill data set includes: acquiring a first preset distance; before a bill to be detected is placed, when the distance between the front end of the bill to be detected and the thickness sensor is a first preset distance, acquiring background data acquired by the thickness sensor in real time to obtain a background data set; acquiring a second preset distance; and after a bill to be detected is put in, when the distance between the front end of the bill to be detected and the thickness sensor is a second preset distance, acquiring bill data acquired by the thickness sensor in real time to obtain a bill data set.
In one embodiment, the calculating the target background data according to the screened background data and the calculating the target bill data according to the screened bill data includes: calculating the mean value of the screened background data, and taking the mean value of the background data as target background data; and calculating the mean value of the screened bill data, and taking the mean value of the bill data as target bill data.
In one embodiment, the calculating target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data includes: calculating a difference between the target background data and the target ticket data; and taking the difference value as the target acquisition data.
In one embodiment, the determining whether the target background data meets a background requirement according to the preset background threshold and the target background data, and determining whether the target collected data meets a bill requirement according to the preset bill threshold and the target collected data includes: acquiring a preset background error value corresponding to the preset background threshold value, and acquiring a preset bill error value corresponding to the preset bill threshold value; determining whether the target background data meets the background requirement according to the target background data, the preset background error value and the preset background threshold value; and determining whether the target acquisition data meets the bill requirement or not according to the target acquisition data, the preset bill error value and the preset bill threshold value.
A computer-readable storage medium storing a computer program which, when executed by a processor, causes the processor to perform the steps of: acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value; calculating to obtain target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data; judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data; and determining whether the bill to be detected is abnormal or not according to the judgment result.
In one embodiment, the determining whether the to-be-detected bill is abnormal according to the determination result includes: when the target background data meets the background requirement and the target collection data meets the bill requirement, determining that the bill to be detected is normal; and when the target background data does not meet the background requirement or the target collection data does not meet the bill requirement, determining that the bill to be detected is abnormal.
In one embodiment, the acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, and acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in includes: acquiring background data acquired by a thickness sensor before a bill to be detected is put in the bill to be detected in real time to obtain a background data set, and acquiring bill data acquired by the thickness sensor after the bill to be detected is put in the bill to be detected in real time to obtain a bill data set; screening a plurality of background data from the background data set, and screening a plurality of bill data from the bill data set; and calculating to obtain the target background data according to the screened background data, and calculating to obtain the target bill data according to the screened bill data.
In one embodiment, the obtaining background data acquired by the thickness sensor before the bill to be detected is put in the real-time manner to obtain a background data set, and obtaining bill data acquired by the thickness sensor after the bill to be detected is put in the real-time manner to obtain a bill data set includes: acquiring a first preset distance; before a bill to be detected is placed, when the distance between the front end of the bill to be detected and the thickness sensor is a first preset distance, acquiring background data acquired by the thickness sensor in real time to obtain a background data set; acquiring a second preset distance; and after a bill to be detected is put in, when the distance between the front end of the bill to be detected and the thickness sensor is a second preset distance, acquiring bill data acquired by the thickness sensor in real time to obtain a bill data set.
In one embodiment, the calculating the target background data according to the screened background data and the calculating the target bill data according to the screened bill data includes: calculating the mean value of the screened background data, and taking the mean value of the background data as target background data; and calculating the mean value of the screened bill data, and taking the mean value of the bill data as target bill data.
In one embodiment, the calculating target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data includes: calculating a difference between the target background data and the target ticket data; and taking the difference value as the target acquisition data.
In one embodiment, the determining whether the target background data meets a background requirement according to the preset background threshold and the target background data, and determining whether the target collected data meets a bill requirement according to the preset bill threshold and the target collected data includes: acquiring a preset background error value corresponding to the preset background threshold value, and acquiring a preset bill error value corresponding to the preset bill threshold value; determining whether the target background data meets the background requirement according to the target background data, the preset background error value and the preset background threshold value; and determining whether the target acquisition data meets the bill requirement or not according to the target acquisition data, the preset bill error value and the preset bill threshold value.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by a computer program, which can be stored in a non-volatile computer-readable storage medium, and can include the processes of the embodiments of the methods described above when the program is executed. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), Programmable ROM (PROM), Electrically Programmable ROM (EPROM), Electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), Dynamic RAM (DRAM), Synchronous DRAM (SDRAM), Double Data Rate SDRAM (DDRSDRAM), Enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus Direct RAM (RDRAM), direct bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A method for detecting the thickness of a bill, which is characterized by comprising the following steps:
acquiring target background data acquired by a thickness sensor before a bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value;
calculating to obtain target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data;
judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data, and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data;
and determining whether the bill to be detected is abnormal or not according to the judgment result.
2. The method according to claim 1, wherein the determining whether the bill to be detected is abnormal according to the judgment result comprises:
when the target background data meets the background requirement and the target collection data meets the bill requirement, determining that the bill to be detected is normal;
and when the target background data does not meet the background requirement or the target collection data does not meet the bill requirement, determining that the bill to be detected is abnormal.
3. The method of claim 1, wherein the acquiring of the target background data acquired by the thickness sensor before the bill to be detected is put in and the acquiring of the target bill data acquired by the thickness sensor after the bill to be detected is put in comprise:
acquiring background data acquired by a thickness sensor before a bill to be detected is put in the bill to be detected in real time to obtain a background data set, and acquiring bill data acquired by the thickness sensor after the bill to be detected is put in the bill to be detected in real time to obtain a bill data set;
screening a plurality of background data from the background data set, and screening a plurality of bill data from the bill data set;
and calculating to obtain the target background data according to the screened background data, and calculating to obtain the target bill data according to the screened bill data.
4. The method according to claim 3, wherein the obtaining of the background data collected by the thickness sensor before the bill to be detected is put in real time to obtain a background data set, and the obtaining of the bill data collected by the thickness sensor after the bill to be detected is put in real time to obtain a bill data set comprises:
acquiring a first preset distance;
before a bill to be detected is placed, when the distance between the front end of the bill to be detected and the thickness sensor is a first preset distance, acquiring background data acquired by the thickness sensor in real time to obtain a background data set;
acquiring a second preset distance;
and after a bill to be detected is put in, when the distance between the front end of the bill to be detected and the thickness sensor is a second preset distance, acquiring bill data acquired by the thickness sensor in real time to obtain a bill data set.
5. The method of claim 3, wherein said calculating the target context data from the screened plurality of context data and calculating the target ticket data from the screened plurality of ticket data comprises:
calculating the mean value of the screened background data, and taking the mean value of the background data as target background data;
and calculating the mean value of the screened bill data, and taking the mean value of the bill data as target bill data.
6. The method according to claim 1, wherein the calculating target collection data corresponding to the to-be-detected bill according to the target background data and the target bill data comprises:
calculating a difference between the target background data and the target ticket data;
and taking the difference value as the target acquisition data.
7. The method of claim 1, wherein said determining whether the target background data meets a background requirement according to the preset background threshold and the target background data and whether the target collected data meets a bill requirement according to the preset bill threshold and the target collected data comprises:
acquiring a preset background error value corresponding to the preset background threshold value, and acquiring a preset bill error value corresponding to the preset bill threshold value;
determining whether the target background data meets the background requirement according to the target background data, the preset background error value and the preset background threshold value;
and determining whether the target acquisition data meets the bill requirement or not according to the target acquisition data, the preset bill error value and the preset bill threshold value.
8. A device for detecting the thickness of a bill, said device comprising:
the acquisition module is used for acquiring target background data acquired by the thickness sensor before the bill to be detected is put in, acquiring target bill data acquired by the thickness sensor after the bill to be detected is put in, and acquiring a preset threshold set, wherein the preset threshold set comprises: presetting a background threshold value and a bill threshold value;
the calculation module is used for calculating to obtain target acquisition data corresponding to the to-be-detected bill according to the target background data and the target bill data;
the judging module is used for judging whether the target background data meets the background requirement or not according to the preset background threshold and the target background data and judging whether the target collected data meets the bill requirement or not according to the preset bill threshold and the target collected data;
and the detection module is used for determining whether the bill to be detected is abnormal or not according to the judgment result.
9. A computer device comprising a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method according to any one of claims 1 to 7.
10. A computer-readable storage medium, storing a computer program which, when executed by a processor, causes the processor to carry out the steps of the method according to any one of claims 1 to 7.
CN201911375002.8A 2019-12-27 2019-12-27 Bill thickness detection method and device, computer equipment and storage medium Pending CN113053020A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911375002.8A CN113053020A (en) 2019-12-27 2019-12-27 Bill thickness detection method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911375002.8A CN113053020A (en) 2019-12-27 2019-12-27 Bill thickness detection method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN113053020A true CN113053020A (en) 2021-06-29

Family

ID=76506124

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911375002.8A Pending CN113053020A (en) 2019-12-27 2019-12-27 Bill thickness detection method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN113053020A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106729A (en) * 2012-12-24 2013-05-15 广州广电运通金融电子股份有限公司 Sheet type medium thickness identifying device and identifying method thereof
CN105046805A (en) * 2015-08-07 2015-11-11 新达通科技股份有限公司 Banknote thickness detection device and calibration method
CN105225334A (en) * 2015-10-27 2016-01-06 深圳怡化电脑股份有限公司 The bearing calibration of banknote tester
CN105243728A (en) * 2015-10-22 2016-01-13 深圳怡化电脑股份有限公司 Method and system for calculating thickness of paper money
CN107978061A (en) * 2016-10-25 2018-05-01 深圳怡化电脑股份有限公司 A kind of banknote thickness data extraction method and device
CN108257285A (en) * 2018-01-15 2018-07-06 深圳怡化电脑股份有限公司 A kind of data processing method of thickness transducer, device, banknote tester and storage medium
CN110365405A (en) * 2019-06-24 2019-10-22 深圳怡化电脑股份有限公司 Photoelectric sensor detection method, device, readable storage medium storing program for executing and terminal device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103106729A (en) * 2012-12-24 2013-05-15 广州广电运通金融电子股份有限公司 Sheet type medium thickness identifying device and identifying method thereof
CN105046805A (en) * 2015-08-07 2015-11-11 新达通科技股份有限公司 Banknote thickness detection device and calibration method
CN105243728A (en) * 2015-10-22 2016-01-13 深圳怡化电脑股份有限公司 Method and system for calculating thickness of paper money
CN105225334A (en) * 2015-10-27 2016-01-06 深圳怡化电脑股份有限公司 The bearing calibration of banknote tester
CN107978061A (en) * 2016-10-25 2018-05-01 深圳怡化电脑股份有限公司 A kind of banknote thickness data extraction method and device
CN108257285A (en) * 2018-01-15 2018-07-06 深圳怡化电脑股份有限公司 A kind of data processing method of thickness transducer, device, banknote tester and storage medium
CN110365405A (en) * 2019-06-24 2019-10-22 深圳怡化电脑股份有限公司 Photoelectric sensor detection method, device, readable storage medium storing program for executing and terminal device

Similar Documents

Publication Publication Date Title
CN109658584B (en) Bill information identification method and device
CN106296974B (en) A kind of stickup paper money detection method and device
EP1295262A2 (en) Method for verifying the authenticity of documents
CN113516661A (en) Defect detection method and device based on feature fusion
CN106875540B (en) Paper money thickness abnormity detection method and device
CN109360324A (en) Banknote detection method, banknote tester, finance device and computer readable storage medium
CN113192252B (en) Method, device, equipment and readable medium for detecting note duplicate
CN113053020A (en) Bill thickness detection method and device, computer equipment and storage medium
JPH1166381A (en) Method and device for checking valuable or guarantee product, especially bank note
CN107798770B (en) Parameter adjusting method and device for image sensor, ATM and storage medium
CN108932788B (en) Method, device and equipment for detecting abnormal thickness grade of paper money
CN111178203A (en) Signature verification method and device, computer equipment and storage medium
CN116071335A (en) Wall surface acceptance method, device, equipment and storage medium
CN113034423A (en) Detection method and device of thickness sensor, computer equipment and storage medium
CN110634124A (en) Method and equipment for area detection
CN113160480A (en) Method and device for detecting thickness of bank note, computer equipment and storage medium
CN113298182A (en) Early warning method, device and equipment based on certificate image
CN113435842A (en) Business process processing method and computer equipment
US10482314B2 (en) Automatic calculation for ploidy classification
CN113256868B (en) Currency detection method, currency detection device, currency detection terminal and storage medium
CN113256554B (en) Deterministic image inspection
CN109191661B (en) Foreign matter detection method and device and computer readable storage medium
CN112829476B (en) Batch bill printing method, batch bill printing device, printing equipment and medium
CN114842014B (en) Defect detection method, device and equipment based on density estimation and storage medium
CN117219235A (en) Processing method, system, equipment and medium for reading genetic FISH sample

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination