Electronic purchase order identification method, device and terminal equipment
By using the pre-trained Alexnet convolutional neural network model to identify the electronic purchase order pictures, the problem of difficult to identify the legality of electronic signatures is solved, and the automatic and accurate identification of electronic signatures is realized, reducing risks.
Patent Information
- Application Number
- CN201980092322.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-02-25
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2039-02-25
AI Technical Summary
In electronic purchase orders, it is difficult to accurately identify the legality of electronic signatures manually, resulting in potential risks.
The pre-trained Alexnet convolutional neural network model recognizes the electronic purchase order pictures to judge the legitimacy of the electronic signature.
It realizes accurate and efficient automatic identification of the legality of electronic signatures on electronic purchase orders, making up for the omissions of manual inspection.
Smart Images

Figure CN113474786B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of e-commerce technology, and specifically relates to an electronic purchase order recognition method, device, terminal equipment and computer-readable storage medium. Background Art
[0002] In traditional card payment, consumers need to sign the paper receipt printed out by the POS (Point of Sales) terminal as a proof of the cardholder's confirmation of the payment. Since paper receipts waste paper, are cumbersome to store and manage, more and more merchants are using electronic receipts to replace traditional paper receipts. After the transaction is completed, consumers sign the electronic receipt electronically through the touch screen. After the signature is completed, the POS terminal will automatically send the electronic receipt to the system for storage, which is environmentally friendly and easy to manage.
[0003] However, in the busy work, cashiers usually do not carefully identify whether the electronic signature on the electronic purchase order is clear and legal. If the consumer just clicks or swipes randomly on the touch screen, the cashier may not notice it, resulting in the inability to determine what is specifically signed on the electronic purchase order as a voucher when checking it later, which leads to potential risks. Summary of the invention
[0004] In view of this, the present application provides an electronic purchase order recognition method, apparatus, terminal device and computer-readable storage medium to solve the problem of how to automatically recognize and judge the electronic signature in the electronic purchase order.
[0005] The first aspect of the present application provides an electronic purchase order recognition method, comprising:
[0006] Obtaining an electronic purchase order image, wherein the electronic purchase order image includes an electronic signature;
[0007] The electronic purchase order image is recognized by using a pre-trained Alexnet convolutional neural network model to determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result.
[0008] A second aspect of the present application provides an electronic purchase order recognition device, comprising:
[0009] A first acquisition unit is used to acquire an electronic purchase order image, wherein the electronic purchase order image includes an electronic signature;
[0010] The recognition unit is used to recognize the electronic purchase order image through a pre-trained Alexnet convolutional neural network model, determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result.
[0011] The third aspect of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the electronic purchase order identification method mentioned in the first aspect or any possible implementation of the first aspect is implemented.
[0012] The fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon. When the computer program is executed by a processor, the electronic purchase order identification method mentioned in the first aspect or any possible implementation of the first aspect is implemented.
[0013] In the embodiment of the present invention, since the electronic purchase order containing the electronic signature is identified and judged by the pre-trained Alexnet convolutional neural network model, the legality of the electronic signature on the electronic purchase order can be accurately and efficiently identified and judged automatically and in a timely manner, thereby compensating for manual inspection omissions. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] In order to more clearly illustrate the embodiments of the present application 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 application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0015] Figure 1 A schematic diagram of the implementation process of the first electronic purchase order identification method provided in this application;
[0016] Figure 2a-2c An example of a positive sample image provided for this application;
[0017] Figure 3a-3c Example of negative sample images provided for this application;
[0018] Figure 4 A schematic diagram of the implementation process of the second electronic purchase order identification method provided in this application;
[0019] Figure 5 Schematic diagram of the electronic purchase order identification device provided for this application;
[0020] Figure 6 A schematic diagram of the structure of an embodiment of the terminal device provided in this application. DETAILED DESCRIPTION
[0021] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present invention. However, it should be clear to those skilled in the art that the present invention may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present invention.
[0022] In order to illustrate the technical solution of the present invention, a specific embodiment is provided below for illustration.
[0023] It should be understood that when used in this specification and the appended claims, the term "comprising" indicates the presence of described features, integers, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.
[0024] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.
[0025] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.
[0026] As used in this specification and the appended claims, the term "if" may be interpreted as "when" or "upon" or "in response to determining" or "in response to detecting," depending on the context. Similarly, the phrases "if it is determined" or "if [described condition or event] is detected" may be interpreted as meaning "upon determination" or "in response to determining" or "upon detection of [described condition or event]" or "in response to detecting [described condition or event]," depending on the context.
[0027] In addition, in the description of the present application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0028] Embodiment 1
[0029] The following describes the first electronic purchase order recognition method provided in the embodiment of the present application. Figure 1 The electronic purchase order recognition method in the embodiment of the present application includes:
[0030] In S101, an electronic purchase order image is obtained, wherein the electronic purchase order image includes an electronic signature.
[0031] An electronic purchase receipt is a receipt generated after a consumer swipes a card to make a purchase. In addition to basic information such as store name, product name, consumption amount, consumption time, serial number, etc., the complete electronic purchase receipt also includes the consumer's handwritten electronic signature on the electronic purchase receipt through an electronic device.
[0032] To obtain the electronic purchase order image, the electronic purchase order can be converted into an image format such as jpg through a format conversion program, or the electronic purchase order image can be obtained by automatically taking a screenshot when the electronic purchase order is displayed. The electronic purchase order image at least includes an area where the electronic signature is displayed, that is, the electronic purchase order needs to include electronic signature information. Preferably, the electronic purchase order image only includes an area where the electronic signature is displayed, and excludes areas where other redundant basic information is displayed.
[0033] In S102, the electronic purchase order image is recognized by a pre-trained Alexnet convolutional neural network model to determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result.
[0034] The pre-trained Alexnet convolutional neural network model is loaded into the running memory, and the electronic purchase order image is recognized to determine whether the electronic signature on the electronic purchase order image is legal, that is, whether the signature on the electronic purchase order is clear and recognizable, and obtain a determination result. Optionally, the determination result can be fed back to the user in the form of text or graphics displayed on the screen, for example, by displaying text such as "legal" or "illegal", or by displaying a green icon to indicate that the electronic signature on the electronic purchase order is legal, and by displaying a red icon to indicate that the electronic signature on the electronic purchase order is illegal.
[0035] Optionally, before step S102, the method further includes:
[0036] The electronic purchase order image is preprocessed.
[0037] The preprocessing may include grayscale processing and vector conversion processing.
[0038] When judging the legality of the electronic signature on the electronic purchase order image, there is no need to obtain the specific color information of the electronic purchase order image. Therefore, if the electronic purchase order image is an RGB image, the electronic purchase order image can be grayscale processed to obtain an electronic purchase order image with only one color channel information, thereby reducing the amount of computation required for subsequent recognition and judgment by the Alexnet convolutional neural network model.
[0039] Since the Alexnet convolutional neural network model specifically performs a series of convolution and transformation operations on the input matrix data, the electronic purchase order image is converted into a vector, and the vector corresponding to the converted electronic purchase order image is input into the Alexnet convolutional neural network model.
[0040] Specifically, the pre-trained Alexnet convolutional neural network model includes a Batch Normalization layer and a softmax classifier.
[0041] The pre-trained Alexnet convolutional neural network model is an 8-layer deep neural network, including 5 convolutional layers and 3 fully connected layers, and finally a softmax classifier, which is described as follows:
[0042] Convolutional layer 1: Since the electronic purchase order image is usually black and white or has been grayscale processed, the input data matrix is different from the usual 227*227*3, but 227*227*1; the linear rectified unit (RectifiedLinear Unit, ReLU) is used as the activation function, the convolution kernel size is 11*11, the number is 96, the step size is 4*4, and the padded pixel is 0. After the data passes through this convolution layer, (227-11) / 4+1=55, so the output is 55*55*96. After the first convolution layer, there is a local response normalization layer (Local Response Normalization, LRN) and a max_pooling pooling layer. The LRN layer creates a competition mechanism for the activity of local neurons, making the values with larger responses become relatively larger, and inhibiting other neurons with smaller feedback, enhancing the generalization ability of the model. The max_pooling pooling layer kernel size is 3*3, the step size is 2*2, and after the data is transformed, (55-3) / 2+1=27, so after all the processing of the first layer, the data becomes 27*27*96.
[0043] Convolutional layer 2: The input data matrix is 27*27*96, RELU is used as the activation function, the convolution kernel size is 5*5, the number is 256, the step size is 1*1, and the padding pixel is 2. After the data passes through this convolution layer, (27-5+2*2) / 1+1=27, so the output is 27*27*256. Convolutional layer 2 is the same as layer 1, and also has the same LRN layer and max_pooling pooling layer. After the pooling layer, (27-3) / 2+1=13, and the final output is 13*13*256.
[0044] Convolutional layer 3: The input data matrix is 13*13*256, RELU is used as the activation function, the convolution kernel size is 3*3, the number is 384, the step size is 1*1, and the padding pixel is 1. After the data passes through this convolution layer, (13-3+2*1) / 1+1=13 is obtained, so the output is 13*13*384. Convolutional layer 3 does not have LRN layer and pooling layer.
[0045] Convolutional layer 4: The input data matrix is 13*13*384, RELU is used as the activation function, the convolution kernel size is 3*3, the number is 384, the step size is 1*1, and the padding pixel is 1. After the data passes through this convolution layer, (13-3+2*1) / 1+1=13 is obtained, so the output is 13*13*384. Convolutional layer 4 also has no LRN layer and pooling layer.
[0046] Convolution layer 5: The input data matrix is 13*13*384, RELU is used as the activation function, the convolution kernel size is 3*3, the number is 256, the step size is 1*1, and the padding pixel is 1. After the data passes through this convolution layer, (13-3+2*1) / 1+1=13 is obtained, so the output is 13*13*256. This layer also has a max_pooling pooling layer, the pooling layer kernel size is 3*3, the step size is 2*2, and after transformation, (13-3) / 2+1=6 is obtained, and the output is 6*6*256.
[0047] Fully connected layer 1: The input data is 6*6*256, and RELU is used as the activation function. This layer uses BatchNormalization as the dropout layer. After the change, the data becomes 4096*1.
[0048] Using Batch Normalization as the dropout layer can prevent overfitting while also speeding up model training.
[0049] Fully connected layer 2: Fully connected layer 2 is similar to fully connected layer 1, with an input of 4096*1 and an output of 4096*1.
[0050] Fully connected layer 3: The input data is 4096*1 and the output is 1000*1.
[0051] Softmax classifier: The softmax classifier here specifically includes two categories. Classification label 0 represents legal, and classification label 1 represents illegal.
[0052] Optionally, before step S102, the method further includes:
[0053] Obtaining a preset number of training images, wherein the training images carry determination label information;
[0054] The batch size parameter batch_size, the training round parameter epochs, and the validation set ratio parameter validation_split of the Alexnet convolutional neural network are set, and the training picture is input to obtain the pre-trained Alexnet convolutional neural network model.
[0055] The training images are images that contain electronic signatures and carry judgment label information. A judgment label of 0 indicates that the electronic signature contained in the training image is legal, and a judgment label of 1 indicates that the electronic signature contained in the training image is illegal. The judgment label information carried in the training images can be labels that are marked in advance by staff through manual judgment. A preset number of training images are obtained, for example, 97,150 images containing electronic signatures are obtained as training images. The training images include positive sample images (legal images carrying a judgment label of 0, such as Figure 2a , Figure 2b , Figure 2c As shown) and negative sample images (illegal images with a judgment label of 1, such as Figure 3a , Figure 3b , Figure 3c As shown), and the ratio of positive sample images to negative sample images is balanced, for example, among 97150 training images, the number of positive samples is 56600 and the number of negative samples is 40550. After obtaining the preset number of training images, the training images are subjected to vector conversion processing.
[0056] The hyperparameters of the Alexnet convolutional neural network are set, and the hyperparameters include a batch size parameter batch_size, a training round parameter epochs, and a validation set ratio parameter validation_split. For example, batch_size is set to 128, epochs is set to 100, and validation_split is set to 0.2 (representing that 0.2 ratio of pictures in the training pictures are used as validation sets). The above-mentioned training pictures that have been vector-converted are input into the Alexnet convolutional neural network with the hyperparameters set for training. During the training process, the Alexnet convolutional neural network autonomously adjusts other parameters to finally obtain a trained Alexnet convolutional neural network model, which is used as a pre-trained Alexnet convolutional neural network model.
[0057] In the embodiment of the present application, since the electronic purchase order containing the electronic signature is identified and judged by the pre-trained Alexnet convolutional neural network model, the legality of the electronic signature on the electronic purchase order can be accurately and efficiently identified and judged automatically and in a timely manner, thereby compensating for omissions in manual inspection.
[0058] Embodiment 2
[0059] Figure 4 The flowchart of the second electronic purchase order recognition method provided in the embodiment of the present application is shown. The execution subject of the example of the present invention is a terminal device, such as a POS machine, which is described in detail as follows:
[0060] In S401, an electronic purchase order image is obtained, wherein the electronic purchase order image includes an electronic signature.
[0061] S401 in this embodiment is the same as S101 in the previous embodiment. Please refer to the relevant description of S101 in the previous embodiment for details, which will not be repeated here.
[0062] Optionally, before S401, the method further includes:
[0063] Obtain the sliding track and generate an electronic signature on the electronic purchase order based on the sliding track.
[0064] When a consumer swipes a card to complete a purchase, an electronic receipt is generated and displayed on the terminal device. At this time, the terminal device obtains the consumer's sliding operation. The consumer can use a touch pen or finger to perform a sliding operation on the signature column of the electronic receipt displayed on the touch screen of the terminal device to obtain a sliding track. After the consumer's sliding operation is completed, the terminal device generates an electronic signature on the electronic receipt according to the sliding track.
[0065] In S402, the electronic purchase order image is recognized by a pre-trained Alexnet convolutional neural network model to determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result.
[0066] S402 in this embodiment is the same as S102 in the previous embodiment. Please refer to the relevant description of S102 in the previous embodiment for details, which will not be repeated here.
[0067] Optionally, after S402, the method further includes:
[0068] The electronic purchase order image and the corresponding determination result are stored.
[0069] The electronic purchase order image and the corresponding judgment result are stored for later query and historical information tracing. Optionally, the electronic purchase order serial number corresponding to the electronic purchase order image can be extracted, and the serial number, the electronic purchase order image and the corresponding judgment result can be stored in the database. Later, the user only needs to enter the serial number to view the legal information of the electronic purchase order.
[0070] In S403, if the determination result is illegal, a prompt for re-signing is issued.
[0071] If the electronic signature on the current electronic purchase order image is judged to be illegal, it means that the electronic signature signed by the current consumer on the electronic purchase order is unclear, and a prompt to re-sign is issued. The consumer can be prompted to re-sign the electronic signature on the electronic purchase order by playing voice and / or displaying text on the display screen.
[0072] In the embodiment of the present application, since the electronic purchase order containing the electronic signature is identified and judged by the pre-trained Alexnet convolutional neural network model, the legality of the electronic signature on the electronic purchase order can be accurately and efficiently identified and judged automatically in a timely manner, thereby making up for the omissions in manual inspection; at the same time, when the result of the judgment is illegal, a prompt to re-sign is issued to automatically guide the consumer to re-sign, further reducing the workload of the staff and improving work efficiency.
[0073] It should be understood that the order of execution of the steps in the above embodiment does not necessarily mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention.
[0074] Embodiment 3
[0075] The present application also provides an electronic purchase order recognition device, such as Figure 5 For the sake of convenience, only the parts related to the embodiments of the present application are shown:
[0076] The electronic purchase order recognition device comprises: a first acquisition unit 51 and a recognition unit 52. Among them:
[0077] The first acquisition unit 51 is used to acquire an electronic purchase order image, wherein the electronic purchase order image includes an electronic signature.
[0078] An electronic purchase receipt is a receipt generated after a consumer swipes a card to make a purchase. In addition to basic information such as store name, product name, consumption amount, consumption time, serial number, etc., the complete electronic purchase receipt also includes the consumer's handwritten electronic signature on the electronic purchase receipt through an electronic device.
[0079] To obtain the electronic purchase order image, the electronic purchase order can be converted into a picture format such as jpg through a format conversion program, or the electronic purchase order image can be obtained by automatically taking a screenshot when the electronic purchase order is displayed. The electronic purchase order image at least includes an area where the electronic signature is displayed, that is, the electronic purchase order needs to include electronic signature information. Preferably, the electronic purchase order image only includes an area where the electronic signature is displayed, and excludes areas where other redundant basic information is displayed.
[0080] The recognition unit 52 is used to recognize the electronic purchase order image through the pre-trained Alexnet convolutional neural network model, determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result.
[0081] The pre-trained Alexnet convolutional neural network model is loaded into the running memory, and the electronic purchase order image is recognized to determine whether the electronic signature on the electronic purchase order image is legal, that is, whether the signature on the electronic purchase order is clear and recognizable, and obtain a determination result. Optionally, the determination result can be fed back to the user in the form of text or graphics displayed on the screen, for example, by displaying text such as "legal" or "illegal", or by displaying a green icon to indicate that the electronic signature on the electronic purchase order is legal, and by displaying a red icon to indicate that the electronic signature on the electronic purchase order is illegal.
[0082] Specifically, the pre-trained Alexnet convolutional neural network model includes a Batch Normalization layer and a softmax classifier.
[0083] The pre-trained Alexnet convolutional neural network model is an 8-layer deep neural network, including 5 convolutional layers and 3 fully connected layers, and finally a softmax classifier, which is described as follows:
[0084] Convolution layer 1: Since the electronic purchase order image is usually black and white or grayscale processed, the input data matrix is different from the usual 227*227*3, but 227*227*1; the linear rectified unit (RectifiedLinear Unit, ReLU) is used as the activation function, the convolution kernel size is 11*11, the number is 96, the step size is 4*4, and the padded pixel is 0. After the data passes through this convolution layer, (227-11) / 4+1=55, so the output is 55*55*96. After the first convolution layer, there is a local response normalization layer (Local Response Normalization, LRN) and a max_pooling pooling layer. The LRN layer creates a competition mechanism for the activity of local neurons, making the values with larger responses become relatively larger, and inhibiting other neurons with smaller feedback, enhancing the generalization ability of the model. The max_pooling pooling layer kernel size is 3*3, the step size is 2*2, and after the data is transformed, (55-3) / 2+1=27, so after all the processing of the first layer, the data becomes 27*27*96.
[0085] Convolutional layer 2: The input data matrix is 27*27*96, RELU is used as the activation function, the convolution kernel size is 5*5, the number is 256, the step size is 1*1, and the padding pixel is 2. After the data passes through this convolution layer, (27-5+2*2) / 1+1=27, so the output is 27*27*256. Convolutional layer 2 is the same as layer 1, and also has the same LRN layer and max_pooling pooling layer. After the pooling layer, (27-3) / 2+1=13, and the final output is 13*13*256.
[0086] Convolutional layer 3: The input data matrix is 13*13*256, RELU is used as the activation function, the convolution kernel size is 3*3, the number is 384, the step size is 1*1, and the padding pixel is 1. After the data passes through this convolution layer, (13-3+2*1) / 1+1=13 is obtained, so the output is 13*13*384. Convolutional layer 3 does not have LRN layer and pooling layer.
[0087] Convolutional layer 4: The input data matrix is 13*13*384, RELU is used as the activation function, the convolution kernel size is 3*3, the number is 384, the step size is 1*1, and the padding pixel is 1. After the data passes through this convolution layer, (13-3+2*1) / 1+1=13 is obtained, so the output is 13*13*384. Convolutional layer 4 also has no LRN layer and pooling layer.
[0088] Convolution layer 5: The input data matrix is 13*13*384, RELU is used as the activation function, the convolution kernel size is 3*3, the number is 256, the step size is 1*1, and the padding pixel is 1. After the data passes through this convolution layer, (13-3+2*1) / 1+1=13 is obtained, so the output is 13*13*256. This layer also has a max_pooling pooling layer, the pooling layer kernel size is 3*3, the step size is 2*2, and after transformation, (13-3) / 2+1=6 is obtained, and the output is 6*6*256.
[0089] Fully connected layer 1: The input data is 6*6*256, and RELU is used as the activation function. This layer uses BatchNormalization as the dropout layer. After the change, the data becomes 4096*1.
[0090] Using Batch Normalization as the dropout layer can prevent overfitting while also speeding up model training.
[0091] Fully connected layer 2: Fully connected layer 2 is similar to fully connected layer 1, with an input of 4096*1 and an output of 4096*1.
[0092] Fully connected layer 3: The input data is 4096*1 and the output is 1000*1.
[0093] Softmax classifier: The softmax classifier here specifically includes two categories. Classification label 0 represents legal, and classification label 1 represents illegal.
[0094] Optionally, the electronic purchase order identification device further includes:
[0095] The training unit is used to obtain a preset number of training images, wherein the training images carry determination label information; set the batch size parameter batch_size, the training round parameter epochs, and the validation set ratio parameter validation_split of the Alexnet convolutional neural network, and input the training images to obtain the pre-trained Alexnet convolutional neural network model.
[0096] Optionally, the electronic purchase order identification device further includes:
[0097] The electronic signature generating unit is used to obtain the sliding track and generate an electronic signature on the electronic purchase order according to the sliding track.
[0098] Optionally, the electronic purchase order identification device further includes:
[0099] A preprocessing unit is used to preprocess the electronic purchase order image.
[0100] Optionally, the electronic purchase order identification device further includes:
[0101] The prompting unit is used to issue a prompt for re-signing if the determination result is illegal.
[0102] Optionally, the electronic purchase order identification device further includes:
[0103] The storage unit is used to store the electronic purchase order image and the corresponding determination result.
[0104] In the embodiment of the present invention, since the electronic purchase order containing the electronic signature is identified and judged by the pre-trained Alexnet convolutional neural network model, the legality of the electronic signature on the electronic purchase order can be accurately and efficiently identified and judged automatically and in a timely manner, thereby compensating for manual inspection omissions.
[0105] Embodiment 4
[0106] Figure 6 Schematic diagram of a terminal device provided by an embodiment of the present invention. Figure 6As shown, the terminal device 6 of this embodiment includes: a processor 60, a memory 61, and a computer program 62 stored in the memory 61 and executable on the processor 60, such as an electronic purchase order recognition program. When the processor 60 executes the computer program 62, the steps in the above-mentioned electronic purchase order recognition method embodiments are implemented, such as Figure 1 Alternatively, when the processor 60 executes the computer program 62, the functions of each module / unit in the above-mentioned device embodiments are realized, for example Figure 5 The functions of modules 51 to 52 are shown.
[0107] Exemplarily, the computer program 62 may be divided into one or more modules / units, which are stored in the memory 61 and executed by the processor 60 to complete the present invention. The one or more modules / units may be a series of computer program instruction segments capable of completing specific functions, which are used to describe the execution process of the computer program 62 in the terminal device 6. For example, the computer program 62 may be divided into a first acquisition unit and an identification unit, and the specific functions of each unit are as follows:
[0108] The first acquisition unit is used to acquire an electronic purchase order image, wherein the electronic purchase order image includes an electronic signature.
[0109] The recognition unit is used to recognize the electronic purchase order image through a pre-trained Alexnet convolutional neural network model, determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result.
[0110] The terminal device 6 may be a computing device such as a desktop computer, a notebook, a PDA, or a cloud server. The terminal device may include, but is not limited to, a processor 60 and a memory 61. Those skilled in the art will appreciate that Figure 6 It is only an example of the terminal device 6 and does not constitute a limitation on the terminal device 6. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0111] The processor 60 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0112] The memory 61 may be an internal storage unit of the terminal device 6, such as a hard disk or memory of the terminal device 6. The memory 61 may also be an external storage device of the terminal device 6, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device 6. Further, the memory 61 may also include both an internal storage unit and an external storage device of the terminal device 6. The memory 61 is used to store the computer program and other programs and data required by the terminal device. The memory 61 may also be used to temporarily store data that has been output or is to be output.
[0113] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0114] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0115] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0116] In the embodiments provided by the present invention, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0117] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0118] In addition, each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0119] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present invention implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0120] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention, and should all be included in the protection scope of the present invention.
Claims
1. A method for identifying an electronic purchase order, characterized in that: include: Obtaining an electronic purchase order image, wherein the electronic purchase order image includes an electronic signature; The electronic purchase order image is recognized by using a pre-trained Alexnet convolutional neural network model to determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result; Before obtaining the electronic purchase order image, the method further includes: Obtain the sliding track and generate an electronic signature on the electronic purchase order according to the sliding track; The judgment result is to judge whether the signature on the electronic purchase order is clear and recognizable, and the judgment result is fed back to the user in the form of text or graphics displayed on the screen.
2. The electronic purchase order recognition method according to claim 1, characterized in that: After obtaining the electronic purchase order image, the method further includes: The electronic purchase order image is preprocessed.
3. The electronic purchase order recognition method according to claim 1, characterized in that: The pre-trained Alexnet convolutional neural network model includes a Batch Normalization layer and a softmax classifier.
4. The electronic purchase order recognition method according to claim 1, characterized in that: Before the electronic purchase order image is recognized by the pre-trained Alexnet convolutional neural network model to determine whether the electronic signature on the electronic purchase order image is legal and obtaining the determination result, the method further includes: Obtaining a preset number of training images, wherein the training images carry determination label information; The batch size parameter batch_size, the training round parameter epochs, and the validation set ratio parameter validation_split of the Alexnet convolutional neural network are set, and the training picture is input to obtain the pre-trained Alexnet convolutional neural network model.
5. The electronic purchase order recognition method according to any one of claims 1 to 4, characterized in that: After the pre-trained Alexnet convolutional neural network model is used to identify the electronic purchase order image and determine whether the electronic signature on the electronic purchase order image is legal, and a determination result is obtained, the method further includes: If the determination result is illegal, a prompt for re-signing is issued.
6. The electronic purchase order recognition method according to any one of claims 1 to 4, characterized in that: After the pre-trained Alexnet convolutional neural network model is used to identify the electronic purchase order image and determine whether the electronic signature on the electronic purchase order image is legal, and a determination result is obtained, the method further includes: The electronic purchase order image and the corresponding determination result are stored.
7. An electronic purchase order recognition device, characterized in that: include: A first acquisition unit is used to acquire an electronic purchase order image, wherein the electronic purchase order image includes an electronic signature; The recognition unit is used to recognize the electronic purchase order image through the pre-trained Alexnet convolutional neural network model, determine whether the electronic signature on the electronic purchase order image is legal, and obtain a determination result; the determination result is to determine whether the signature on the electronic purchase order is clear and recognizable, and the determination result is fed back to the user in the form of text or pattern displayed on the screen; Wherein, the electronic purchase order recognition device further includes: The electronic signature generating unit is used to obtain the sliding track and generate an electronic signature on the electronic purchase order according to the sliding track.
8. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.
Citation Information
Patent Citations
A signature handwriting authentication method of a generation countermeasure network SIGAN based on dual learning
CN109190579A