A method and apparatus for generating a work ticket
By scanning paper tickets and using blockchain technology to generate electronic work tickets, the problem of paper work tickets being easily tampered with is solved, and the digital extraction and retention of information is realized, reducing the risk of tampering and improving the accuracy and efficiency of information.
Patent Information
- Application Number
- CN202211490567.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-25
- Publication Date
- 2026-08-25
- Estimated Expiration
- 2042-11-25
AI Technical Summary
In the existing technology, paper work tickets are easily altered, and manual entry of information is prone to errors, posing a risk of information tampering.
By scanning paper tickets, obtaining ticket images and performing semantic recognition, blockchain technology is used to store and generate electronic work tickets. Smart contracts are used for information comparison and sharpening to ensure the accuracy and integrity of the information.
It enables the digital extraction and retention of paper work order information, reducing the risk of information tampering and improving the efficiency and accuracy of work order information retention.
Smart Images

Figure CN115828880B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the electrical field, and in particular to a method and apparatus for generating work orders. Background Technology
[0002] A work permit is a written order authorizing workers to work on electrical equipment or lines, and it serves as the written basis for implementing safety-ensuring technical measures. Therefore, accurate filing and documentation of work permits are crucial for ensuring safe power production and investigating violations.
[0003] In existing technologies, work tickets are archived on paper or manually entered into an information system to preserve the information on them. However, using existing technologies for archiving and preserving work tickets carries the risk of the information on the work tickets being tampered with. Summary of the Invention
[0004] In view of this, this application provides a method and apparatus for generating work orders, thereby reducing the risk of information on work orders being tampered with.
[0005] The method for generating work tickets provided in this application is implemented as follows:
[0006] Scan the paper receipt to obtain an image of the receipt;
[0007] Extract text from a receipt image to obtain multiple fields of information;
[0008] Perform semantic recognition on multiple fields and add identifiers to indicate the position of the multiple fields on the form template;
[0009] Generate electronic work tickets based on the identifier and form template.
[0010] Optionally, after scanning the paper ticket to obtain a ticket image, the method also includes:
[0011] The first piece of information is obtained by storing the ticket image on the blockchain.
[0012] Optionally, after storing the ticket image on the blockchain and obtaining the first retained information, the following may also be included:
[0013] Read the first image from the blockchain;
[0014] Compare the first image with the first retained information;
[0015] If the first image and the first stored information are consistent, then the first smart contract of the blockchain will be used to sharpen the first image.
[0016] If the first image and the first stored information are inconsistent, an error message will be output;
[0017] Then, the text in the ticket image is retrieved, and multiple fields of information are obtained, including: the text in the first image after sharpening is retrieved, and multiple fields of information are obtained.
[0018] Optionally, before retrieving the text from the invoice image and obtaining multiple field information, the process may also include:
[0019] Using the second smart contract of the blockchain, the ticket image is segmented according to the table borders of the ticket in the ticket image to obtain multiple sub-images of the ticket image;
[0020] Multiple sub-images of the ticket image are stored on the blockchain to obtain the second retained information.
[0021] Optionally, after storing multiple sub-images of the ticket image on the blockchain and obtaining the second retention information, it also includes:
[0022] Read the second image from the blockchain;
[0023] Compare the second image and the second retained information;
[0024] Confirm that the second image and the second saved information are consistent;
[0025] Then, the text in the ticket image is obtained, and multiple fields of information are obtained, including: using the third smart contract of the blockchain, the text in the second image is obtained, and multiple fields of information are obtained.
[0026] Optionally, the method further includes: if the second image and the second retained information are inconsistent, then an error message is output.
[0027] Optionally, after obtaining the text in the invoice image and getting multiple field information, the method further includes: saving the multiple field information on the blockchain to obtain third-party retention information;
[0028] Before performing semantic recognition and adding identifiers to multiple fields of information, the process also includes:
[0029] Read the first information from the blockchain;
[0030] Compare the first piece of information with the third piece of retained information;
[0031] The first and third retained information are confirmed to be consistent.
[0032] Optionally, semantic recognition is performed on multiple fields of information and identifiers are added, including: semantic recognition is performed on the first information and identifiers are added;
[0033] The method also includes: if the first information and the third retained information are inconsistent, an error message will be output.
[0034] Optionally, after generating the electronic work ticket based on the identifier and form template, the method also includes: storing the electronic work ticket on the blockchain.
[0035] This application also provides an apparatus for generating work orders, the apparatus comprising: a scanning unit, an acquisition unit, an identification unit, and a generation unit;
[0036] The scanning unit is used to scan paper tickets to obtain images of the tickets;
[0037] The acquisition unit is used to extract text from the invoice image and obtain field information.
[0038] The identification unit is used to semantically identify field information and add identifiers, which indicate the position of the field information on the form template;
[0039] The generation unit is used to generate electronic work tickets based on the identifier and form template.
[0040] This application also provides a computer device, which includes: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computer device to implement a method for generating a work order.
[0041] Therefore, the beneficial effects of this application are: it provides a method and apparatus for generating work tickets, which involves scanning paper tickets to obtain ticket images, extracting text from the ticket images to obtain multiple field information, performing semantic recognition on the multiple field information and adding identifiers, the identifiers indicating the positions of the multiple field information on the form template, and generating electronic work tickets based on the identifiers and the form template. By automatically recognizing paper ticket information and using the form template to convert paper tickets into electronic ticket vouchers, it achieves the effect of digitally extracting and retaining paper work ticket information, reducing the risk of information on work tickets being tampered with. Attached Figure Description
[0042] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of this application. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.
[0043] Figure 1 This is a flowchart of the first embodiment of this application;
[0044] Figure 2 This is a flowchart of S201-S210 in the second embodiment of this application;
[0045] Figure 3This is a flowchart of S211-S220 in the second embodiment of this application;
[0046] Figure 4 This is a schematic diagram of an apparatus according to this application;
[0047] Figure 5 This is a schematic diagram of a computer device according to this application. Detailed Implementation
[0048] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0049] Because paper work tickets are easily altered, and manual data entry can lead to errors, the information on the work tickets is at risk of being tampered with. Therefore, this application automatically identifies paper ticket information, uses form templates to convert paper tickets into electronic vouchers, and extracts and retains the paper work ticket information digitally.
[0050] In this application embodiment, the device for generating work tickets may include, but is not limited to, computer devices.
[0051] A computer device may include: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computer device to implement a method for generating a work order.
[0052] Please see Figure 1 The specific steps of the first embodiment of this application are as follows:
[0053] S101: The computer scans the paper ticket to obtain a picture of the ticket.
[0054] The paper-based tickets are paper-based work tickets.
[0055] In some implementations, the processes of scanning paper tickets, extracting text from ticket images, performing semantic recognition and adding identifiers to multiple fields, and generating electronic work tickets all take place on the blockchain. Blockchain technology is a decentralized distributed ledger that features on-chain information that is difficult to tamper with and traceable.
[0056] In some implementations, the computer scans the paper tickets and reads them in before obtaining the ticket image. Paper tickets can be read in batches or individually.
[0057] In other implementations, a computer scans paper tickets to obtain an image of the ticket, and then stores the image on a blockchain.
[0058] S102: The computer extracts the text from the image of the ticket and obtains information from multiple fields.
[0059] The field information is in the format required by the form template, and the text in the obtained ticket image can be converted into the corresponding data type according to the requirements.
[0060] In some implementations, computers use third-party smart contracts on the blockchain to retrieve text from a ticket image and obtain information from multiple fields.
[0061] In other implementations, before the computer obtains the text from the ticket image and acquires multiple fields of information, it first uses the first smart contract of the blockchain to sharpen the ticket image.
[0062] In other implementations, before the computer obtains the text from the ticket image and gets multiple field information, it first uses a second smart contract on the blockchain to segment the ticket image according to the table borders of the ticket in the ticket image, obtaining multiple sub-images of the ticket image, and then saves the multiple sub-images of the ticket image on the blockchain.
[0063] In other implementations, the computer extracts text from the image of the ticket, obtains multiple fields of information, and then stores these fields on the blockchain.
[0064] S103: The computer performs semantic recognition on multiple field information and adds identifiers, which indicate the positions of the multiple field information on the form template.
[0065] Semantic recognition involves understanding the identified text. Since the content of each form in a work order is relatively fixed and often consists of industry terminology, the field information obtained from the work order can be matched with its position on the form template.
[0066] S104: The computer generates an electronic work order based on the identifier and form template.
[0067] In some implementations, the computer generates an electronic work ticket based on the identifier and form template, and then stores the electronic work ticket on the blockchain.
[0068] In the first embodiment of this application, by automatically identifying paper ticket information and using form templates to convert paper tickets into electronic ticket vouchers, the paper work ticket information is digitally extracted and stored, which improves the efficiency of work ticket information storage and reduces the risk of information on the work ticket being tampered with.
[0069] The following describes the specific implementation of this application in conjunction with blockchain technology. Please refer to [link / reference]. Figure 2 and Figure 3 The specific steps of the second embodiment of this application are as follows:
[0070] S201: Computerized batch import of paper documents.
[0071] In some implementations, the step of batch reading paper documents is performed by the document reading module.
[0072] In some other implementations, the document reading module reads paper documents in batches and then transmits the paper documents to the document scanning module.
[0073] S202: The computer scans the paper ticket to obtain a picture of the ticket.
[0074] In some implementations, step S202 is performed by the ticket scanning module.
[0075] In some other implementations, the ticket scanning module sequentially scans multiple paper tickets transmitted by the ticket reading module.
[0076] S203: The computer saves the ticket image on the blockchain, obtaining the first retained information.
[0077] The first type of information retained is the original information, which is the image of the ticket obtained by scanning the paper ticket.
[0078] In some implementations, the ticket scanning module scans paper tickets, obtains a ticket image, and then transmits the ticket to a cache, while simultaneously storing the ticket image on the blockchain. The cache can store images of one or more paper tickets. The cache can be a high-speed storage device, or it can be configured as other types of storage depending on actual needs.
[0079] In some other implementations, the ticket reading module, the ticket scanning module, and the buffer area constitute the ticket preprocessing unit.
[0080] S204: The computer reads the first image from the blockchain.
[0081] The first image is retrieved from the blockchain. This image can be retrieved based on the block position of the document image in the blockchain, or through other methods that allow access to document images. Since the blockchain may store multiple image data sets, S205 must be executed to ensure that the retrieved image matches the paper document to be converted.
[0082] In some implementations, the information recognition unit reads the first image from the cache.
[0083] In other implementations, the information recognition unit consists of an image enhancement module, an image segmentation module, a character recognition module, and a character integration module.
[0084] S205: The computer compares the first image with the first stored information to determine whether the first image and the first stored information are consistent.
[0085] If the first image and the first retained information are consistent, then execute S206; if the first image and the first retained information are inconsistent, then execute S207.
[0086] In some implementations, the information recognition unit compares the first image with the first stored information.
[0087] S206: The computer uses the first smart contract of the blockchain to sharpen the first image.
[0088] The first smart contract is one that incorporates high-pass filtering technology. A smart contract is a set of commitments defined in digital form, including protocols that the contract participants can execute. Smart contracts allow for trusted transactions without a third party; the transactions are traceable and irreversible, and can be implemented using computer code.
[0089] Since the text color and background color of paper tickets have a significant contrast, sharpening can enhance the contrast between the text and the background, thereby improving the visual effect of the text.
[0090] In some implementations, the image enhancement module sharpens the first image.
[0091] S207: The computer outputs an error message.
[0092] In some implementations, the information recognition unit outputs error message information.
[0093] In some implementations, after the computer outputs an error message, it does not execute subsequent steps for this paper document, but directly converts the next paper document.
[0094] S208: The computer uses the second smart contract of the blockchain to segment the first image after sharpening based on the table borders of the ticket in the first image after sharpening, and obtains multiple sub-images of the first image after sharpening.
[0095] The second smart contract is one that integrates image segmentation technology based on edge segmentation. Image segmentation technology first identifies the edge pixels in the image, and then connects the edge pixels together to form the required region boundaries for image segmentation.
[0096] Since paper tickets are primarily in tabular form, edge-based segmentation techniques can effectively segment the image according to the table borders. Edge segmentation can be performed using the Sobel operator, which has good segmentation results in both horizontal and vertical directions, a simple structure, and significant noise suppression. Edge segmentation can also be implemented using gradient algorithms, Roberts operators, Prewitt operators, Kirsch operators, Laplacian operators, or other algorithms.
[0097] The computer divides the first image after sharpening into multiple sub-images to facilitate the extraction of text from different areas of the table in the paper document.
[0098] In some implementations, the image segmentation module segments the first image after sharpening.
[0099] S209: The computer saves multiple sub-images of the first image after sharpening on the blockchain to obtain the second retained information.
[0100] The second set of retained information consists of multiple sub-images of the first image after sharpening.
[0101] In some implementations, the image segmentation module stores multiple sub-images of the first image after sharpening on the blockchain.
[0102] In some implementations, the image segmentation module also sends multiple sub-images of the sharpened first image to the text recognition module.
[0103] S210: The computer reads the second image from the blockchain.
[0104] The second image is read from the blockchain. The second image can be read based on the block positions of multiple sub-images of the sharpened first image stored in the blockchain, or through other methods that can access these sub-images. Since the blockchain may store multiple image data, S211 needs to be executed to ensure that the read image is consistent with the multiple sub-images of the sharpened first image.
[0105] In some implementations, the second image is the image sent by the image segmentation module and received by the text recognition module.
[0106] S211: The computer compares the second image with the second stored information to determine whether the second image and the second stored information are consistent.
[0107] If the second image and the second retained information are consistent, then execute S212; if the second image and the second retained information are inconsistent, then execute S213.
[0108] In some implementations, the text recognition module compares the second image with the second stored information.
[0109] S212: The computer uses the third smart contract of the blockchain to obtain the text in the second image and obtain multiple fields of information.
[0110] The third smart contract is one that incorporates the CTPN algorithm. Since paper forms are filled out horizontally, the CTPN algorithm can be used to extract the text. Text extraction can also be achieved using the CRNN algorithm, the Seq2Seq algorithm, or other algorithms.
[0111] In some implementations, the text recognition module recognizes the text in the second image and converts it into digital characters, and then the text integration module organizes the recognized text into fields with a fixed format.
[0112] S213: The computer outputs an error message.
[0113] In some implementations, the text recognition module outputs error messages.
[0114] In some implementations, after the computer outputs an error message, it does not execute subsequent steps for this paper document, but directly converts the next paper document.
[0115] S214: The computer stores multiple fields of information on the blockchain to obtain third-party retained information.
[0116] The third retained information consists of multiple fields obtained by extracting text from the second image.
[0117] In some implementations, the text integration module stores multiple fields of information on the blockchain.
[0118] In some other implementations, the text integration module also sends multiple field information to the information storage unit.
[0119] S215: The computer reads the first information from the blockchain.
[0120] The first piece of information is read from the blockchain. This information can be read based on the block positions where multiple fields are stored in the blockchain, or through other methods that can retrieve multiple fields. Since the blockchain may simultaneously store field information from different paper documents, S216 needs to be executed to ensure that the read information is consistent with the multiple field information.
[0121] In some implementations, the first information is the information received by the information storage unit from the text integration module.
[0122] In some other implementations, the information storage unit reads the first information from the blockchain.
[0123] S216: The computer compares the first information and the third retained information to determine whether the first information and the third retained information are consistent.
[0124] If the first information and the third retained information are consistent, then execute S217; if the first information and the third retained information are inconsistent, then execute S218.
[0125] S217: The computer performs semantic recognition on the first information and adds an identifier.
[0126] The identifier indicates the location of the first piece of information on the form template.
[0127] Semantic recognition of the first piece of information can be achieved through text matching technology based on the BM25 algorithm, or through the VSM algorithm, Jaccard algorithm, SimHash algorithm, Levenshtein algorithm, match_pyramid algorithm, textmatching algorithm or other algorithms.
[0128] S218: The computer outputs an error message.
[0129] In some implementations, the information storage unit outputs error message information.
[0130] In some implementations, after the computer outputs an error message, it does not execute subsequent steps for this paper document, but directly converts the next paper document.
[0131] S219: The computer generates an electronic work order based on the identifier and form template.
[0132] An electronic work ticket is an electronic version of a work ticket certificate.
[0133] In some implementations, the form template is a built-in form template of the form generation module. The form production module generates a blockchain-based electronic work ticket voucher based on the markings of different fields in the first information and the built-in form template.
[0134] In some other implementations, the form generation module is a module within the information storage unit.
[0135] S220: Computers store electronic work tickets on a blockchain.
[0136] In some implementations, the form generation module stores the electronic work ticket on the blockchain.
[0137] In the second embodiment of this application, by converting paper tickets into electronic work tickets on the blockchain, the paper ticket information can be prevented from being tampered with during the conversion process, thus ensuring the authenticity of the paper ticket information.
[0138] Please see Figure 4 This application provides an apparatus 400 for generating work orders, including: a scanning unit 401, an acquisition unit 402, an identification unit 403, and a generation unit 404.
[0139] Scanning unit 401: Used to scan paper tickets to obtain ticket images.
[0140] Unit 402: Used to retrieve text from the invoice image and obtain field information.
[0141] Identification unit 403: used to perform semantic recognition on field information and add an identifier, the identifier indicating the position of the field information on the form template.
[0142] Generation unit 404: Used to generate electronic work tickets based on the identifier and form template.
[0143] Optionally, an apparatus for generating a work order may further include: a reading unit 405, a saving unit 406, a comparison unit 407, a processing unit 408, an output unit 409, or a segmentation unit 410.
[0144] Reading unit 405: Used to read the first image, the second image, or the first information from the blockchain.
[0145] Storage unit 406: Used to store invoice images, multiple sub-images of the invoice image, multiple field information, or electronic work tickets.
[0146] Comparison unit 407: used to compare the first image with the first retained information, compare the second image with the second retained information, or compare the first information with the third retained information.
[0147] Processing unit 408: used to sharpen the first image.
[0148] Output unit 409: Used to output error message information.
[0149] Segmentation unit 410: Used to segment the ticket image.
[0150] Regarding the apparatus in the above embodiments, the specific manner in which each module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0151] It should be noted that the above-described apparatus for generating work orders is only illustrated by the division of the functional modules described above. In practical applications, the functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus for generating work orders can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the apparatus for generating work orders and the method for generating work orders provided in the above embodiments belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0152] Figure 5 This is a schematic diagram of the structure of a computer device 500 provided in an embodiment of this application.
[0153] Computer device 500 includes at least one processor 501, memory 502 and at least one network interface 503.
[0154] Processor 501 may be, for example, a general-purpose central processing unit (CPU), a network processor (NP), a graphics processing unit (GPU), a neural-network processing unit (NPU), a data processing unit (DPU), a microprocessor, or one or more integrated circuits for implementing the embodiments of this application. For example, processor 501 may include an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. A PLD may be, for example, a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.
[0155] Memory 502 may be, for example, read-only memory (ROM) or other types of static storage devices capable of storing static information and instructions; random access memory (RAM) or other types of dynamic storage devices capable of storing information and instructions; electrically erasable programmable read-only memory (EEPROM); compact disc read-only memory (CD-ROM) or other optical disc storage, optical disc storage (including compressed discs, laser discs, optical discs, digital universal discs, Blu-ray discs, etc.); magnetic disk storage media or other magnetic storage devices; or any other medium capable of carrying or storing desired program code in the form of instructions or data structures and accessible by a computer, but not limited thereto. Optionally, memory 502 exists independently and is connected to processor 501 via internal connection 504. Alternatively, memory 502 and processor 501 may be integrated together.
[0156] Network interface 503 uses any transceiver-like device for communicating with other devices or communication networks. Network interface 503 includes, for example, at least one of a wired network interface or a wireless network interface. The wired network interface is, for example, an Ethernet interface. The Ethernet interface is, for example, an optical interface, an electrical interface, or a combination thereof. The wireless network interface is, for example, a wireless local area network (WLAN) interface, a cellular network interface, or a combination thereof.
[0157] In some embodiments, processor 501 includes one or more CPUs, such as Figure 5 CPU0 and CPU1 are shown in the diagram.
[0158] In some embodiments, the computer device 500 may optionally include multiple processors, such as Figure 5 The processors 501 and 505 are shown. Each of these processors is, for example, a single-core processor (CPU) or a multi-core processor (CPU). A processor here may optionally refer to one or more devices, circuits, and / or processing cores used to process data (such as computer program instructions).
[0159] In some embodiments, the computer device 500 further includes an internal connection 504. The processor 501, memory 502, and at least one network interface 503 are connected via the internal connection 504. The internal connection 504 includes pathways for transmitting information between the aforementioned components. Optionally, the internal connection 504 is a single board or a bus. Optionally, the internal connection 504 may be divided into an address bus, a data bus, a control bus, etc.
[0160] In some embodiments, the computer device 500 further includes an input / output interface 506. The input / output interface 506 is connected to the internal connection 504.
[0161] In some embodiments, the input / output interface 506 is used to connect to an input device to receive commands or data input by a user through the input device, as described in the above embodiments. Input devices include, but are not limited to, keyboards, touchscreens, microphones, mice, or sensing devices, etc.
[0162] In some embodiments, the input / output interface 506 is also used to connect to an output device. The input / output interface 506 outputs intermediate and / or final results generated by the processor 501 executing the above method embodiments through the output device. The output device includes, but is not limited to, a display, printer, projector, etc.
[0163] Optionally, the processor 501 implements the method in the above embodiments by reading program code stored in the memory 502, or the processor 501 implements the method in the above embodiments by internally stored program code. When the processor 501 implements the method in the above embodiments by reading program code stored in the memory 502, the memory 502 stores program code 510 that implements the method provided in the embodiments of this application.
[0164] For more details on how processor 501 implements the above functions, please refer to the descriptions in the previous method embodiments, which will not be repeated here.
[0165] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0166] The above description of the disclosed embodiments enables those skilled in the art to make or use this application. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of this application. Therefore, this application is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. A method for generating work orders, characterized in that, The method includes: Scan the paper receipt to obtain an image of the receipt; The ticket image is stored on the blockchain to obtain the first retained information; Read the first image from the blockchain; Compare the first image with the first stored information; If the first image and the first stored information are consistent, then the first image is sharpened using the first smart contract of the blockchain; if the first image and the first stored information are inconsistent, then an error message is output. Using the second smart contract of the blockchain, the first image after sharpening is segmented according to the table borders of the ticket in the first image after sharpening, resulting in multiple sub-images of the first image after sharpening. Multiple sub-images of the first image after sharpening are stored on the blockchain to obtain the second retained information; Based on the block positions of multiple sub-images of the first image after sharpening in the blockchain, the second image is read from the blockchain; Compare the second image and the second retained information; confirm that the second image and the second retained information are consistent. Using the third smart contract of the blockchain, the text in the second image is obtained, yielding multiple field information. The multiple field information is stored on the blockchain to obtain the third retained information; Based on the block location stored in the blockchain according to the multiple field information, the first information is read from the blockchain; Compare the first information and the third retained information; determine that the first information and the third retained information are consistent; The first information is semantically identified and an identifier is added, the identifier indicating the position of the first information on the form template; An electronic work order is generated based on the identifier and the form template.
2. The method according to claim 1, characterized in that, The method further includes: If the second image and the second retained information are inconsistent, the error message will be output.
3. The method according to any one of claims 1-2, characterized in that, After generating the electronic work order based on the identifier and the form template, the process further includes: The electronic work ticket is stored on the blockchain.
4. An apparatus for generating work orders, characterized in that, The device includes: a scanning unit, an acquisition unit, an identification unit, a generation unit, a reading unit, a storage unit, a comparison unit, a processing unit, an output unit, and a segmentation unit; The scanning unit is used to scan paper tickets to obtain images of the tickets; A storage unit is used to store the ticket image on the blockchain to obtain the first retention information; A reading unit is used to read the first image from the blockchain; The comparison unit is used to compare the first image with the first stored information; The processing unit is used to sharpen the first image by utilizing the first smart contract of the blockchain when the first image and the first stored information are consistent. The segmentation unit is used to utilize the second smart contract of the blockchain to segment the first image after sharpening based on the table borders of the ticket in the first image after sharpening, thereby obtaining multiple sub-images of the first image after sharpening. The storage unit is also used to store multiple sub-images of the first image after sharpening on the blockchain to obtain second retention information; The reading unit is also used to read the second image from the blockchain according to the block positions of the multiple sub-images of the sharpened first image stored in the blockchain; The comparison unit is further configured to compare the second image and the second retained information, and determine that the second image and the second retained information are consistent; The acquisition unit is used to acquire the text in the second image using the third smart contract of the blockchain, and obtain multiple field information. The storage unit is also used to store the multiple field information on the blockchain to obtain third retention information; The reading unit is also used to read first information from the blockchain based on the block location stored in the blockchain according to the multiple field information; The comparison unit is further configured to compare the first information and the third retained information, and determine that the first information and the third retained information are consistent; An identification unit is used to perform semantic recognition on the first information and add an identifier, wherein the identifier indicates the position of the first information on the form template; The generation unit is used to generate an electronic work order based on the identifier and the form template; The output unit is used to output an error message when the first image and the first stored information are inconsistent. The output unit is also used to output an error message when the second image and the second stored information are inconsistent; The output unit is also used to output an error message when the first information and the third retained information are inconsistent.
5. A computer device, characterized in that, The computer device includes: a processor coupled to a memory, the memory storing at least one computer program instruction, the at least one computer program instruction being loaded and executed by the processor to enable the computer device to implement the method of any one of claims 1-3.
Citation Information
Patent Citations
Invoice authenticity verification method and device based on block chain and electronic equipment
CN110019326A
Bill identification method, apparatus and device, computer storage medium and program product
CN114550189A