Methods, devices, computer equipment, and storage media for identifying counterfeit currency types
By acquiring the serial number and dimension information of banknotes, establishing a mapping array and calculating the matching score, the problem of low efficiency in counterfeit currency identification in existing technologies is solved, and fast and accurate identification of counterfeit currency types is achieved.
Patent Information
- Application Number
- CN202310341399.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-31
- Publication Date
- 2025-12-02
- Estimated Expiration
- 2043-03-31
AI Technical Summary
Existing counterfeit currency identification technologies cannot meet the requirements for efficient and accurate identification, resulting in low identification efficiency.
By acquiring the serial number and dimension information of the banknote to be identified, a mapping array is established for matching, the matching score is calculated, and the type of counterfeit banknote is determined.
It enables rapid and accurate identification of counterfeit currency types, improving identification efficiency and accuracy.
Smart Images

Figure CN116486531B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a method, apparatus, computer device, and storage medium for identifying counterfeit currency types. Background Technology
[0002] Cash and banknotes, as circulating media, need to have high anti-counterfeiting performance. Therefore, they are usually equipped with multiple anti-counterfeiting technical features. As technology advances, counterfeiters will gradually master the production process of corresponding banknote anti-counterfeiting technologies. In practical applications, in order to ensure efficient identification of counterfeit money, it is necessary to accurately and quickly identify the type of banknote to which the counterfeit money belongs. However, the existing technical means cannot meet the actual needs and there is a problem of low identification efficiency. Summary of the Invention
[0003] Therefore, it is necessary to provide a method, apparatus, computer device, computer-readable storage medium, and computer program product capable of identifying the type of counterfeit currency in response to the above-mentioned technical problems.
[0004] Firstly, this application provides a method for identifying the type of counterfeit currency. The method includes:
[0005] Obtain first banknote information of the banknote to be identified; the first banknote information includes a first serial number and first dimension information;
[0006] If a matching target mapping array is determined based on the first serial number, the banknote to be identified is considered counterfeit.
[0007] Based on the first dimension information, the counterfeit money is matched with the banknotes in the target mapping array to obtain the matching result;
[0008] Calculate the matching score between the counterfeit currency and the corresponding banknote based on the matching results;
[0009] The banknote type corresponding to the score that meets the scoring condition in the matching score is taken as the banknote type to which the counterfeit banknote belongs.
[0010] In one embodiment, before obtaining the first banknote information of the banknote to be identified, the method further includes:
[0011] Obtain the second banknote information from the counterfeit currency database; the second banknote information includes the second serial number and second dimension information.
[0012] The second banknote information is assembled based on the second serial number to obtain a mapping array; the mapping array includes the target mapping array.
[0013] In one embodiment, determining the matching target mapping array based on the first serial number includes:
[0014] Search the mapping array corresponding to the first serial number in the mapping array;
[0015] The mapping array corresponding to the first serial number is used as the target mapping array to match the banknote to be identified.
[0016] In one embodiment, the step of matching the counterfeit currency with the banknotes in the target mapping array based on the first dimension information to obtain the matching result includes:
[0017] Determine the second-dimensional information and banknote identifier corresponding to the banknotes in the target mapping array;
[0018] Establish a mapping relationship between the first dimension information and the second dimension information;
[0019] Based on the banknote identifier and the mapping relationship, the counterfeit banknote is matched with the banknote in sequence to obtain the matching result.
[0020] In one embodiment, the matching result includes a matching priority value; calculating the matching score between the counterfeit currency and the corresponding banknote based on the matching result includes:
[0021] Get the matching score function;
[0022] Based on the first dimension information, the matching priority value is substituted into the matching score function to obtain the key matching score;
[0023] The matching scores of the key matching points are summed based on the banknote identifiers to obtain the matching score between the counterfeit banknote and the corresponding banknote.
[0024] In one embodiment, the method further includes:
[0025] When the matching priority value is the first preset value, the corresponding key matching score is the second preset value.
[0026] Secondly, this application also provides a counterfeit currency type identification device. The device includes:
[0027] The acquisition module is used to acquire the first banknote information of the banknote to be identified; the first banknote information includes the first serial number and the first dimension information;
[0028] The determination module is used to identify the banknote as counterfeit if a matching target mapping array is determined based on the first serial number;
[0029] The matching module is used to match the counterfeit money with the banknotes in the target mapping array based on the first dimension information to obtain the matching result;
[0030] The calculation module is used to calculate the matching score between the counterfeit money and the corresponding banknote based on the matching result;
[0031] The processing module is used to identify the banknote type corresponding to the score that meets the scoring conditions in the matching scores as the banknote type to which the counterfeit banknote belongs.
[0032] In one embodiment, the device further includes:
[0033] An assembly module is used to obtain second banknote information from banknotes in a counterfeit currency database; the second banknote information includes a second serial number and second dimension information; the second banknote information is assembled according to the second serial number to obtain a mapping array; the mapping array includes the target mapping array.
[0034] In one embodiment, the determining module is used to query the mapping array corresponding to the first serial number in the mapping array; and to use the mapping array corresponding to the first serial number as the target mapping array to match the counterfeit currency.
[0035] In one embodiment, the matching module is used to determine the second dimension information and banknote identifier corresponding to the banknotes in the target mapping array; establish a mapping relationship between the first dimension information and the second dimension information; and match the counterfeit banknotes with the banknotes in sequence according to the banknote identifier and the mapping relationship to obtain a matching result.
[0036] In one embodiment, the matching result includes a matching priority value; the calculation module is further configured to obtain a matching score function; substitute the matching priority value into the matching score function based on the first dimension information to obtain a key matching score; and sum the key matching scores based on the banknote identifier to obtain the matching score between the counterfeit banknote and the corresponding banknote.
[0037] In one embodiment, the calculation module is further configured to set a second preset value for the corresponding key matching score when the matching priority value is a first preset value.
[0038] Thirdly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the above-described method.
[0039] Fourthly, this application also provides a computer-readable storage medium. The computer-readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the above-described method.
[0040] Fifthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the above-described method.
[0041] The aforementioned method, apparatus, computer equipment, and storage medium for identifying counterfeit currency types involve: acquiring first banknote information of the banknote to be identified; if the first banknote information includes a first serial number and first dimension information, then identifying the banknote as counterfeit; determining a matching target mapping array based on the first serial number; establishing a matching relationship between the serial number and the corresponding target mapping array, enabling rapid determination of the matching target mapping array based on the serial number, i.e., quickly determining the possible banknote type of the counterfeit currency; furthermore, matching the counterfeit currency with the banknotes in the target mapping array based on the first dimension information to obtain a matching result; calculating a matching score between the counterfeit currency and the corresponding banknote based on the matching result; and identifying the banknote type corresponding to the score that meets the scoring conditions in the matching score as the banknote type to which the counterfeit currency belongs. This achieves accurate determination of the banknote type to which the counterfeit currency belongs based on the matching score of the banknotes in the target mapping array, thereby effectively improving the efficiency of counterfeit currency type identification while ensuring the accuracy of counterfeit currency type identification. Attached Figure Description
[0042] Figure 1 This is an application environment diagram of a counterfeit currency type identification method in one embodiment;
[0043] Figure 2 This is a flowchart illustrating a method for identifying counterfeit currency types in one embodiment;
[0044] Figure 3 This is a flowchart illustrating the matching steps in one embodiment;
[0045] Figure 4 This is a flowchart illustrating a method for identifying counterfeit currency types in another embodiment;
[0046] Figure 5 This is a structural block diagram of a counterfeit currency type identification device in one embodiment;
[0047] Figure 6 This is a structural block diagram of a counterfeit currency type identification device in another embodiment;
[0048] Figure 7 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0049] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0050] The counterfeit currency type identification method provided in this application embodiment can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be integrated onto server 104, or it can be located in the cloud or on another network server.
[0051] Terminal 102 acquires the first banknote information of the counterfeit currency; the first banknote information includes the first serial number and the first dimension information; terminal 102 determines the target mapping array for matching based on the first serial number; terminal 102 matches the counterfeit currency with the banknotes in the target mapping array based on the first dimension information to obtain the matching result; terminal 102 calculates the matching score between the counterfeit currency and the corresponding banknote based on the matching result; terminal 102 takes the banknote type corresponding to the score that meets the scoring condition in the matching score as the banknote type to which the counterfeit currency belongs.
[0052] The terminal 102 can be, but is not limited to, various personal computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle systems. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster consisting of multiple servers.
[0053] In one embodiment, such as Figure 2 As shown, a method for identifying the type of counterfeit currency is provided, which can be applied to... Figure 1 Taking terminal 102 as an example, the explanation includes the following steps:
[0054] S202, Obtain the first banknote information of the banknote to be identified; the first banknote information includes the first serial number and the first dimension information.
[0055] Among them, the banknote to be identified can refer to the banknote to be identified, which can be genuine or counterfeit.
[0056] Banknote information can refer to information related to banknotes. In this application, the banknotes can be genuine or counterfeit. First banknote information can refer to information related to counterfeit banknotes, including the first serial number and first dimension information. The serial number refers to the code on a Renminbi banknote. The "serial number" consists of two or three English letters printed on the banknote to mark the printing batch, arranged and printed by the banknote printing plant according to a certain pattern; the "number" is the Arabic numeral serial number printed after the serial number, used to indicate the order of each banknote within the same serial number batch. The first serial number can refer to the serial number of counterfeit banknotes.
[0057] Dimensional information refers to all information about a banknote except for the serial number. It can be used to identify the type of banknote and may include currency type, denomination, version, issuance date, machine-readable anti-counterfeiting features, and source. Different dimensions have different values; for example, if the dimension is currency, the corresponding value could be RMB, USD, or EUR. Denomination refers to the face value of the banknote; for example, the value for the "denomination" dimension could be 1 yuan, 10 yuan, or 20 yuan. Version refers to differences in the year and design of banknotes of the same denomination; for example, the value for the "version" dimension could be 1990, 2008, or 2026. First-degree dimensional information can also refer to the dimensional information of counterfeit banknotes.
[0058] Specifically, on the banknote information acquisition page, the terminal can respond to the user's input of banknote information for counterfeit banknotes and obtain the first banknote information for the counterfeit banknote.
[0059] In one embodiment, the terminal can display different serial numbers and dimension information on the banknote information display page. The dimension information includes dimension values for different dimensions. In response to the user's selection of serial numbers and selection of dimension values for different dimensions, the terminal can obtain the first banknote information of counterfeit banknotes.
[0060] In one embodiment, prior to S202, second banknote information of banknotes in the counterfeit banknote database is obtained; the second banknote information includes a second serial number and second dimension information; the second banknote information is assembled based on the second serial number to obtain a mapping array; the mapping array includes a target mapping array.
[0061] The counterfeit currency vault can refer to an area that stores information related to counterfeit currency. The information stored in the counterfeit currency vault can be used to identify the type of counterfeit currency. The counterfeit currency vault contains different types of banknotes, and the counterfeit currency in the counterfeit currency vault is used to identify the type of counterfeit currency.
[0062] Banknote type refers to the variety of banknotes. Banknote types can be categorized based on serial number and dimensions. The more dimensions, the more detailed the classification of banknote types, and the more banknote types there are. The specific number of dimensions can be determined based on the actual situation. Different types of banknotes have different serial numbers or different dimension values. For example, when the dimension is currency, the banknote types include Renminbi, US Dollar, and Euro, etc.
[0063] Second banknote information can refer to information related to banknotes in the counterfeit banknote database. Second banknote information includes the second serial number and second dimension information. The second serial number can refer to the serial number of banknotes in the counterfeit banknote database. The second dimension information can refer to the dimension information of banknotes in the counterfeit banknote database. A mapping array can refer to an array obtained by combining different types of banknotes based on the second serial number. Each banknote in the mapping array corresponds to a serial number, and different mapping arrays correspond to different serial numbers. For example, there are mapping arrays A and B. Array A contains banknotes a1, a2, and a3; array B contains banknotes b1, b2, and b3. The serial number of banknotes a1, a2, and a3 can be RB81629639, and the serial number of banknotes b1, b2, and b3 can be RB81629630. The target mapping array can refer to the mapping array with the first serial number.
[0064] In one embodiment, assembling the second banknote information based on the second serial number to obtain a mapping array includes generating different initial mapping arrays based on different second serial numbers, determining the dimension priority of different dimensions in the second banknote information, and assembling the different dimensions of the banknote according to the dimension priority in the initial mapping array to obtain the mapping array.
[0065] The initial mapping array refers to a preliminary mapping array generated based on the serial number, with each initial mapping array corresponding to one serial number. Dimension priority indicates the importance of a dimension in counterfeit currency identification; the higher the dimension priority, the greater its impact on counterfeit currency identification.
[0066] In one embodiment, in the initial mapping array, the different dimensions of the banknotes are assembled according to the dimension priority to obtain the mapping array. The terminal can arrange the dimensions of the banknotes in order of dimension priority from low to high or from high to low, and in the initial mapping array, the dimensions of each banknote are assembled sequentially according to the banknote identifier to obtain the mapping array.
[0067] Among them, the banknote identifier can be used to represent different banknotes. The banknote identifier can be the ID (Identity Document) corresponding to the banknote. For example, the banknote identifiers of banknote A and banknote B are 001 and 002, respectively.
[0068] S204, if the target mapping array is determined based on the first serial number, the banknote to be identified is considered counterfeit.
[0069] Counterfeit currency refers to counterfeit banknotes, also known as fake banknotes, which are forged or altered currencies. Forged currency refers to counterfeit currency made by various means to imitate the pattern, shape, and color of genuine currency. Altered currency refers to counterfeit currency made by using various methods such as patching, peeling, alteration, piecing together, shifting, and reprinting to change the original form of genuine currency. In this application, counterfeit currency refers to counterfeit currency that is to be identified in terms of type.
[0070] Specifically, if the terminal finds the mapping array corresponding to the first serial number in the mapping array, it will use the mapping array corresponding to the first serial number as the target mapping array to match the banknote to be identified, and the banknote to be identified will be identified as counterfeit.
[0071] In one embodiment, if no matching target mapping array is determined based on the first serial number, the banknote to be identified is treated as a genuine banknote, and the subsequent steps S206, S208, and S210 are not performed.
[0072] S206: Based on the first dimension information, match the counterfeit money with the banknotes in the target mapping array to obtain the matching result.
[0073] The matching result refers to the result of matching the dimensions of the counterfeit currency with the dimensions of the banknotes in the target mapping array. The matching result includes a matching priority value and a matching result identifier. The matching priority value refers to the return value after matching. It is used to determine whether the dimensions of the counterfeit currency match those of the banknotes in the target mapping array, and to calculate the matching score. The higher the dimension priority, the larger the matching priority value. For example, if the dimension priority is: Currency > Denomination > Version, then the matching priority values could be: Currency: 3, Denomination: 2, and Version: 1.
[0074] The matching result identifier is used to indicate whether a match has occurred. For example, when matching the dimension value of dimension A of counterfeit currency with the dimension value of dimension A of banknote B, if both the counterfeit currency's dimension A (currency type) and the banknote's dimension A (currency type) have the same value, the matching result identifier is "Yes," indicating that the dimension value of dimension A of counterfeit currency matches the dimension value of dimension A of banknote B. If both the counterfeit currency's dimension A (currency type) and the banknote's dimension A (currency type) have the same value, the matching result identifier is "No," indicating that the dimension value of dimension A of counterfeit currency does not match the dimension value of dimension A of banknote B.
[0075] Specifically, the terminal can match the dimensions in the second dimension information of the banknote in the target mapping array with the dimensions in the first dimension information of the counterfeit banknote based on the banknote identifier, and obtain the matching result.
[0076] In one embodiment, the dimensions in the second dimension information of the banknotes in the target mapping array are matched with the dimensions in the first dimension information of the counterfeit banknotes. The matching result is obtained by matching the dimensions in the second dimension information of the banknotes in the target mapping array with the dimensions in the first dimension information of the counterfeit banknotes in order of dimension priority from low to high or from high to low.
[0077] S208, calculate the matching score between the counterfeit currency and the corresponding banknote based on the matching results.
[0078] The matching score refers to the score after matching counterfeit money with banknotes. The matching score can be used to measure the similarity between the counterfeit money and the banknotes in terms of their banknote types. For example, after matching counterfeit money with banknote 'a' in different dimensions, if the matching score is higher, the counterfeit money is more likely to be the banknote type to which banknote 'a' belongs.
[0079] Specifically, the matching score function is obtained; the matching priority value is substituted into the matching score function based on the first dimension information to obtain the key matching score; the key matching scores are summed based on the banknote identifier to obtain the matching score between the counterfeit banknote and the corresponding banknote.
[0080] The matching score function refers to the function used to calculate the matching score; different dimensions may correspond to the same or different matching score functions. The key matching score refers to the value obtained by substituting the matching priority value into the matching score function. The banknote identifier can be used to represent different banknotes; the banknote identifier can be the ID (Identity Document) corresponding to the banknote, for example, banknote A and banknote B have banknote identifiers of 001 and 002 respectively.
[0081] For example, the matching score function can be an exponential function generated based on the weight base, and the formula for the matching score function can be shown below:
[0082] y = a x
[0083] Where y is the key matching score, a is the weight base, and x is the matching priority value. The weight base can be set according to the importance of different dimensions in identifying the type of counterfeit currency. The higher the importance, the larger the weight base. Alternatively, the weight base can be set uniformly, for example, the weight base can be 2.
[0084] In one embodiment, when the matching priority value is a first preset value, the corresponding key matching score is a second preset value.
[0085] Here, the preset value can refer to a pre-set value, and the first preset value and the second preset value can be different preset values. For example, if the first preset value is -2 and the second preset value is 0, when the matching priority value of dimension A is -2, it means that the dimension A of the counterfeit money does not match the dimension A of the banknote in the target mapping array, and the corresponding key matching score is 0.
[0086] S210, the banknote type corresponding to the score that meets the score condition in the matching score is taken as the banknote type to which the counterfeit banknote belongs.
[0087] Among them, the scoring condition can refer to the condition used to measure the matching score. For example, the scoring condition can be greater than the score threshold, or the highest matching score, or greater than the score threshold and the highest matching score.
[0088] The score threshold can be a value used to determine the matching score. For example, the score threshold can be 6, etc., and can be set according to the actual situation.
[0089] In one embodiment, when the score condition is greater than a score threshold, the banknote type corresponding to the score greater than the score threshold in the matching score is taken as the banknote type to which the counterfeit banknote may belong, thereby further determining the banknote type to which the counterfeit banknote belongs among the banknote types to which the counterfeit banknote may belong.
[0090] In one embodiment, when the scoring condition is the highest matching score, the banknote type corresponding to the highest matching score is taken as the banknote type to which the counterfeit banknote belongs.
[0091] In the aforementioned method for identifying counterfeit currency, the method obtains the first banknote information of the banknote to be identified, including the first serial number and the first dimension information. If a matching target mapping array is determined based on the first serial number, the banknote to be identified is considered counterfeit. A matching relationship between the serial number and the corresponding target mapping array is established, enabling rapid determination of the matching target mapping array based on the serial number, thus quickly identifying the possible banknote type of the counterfeit currency. Furthermore, the counterfeit currency is matched with the banknotes in the target mapping array based on the first dimension information to obtain a matching result. A matching score between the counterfeit currency and the corresponding banknote is calculated based on the matching result. The banknote type corresponding to the score that meets the scoring condition is taken as the banknote type to which the counterfeit currency belongs. This method accurately determines the banknote type to which the counterfeit currency belongs based on the matching score of the banknotes in the target mapping array, thereby effectively improving the efficiency of counterfeit currency type identification while also ensuring the accuracy of counterfeit currency type identification.
[0092] In one embodiment, such as Figure 3 As shown, the matching steps include:
[0093] S302, determine the second-dimensional information and banknote identifier corresponding to the banknotes in the target mapping array.
[0094] Specifically, the terminal can first determine the banknote identifier in the target mapping array, and then determine the second dimension information corresponding to each banknote based on the banknote identifier.
[0095] S304, Establish the mapping relationship between the first-dimensional information and the second-dimensional information.
[0096] The mapping relationship can be used to represent the correspondence between the dimensions in the first dimension information and the dimensions in the second dimension information. For example, the dimension A of counterfeit money and the dimension A of paper money are mutually corresponding.
[0097] Specifically, the terminal can establish a mapping relationship between each dimension of the first dimension information and each dimension of the second dimension information based on the banknote identification.
[0098] S306, based on the banknote identifier and mapping relationship, the counterfeit banknote is matched with the banknote in sequence to obtain the matching result.
[0099] In one embodiment, the terminal can determine the matching order of the counterfeit money and the banknote based on the banknote identifier, and then match each dimension of the counterfeit money with each dimension of the banknote in turn according to the matching order and mapping relationship to obtain the matching result.
[0100] For example, the dimensional information includes currency, denomination, and issuance date. In the first dimension of counterfeit currency, the corresponding dimension values are RMB, 5-yuan note, and 2011. The target mapping array contains banknotes A, B, and C. Banknote A is identified as 001, with corresponding dimension values of USD, 5-yuan note, and 2011. Banknote B is identified as 002, with corresponding dimension values of RMB, 10-yuan note, and 2011. Banknote C is identified as 003, with corresponding dimension values of RMB, 5-yuan note, and 2011. Following the matching order of banknotes identified as 001, 002, and 003, banknotes A (US dollars, 5 yuan notes, and 2011), B (RMB, 10 yuan notes, and 2011), and C (RMB, 5 yuan notes, and 2011) are matched with counterfeit banknotes (RMB, 5 yuan notes, and 2011) to obtain the matching results.
[0101] In this embodiment, by determining the second-dimensional information and banknote identifier corresponding to the banknotes in the target mapping array, a mapping relationship between the first-dimensional information and the second-dimensional information is established. Based on the banknote identifier and the mapping relationship, counterfeit banknotes are matched with banknotes sequentially to obtain the matching results. This method can accurately match counterfeit banknotes with counterfeit banknotes in the target mapping array, thereby accurately identifying the type of counterfeit banknotes.
[0102] As an example, this embodiment is as follows:
[0103] The approach to this solution can be as follows:
[0104] In the process of matching counterfeit banknotes with serial numbers, the input banknotes to be identified have many dimensions, such as serial number, denomination, version, issuance date, machine-readable anti-counterfeiting features, and source channel, possibly more than a dozen dimensions of data (with no duplicate dimension values). These need to be matched according to the following rules:
[0105] (1) Prioritize matching of higher priority dimensions;
[0106] (2) Secondly, prioritize matching more indicators, and finally, the matching results in the fake currency database need to be displayed in descending order of matching degree.
[0107] This method places the values of each dimension of a counterfeit currency record into different positions in an array, ordered from low to high priority, from left to right. Weights are then assigned based on the array coordinates: for example, if a specific dimension of the input banknote information matches the corresponding dimension value in the array of counterfeit currency records, a key match score of [2^match priority value] is obtained. Finally, the matching score is obtained by summing the key match scores; a higher matching score means a higher degree of matching and is ranked higher, while a lower matching score means a lower degree of matching and is ranked lower.
[0108] The specific plan can be as follows:
[0109] By assembling a counterfeit currency data set into an array from left to right according to its various dimensions from low to high priority, and then matching the values of each dimension of the real-time input banknote information to obtain the key matching score for that dimension, the matching scores are finally obtained and sorted in descending order according to the matching scores. This achieves the goal of dimension priority matching sorting and matching score sorting in multi-dimensional scenarios.
[0110] Step 1: Start a scheduled task every day to assemble all banknote information from the counterfeit currency database into a memory-mapped array (Key)<serial number,<banknote identifier, array>>.
[0111] Step 1.1: The project starts a scheduled task every day to assemble all the banknote information in the counterfeit banknote database into memory. One counterfeit banknote serial number may have many counterfeit banknote information entries, so the assembly structure is: mapping array <serial number, <banknote identifier, array>>.
[0112] Step 1.2: Each array in <banknote identifier, array> is an array assembled from the dimension values of one banknote information entry from the database, corresponding to an ArrayList in Java. <string>From left to right, the priority of each dimension increases sequentially.
[0113] Step 2: Based on the banknote information of the banknote to be identified input in real time, locate the target mapping array for the matching serial number in the mapping array <serial number, <banknote identifier, array>>: <banknote identifier, array>.
[0114] Step 3: Based on the various dimensions of the input banknote, match each array in the target mapping array in Step 2 to obtain the key matching score, and finally obtain the matching score, which is sorted in descending order.
[0115] Step 3.1: Based on the <banknote identifier, array> encapsulated with all banknote information corresponding to the real-time input banknote serial number obtained in Step 2, iterate through each key-value combination in the operation mapping array (key is the unique banknote identifier recorded in the counterfeit banknote database, and value is an array encapsulated with all dimension information): according to each dimension value of the input banknote information, execute arrayList.indexof(dimensional value). If the return value is -1, it means there is no match, and the key match score is [0]; if the return value is not -1, it means there is a match, and the return value is the priority value of the match, and the key match score is [2^return value]. For example, if the return value is 3, the key match score is: [2^3=8].
[0116] Step 3.2: After matching each counterfeit banknote identifier across all dimensions, sum the key matching scores for all dimensions to obtain a matching score. Counterfeit banknote records with higher matching scores have a higher degree of matching and are ranked higher. Based on the obtained matching scores, output the ranking results and display the banknote matching results to further improve the accurate identification of banknotes or provide early warnings. For example, banknotes can be manually or automatically identified based on the displayed ranking results.
[0117] Figure 4 This is a flowchart illustrating a method for identifying counterfeit currency types in another embodiment. Counterfeit currency types are identified based on three dimensions: currency type, denomination, and version. The priority of these dimensions in the diagram is: currency type > denomination > version.
[0118] It should be understood that although the steps in the flowcharts of the above embodiments are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the above embodiments may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0119] Based on the same inventive concept, this application also provides a counterfeit currency type identification device for implementing the counterfeit currency type identification method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations of one or more counterfeit currency type identification device embodiments provided below can be found in the limitations of the counterfeit currency type identification method described above, and will not be repeated here.
[0120] In one embodiment, such as Figure 5 As shown, a counterfeit currency type identification device is provided, including: an acquisition module 502, a determination module 504, a matching module 506, a calculation module 508, and a processing module 510, wherein:
[0121] The acquisition module 502 is used to acquire the first banknote information of the banknote to be identified; the first banknote information includes the first serial number and the first dimension information.
[0122] The determination module 504 is used to identify the banknote as counterfeit if a matching target mapping array is determined based on the first serial number;
[0123] The matching module 506 is used to match the counterfeit money with the banknotes in the target mapping array based on the first dimension information to obtain the matching result;
[0124] The calculation module 508 is used to calculate the matching score between the counterfeit currency and the corresponding banknote based on the matching results;
[0125] The processing module 510 is used to identify the banknote type corresponding to the score that meets the scoring conditions in the matching score as the banknote type to which the counterfeit banknote belongs.
[0126] In one embodiment, the determining module 504 is used to query the mapping array corresponding to the first serial number in the mapping array; and to use the mapping array corresponding to the first serial number as the target mapping array for matching counterfeit currency.
[0127] In one embodiment, the matching module 506 is used to determine the second dimension information and banknote identifier corresponding to the banknote in the target mapping array; establish the mapping relationship between the first dimension information and the second dimension information; and match the counterfeit banknote with the banknote in sequence according to the banknote identifier and the mapping relationship to obtain the matching result.
[0128] In one embodiment, the matching result includes a matching priority value; the calculation module 508 is also used to obtain a matching score function; the matching priority value is substituted into the matching score function according to the first dimension information to obtain a key matching score; the key matching score is summed according to the banknote identifier to obtain the matching score between the counterfeit banknote and the corresponding banknote.
[0129] In one embodiment, the calculation module 510 is further configured to set the corresponding key matching score to a second preset value when the matching priority value is a first preset value.
[0130] In one embodiment, such as Figure 6 As shown, the counterfeit currency type identification device further includes: an assembly module 512, wherein:
[0131] Assembly module 512 is used to obtain the second banknote information of banknotes in the counterfeit banknote database; the second banknote information includes the second serial number and the second dimension information; the second banknote information is assembled according to the second serial number to obtain a mapping array; the mapping array includes the target mapping array.
[0132] In the above embodiment, by acquiring the first banknote information of the banknote to be identified, including the first serial number and the first dimension information, if a matching target mapping array is determined based on the first serial number, the banknote to be identified is identified as counterfeit. A matching relationship between the serial number and the corresponding target mapping array is established, realizing the rapid determination of the matching target mapping array based on the serial number, that is, quickly determining the possible banknote type of the counterfeit banknote. Then, by matching the counterfeit banknote with the banknotes in the target mapping array based on the first dimension information, a matching result is obtained. The matching score between the counterfeit banknote and the corresponding banknote is calculated based on the matching result. The banknote type corresponding to the score that meets the scoring condition in the matching score is taken as the banknote type to which the counterfeit banknote belongs. This realizes the accurate determination of the banknote type to which the counterfeit banknote belongs based on the matching score of the banknotes in the target mapping array, thereby effectively improving the efficiency of counterfeit banknote type identification while ensuring the accuracy of counterfeit banknote type identification.
[0133] The various modules in the aforementioned counterfeit currency type identification device can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0134] In one embodiment, a computer device is provided, which may be a terminal or a server; this embodiment uses a computer device as a terminal for description. Its internal structure diagram can be as follows: Figure 7 As shown, the computer device includes a processor, memory, input / output interfaces, a communication interface, a display unit, and an input device. The processor, memory, and input / output interfaces are connected via a system bus, and the communication interface, display unit, and input device are also connected to the system bus via the input / output interfaces. The processor provides computing and control capabilities. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores the operating system and computer programs. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage medium. The input / output interfaces are used for exchanging information between the processor and external devices. The communication interface is used for wired or wireless communication with external terminals; wireless communication can be achieved through Wi-Fi, mobile cellular networks, NFC (Near Field Communication), or other technologies. When executed by the processor, the computer program implements a method for identifying the type of counterfeit currency. The display unit of the computer device is used to form a visually visible image. It can be a display screen, a projection device, or a virtual reality imaging device. The display screen can be an LCD screen or an e-ink screen. The input device of the computer device can be a touch layer covering the display screen, or buttons, trackballs, or touchpads set on the casing of the computer device, or external keyboards, touchpads, or mice, etc.
[0135] Those skilled in the art will understand that Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0136] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the embodiments described above.
[0137] In one embodiment, a computer-readable storage medium is provided having a computer program stored thereon, which, when executed by a processor, implements the embodiments described above.
[0138] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the embodiments described above.
[0139] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data shall comply with the relevant laws, regulations and standards of the relevant countries and regions.
[0140] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0141] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0142] The above embodiments are merely illustrative of several implementation methods of this application, and their descriptions are relatively specific and detailed. However, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.< / string>
Claims
1. A method for identifying the type of counterfeit currency, characterized in that, The method includes: Obtain first banknote information of the banknote to be identified; the first banknote information includes the first serial number and first dimension information of the banknote to be identified, and the first dimension information of the banknote to be identified includes version, denomination and currency. If no mapping array is found based on the first serial number, then the banknote to be identified is a genuine banknote; If a matching target mapping array is determined based on the first serial number, the banknote to be identified is considered counterfeit. The mapping array is an array obtained by combining multiple counterfeit banknotes of different types based on the second serial number. Different mapping arrays correspond to different second serial numbers. Each mapping array corresponds to one second serial number. The same mapping array includes multiple counterfeit banknote records. Each counterfeit banknote record includes a banknote identifier and an array. The array includes the second dimension information of the counterfeit banknote. The second dimension information of the counterfeit banknote includes the version, denomination, and currency. The version, denomination, and currency are stored in different array coordinates in the array in the order from left to right. The larger the array coordinate, the higher the dimension priority. The dimension priority indicates the importance of the corresponding dimension in the identification of the counterfeit banknote type. Based on the first dimension information, the counterfeit currency is matched with multiple counterfeit currency records in the target mapping array to obtain a matching result. The matching result includes a matching priority value. When the priority of the dimension corresponding to the matched dimension is higher, the matching priority value is larger. The matching score between the counterfeit currency and the corresponding banknote is calculated based on the matching priority value in the matching results; The banknote type corresponding to the score that meets the scoring condition in the matching score is taken as the banknote type to which the counterfeit banknote belongs.
2. The method according to claim 1, characterized in that, Before obtaining the first banknote information of the banknote to be identified, the method further includes: Obtain the second banknote information from the counterfeit banknote database; the second banknote information includes the second serial number and second dimension information of the banknotes in the counterfeit banknote database. The second banknote information is assembled based on the second serial number to obtain a mapping array; the mapping array includes the target mapping array.
3. The method according to claim 2, characterized in that, The step of determining the target mapping array for matching based on the first serial number includes: Search the mapping array corresponding to the first serial number in the mapping array; The mapping array corresponding to the first serial number is used as the target mapping array to match the banknote to be identified.
4. The method according to claim 1, characterized in that, The step of matching the counterfeit currency with multiple counterfeit currency records in the target mapping array based on the first dimension information, and obtaining the matching results, includes: Determine the second-dimensional information and banknote identifier corresponding to the banknotes in the target mapping array; Establish a mapping relationship between the first dimension information and the second dimension information; Based on the banknote identifier and the mapping relationship, the counterfeit banknote is matched with the banknote in sequence to obtain the matching result.
5. The method according to claim 4, characterized in that, The calculation of the matching score between the counterfeit currency and the corresponding banknote based on the matching result includes: Get the matching score function; Based on the first dimension information, the matching priority value is substituted into the matching score function to obtain the key matching score; The matching scores of the key matching points are summed based on the banknote identifiers to obtain the matching score between the counterfeit banknote and the corresponding banknote.
6. The method according to claim 5, characterized in that, The method further includes: When the matching priority value is the first preset value, the corresponding key matching score is the second preset value.
7. A counterfeit currency type identification device, characterized in that, The device includes: The acquisition module is used to acquire first banknote information of the banknote to be identified; the first banknote information includes the first serial number and first dimension information of the banknote to be identified, and the first dimension information of the banknote to be identified includes version, denomination and currency. The determination module is used to determine whether the banknote to be identified is genuine if no matching mapping array is found based on the first serial number, or if a matching target mapping array is determined based on the first serial number, and the banknote to be identified is counterfeit. The mapping array is an array obtained by combining multiple counterfeit banknotes of different types based on the second serial number. Different mapping arrays correspond to different second serial numbers. Each mapping array corresponds to one second serial number. The same mapping array includes multiple counterfeit banknote records. Each counterfeit banknote record includes a banknote identifier and an array. The array includes the second dimension information of the counterfeit banknote, which includes the version, denomination, and currency. The version, denomination, and currency are stored in different array coordinates in the array in order from left to right. The larger the array coordinate, the higher the dimension priority. The dimension priority indicates the importance of the corresponding dimension in the identification of the counterfeit banknote type. The matching module is used to match the counterfeit currency with multiple counterfeit currency records in the target mapping array based on the first dimension information to obtain a matching result. The matching result includes a matching priority value. The higher the priority of the dimension corresponding to the matched dimension, the larger the matching priority value. The calculation module is used to calculate the matching score between the counterfeit money and the corresponding banknote based on the matching priority value in the matching result; The processing module is used to identify the banknote type corresponding to the score that meets the scoring conditions in the matching scores as the banknote type to which the counterfeit banknote belongs.
8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
10. A computer program product, comprising a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 6.
Citation Information
Patent Citations
A banknote identification method and identification device and a terminal apparatus
CN107464334A
Counterfeit currency management method and system, electronic equipment and readable medium
CN114821888A