Invoice information security management method, device, equipment, medium and product
By obtaining the multi-dimensional feature data of invoices and the K-means clustering algorithm, the importance score of the invoices to be stored is calculated, which solves the problem of high storage cost of invoice information in the existing technology, realizes a personalized secure storage strategy for invoice information, and reduces storage costs.
Patent Information
- Application Number
- CN202410596814.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-14
- Publication Date
- 2024-09-17
- Estimated Expiration
- 2044-05-14
AI Technical Summary
Existing invoice information storage solutions cannot match storage strategies based on the importance of invoices, resulting in high storage costs.
By obtaining the multi-dimensional feature data of the stored invoices, the K-means clustering algorithm is used to cluster to obtain the invoice category center, calculate the estimated importance score of the invoices to be stored, and determine the appropriate data security storage strategy for storage based on the score range.
It achieves the matching of invoice importance and storage cost, optimizes the cost of secure storage of invoice information, and reduces unnecessary storage overhead.
Smart Images

Figure CN118350029B
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of data security technology, and specifically relates to an invoice information security management method, device, equipment, medium and product. Background Art
[0002] Various commercial activities in modern society widely use various invoices, such as electronic invoices and traditional paper invoices, etc. As a result, the finance department receives and processes (such as verifying and saving invoices) a large number of invoice images (i.e., image information of electronic invoices / paper invoices) every day.
[0003] With the advent of the digital age, data has become an important asset in various industries, and data security issues involving important information such as personal privacy and business secrets have become increasingly prominent. The secure storage of data is an important link to ensure that data is not damaged, lost, stolen, or leaked. Invoice information, as important information involving personal privacy and business secrets, should also be kept safe.
[0004] At present, the security strategy of the existing invoice information storage solution treats all invoice information equally, that is, no matter how important the invoice information is, it is stored using the same data security storage strategy (for example, local storage or cloud platform storage, etc.), but different data security storage strategies have different costs (for example, the cost of encrypted storage strategy will be higher than that of non-encrypted storage strategy, the cost of cloud platform storage strategy will be higher than that of local storage strategy, etc.), so if a high-cost data security storage strategy is used to save invoice information of lower importance, the storage cost will remain high. Therefore, how to determine a data security storage strategy that matches the importance of the invoice and store the invoice information in a personalized manner, so as to optimize and reduce the cost of secure storage of invoice information, is a topic that technicians in this field urgently need to study. Summary of the invention
[0005] The purpose of the present invention is to provide an invoice information security management method, device, computer equipment, computer readable storage medium and computer program product to solve the problem of existing invoice information storage solutions that the importance of invoices does not match the storage cost, which may lead to high storage costs.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions:
[0007] In a first aspect, a method for secure management of invoice information is provided, comprising:
[0008] Get image information of all stored invoices;
[0009] For each stored invoice among all the stored invoices, extract corresponding multi-dimensional feature data from the corresponding image information;
[0010] Based on the multi-dimensional feature data of each stored invoice, a K-means clustering algorithm is applied to cluster and obtain the centers of multiple invoice categories;
[0011] Acquire image information of the invoice to be deposited, and extract multi-dimensional feature data of the invoice to be deposited from the image information;
[0012] According to the importance score of each scored invoice, the importance score estimate I of the invoice to be stored is calculated according to the following formula:
[0013]
[0014] Wherein, N represents the total number of the scored invoices, the scored invoices refer to the stored invoices among all the stored invoices and have been manually scored to obtain the importance score value, n and n' represent positive integers less than or equal to N, S n represents the similarity calculated based on the multidimensional feature data of the invoice to be stored and the multidimensional feature data of the nth scored invoice among all the scored invoices, μ n represents the correction factor corresponding to the invoice to be stored and the nth scored invoice, I n represents the importance score of the nth scored invoice, K represents the total number of invoice categories of the multiple invoice categories, k′ represents a positive integer less than or equal to K, D k′ represents the Euler distance calculated based on the multi-dimensional feature data of the invoice to be stored and the center of the k′th category among the multiple invoice categories, D n,k′ represents the Euler distance calculated based on the multidimensional feature data of the nth scored invoice and the center of the k′th category, D n′,k′ represents the Euler distance calculated based on the multi-dimensional feature data of the n′th scored invoice among all the scored invoices and the center of the k′th category;
[0015] According to a plurality of importance score ranges that are preset and correspond one to one with a plurality of data security storage policies, determining an importance score range that includes the importance score estimate value from the plurality of importance score ranges;
[0016] The image information of the invoice to be stored is stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range.
[0017] Based on the above invention content, a new solution is provided for determining a data security storage strategy that matches the importance of invoices based on invoice clustering results and performing personalized storage of invoice information, that is, firstly extracting multidimensional feature data of each stored invoice based on the image information of all stored invoices, then clustering the centers of multiple invoice categories using the K-means clustering algorithm based on the data extraction results, and then calculating the importance score estimate of the invoice to be stored based on the distance between the invoice to be stored and the center of each category, the distance between each scored invoice and the center of each category, and the importance score of each scored invoice, finally determining a data security storage strategy that matches the importance of the invoice based on the subordinate relationship between the importance score estimate and multiple importance score ranges, and storing the image information of the invoice to be stored according to this strategy, so as to achieve the purpose of matching the importance of the invoice with the storage cost, optimize and reduce the cost of secure storage of invoice information, and facilitate practical application and promotion.
[0018] In a possible design, for each stored invoice among all the stored invoices, corresponding multi-dimensional feature data is extracted from the corresponding image information, including:
[0019] For each stored invoice among all the stored invoices, optical character recognition (OCR) technology is applied to obtain corresponding invoice content, wherein the invoice content includes the invoice header, track number, copy number, purpose, customer name, bank account number, transaction product name, business item, measurement unit, quantity, unit price, amount, person handling, company seal, invoice date, tax type, tax rate and / or tax amount;
[0020] For each of the stored invoices, label encoding or one-hot encoding is applied to encode each non-numerical item in the corresponding invoice content to obtain numerical codes corresponding to each of the non-numerical items one by one, and the numerical codes and the numerical items in the corresponding invoice content are summarized to obtain corresponding multi-dimensional feature data.
[0021] In a possible design, based on the multi-dimensional feature data of each stored invoice, a K-means clustering algorithm is applied to cluster and obtain the centers of multiple invoice categories, including:
[0022] For each stored invoice, according to the corresponding multidimensional feature data and the multidimensional feature data of each other stored invoice in all the stored invoices, the corresponding Euler distance with each other stored invoice is calculated, and the number of distances whose corresponding Euler distance is less than a preset distance threshold is obtained by counting;
[0023] Determine, according to the number of distances between the stored invoices and the distribution positions of the stored invoices in the multidimensional space, a plurality of stored invoices having maximum number of distances among all the stored invoices, wherein each dimension in the multidimensional space corresponds to each dimension of the multidimensional feature data in a one-to-one manner;
[0024] Arrange the plurality of stored invoices in descending order according to the maximum values of the distance numbers to obtain an invoice sequence;
[0025] Selecting the first K stored invoices from the invoice sequence, and using the multi-dimensional feature data of the first K stored invoices as K initial cluster centers in a one-to-one correspondence, where K represents the total number of preset invoice categories;
[0026] Based on the K initial cluster centers, other steps of the K-means clustering algorithm and located after the initial cluster center selection step are applied to cluster and obtain centers of multiple invoice categories.
[0027] In a possible design, after extracting the multi-dimensional feature data of the invoice to be deposited and before calculating the importance score estimate of the invoice to be deposited, the method further includes:
[0028] Importing the multi-dimensional feature data of the invoice to be stored into a false invoice identification model pre-trained based on a machine learning algorithm, and outputting the confidence that the invoice to be stored is a false invoice;
[0029] Determining whether the confidence level is less than a preset confidence level threshold;
[0030] If yes, then continue to calculate the importance score estimate of the invoice to be stored, otherwise push the image information of the invoice to be stored to the manual verification terminal;
[0031] When the manual verification result fed back by the manual verification terminal is received and confirms that the invoice to be deposited is a real invoice, the importance score estimate of the invoice to be deposited continues to be calculated. When the manual verification result fed back by the manual verification terminal is received and confirms that the invoice to be deposited is a false invoice, the calculation of the importance score estimate of the invoice to be deposited is terminated.
[0032] In one possible design, the multiple data security storage policies include a cloud platform non-encrypted storage policy, a cloud platform encrypted storage policy, a blockchain storage policy, a local non-encrypted storage policy, a local encrypted storage policy, a local periodic backup storage policy and / or a local authority management storage policy.
[0033] In a possible design, storing the image information of the invoice to be stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range includes:
[0034] Importing the image information of the invoice to be stored and the image information of the invoice sample into a pre-trained image difference description generation model, and outputting a text describing the image difference between the image information of the invoice to be stored and the image information of the invoice sample;
[0035] Performing hash processing on the image information of the invoice to be stored based on a hash algorithm to obtain a first hash value;
[0036] According to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range, the image difference description text and the first hash value are stored in the target storage location of the certain data security storage strategy, so that when it is necessary to restore and reproduce the image information of the invoice to be stored, the invoice sample image information and the image difference description text are first imported into the AI drawing tool based on AIGC, and the image information to be reproduced is output, and then the image information to be reproduced is hashed based on the hash algorithm to obtain a second hash value, and finally, when it is determined that the second hash value matches the first hash value, the image information to be reproduced is output as the image information of the invoice to be stored.
[0037] In a second aspect, an invoice information security management device is provided, comprising an invoice information acquisition unit, a feature data extraction unit, a category center determination unit, an importance score estimation unit, a target range determination unit, and a storage strategy implementation unit;
[0038] The invoice information acquisition unit is used to acquire the image information of all stored invoices;
[0039] The feature data extraction unit is communicatively connected to the invoice information acquisition unit, and is used to extract corresponding multi-dimensional feature data from corresponding image information for each stored invoice among all the stored invoices;
[0040] The category center determination unit is communicatively connected to the feature data extraction unit, and is used to apply K-means clustering algorithm to cluster the multi-dimensional feature data of each stored invoice to obtain the centers of multiple invoice categories;
[0041] The invoice information acquisition unit is further used to acquire image information of the invoice to be stored;
[0042] The feature data extraction unit is further used to extract the multi-dimensional feature data of the invoice to be deposited from the image information of the invoice to be deposited;
[0043] The importance score estimation unit is respectively connected to the feature data extraction unit and the category center determination unit for calculating the importance score estimation value I of the invoice to be stored according to the importance score value of each scored invoice according to the following formula:
[0044]
[0045] Wherein, N represents the total number of the scored invoices, the scored invoices refer to the stored invoices among all the stored invoices and have been manually scored to obtain the importance score value, n and n' represent positive integers less than or equal to N, S n represents the similarity calculated based on the multidimensional feature data of the invoice to be stored and the multidimensional feature data of the nth scored invoice among all the scored invoices, μ n represents the correction factor corresponding to the invoice to be stored and the nth scored invoice, I n represents the importance score of the nth scored invoice, K represents the total number of invoice categories of the multiple invoice categories, k′ represents a positive integer less than or equal to K, D k′ represents the Euler distance calculated based on the multi-dimensional feature data of the invoice to be stored and the center of the k′th category among the multiple invoice categories, D n,k′ represents the Euler distance calculated based on the multidimensional feature data of the nth scored invoice and the center of the k′th category, D n′,k′ represents the Euler distance calculated based on the multi-dimensional feature data of the n′th scored invoice among all the scored invoices and the center of the k′th category;
[0046] The target range determination unit is communicatively connected to the importance score estimation unit, and is used to determine an importance score range including the importance score estimation value from among a plurality of importance score ranges that are preset and correspond one to one with a plurality of data security storage policies;
[0047] The storage strategy implementation unit is respectively communicatively connected to the invoice information acquisition unit and the target range determination unit, and is used to store the image information of the invoice to be stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range.
[0048] In a third aspect, the present invention provides a computer device comprising a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the invoice information security management method as described in the first aspect or any possible design of the first aspect.
[0049] In a fourth aspect, the present invention provides a computer-readable storage medium having instructions stored thereon, which, when executed on a computer, executes the invoice information security management method as described in the first aspect or any possible design of the first aspect.
[0050] In a fifth aspect, the present invention provides a computer program product, including a computer program or instructions, which, when executed by a computer, implements the invoice information security management method as described in the first aspect or any possible design of the first aspect.
[0051] Beneficial effects of the above scheme:
[0052] (1) The present invention creatively provides a new solution for determining a data security storage strategy that matches the importance of invoices based on the results of invoice clustering and performing personalized storage of invoice information, namely, first extracting multidimensional feature data of each stored invoice based on the image information of all stored invoices, then clustering multiple invoice categories using the K-means clustering algorithm based on the data extraction results, and then calculating the estimated importance score of the invoice to be stored based on the distance between the invoice to be stored and the center of each category, the distance between each scored invoice and the center of each category, and the importance score of each scored invoice. Finally, according to the subordinate relationship between the estimated importance score and multiple importance score ranges, a data security storage strategy that matches the importance of the invoice is determined, and the image information of the invoice to be stored is stored according to this strategy. In this way, the purpose of matching the importance of invoices with storage costs can be achieved, the cost of secure storage of invoice information can be optimized and reduced, and practical application and promotion can be facilitated. BRIEF DESCRIPTION OF THE DRAWINGS
[0053] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0054] Figure 1 A flowchart of the invoice information security management method provided in an embodiment of the present application.
[0055] Figure 2 A schematic diagram of the structure of the invoice information security management device provided in an embodiment of the present application.
[0056] Figure 3 A schematic diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0057] In order to more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in combination with the drawings and the description of the embodiments or the prior art. Obviously, the following description of the structures of the drawings is only some embodiments of the present invention. For ordinary technicians in this field, other embodiments can be obtained based on these embodiments without creative work. It should be noted that the description of these embodiments is used to help understand the present invention, but does not constitute a limitation of the present invention.
[0058] It should be understood that although the terms first and second, etc. may be used herein to describe various objects, these objects should not be limited by these terms. These terms are only used to distinguish one object from another object. For example, a first object can be referred to as a second object, and similarly, a second object can be referred to as a first object without departing from the scope of the exemplary embodiments of the present invention.
[0059] It should be understood that the term "and / or" that may appear in this document is merely a description of the association relationship between associated objects, indicating that there may be three relationships. For example, A and / or B can indicate three situations: A exists alone, B exists alone, or A and B exist at the same time. For another example, A, B and / or C can indicate the existence of any one of A, B and C or any combination of them. The term " / and" that may appear in this document describes another type of association object relationship, indicating that there may be two relationships. For example, A / and B can indicate two situations: A exists alone or A and B exist at the same time. In addition, the character " / " that may appear in this document generally indicates that the previous and next associated objects are in an "or" relationship.
[0060] Example
[0061] like Figure 1 As shown, the invoice information security management method provided in the first aspect of this embodiment can be, but is not limited to, executed by a computer device with certain computing resources, such as a financial management server or other electronic device. Figure 1 As shown, the invoice information security management method may include but is not limited to the following steps S1 to S7.
[0062] S1. Get the image information of all stored invoices.
[0063] In step S1, the stored invoice refers to the invoice whose image information has been stored according to the equal treatment storage strategy or a certain data security storage strategy, which can be an electronic invoice or various traditional paper invoices. In addition, the specific method of obtaining the image information of all stored invoices can be implemented by conventional data reading methods.
[0064] S2. For each stored invoice among all the stored invoices, corresponding multi-dimensional feature data is extracted from the corresponding image information.
[0065] In step S2, since the image information of the invoice includes but is not limited to invoice contents such as the ticket header, track number, copy number, purpose, customer name, bank account number, transaction item name, business item, unit of measurement, quantity, unit price, amount, person handling, company seal, invoice date, tax type, tax rate and / or tax amount, etc., multi-dimensional feature data for invoice category analysis / and for false invoice identification can be extracted from the invoice image information based on these invoice contents. Specifically, for each stored invoice among all the stored invoices, corresponding multi-dimensional feature data is extracted from the corresponding image information, including but not limited to the following steps S21 to S22.
[0066] S21. For each stored invoice among all the stored invoices, optical character recognition (OCR) technology is used to identify the corresponding invoice content, wherein the invoice content includes but is not limited to the invoice header, track number, copy number, purpose, customer name, bank account number, transaction product name, business item, unit of measurement, quantity, unit price, amount, person handling, company seal, invoice date, tax type, tax rate and / or tax amount, etc.
[0067] In step S21, the above-mentioned OCR (Optical Character Recognition) refers to the process in which an electronic device (such as a scanner or a digital camera) checks the characters printed on paper, determines their shapes by detecting dark and light patterns, and then translates the shapes into computer text using a character recognition method. Therefore, the invoice content can be identified from the invoice image information based on the existing optical character recognition OCR technology.
[0068] S22. For each of the stored invoices, apply label encoding or one-hot encoding to encode each non-numerical item in the corresponding invoice content to obtain each numerical code corresponding to each non-numerical item one by one, and summarize each numerical code and each numerical item in the corresponding invoice content to obtain corresponding multi-dimensional feature data.
[0069] In step S22, the label encoding method and the one-hot encoding method are both existing encoding methods, and are both used to convert classification data into numerical codes, thereby obtaining numerical multidimensional feature data, so as to subsequently perform Euler distance calculation, similarity calculation or import recognition model, etc.
[0070] S3. Based on the multi-dimensional feature data of each stored invoice, a K-means clustering algorithm is applied to cluster and obtain the centers of multiple invoice categories.
[0071] In step S3, the K-means clustering algorithm is an iterative clustering analysis algorithm, and its steps are generally: pre-dividing the data into K groups, and randomly selecting K objects as initial cluster centers, and then calculating the distance between each object and each seed cluster center, assigning each object to the cluster center closest to it, and continuously updating the iterative cluster center until the error sum (i.e., the criterion function) converges to obtain the clustering result. Considering that the existing K-means clustering algorithm will change the compactness and discreteness of the clusters due to the influence of extreme values during the clustering process, reducing the accuracy of the entire clustering result, preferably, according to the multi-dimensional feature data of each stored invoice, the K-means clustering algorithm is applied to cluster to obtain the centers of multiple invoice categories, including but not limited to the following steps S31 to S35.
[0072] S31. For each stored invoice, the corresponding Euler distance with each other stored invoice is calculated based on the corresponding multidimensional feature data and the multidimensional feature data of each other stored invoice in all the stored invoices, and the number of distances whose corresponding Euler distance is less than a preset distance threshold is counted.
[0073] In step S31, the specific calculation formula of the Euler distance is an existing formula. For example, for a certain stored invoice, if there are 99 other stored invoices, 99 Euler distances will be calculated, and if 15 of the 99 Euler distances are less than the distance threshold, then the number of distances of the certain stored invoice whose Euler distance is less than the preset distance threshold is 15. The aforementioned number of distances positively reflects the number of other stored invoices located around the certain stored invoice in the multidimensional space, that is, positively reflects the size of the neighbor density corresponding to the certain stored invoice.
[0074] S32. According to the number of distances between the stored invoices and the distribution positions of the stored invoices in the multidimensional space, multiple stored invoices with maximum number of distances among all the stored invoices are determined, wherein each dimension in the multidimensional space corresponds one-to-one to each dimension of the multidimensional feature data.
[0075] In step S32, the number of distances between each of the multiple stored invoices is greater than the number of distances between adjacent invoices in each dimension, which can be similar to the method of finding extreme values through partial derivatives of multivariate functions. According to the number of distances between each of the multiple stored invoices and the distribution positions of each of the stored invoices in the multidimensional space, the multiple stored invoices with the maximum number of distances are determined.
[0076] S33. Arrange the multiple stored invoices in descending order according to the maximum values of the distance numbers to obtain an invoice sequence.
[0077] S34. Select the first K stored invoices from the invoice sequence, and use the multi-dimensional feature data of the first K stored invoices as K initial cluster centers in a one-to-one correspondence, where K represents the total number of preset invoice categories.
[0078] S35. Based on the K initial cluster centers, apply the other steps of the K-means clustering algorithm and located after the initial cluster center selection step to cluster and obtain the centers of multiple invoice categories.
[0079] Therefore, based on the above steps S31 to S35, the sample distribution information can be used to select multiple points with the highest density as the initial clustering centers, so as to effectively solve the problem of clustering falling into local optimality due to human interference or extreme value influence, so that the final clustering result can meet the conditions that the similarity of the same cluster is the highest and the similarity of different clusters is the lowest, thereby ensuring the stability of the clustering result.
[0080] S4. Obtain image information of the invoice to be deposited, and extract multi-dimensional feature data of the invoice to be deposited from the image information.
[0081] In step S4, the invoice to be stored is the newly received invoice to be stored, which can be an electronic invoice or a traditional paper invoice. In addition, the specific method of extracting the multi-dimensional feature data of the invoice to be stored can be obtained by referring to the conventional derivation of step S2 above, which will not be repeated here.
[0082] S5. Based on the importance scores of each scored invoice, the importance score estimate I of the invoice to be stored is calculated according to the following formula:
[0083]
[0084] Wherein, N represents the total number of the scored invoices, the scored invoices refer to the stored invoices among all the stored invoices and have been manually scored to obtain the importance score value, n and n' represent positive integers less than or equal to N, S nrepresents the similarity calculated based on the multidimensional feature data of the invoice to be stored and the multidimensional feature data of the nth scored invoice among all the scored invoices, μ n represents the correction factor corresponding to the invoice to be stored and the nth scored invoice, I n represents the importance score of the nth scored invoice, K represents the total number of invoice categories of the multiple invoice categories, k′ represents a positive integer less than or equal to K, D k′ represents the Euler distance calculated based on the multi-dimensional feature data of the invoice to be stored and the center of the k′th category among the multiple invoice categories, D n,k′ represents the Euler distance calculated based on the multidimensional feature data of the nth scored invoice and the center of the k′th category, D n′,k′ represents the Euler distance calculated based on the multi-dimensional feature data of the n′th scored invoice among all the scored invoices and the center of the k′th category.
[0085] In step S5, in the process of estimating the importance score estimate of the invoice to be stored with reference to the importance score of each scored invoice, the key point is to accurately find the neighbor set of the target invoice (i.e., the invoice to be stored). Although the traditional method can use the cosine similarity formula or the Pearson correlation coefficient formula to calculate the similarity between invoices, it is difficult for them to obtain the true nearest neighbor set in the case of the invoice-score matrix and its coefficients, and there is a certain deviation. Therefore, this embodiment is specifically based on the results of the invoice category clustering analysis, and adds a correction factor μ to correct the deviation caused by the Pearson correlation coefficient calculation formula. The importance score of each scored invoice is used as a sample score, which can be obtained by manually scoring when a certain data security storage strategy is manually selected to save the corresponding invoice. In addition, the similarity can be specifically, but not limited to, conventionally calculated using the cosine similarity formula.
[0086] Before step S5, in order to avoid calculating the importance score estimate for false invoices and achieve the purpose of saving procedures, preferably, after extracting the multi-dimensional feature data of the invoice to be deposited and before calculating the importance score estimate of the invoice to be deposited, the method also includes but is not limited to the following steps S501 to S505.
[0087] S501. Import the multi-dimensional feature data of the invoice to be deposited into a false invoice identification model pre-trained based on a machine learning algorithm, and output the confidence level that the invoice to be deposited is a false invoice.
[0088] In step S501, the machine learning algorithm is a core artificial intelligence algorithm that specifically studies how computers simulate or implement human learning behavior to acquire new knowledge or skills, reorganize existing knowledge structures to continuously improve their own performance, and is the fundamental way to make computers intelligent; specifically, the machine learning algorithm preferably uses a machine learning algorithm based on support vector machine, K nearest neighbor method, stochastic gradient descent method, multi-layer perceptron, decision tree, back propagation neural network or radial basis function network, etc., so as to quickly and accurately find the rules in the data. Therefore, based on a certain amount of sample data (i.e., the multidimensional feature data of the sample invoice) and positive and negative labels (i.e., false invoice labels and real invoice labels), the false invoice recognition model can be trained through conventional calibration verification modeling methods (specifically including the calibration process and verification process of the model, that is, first by comparing the model simulation results with the measured data, and then adjusting the model parameters according to the comparison results, so that the simulation results are consistent with the actual process). Preferably, in the calibration verification modeling process of the false invoice recognition model, the model parameters are tuned using a tree-structured Bayesian optimization algorithm.
[0089] S502: Determine whether the confidence level is less than a preset confidence level threshold.
[0090] In the step S502, the confidence threshold may be 70% for example.
[0091] S503. If yes, continue to calculate the importance score estimate of the invoice to be stored; otherwise, push the image information of the invoice to be stored to the manual verification terminal.
[0092] In step S503, the manual verification terminal is an electronic device held by the invoice authenticity verification personnel, such as a work computer or a work mobile phone, which is used to display the image information of the invoice to be deposited to the invoice authenticity verification personnel, and collect and obtain the invoice authenticity manual verification result of the invoice to be deposited input by the invoice authenticity verification personnel: whether the invoice to be deposited is a real invoice or a fake invoice.
[0093] S504. Upon receiving the manual verification result fed back by the manual verification terminal and confirming that the invoice to be deposited is a genuine invoice, continue to calculate the estimated importance score of the invoice to be deposited. Upon receiving the manual verification result fed back by the manual verification terminal and confirming that the invoice to be deposited is a false invoice, terminate the calculation of the estimated importance score of the invoice to be deposited.
[0094] S6. According to a plurality of importance score ranges that are preset and correspond one to one with a plurality of data security storage strategies, determine an importance score range that includes the importance score estimate value from the plurality of importance score ranges.
[0095] In the step S6, specifically, the multiple data security storage strategies include but are not limited to cloud platform non-encrypted storage strategy, cloud platform encrypted storage strategy, blockchain storage strategy, local non-encrypted storage strategy, local encrypted storage strategy, local periodic backup storage strategy and / or local authority management storage strategy, etc., which respectively correspond to different storage costs and are positively correlated with the value of the importance score range and the importance of the invoice: the lower the storage cost, the lower the value of the importance score range, and the lower the importance of the invoice; the higher the storage cost, the higher the value of the corresponding importance score range, and the higher the importance of the invoice. In addition, any two importance score ranges in the multiple importance score ranges generally have no intersection, but of course there may be an intersection (at this time, at least two importance score ranges containing the importance score estimate may be determined, and one of them needs to be randomly or manually selected for implementation).
[0096] S7. Store the image information of the invoice to be stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range.
[0097] In the step S7, considering that the data volume of the image information of the invoice to be stored is large (generally at the Mb level), in order to reduce the storage space and further optimize and reduce the storage cost, it is preferred that the image information of the invoice to be stored is stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range, including but not limited to the following steps S71 to S73.
[0098] S71. Import the image information of the invoice to be deposited and the image information of the invoice sample into a pre-trained image difference description generation model, and output the image difference description text between the image information of the invoice to be deposited and the image information of the invoice sample.
[0099] In step S71, the goal of the image difference captioning (IDC) model is to compare two similar pictures and capture the visual differences between them, and then describe these differences in natural language. Specifically, it can be implemented by, but not limited to, using existing models based on pre-extracted object-level difference features, models based on dynamic correlation attention mechanisms, difference description models based on Transformer (a classic NLP model proposed by Google's team in 2017) structures, and / or models that combine the use of semantic segmentation models and graph convolutional neural networks to describe image differences. Specifically, the image difference description text can be, but is not limited to, composed of several keywords. In addition, the specific pre-training process of the image difference description generation model can also be implemented with reference to the prior art; the invoice sample image information can preferably be the image information of a blank invoice.
[0100] S72. Perform hash processing on the image information of the invoice to be deposited based on a hash algorithm to obtain a first hash value.
[0101] In step S72, the hash algorithm is an existing algorithm and is used to map a binary value of any length into a shorter and fixed-length binary value. This short binary value is called a hash value. Therefore, the algorithm can be applied to perform the hash processing on the image information of the invoice to be deposited to obtain the first hash value.
[0102] S73. According to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range, the image difference description text and the first hash value are stored in the target storage location of the certain data security storage strategy, so that when it is necessary to restore and reproduce the image information of the invoice to be stored, the invoice sample image information and the image difference description text are first imported into an AI drawing tool based on AIGC (Artificial Intelligence Generated Content, generative artificial intelligence, which is an important symbol of the transition from the artificial intelligence 1.0 era to the 2.0 era), and the image information to be reproduced is output, and then the image information to be reproduced is hashed based on the hash algorithm to obtain a second hash value, and finally, when it is determined that the second hash value matches the first hash value, the image information to be reproduced is output as the image information of the invoice to be stored.
[0103] In step S73, since the total data size of the image difference description text and the first hash value is generally at the Kb level, the storage space requirement can be greatly reduced relative to the invoice image information with a data size of the Mb level. The AI drawing tool is an existing drawing software, which may include but is not limited to AI drawing software such as Midjourrney, Dell-E, StableDiffusion, NovelAI and Disco Diffusion. Since these software belong to large models, they have the characteristics of many parameters, long training time, good generalization, strong versatility and high practicality, and can be applied to drawing in various scenes, so they can be well applied to this embodiment, that is, when necessary, the image information of the invoice to be stored can be restored and reproduced based on the invoice sample image information and the image difference description text. Since the hash value has the characteristics of irreversibility, uniqueness and anti-collision, the matching result of the second hash value and the first hash value can be used as a basis for measuring whether the image information of the invoice to be stored is successfully restored and reproduced: if it matches, the restoration is successful, otherwise the restoration fails. In addition, considering the possibility of single restoration failure, multiple restoration measures can also be used to restore the image information.
[0104] Therefore, based on the invoice information security management method described in the aforementioned steps S1 to S7, a new solution is provided for determining a data security storage strategy that matches the importance of invoices based on the invoice clustering results and performing personalized storage of invoice information, that is, firstly extracting multidimensional feature data of each stored invoice based on the image information of all stored invoices, and then, based on the data extraction results, applying the K-means clustering algorithm to cluster and obtain the centers of multiple invoice categories, and then calculating the importance score estimate of the invoice to be stored based on the distance between the invoice to be stored and the center of each category, the distance between each scored invoice and the center of each category, and the importance score of each scored invoice, finally determining a data security storage strategy that matches the importance of the invoice based on the subordinate relationship between the importance score estimate and multiple importance score ranges, and storing the image information of the invoice to be stored according to this strategy, so as to achieve the purpose of matching the importance of invoices with storage costs, optimize and reduce the cost of secure storage of invoice information, and facilitate practical application and promotion.
[0105] like Figure 2 As shown, the second aspect of this embodiment provides a virtual device for implementing the invoice information security management method described in the first aspect, comprising an invoice information acquisition unit, a feature data extraction unit, a category center determination unit, an importance score estimation unit, a target range determination unit, and a storage strategy implementation unit;
[0106] The invoice information acquisition unit is used to acquire the image information of all stored invoices;
[0107] The feature data extraction unit is communicatively connected to the invoice information acquisition unit, and is used to extract corresponding multi-dimensional feature data from corresponding image information for each stored invoice among all the stored invoices;
[0108] The category center determination unit is communicatively connected to the feature data extraction unit, and is used to apply K-means clustering algorithm to cluster the multi-dimensional feature data of each stored invoice to obtain the centers of multiple invoice categories;
[0109] The invoice information acquisition unit is further used to acquire image information of the invoice to be stored;
[0110] The feature data extraction unit is further used to extract the multi-dimensional feature data of the invoice to be deposited from the image information of the invoice to be deposited;
[0111] The importance score estimation unit is respectively connected to the feature data extraction unit and the category center determination unit for calculating the importance score estimation value I of the invoice to be stored according to the importance score value of each scored invoice according to the following formula:
[0112]
[0113] Wherein, N represents the total number of the scored invoices, the scored invoices refer to the stored invoices among all the stored invoices and have been manually scored to obtain the importance score value, n and n' represent positive integers less than or equal to N, S n represents the similarity calculated based on the multidimensional feature data of the invoice to be stored and the multidimensional feature data of the nth scored invoice among all the scored invoices, μ n represents the correction factor corresponding to the invoice to be stored and the nth scored invoice, I n represents the importance score of the nth scored invoice, K represents the total number of invoice categories of the multiple invoice categories, k′ represents a positive integer less than or equal to K, D k′ represents the Euler distance calculated based on the multi-dimensional feature data of the invoice to be stored and the center of the k′th category among the multiple invoice categories, D n,k′ represents the Euler distance calculated based on the multidimensional feature data of the nth scored invoice and the center of the k′th category, D n′,k′ represents the Euler distance calculated based on the multi-dimensional feature data of the n′th scored invoice among all the scored invoices and the center of the k′th category;
[0114] The target range determination unit is communicatively connected to the importance score estimation unit, and is used to determine an importance score range including the importance score estimation value from among a plurality of importance score ranges that are preset and correspond one to one with a plurality of data security storage policies;
[0115] The storage strategy implementation unit is respectively communicatively connected to the invoice information acquisition unit and the target range determination unit, and is used to store the image information of the invoice to be stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range.
[0116] The working process, working details and technical effects of the aforementioned device provided in the second aspect of this embodiment can be referred to the invoice information security management method described in the first aspect, and will not be repeated here.
[0117] like Figure 3 As shown, the third aspect of this embodiment provides a computer device for executing the invoice information security management method as described in the first aspect, including a memory, a processor and a transceiver that are sequentially connected in communication, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the invoice information security management method as described in the first aspect. Specifically, the memory may include, but is not limited to, a random access memory (Random-Access Memory, RAM), a read-only memory (Read-Only Memory, ROM), a flash memory (Flash Memory), a first-in-first-out memory (First Input First Output, FIFO) and / or a first-in-last-out memory (First Input Last Output, FILO), etc.; the processor may include, but is not limited to, a microprocessor of the STM32F105 series. In addition, the computer device may also include, but is not limited to, a power module, a display screen and other necessary components.
[0118] The working process, working details and technical effects of the aforementioned computer equipment provided in the third aspect of this embodiment can be found in the invoice information security management method described in the first aspect, and will not be repeated here.
[0119] The fourth aspect of this embodiment provides a computer-readable storage medium storing instructions including the invoice information security management method as described in the first aspect, that is, the computer-readable storage medium stores instructions, and when the instructions are executed on a computer, the invoice information security management method as described in the first aspect is executed. The computer-readable storage medium refers to a carrier for storing data, which may include but is not limited to computer-readable storage media such as floppy disks, optical disks, hard disks, flash memory, USB flash drives and / or memory sticks, and the computer may be a general-purpose computer, a special-purpose computer, a computer network or other programmable devices.
[0120] The working process, working details and technical effects of the aforementioned computer-readable storage medium provided in the fourth aspect of this embodiment can be referred to the invoice information security management method described in the first aspect, and will not be repeated here.
[0121] In a fifth aspect, this embodiment provides a computer program product, including a computer program or instructions, which, when executed by a computer, implements the invoice information security management method as described in the first aspect. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0122] Finally, it should be noted that the above description is only a preferred embodiment of the present invention and is not intended to limit the protection scope of the present invention. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.
Claims
1. A method for secure management of invoice information, characterized in that: include: Get image information of all stored invoices; For each stored invoice among all the stored invoices, extract corresponding multi-dimensional feature data from corresponding image information; Based on the multi-dimensional feature data of each stored invoice, a K-means clustering algorithm is applied to cluster and obtain the centers of multiple invoice categories; Acquire image information of the invoice to be deposited, and extract multi-dimensional feature data of the invoice to be deposited from the image information; According to the importance score of each scored invoice, the importance score estimate I of the invoice to be stored is calculated according to the following formula: Wherein, N represents the total number of the scored invoices, the scored invoices refer to the stored invoices among all the stored invoices that have been manually scored to obtain importance scores, n and n' represent positive integers less than or equal to N, S n represents the similarity calculated based on the multidimensional feature data of the invoice to be stored and the multidimensional feature data of the nth scored invoice among all the scored invoices, μ n represents the correction factor corresponding to the invoice to be stored and the nth scored invoice, I n represents the importance score of the nth scored invoice, K represents the total number of invoice categories of the multiple invoice categories, k′ represents a positive integer less than or equal to K, D k′ represents the Euler distance calculated based on the multi-dimensional feature data of the invoice to be stored and the center of the k′th category among the multiple invoice categories, D n,k′ represents the Euler distance calculated based on the multidimensional feature data of the nth scored invoice and the center of the k′th category, D n′,k′ represents the Euler distance calculated based on the multi-dimensional feature data of the n′th scored invoice among all the scored invoices and the center of the k′th category; According to a plurality of importance score ranges that are preset and correspond one to one with a plurality of data security storage policies, determining an importance score range that includes the importance score estimate value from the plurality of importance score ranges; The image information of the invoice to be stored is stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range.
2. The invoice information security management method according to claim 1 is characterized in that: For each stored invoice among all the stored invoices, corresponding multi-dimensional feature data is extracted from the corresponding image information, including: For each stored invoice among all the stored invoices, optical character recognition (OCR) technology is applied to obtain corresponding invoice content, wherein the invoice content includes the invoice header, track number, copy number, purpose, customer name, bank account number, transaction product name, business item, measurement unit, quantity, unit price, amount, person handling, company seal, invoice date, tax type, tax rate and / or tax amount; For each of the stored invoices, label encoding or one-hot encoding is applied to encode each non-numerical item in the corresponding invoice content to obtain numerical codes corresponding to each of the non-numerical items one by one, and the numerical codes and the numerical items in the corresponding invoice content are summarized to obtain corresponding multi-dimensional feature data.
3. The invoice information security management method according to claim 1, characterized in that: Based on the multi-dimensional feature data of each stored invoice, the K-means clustering algorithm is applied to cluster and obtain the centers of multiple invoice categories, including: For each stored invoice, according to the corresponding multidimensional feature data and the multidimensional feature data of each other stored invoice in all the stored invoices, the corresponding Euler distance with each other stored invoice is calculated, and the number of distances whose corresponding Euler distance is less than a preset distance threshold is obtained by counting; Determine, according to the number of distances between the stored invoices and the distribution positions of the stored invoices in the multidimensional space, a plurality of stored invoices having maximum number of distances among all the stored invoices, wherein each dimension in the multidimensional space corresponds to each dimension of the multidimensional feature data in a one-to-one manner; Arrange the plurality of stored invoices in descending order according to the maximum values of the distance numbers to obtain an invoice sequence; Selecting the first K stored invoices from the invoice sequence, and using the multi-dimensional feature data of the first K stored invoices as K initial cluster centers in a one-to-one correspondence, where K represents the total number of preset invoice categories; Based on the K initial cluster centers, other steps of the K-means clustering algorithm and located after the initial cluster center selection step are applied to cluster and obtain centers of multiple invoice categories.
4. The invoice information security management method according to claim 1 is characterized in that: After extracting the multi-dimensional feature data of the invoice to be stored and before calculating the importance score estimate of the invoice to be stored, the method further includes: Importing the multi-dimensional feature data of the invoice to be stored into a false invoice identification model pre-trained based on a machine learning algorithm, and outputting the confidence that the invoice to be stored is a false invoice; Determining whether the confidence level is less than a preset confidence level threshold; If yes, then continue to calculate the importance score estimate of the invoice to be stored, otherwise push the image information of the invoice to be stored to the manual verification terminal; When the manual verification result fed back by the manual verification terminal is received and confirms that the invoice to be deposited is a real invoice, the importance score estimate of the invoice to be deposited continues to be calculated. When the manual verification result fed back by the manual verification terminal is received and confirms that the invoice to be deposited is a false invoice, the calculation of the importance score estimate of the invoice to be deposited is terminated.
5. The invoice information security management method according to claim 1, characterized in that: The multiple data security storage policies include a cloud platform non-encrypted storage policy, a cloud platform encrypted storage policy, a blockchain storage policy, a local non-encrypted storage policy, a local encrypted storage policy, a local regular backup storage policy and / or a local authority management storage policy.
6. The invoice information security management method according to claim 1 is characterized in that: Storing the image information of the invoice to be stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range includes: Importing the image information of the invoice to be stored and the image information of the invoice sample into a pre-trained image difference description generation model, and outputting a text describing the image difference between the image information of the invoice to be stored and the image information of the invoice sample; Performing hash processing on the image information of the invoice to be stored based on a hash algorithm to obtain a first hash value; According to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range, the image difference description text and the first hash value are stored in the target storage location of the certain data security storage strategy, so that when it is necessary to restore and reproduce the image information of the invoice to be stored, the invoice sample image information and the image difference description text are first imported into the AI drawing tool based on AIGC, and the image information to be reproduced is output, and then the image information to be reproduced is hashed based on the hash algorithm to obtain a second hash value, and finally, when it is determined that the second hash value matches the first hash value, the image information to be reproduced is output as the image information of the invoice to be stored.
7. An invoice information security management device, characterized in that: It includes an invoice information acquisition unit, a feature data extraction unit, a category center determination unit, an importance score estimation unit, a target range determination unit and a storage strategy implementation unit; The invoice information acquisition unit is used to acquire the image information of all stored invoices; The feature data extraction unit is communicatively connected to the invoice information acquisition unit, and is used to extract corresponding multi-dimensional feature data from corresponding image information for each stored invoice among all the stored invoices; The category center determination unit is communicatively connected to the feature data extraction unit, and is used to apply K-means clustering algorithm to cluster the multi-dimensional feature data of each stored invoice to obtain the centers of multiple invoice categories; The invoice information acquisition unit is further used to acquire image information of the invoice to be stored; The feature data extraction unit is further used to extract the multi-dimensional feature data of the invoice to be deposited from the image information of the invoice to be deposited; The importance score estimation unit is respectively connected to the feature data extraction unit and the category center determination unit for calculating the importance score estimation value I of the invoice to be stored according to the importance score value of each scored invoice according to the following formula: Wherein, N represents the total number of the scored invoices, the scored invoices refer to the stored invoices among all the stored invoices that have been manually scored to obtain importance scores, n and n' represent positive integers less than or equal to N, S n represents the similarity calculated based on the multidimensional feature data of the invoice to be stored and the multidimensional feature data of the nth scored invoice among all the scored invoices, μ n represents the correction factor corresponding to the invoice to be stored and the nth scored invoice, I n represents the importance score of the nth scored invoice, K represents the total number of invoice categories of the multiple invoice categories, k′ represents a positive integer less than or equal to K, D k′ represents the Euler distance calculated based on the multi-dimensional feature data of the invoice to be stored and the center of the k′th category among the multiple invoice categories, D n,k′ represents the Euler distance calculated based on the multidimensional feature data of the nth scored invoice and the center of the k′th category, D n′,k′ represents the Euler distance calculated based on the multi-dimensional feature data of the n′th scored invoice among all the scored invoices and the center of the k′th category; The target range determination unit is communicatively connected to the importance score estimation unit, and is used to determine an importance score range including the importance score estimation value from among a plurality of importance score ranges that are preset and correspond one to one with a plurality of data security storage policies; The storage strategy implementation unit is respectively communicatively connected to the invoice information acquisition unit and the target range determination unit, and is used to store the image information of the invoice to be stored according to a data security storage strategy among the multiple data security storage strategies and corresponding to the certain importance score range.
8. A computer device, characterized in that: It includes a memory, a processor and a transceiver which are communicatively connected in sequence, wherein the memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program to execute the invoice information security management method as described in any one of claims 1 to 6.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores instructions, and when the instructions are executed on the computer, the invoice information security management method as described in any one of claims 1 to 6 is executed.
10. A computer program product comprising a computer program or instructions, characterized in that The computer program or the instruction, when executed by a computer, implements the invoice information security management method as described in any one of claims 1 to 6.
