Electronic invoice verification method, device, computer equipment and storage medium

Through an electronic invoice verification method, the concurrent transmission method of the message queue and the signature platform is used to realize efficient and accurate timeliness verification and update of the signature information of the electronic invoice document, and solve the effectiveness and accuracy problems caused by manual intervention in the prior art.

CN118154200BActive Publication Date: 2025-05-16SHENZHEN GAODENGYUN TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202410210213.0
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-26
Publication Date
2025-05-16
Estimated Expiration
2044-02-26

AI Technical Summary

Technical Problem

In the prior art, the verification and update of electronic signatures of electronic invoices require manual intervention, resulting in low validity and accuracy of verification and update.

Method used

Provide a method for verifying electronic invoices, and determine the timeliness of signature information by obtaining the electronic documents to be verified and their corresponding signature information. If the signature information has not expired, the corresponding electronic invoice file will be directly obtained; if it has expired, the relevant information will be sent to the signature platform concurrently through the message queue to obtain and update it to the signature information that has not expired.

Benefits of technology

It realizes efficient and accurate timeliness verification and update of electronic invoice document signature information, and improves the automation and accuracy of the verification and update process of electronic invoices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118154200B_ABST
    Figure CN118154200B_ABST
Patent Text Reader

Abstract

The present application relates to an electronic invoice verification method, device, computer equipment and storage medium. The method includes: determining the timeliness of the signature information corresponding to the electronic file to be verified; if the signature information has not expired, obtaining the first electronic invoice file corresponding to the signature information; if the signature information has expired, the message containing the electronic file to be verified and the signature information is concurrently sent to the message queue through the corresponding first coroutine, and the message queue concurrently sends the asynchronously received message to the signature platform through the corresponding second coroutine, and the signature platform returns the address of the second electronic invoice file obtained based on the non-expired signature information corresponding to the signature information. Based on this, the timeliness verification of the signature information is performed efficiently and accurately, and further, the expired signature information is updated efficiently and accurately through the concurrent and asynchronous information transmission method of the coroutine and the message queue.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of electronic invoice application, and in particular to an electronic invoice verification method, device, computer equipment and storage medium. Background Art

[0002] In the field of electronic invoice application technology, it is necessary to ensure that the electronic signature in the electronic invoice meets the timeliness requirements to ensure the validity of the electronic invoice.

[0003] In traditional methods, on the one hand, the timeliness of electronic signatures needs to be checked manually one by one, and on the other hand, expired electronic signatures need to be updated manually. As a result, the effectiveness and accuracy of verifying and updating electronic signatures on electronic invoices are reduced. Summary of the invention

[0004] Based on this, it is necessary to provide an electronic invoice verification method, device, computer equipment and computer-readable storage medium that can efficiently and accurately verify and update the signature information corresponding to the electronic invoice document in response to the above technical problems.

[0005] In a first aspect, the present application provides a method for verifying an electronic invoice, comprising:

[0006] Acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determine the timeliness of the signature information;

[0007] If the signature information has not expired, obtaining a first electronic invoice file corresponding to the signature information;

[0008] If the signature information is expired, a message containing the electronic file to be verified and the signature information is sent to a message queue through a corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through a corresponding second coroutine;

[0009] Receive the address of the second electronic invoice file returned from the signature platform and obtained based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0010] In one of the embodiments, the obtaining of the electronic file to be verified and the signature information corresponding to the electronic file to be verified includes: obtaining an invoicing request, the invoicing request including invoicing information; obtaining an invoice template, filling the invoicing information into the invoice template, and obtaining the electronic file to be verified corresponding to the invoicing request; obtaining the signature information corresponding to the invoicing information in a database; after obtaining the second electronic invoice file corresponding to the unexpired signature information, it also includes: updating the signature information in the database to the unexpired signature information.

[0011] In one of the embodiments, the obtaining of the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determining the timeliness of the signature information, include: obtaining a document list, the document list including files carrying signature information; using the file carrying signature information as the electronic file to be verified; obtaining the signature information in the electronic file to be verified, and determining the timeliness of the signature information.

[0012] In one of the embodiments, obtaining the signature information in the electronic file to be verified includes: identifying the starting position and the ending position corresponding to the signature area in the electronic file to be verified according to a regular expression; based on the starting position and the ending position, intercepting the character string corresponding to the information of the signature area in the electronic file to be verified; encrypting the character string based on a preset encoding algorithm to obtain an encrypted character string corresponding to the character string; adding a certificate start symbol to the starting position of the encrypted character string, and adding a certificate end symbol to the ending position of the encrypted character string to obtain a certificate character string corresponding to the encrypted character string; wherein the certificate start symbol and the certificate end symbol are respectively used to represent the starting position and the ending position of the certificate; based on a preset decoding algorithm, parsing the certificate character string to obtain the time information and identity information in the signature information; wherein the time information is used to represent the timeliness of the signature information, and the identity information is used to represent the legitimacy of the corporate identity corresponding to the signature information.

[0013] In one of the embodiments, the character string is encrypted based on a preset encoding algorithm to obtain an encrypted character string corresponding to the character string, including: dividing the character string into multiple groups, and mapping the characters of each group to corresponding elements in a character set corresponding to the encoding algorithm; arranging each mapped element in sequence to obtain the encrypted character string; the certificate character string is parsed based on a preset decoding algorithm to obtain the time information and identity information in the signature information, including: parsing the structure of the certificate character string based on a preset decoding algorithm to extract the field information in the certificate character string; and obtaining the time information and identity information in the signature information based on the field information.

[0014] In one of the embodiments, after obtaining the time information and identity information in the signature information, it also includes: obtaining the current time information, if the current time information meets the timeliness condition corresponding to the time information, determining that the signature information is not expired; if not, determining that the signature information is expired; obtaining the target identity information corresponding to the signature information returned from the signature platform, if the target identity information matches the identity information, determining that the signature information is secure; if not, determining that the signature information is insecure; if it is determined that the signature information is expired or insecure, generating an alarm information corresponding to the signature information.

[0015] In one of the embodiments, the address of the second electronic invoice file obtained based on the unexpired signature information corresponding to the signature information and returned from the signature platform, and based on the address, obtaining the second electronic invoice file corresponding to the unexpired signature information, includes: receiving the address corresponding to the second electronic invoice file uploaded to the cloud storage service platform and returned after receiving the message from the signature platform; based on the interface corresponding to the cloud storage service platform, receiving the second electronic invoice file corresponding to the address.

[0016] In a second aspect, the present application also provides an electronic invoice verification device, comprising:

[0017] An acquisition module, used to acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and to determine the timeliness of the signature information;

[0018] A first generating module, configured to obtain a first electronic invoice file corresponding to the signature information if the signature information has not expired;

[0019] A sending module, configured to send a message containing the electronic file to be verified and the signature information to a message queue through a corresponding first coroutine if the signature information expires, so that the message queue concurrently sends the received message to the signature platform through a corresponding second coroutine;

[0020] The second generation module is used to receive the address of the second electronic invoice file returned from the signature platform based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0021] In a third aspect, the present application further provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:

[0022] Acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determine the timeliness of the signature information;

[0023] If the signature information has not expired, obtaining a first electronic invoice file corresponding to the signature information;

[0024] If the signature information is expired, a message containing the electronic file to be verified and the signature information is sent to a message queue through a corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through a corresponding second coroutine;

[0025] Receive the address of the second electronic invoice file returned from the signature platform and obtained based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0026] In a fourth aspect, the present application further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the following steps are implemented:

[0027] Acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determine the timeliness of the signature information;

[0028] If the signature information has not expired, obtaining a first electronic invoice file corresponding to the signature information;

[0029] If the signature information is expired, a message containing the electronic file to be verified and the signature information is sent to a message queue through a corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through a corresponding second coroutine;

[0030] Receive the address of the second electronic invoice file returned from the signature platform and obtained based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0031] The above-mentioned electronic invoice verification method, device, computer equipment and storage medium determine the timeliness of the signature information corresponding to the electronic file to be verified; if the signature information has not expired, a first electronic invoice file corresponding to the signature information is obtained; if the signature information is expired, a message containing the electronic file to be verified and the signature information is concurrently sent to the message queue through the corresponding first coroutine, and the message queue concurrently sends the asynchronously received message to the signature platform through the corresponding second coroutine, and the signature platform returns the address of the second electronic invoice file obtained based on the non-expired signature information corresponding to the signature information; based on this, the signature information corresponding to the electronic invoice file is efficiently and accurately verified for timeliness, and further, through the concurrent and asynchronous information transmission method of the coroutine and the message queue, the expired signature information is efficiently and accurately updated. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the related technologies, the drawings required for use in the embodiments or the related technical descriptions are 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 creative work.

[0033] Figure 1 A schematic diagram of a flow chart of a method for verifying an electronic invoice in one embodiment;

[0034] Figure 2 A schematic diagram of a flow chart of a method for verifying an electronic invoice in another embodiment;

[0035] Figure 3 A schematic diagram of a flow chart of a method for verifying an electronic invoice in another embodiment;

[0036] Figure 4 A schematic diagram of a flow chart of a method for verifying an electronic invoice in another embodiment;

[0037] Figure 5 A schematic diagram of a flow chart of a method for verifying an electronic invoice in another embodiment;

[0038] Figure 6 is a structural block diagram of an electronic invoice verification device in one embodiment;

[0039] Figure 7 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION

[0040] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.

[0041] In one embodiment, Figure 1 As shown, a method for verifying an electronic invoice is provided. This embodiment uses the method applied to a server as an example. It is understandable that the method can also be applied to a terminal, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In this embodiment, the method includes the following steps S102 to S108. Among them:

[0042] Step 102: Acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determine the timeliness of the signature information.

[0043] The signature information corresponding to the electronic file to be verified may indicate that the electronic file to be verified carries the signature information, or may indicate that the electronic file to be verified does not carry the signature information, but the data therein is associated with the signature information.

[0044] Furthermore, the electronic file to be verified may represent an electronic invoice file to be verified, which may represent an electronic invoice file with signature information, or an electronic invoice file to be issued without signature information filled in; furthermore, the electronic invoice file represents an invoice file generated, stored and transmitted in electronic form, and the electronic invoice file may also represent a file stored in electronic form after scanning a paper invoice file.

[0045] Among them, the signature information refers to the digital signature or electronic seal attached to the electronic invoice document, which is used to verify the authenticity and integrity of the electronic invoice.

[0046] Exemplarily, the validity period of the digital signature or electronic signature is extracted from the signature information, and the validity period is compared with the current time. If the validity period of the digital signature or electronic signature is equal to or later than the current time, it means that the signature information has not expired; if not, it means that the signature information has expired.

[0047] Step 104: If the signature information has not expired, a first electronic invoice file corresponding to the signature information is obtained.

[0048] The first electronic invoice file refers to an electronic invoice file containing unexpired signature information.

[0049] Exemplarily, when the signature information has not expired, a first electronic invoice file corresponding to the electronic file to be verified and the signature information is obtained.

[0050] Step 106: If the signature information expires, the message containing the electronic file to be verified and the signature information is sent to the message queue through the corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through the corresponding second coroutine.

[0051] Among them, the message queue represents a communication mode for transmitting messages between different systems, the first coroutine represents the message producer, and the second coroutine represents the message consumer; the message producer represents the system component used to send messages to the message queue, the message consumer represents the system component used to receive messages from the message queue, and the message queue represents the middleware used to store messages.

[0052] Message queues, message producers, and message consumers work together to achieve asynchronous communication between systems, thereby decoupling the direct relationship between the sender and receiver of the message, allowing the sender and receiver of the message to work at different speeds and times to avoid system congestion or overload, and helping to improve the scalability and reliability of the system.

[0053] The message containing the electronic file to be verified and the signature information indicates a request to update the signature information and generate an electronic invoice file containing the updated signature information. The signature platform indicates a third-party service platform for managing and storing signature information.

[0054] Exemplarily, when multiple signature information expires, the server sends different messages corresponding to different signature information to the message queue through different first coroutines; the message queue asynchronously receives different messages and concurrently sends different messages to the signature platform through different second coroutines.

[0055] Optionally, the relationship between the coroutine and the message can be expressed as a one-to-one correspondence or a one-to-many correspondence: for example, when multiple signature information expires, the server sends different messages corresponding to different signature information to the message queue through the same first coroutine, and the message queue asynchronously receives different messages and sends different messages to the signature platform through the same second coroutine.

[0056] Optionally, according to actual information transmission needs, the asynchronous transmission efficiency of the message can be flexibly adjusted by adjusting the message sending efficiency and the message receiving efficiency corresponding to the first coroutine and the second coroutine respectively; furthermore, the concurrent transmission efficiency of the message can be flexibly adjusted by adjusting the quantitative correspondence between the first coroutine, the second coroutine and the message respectively.

[0057] Optionally, the message containing the electronic file to be verified and the signature information may be represented by converting the electronic file to be verified and the signature information into a data form suitable for data transmission through a message queue.

[0058] Step 108, receiving the address of the second electronic invoice file based on the unexpired signature information corresponding to the signature information returned from the signature platform, and obtaining the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0059] The address is used to identify the location of the resource; the address can represent a URL (Uniform Resource Locator), which is used to identify and locate resources on the Internet.

[0060] The second electronic invoice file refers to an electronic invoice file containing unexpired signature information.

[0061] Exemplarily, after receiving a message from a message queue, the signature platform obtains the unexpired signature information corresponding to the signature information based on the signature information contained in the message, and then generates a second electronic invoice file based on the unexpired signature information and the electronic file to be verified contained in the message, and returns the address of the second electronic invoice file to the server; based on the address, the server obtains the second electronic invoice file corresponding to the electronic file to be verified and the unexpired signature information.

[0062] Optionally, the server may transmit a message containing only signature information to the signature platform through a message queue, and the signature platform obtains the corresponding unexpired signature information based on the signature information and returns it to the server; after the server receives the unexpired signature information, it integrates the unexpired signature information into the electronic file to be verified to generate a second electronic invoice file.

[0063] In the above-mentioned electronic invoice verification method, the timeliness of the signature information corresponding to the electronic file to be verified is determined; if the signature information has not expired, the first electronic invoice file corresponding to the signature information is obtained; if the signature information is expired, the message containing the electronic file to be verified and the signature information is concurrently sent to the message queue through the corresponding first coroutine, and the message queue concurrently sends the asynchronously received message to the signature platform through the corresponding second coroutine, and the signature platform returns the address of the second electronic invoice file obtained based on the non-expired signature information corresponding to the signature information; based on this, the timeliness of the signature information corresponding to the electronic invoice file is efficiently and accurately verified, and further, through the concurrent and asynchronous information transmission method of the coroutine and the message queue, the expired signature information is efficiently and accurately updated.

[0064] In an exemplary embodiment, Figure 2As shown, obtaining the electronic file to be verified and the signature information corresponding to the electronic file to be verified includes steps S202 to S204; after obtaining the second electronic invoice file corresponding to the unexpired signature information, it also includes step S206. Among them:

[0065] Step S202, obtaining an invoicing request, the invoicing request including invoicing information; obtaining an invoice template, filling the invoicing information into the invoice template, and obtaining an electronic file to be verified corresponding to the invoicing request.

[0066] The invoice request refers to the information for requesting the issuance of an invoice. The invoice information refers to the basic information required for issuing an invoice, such as the invoice title, invoice number, invoice date, commodity or service information, etc. The invoice template refers to the pre-designed format and layout for issuing an invoice, such as the position, size, font style of each field on the invoice, and the layout of other visual elements.

[0067] Exemplarily, an invoice template is obtained, and the invoicing information is filled into the corresponding positions in the invoice template to obtain an electronic invoice file to be verified that contains the invoicing information but does not contain signature information. That is, the electronic invoice file to be verified represents the electronic invoice file to be issued, in which the invoicing information is associated with the signature information.

[0068] Step S204, obtaining signature information corresponding to the invoicing information from the database.

[0069] The signature information corresponding to different invoicing information has been stored in the database in advance.

[0070] Exemplarily, if the signature information obtained in the database has not expired, the signature information is integrated into the electronic invoice file to be verified to obtain a first electronic invoice file containing the signature information; if the signature information obtained in the database has expired, the signature platform obtains the unexpired signature information corresponding to the signature information, and integrates the unexpired signature information into the electronic invoice file to be verified to obtain a second electronic invoice file containing the unexpired signature information.

[0071] Step S206: Update the signature information in the database to unexpired signature information.

[0072] Exemplarily, the unexpired signature information in the second electronic invoice file is obtained, and the signature information corresponding to the electronic invoice file to be verified in the database is updated to the unexpired signature information corresponding to the second electronic invoice file.

[0073] In this embodiment, the timeliness verification is performed on the signature information corresponding to the electronic invoice file to be issued. If the signature information has not expired, the signature information is directly integrated into the electronic invoice file to be issued, thereby generating a newly issued electronic invoice file that meets the timeliness verification requirements; if the signature information is expired, the non-expired signature information is efficiently and accurately obtained in the signature platform through the message queue, and the non-expired signature information is integrated into the electronic invoice file to be issued, thereby generating a newly issued electronic invoice file that meets the timeliness verification requirements.

[0074] In an exemplary embodiment, Figure 3 As shown, obtaining the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determining the timeliness of the signature information, includes steps S302 to S304. Among them:

[0075] Step S302, obtaining a document list, the document list including files carrying signature information; taking the files carrying signature information as electronic files to be verified.

[0076] The document list refers to a list or directory used to represent multiple files, and is used to organize and manage files to make them easier to find and use.

[0077] Among them, the file carrying signature information means a file that at least contains signature information, that is, it can represent both a non-electronic invoice file containing signature information and an existing historical electronic invoice file.

[0078] Furthermore, the historical electronic invoice file may refer to an electronic invoice file generated by the server at a historical moment and included in the document list, or may refer to an electronic invoice file uploaded to the server at a historical moment and included in the document list.

[0079] Exemplarily, a file carrying signature information is obtained from the document list, and the file carrying signature information is used as an electronic file to be verified, so as to perform timeliness verification on the signature information in the electronic file to be verified.

[0080] Step S304: Acquire the signature information in the electronic file to be verified, and determine the timeliness of the signature information.

[0081] Exemplarily, when the electronic file to be verified is a non-electronic invoice file containing signature information, the timeliness of the signature information is verified, and based on the verification result, the electronic file to be verified is marked. Optionally, if the signature information of the non-electronic invoice file expires, the signature platform can be used to obtain the unexpired signature information corresponding to the signature information, and the original signature information in the non-electronic invoice file is updated to the unexpired signature information.

[0082] Exemplarily, in the case that the electronic file to be verified is an existing historical electronic invoice file, if the signature information in the electronic file to be verified has not expired, the electronic file to be verified will be used as the first electronic invoice file; if the signature information in the electronic file to be verified has expired, the signature platform will obtain the non-expired signature information corresponding to the signature information, and replace the original signature information in the electronic file to be verified with the non-expired signature information, so as to obtain a second electronic invoice file containing the non-expired signature information.

[0083] Optionally, the obtained unexpired signature information can be stored in a database; optionally, when the electronic file to be verified is an existing electronic invoice file, the unexpired signature information can be associated with the billing information in the second electronic invoice file and stored in the database.

[0084] In this embodiment, the timeliness verification is performed on the signature information corresponding to the file carrying the signature information. When the file carrying the signature information is an existing historical electronic invoice file, if the signature information has not expired, it is directly determined that the existing historical electronic invoice file meets the timeliness verification requirements; if the signature information has expired, the non-expired signature information is efficiently and accurately obtained in the signature platform through the message queue, and the original signature information in the existing historical electronic invoice file is replaced with the non-expired signature information, thereby generating an electronic invoice file that meets the timeliness verification requirements.

[0085] In an exemplary embodiment, obtaining signature information in the electronic file to be verified includes steps S402 to S410. Among them:

[0086] Step S402: Identify the start position and end position of the signature area in the electronic file to be verified according to the regular expression.

[0087] Among them, regular expressions are tools for searching and matching specific patterns in text, and can be used to find, extract, or replace text fragments that meet certain rules.

[0088] Among them, the signature area represents a specific area reserved for digital signatures or electronic signatures on an electronic document; the starting position of the signature area represents the starting point or starting boundary of the specific area for placing the digital signature or electronic signature, and the ending position of the signature area represents the end point or ending boundary of the specific area for placing the digital signature or electronic signature; the starting position and the ending position can be represented by coordinates, pixel values, characters or other types of size parameters.

[0089] Step S404: based on the start position and the end position, a character string corresponding to the information of the signature area is intercepted from the electronic file to be verified.

[0090] Exemplarily, based on the starting position and ending position of the signature area, the information of the signature area is identified to obtain a character string corresponding to the information of the signature area; optionally, the character string corresponding to the information of the signature area can be represented as a digital signature stored in the form of a character string, or can be represented as electronic signature image data stored in the form of a character string.

[0091] Step S406: encrypt the character string based on a preset encoding algorithm to obtain an encrypted character string corresponding to the character string.

[0092] Among them, the encoding algorithm refers to an algorithm that converts data from one form or representation into another specific encoding method, which includes character encoding algorithms, data compression algorithms, and encryption algorithms; among them, the encryption algorithm refers to an algorithm that converts data into ciphertext to protect its confidentiality, which includes symmetric encryption algorithms, asymmetric encryption algorithms, and hash algorithms.

[0093] Step S408, adding the certificate start symbol to the starting position of the encrypted string, and adding the certificate end symbol to the ending position of the encrypted string, to obtain a certificate string corresponding to the encrypted string; wherein the certificate start symbol and the certificate end symbol are used to represent the starting position and the ending position of the certificate respectively.

[0094] Among them, certificate represents a digital certificate used for digital encryption and identity authentication; the certificate start symbol and certificate end symbol respectively represent the starting position and the ending position of the certificate area used to identify the text.

[0095] Exemplarily, the certificate start symbol and the certificate end symbol are inserted into the starting position and the ending position of the encrypted string respectively, and the information corresponding to the digital certificate can be inserted at any position between the certificate start symbol and the certificate end symbol to convert the encrypted string into text data containing the information corresponding to the digital certificate, that is, the certificate string.

[0096] Step S410, based on a preset decoding algorithm, the certificate character string is parsed to obtain the time information and identity information in the signature information; the time information is used to characterize the timeliness of the signature information, and the identity information is used to characterize the legitimacy of the corporate identity corresponding to the signature information.

[0097] The decoding algorithm refers to the algorithm that converts the encoded data back into the original data format or representation, which includes the decompression algorithm, the character decoding algorithm, and the decryption algorithm. The decryption algorithm refers to the algorithm that restores the encrypted data to the original plaintext data, which includes the decryption algorithms corresponding to the symmetric encryption algorithm and the asymmetric encryption algorithm respectively.

[0098] Among them, the time information in the signature information represents the timestamp of the signature, which includes the signing timestamp and validity period; the identity information in the signature information represents the identity information of the signatory. For individual signatories, the identity information includes name, ID number, address and other information; for organizational signatories, the identity information includes organization name, organization registration number, legal representative name, organization contact person and other information.

[0099] In this embodiment, regular expressions, encoding algorithms and decoding algorithms are used to efficiently and accurately extract the signature information in the electronic file to be verified, and identify the time information and identity information in the signature information to facilitate verification of the timeliness and legality of the signature information.

[0100] In an exemplary embodiment, based on a preset encoding algorithm, the string is encrypted to obtain an encrypted string corresponding to the string, including step S502; based on a preset decoding algorithm, the certificate string is parsed to obtain time information and identity information in the signature information, including step S504. Wherein:

[0101] Step S502, dividing the character string into multiple groups, mapping the characters in each group to corresponding elements in the character set corresponding to the encoding algorithm; arranging each mapped element in sequence to obtain an encrypted character string.

[0102] The character set corresponding to the encoding algorithm represents the set of character elements that can be used in the encoding process.

[0103] Exemplarily, the characters in the character string are divided into a plurality of groups in sequence, with a preset number of characters being a group, and the characters in each group are respectively mapped to corresponding elements in the character set corresponding to the encoding algorithm.

[0104] Optionally, based on the encoding algorithm used and the characteristics of the character set, the number of characters corresponding to each group when the character strings are grouped, and the corresponding relationship between the number of characters in each group and the number of elements in the character set may be determined.

[0105] Optionally, if the encoding algorithm is the Base64 encoding algorithm, since each Base64 character in the Base64 character set corresponding to the Base64 encoding algorithm represents 6 bits of data, and each 3 bytes of binary data has a total of 24 bits, each 3 bytes of binary data can be mapped to 4 Base64 characters.

[0106] Step S504: Based on a preset decoding algorithm, the structure of the certificate string is parsed to extract field information in the certificate string; based on the field information, the time information and identity information in the signature information are obtained.

[0107] The structure of the certificate string represents the arrangement and meaning of each part in the string; the field information in the certificate string represents the content and meaning of each field in the string.

[0108] Exemplarily, based on a preset decoding algorithm, the header information, field identifier, field length, field content and other information in the certificate string are identified and parsed to obtain the field information in the certificate string, and the time information and identity information are extracted from the field information.

[0109] In this embodiment, by grouping the strings and mapping them to elements in the character set corresponding to the encoding algorithm, an encrypted string is obtained based on the mapped, sequentially arranged elements to achieve efficient and accurate encryption processing of the string; furthermore, by parsing the structure of the certificate string to obtain the time information and identity information in the signature information, efficient and accurate decryption processing of the certificate string is achieved.

[0110] In an exemplary embodiment, after obtaining the time information and identity information in the signature information, the process further includes steps S602 to S606.

[0111] Step S602, obtaining the current time information. If the current time information satisfies the time validity condition corresponding to the time information, it is determined that the signature information is not expired; if not, it is determined that the signature information is expired.

[0112] The current time information indicates the timestamp corresponding to the current moment.

[0113] Exemplarily, if the validity period corresponding to the time information in the signature information is later than or equal to the time corresponding to the current time information, the signature information is determined to be not expired; optionally, if the validity period corresponding to the time information in the signature information is later than the time corresponding to the current time information, and the time difference with the time corresponding to the current time information is greater than a preset threshold, the signature information is determined to be not expired.

[0114] Step S604, obtaining the target identity information corresponding to the signature information returned from the signature platform. If the target identity information matches the identity information, the signature information is determined to be secure; if not, the signature information is determined to be unsafe.

[0115] Exemplarily, the signature platform has pre-stored target identity information corresponding to different signature information. The target identity information may represent the information provided by the user when registering a signature platform account, or it may represent the information accessed by the signature platform based on a third-party service provider; the target identity information returned by the signature platform is compared with the identity information in the signature information. If the target identity information and the identity information match, the signature information is determined to be legal.

[0116] Optionally, different security levels are set according to the degree of match between the identity information and the target identity information. For example, the greater the degree of match (such as the percentage of the number of matching identity information and target identity information, or the degree of similarity between the identity information and the corresponding target identity information), the higher the security level; when the security level is higher than a preset threshold, the signature information is determined to be secure.

[0117] Step S606: If it is determined that the signature information is expired or unsafe, a warning message corresponding to the signature information is generated.

[0118] If the signature information is determined to be expired, an alarm message corresponding to the timeliness is generated to prompt the update of the expired signature information; if the signature information is determined to be unsafe, an alarm message corresponding to the security is generated to prompt the re-testing of the unsafe signature information or the blacklisting of the provider of the electronic invoice file.

[0119] In this embodiment, timeliness verification and security verification are performed on the electronic invoice file, thereby ensuring the reliability of the signature information corresponding to the electronic file in multiple dimensions.

[0120] In an exemplary embodiment, receiving the address of the second electronic invoice file obtained based on the unexpired signature information corresponding to the signature information returned from the signature platform, and obtaining the second electronic invoice file corresponding to the unexpired signature information based on the address, including steps S702 to S704. Among them:

[0121] Step S702, receiving the address corresponding to the second electronic invoice file uploaded to the cloud storage service platform returned after receiving the message from the signature platform.

[0122] Among them, cloud storage service platform refers to a cloud computing platform that provides storage services to allow individuals, organizations and enterprises to store, manage and access data on the cloud computing platform.

[0123] Exemplarily, after receiving a message from a message queue, the signature platform obtains unexpired signature information based on the received message to generate a second electronic invoice file containing unexpired signature information; the signature platform then uploads the second electronic invoice file to the cloud storage service platform, and returns the address of the second electronic invoice file in the cloud storage service platform to the server.

[0124] Step S704: Based on the interface corresponding to the cloud storage service platform, receive the second electronic invoice file corresponding to the address.

[0125] Among them, the interface corresponding to the cloud storage service platform can be expressed as a network interface used to interact with and manage the cloud storage service.

[0126] In this embodiment, after uploading the second electronic invoice file to the cloud storage service platform, it is only necessary to use the interface corresponding to the cloud storage service platform and the address corresponding to the second electronic invoice file. On the one hand, the second electronic invoice file can be obtained in real time and flexibly, and on the other hand, local computer storage resources are greatly saved.

[0127] In an exemplary embodiment, Figure 4 As shown, after consumption, the customer requests an invoice from the merchant; the merchant sends the invoice request to the cloud open platform, where the cloud open platform represents a comprehensive service platform that provides open interfaces, allowing developers to integrate and interact with various cloud services, including invoicing services, subscription application services, invoice collection services, reimbursement services, etc.

[0128] The cloud open platform extracts the invoicing information in the invoicing request and fills the invoicing information into the invoice template. If the invoicing is successful, an electronic invoice file to be verified is generated; if not, the invoicing information is re-filled into the invoice template to re-issue the invoice.

[0129] The cloud open platform obtains the signature information corresponding to the electronic invoice file to be verified in the MySQL database, where the MySQL database represents a relational database management system that organizes and stores data in the form of tables.

[0130] The cloud open platform determines whether the signature information is expired. If the signature information is not expired, the signature information is filled into the electronic invoice file to be verified to generate a first electronic invoice file containing the signature information; the first electronic invoice file is in PDF file format, and then the cloud open platform uploads the first electronic invoice file to the cloud storage service platform, and returns the URL address of the first electronic invoice file to the cloud open platform. Among them, the cloud storage service platform provides a secure, reliable, low-cost, and highly scalable cloud storage service; the cloud storage service platform can store various unstructured data, including pictures, videos, audio, text and other data; the cloud storage service platform supports the standard HTTP protocol (Hypertext Transfer Protocol) or HTTPS protocol (Hypertext Transfer Protocol Secure), and can upload, download and manage data through API (Application Programming Interface), SDK (Software Development Kit), console and other methods.

[0131] If the signature information expires, the message containing the signature information and the electronic invoice file to be verified is sent asynchronously and concurrently to the signature platform through the message queue; the signature platform obtains the unexpired signature information corresponding to the signature information, and fills the unexpired signature information into the electronic invoice file to be verified, and generates a second electronic invoice file containing the unexpired signature information; the second electronic invoice file is in PDF file format, and the signature platform then uploads the second electronic invoice file to the cloud storage service platform, and returns the URL address of the second electronic invoice file to the cloud open platform.

[0132] In an exemplary embodiment, Figure 5 As shown, the merchant uploads the file to the merchant platform, and the merchant platform includes the received file in the document list; wherein, the uploaded file can be represented as an existing electronic invoice file, or as a non-electronic invoice file carrying signature information; wherein, the merchant platform represents an online platform that provides one-stop services for merchants, such as invoicing management services, merchant information maintenance services, data statistics and analysis functions, etc.

[0133] The merchant platform extracts the signature information of the files in the document list; optionally, the extraction frequency and the amount of information extracted each time can be set, so as to flexibly control the detection efficiency of the signature information of the files in the document list.

[0134] Parse the signature information to obtain the time information and identity information in the signature information. Based on the identity information in the signature information, obtain the target identity information corresponding to the identity information in the signature platform; compare the identity information in the signature information with the target identity information in the signature platform to determine whether the signature information is secure; if the identity information matches the target identity information, it means that the signature information is secure and the signature information is marked as secure; if not, it means that the signature information is not secure and a corresponding alarm message is generated.

[0135] Based on the current time information and the time information in the signature information, determine whether the signature information is expired; if the validity period corresponding to the time information in the signature information is later than or equal to the time corresponding to the current time information, it means that the signature information has not expired, and the signature information is marked as not expired.

[0136] If not, it means that the signature information has expired. Then, the message containing the file corresponding to the signature information is sent asynchronously and concurrently to the signature platform through the message queue; the signature platform obtains the non-expired signature information corresponding to the signature information, and replaces the expired signature information with the non-expired signature information in the original file to generate a second electronic invoice file containing the non-expired signature information; the signature platform then uploads the second electronic invoice file to the cloud storage service platform, and the signature platform replaces the URL address of the original file with the URL address of the second electronic invoice file, and returns the URL address of the second electronic invoice file to the cloud open platform.

[0137] In an exemplary embodiment, the above method can be implemented based on K8S (Kubernetes), where K8S is a portable, scalable open source platform; the functions of K8s include: self-healing, elastic scaling, automatic deployment and rollback, service discovery and load balancing, configuration management of confidential data (such as passwords, certificates), automatic completion of box calculations, batch processing, and storage orchestration.

[0138] In an exemplary embodiment, the concurrent processing of tasks by multiple coroutines corresponding to the message queue can be implemented based on the GO language, wherein the GO language is a statically strongly typed, compiled, concurrent programming language with garbage collection capabilities.

[0139] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0140] Based on the same inventive concept, the embodiment of the present application also provides an electronic invoice verification device for implementing the electronic invoice verification method involved above. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above method, so the specific limitations in the one or more electronic invoice verification device embodiments provided below can refer to the limitations of the electronic invoice verification method above, and will not be repeated here.

[0141] In an exemplary embodiment, Figure 6As shown, an electronic invoice verification device is provided, including: an acquisition module 602, a first generation module 604, a sending module 606 and a second generation module 608, wherein:

[0142] The acquisition module 602 is used to acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determine the timeliness of the signature information;

[0143] The first generating module 604 is used to obtain a first electronic invoice file corresponding to the signature information if the signature information has not expired;

[0144] The sending module 606 is used to send the message containing the electronic file to be verified and the signature information to the message queue through the corresponding first coroutine if the signature information expires, so that the message queue concurrently sends the received message to the signature platform through the corresponding second coroutine;

[0145] The second generation module 608 is used to receive the address of the second electronic invoice file returned from the signature platform based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0146] In an exemplary embodiment, the acquisition module 602 is also used to: obtain an invoicing request, which includes invoicing information; obtain an invoice template, fill the invoicing information into the invoice template, and obtain an electronic file to be verified corresponding to the invoicing request; obtain signature information corresponding to the invoicing information in the database; the second generation module 608 is also used to: update the signature information in the database to non-expired signature information.

[0147] In an exemplary embodiment, the acquisition module 602 is also used to: obtain a document list, the document list includes files carrying signature information; use the files carrying signature information as electronic files to be verified; obtain the signature information in the electronic files to be verified, and determine the timeliness of the signature information.

[0148] In an exemplary embodiment, the acquisition module 602 is also used to: identify the start position and end position corresponding to the signature area in the electronic file to be verified according to a regular expression; based on the start position and end position, intercept the character string corresponding to the information in the signature area in the electronic file to be verified; based on a preset encoding algorithm, encrypt the character string to obtain an encrypted character string corresponding to the character string; add the certificate start symbol to the start position of the encrypted character string, and add the certificate end symbol to the end position of the encrypted character string to obtain a certificate string corresponding to the encrypted character string; wherein the certificate start symbol and the certificate end symbol are used to represent the start position and end position of the certificate, respectively; based on a preset decoding algorithm, parse the certificate string to obtain the time information and identity information in the signature information; wherein the time information is used to represent the timeliness of the signature information, and the identity information is used to represent the legitimacy of the corporate identity corresponding to the signature information.

[0149] In an exemplary embodiment, the acquisition module 602 is also used to: divide the character string into multiple groups, and map the characters of each group to corresponding elements in the character set corresponding to the encoding algorithm; arrange each mapped element in sequence to obtain an encrypted character string; based on a preset decoding algorithm, parse the structure of the certificate string to extract the field information in the certificate string; based on the field information, obtain the time information and identity information in the signature information.

[0150] In an exemplary embodiment, the acquisition module 602 is also used to: obtain current time information, and if the current time information meets the timeliness condition corresponding to the time information, determine that the signature information has not expired; if not, determine that the signature information is expired; obtain target identity information corresponding to the signature information returned from the signature platform, and if the target identity information and the identity information match, determine that the signature information is secure; if not, determine that the signature information is insecure; if the signature information is determined to be expired or insecure, generate an alarm message corresponding to the signature information.

[0151] In an exemplary embodiment, the second generation module 608 is also used to: receive the address corresponding to the second electronic invoice file uploaded to the cloud storage service platform that is returned after the message is received from the signature platform; and receive the second electronic invoice file corresponding to the address based on the interface corresponding to the cloud storage service platform.

[0152] Each module in the above-mentioned electronic invoice verification device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0153] In an exemplary embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as shown in FIG. Figure 7 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store data for verifying electronic invoices. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a method for verifying electronic invoices is implemented.

[0154] Those skilled in the art will understand that Figure 7 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0155] In an exemplary embodiment, a computer device is provided, including a memory and a processor, wherein a computer program is stored in the memory, and when the processor executes the computer program, the following steps are implemented:

[0156] Obtaining the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determining the timeliness of the signature information;

[0157] If the signature information has not expired, the first electronic invoice file corresponding to the signature information is obtained;

[0158] If the signature information is expired, the message containing the electronic file to be verified and the signature information is sent to the message queue through the corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through the corresponding second coroutine;

[0159] Receive the address of the second electronic invoice file returned from the signature platform and obtained based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0160] In one embodiment, when the processor executes the computer program, the following steps are also implemented: obtaining an invoicing request, the invoicing request includes invoicing information; obtaining an invoice template, filling the invoicing information into the invoice template, and obtaining an electronic file to be verified corresponding to the invoicing request; obtaining signature information corresponding to the invoicing information in the database; and updating the signature information in the database to non-expired signature information.

[0161] In one embodiment, a document list is obtained, the document list includes files carrying signature information; the files carrying signature information are used as electronic files to be verified; the signature information in the electronic files to be verified is obtained, and the timeliness of the signature information is determined.

[0162] In one embodiment, when the processor executes the computer program, the following steps are also implemented: according to a regular expression, the starting position and the ending position corresponding to the signature area in the electronic file to be verified are identified; based on the starting position and the ending position, a character string corresponding to the information in the signature area in the electronic file to be verified is intercepted; based on a preset encoding algorithm, the character string is encrypted to obtain an encrypted character string corresponding to the character string; the certificate start symbol is added to the starting position of the encrypted character string, and the certificate end symbol is added to the ending position of the encrypted character string to obtain a certificate character string corresponding to the encrypted character string; wherein the certificate start symbol and the certificate end symbol are used to represent the starting position and the ending position of the certificate respectively; based on a preset decoding algorithm, the certificate character string is parsed to obtain the time information and identity information in the signature information; wherein the time information is used to represent the timeliness of the signature information, and the identity information is used to represent the legitimacy of the corporate identity corresponding to the signature information.

[0163] In one embodiment, when the processor executes the computer program, the following steps are also implemented: dividing the character string into multiple groups, and mapping the characters of each group to corresponding elements in the character set corresponding to the encoding algorithm; arranging each mapped element in sequence to obtain an encrypted character string; based on a preset decoding algorithm, parsing the structure of the certificate character string to extract the field information in the certificate character string; based on the field information, obtaining the time information and identity information in the signature information.

[0164] In one embodiment, the processor also implements the following steps when executing the computer program: obtaining current time information, and if the current time information meets the timeliness condition corresponding to the time information, determining that the signature information has not expired; if not, determining that the signature information has expired; obtaining target identity information corresponding to the signature information returned from the signature platform, and if the target identity information and the identity information match, determining that the signature information is secure; if not, determining that the signature information is insecure; if the signature information is determined to be expired or insecure, generating an alarm message corresponding to the signature information.

[0165] In one embodiment, when the processor executes the computer program, the following steps are also implemented: receiving the address corresponding to the second electronic invoice file uploaded to the cloud storage service platform that is returned after receiving the message from the signature platform; and receiving the second electronic invoice file corresponding to the address based on the interface corresponding to the cloud storage service platform.

[0166] In one embodiment, a computer readable storage medium is provided, on which a computer program is stored, and when the computer program is executed by a processor, the following steps are implemented:

[0167] Obtaining the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determining the timeliness of the signature information;

[0168] If the signature information has not expired, the first electronic invoice file corresponding to the signature information is obtained;

[0169] If the signature information is expired, the message containing the electronic file to be verified and the signature information is sent to the message queue through the corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through the corresponding second coroutine;

[0170] Receive the address of the second electronic invoice file based on the unexpired signature information corresponding to the signature information returned from the signature platform, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address.

[0171] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining an invoicing request, which includes invoicing information; obtaining an invoice template, filling the invoicing information into the invoice template, and obtaining an electronic file to be verified corresponding to the invoicing request; obtaining signature information corresponding to the invoicing information in the database; and updating the signature information in the database to non-expired signature information.

[0172] In one embodiment, when the computer program is executed by a processor, the following steps are also implemented: obtaining a document list, the document list includes files carrying signature information; using the files carrying signature information as the electronic files to be verified; obtaining the signature information in the electronic files to be verified, and determining the timeliness of the signature information.

[0173] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: according to a regular expression, the starting position and the ending position corresponding to the signature area in the electronic file to be verified are identified; based on the starting position and the ending position, a character string corresponding to the information in the signature area in the electronic file to be verified is intercepted; based on a preset encoding algorithm, the character string is encrypted to obtain an encrypted character string corresponding to the character string; the certificate start symbol is added to the starting position of the encrypted character string, and the certificate end symbol is added to the ending position of the encrypted character string to obtain a certificate character string corresponding to the encrypted character string; wherein the certificate start symbol and the certificate end symbol are used to represent the starting position and the ending position of the certificate respectively; based on a preset decoding algorithm, the certificate character string is parsed to obtain the time information and identity information in the signature information; wherein the time information is used to represent the timeliness of the signature information, and the identity information is used to represent the legitimacy of the corporate identity corresponding to the signature information.

[0174] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: dividing the character string into multiple groups, and mapping the characters of each group to corresponding elements in the character set corresponding to the encoding algorithm; arranging each mapped element in sequence to obtain an encrypted character string; based on a preset decoding algorithm, parsing the structure of the certificate character string to extract the field information in the certificate character string; based on the field information, obtaining the time information and identity information in the signature information.

[0175] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: obtaining current time information, and if the current time information meets the timeliness condition corresponding to the time information, determining that the signature information has not expired; if not, determining that the signature information is expired; obtaining target identity information corresponding to the signature information returned from the signature platform, and if the target identity information and the identity information match, determining that the signature information is secure; if not, determining that the signature information is insecure; if the signature information is determined to be expired or insecure, generating an alarm message corresponding to the signature information.

[0176] In one embodiment, when the computer program is executed by the processor, the following steps are also implemented: receiving the address corresponding to the second electronic invoice file uploaded to the cloud storage service platform that is returned after receiving the message from the signature platform; and receiving the second electronic invoice file corresponding to the address based on the interface corresponding to the cloud storage service platform.

[0177] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0178] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but are not limited to this.

[0179] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0180] The above-described embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present application. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the present application shall be subject to the attached claims.

Claims

1. A method for verifying an electronic invoice, characterized in that: The method comprises: The electronic file to be verified and the signature information corresponding to the electronic file to be verified are obtained, and the timeliness of the signature information is determined, including: determining the timeliness of the time information in the signature information; wherein the time information is obtained by parsing a certificate character string based on a preset decoding algorithm; the certificate character string is obtained by identifying the start position and the end position corresponding to the signature area in the electronic file to be verified carrying the signature information according to a regular expression, based on the start position and the end position, intercepting the character string corresponding to the information of the signature area in the electronic file to be verified carrying the signature information, and based on the The number of characters corresponding to each group when the character string is grouped is determined by the characteristics of the encoding algorithm and the character set corresponding to the encoding algorithm, and the corresponding relationship between the number of characters in each group and the number of elements in the character set, the character string is divided into multiple groups, the characters of each group are respectively mapped to the corresponding elements in the character set, each mapped element is arranged in sequence to obtain an encrypted character string, and the certificate start symbol is added to the starting position of the encrypted character string, and the certificate end symbol is added to the end position of the encrypted character string; the certificate start symbol and the certificate end symbol are used to represent the starting position and the end position of the certificate respectively; If the signature information has not expired, obtaining a first electronic invoice file corresponding to the signature information; If the signature information is expired, the message containing the electronic file to be verified and the signature information is sent to the message queue through the corresponding first coroutine, so that the message queue concurrently sends the received message to the signature platform through the corresponding second coroutine; wherein, by adjusting the corresponding relationship between the first coroutine, the second coroutine and the message respectively, the corresponding relationship between the coroutine and the message is one-to-one, or one-to-many; Receiving the address of the second electronic invoice file returned from the signature platform and obtained based on the unexpired signature information corresponding to the signature information, and obtaining the second electronic invoice file corresponding to the unexpired signature information based on the address, including: when the electronic file to be verified is an electronic invoice file to be issued without signature information filled in, obtaining the unexpired signature information in the second electronic invoice file, and updating the signature information corresponding to the electronic file to be verified in the database to the unexpired signature information in the second electronic invoice file; When the electronic file to be verified is an electronic invoice file containing signature information, obtain the unexpired signature information corresponding to the signature information returned by the signature platform, update the signature information in the electronic file to be verified to the unexpired signature information, and obtain the second electronic invoice file containing the unexpired signature information.

2. The method according to claim 1, characterized in that The obtaining of the electronic file to be verified and the signature information corresponding to the electronic file to be verified includes: Obtaining an invoicing request, the invoicing request including invoicing information; obtaining an invoice template, filling the invoicing information into the invoice template, and obtaining the electronic file to be verified corresponding to the invoicing request; Acquire signature information corresponding to the invoicing information in a database; After obtaining the second electronic invoice file corresponding to the unexpired signature information, the method further includes: The signature information in the database is updated to the unexpired signature information.

3. The method according to claim 1, characterized in that The obtaining of the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and determining the timeliness of the signature information, includes: Obtaining a document list, the document list including files carrying signature information; using the files carrying signature information as the electronic files to be verified; The signature information in the electronic file to be verified is obtained, and the timeliness of the signature information is determined.

4. The method according to claim 3, characterized in that The obtaining of the signature information in the electronic file to be verified includes: Based on a preset decoding algorithm, the certificate character string is parsed to obtain the time information and identity information in the signature information; wherein the time information is used to characterize the timeliness of the signature information, and the identity information is used to characterize the legitimacy of the corporate identity corresponding to the signature information.

5. The method according to claim 4, characterized in that The method of parsing the certificate string based on a preset decoding algorithm to obtain the time information and identity information in the signature information includes: Based on a preset decoding algorithm, the structure of the certificate string is parsed to extract field information in the certificate string; based on the field information, the time information and identity information in the signature information are obtained.

6. The method according to claim 4, characterized in that After obtaining the time information and identity information in the signature information, the method further includes: Acquire current time information, and if the current time information satisfies the time validity condition corresponding to the time information, determine that the signature information is not expired; if not, determine that the signature information is expired; Obtaining target identity information corresponding to the signature information returned from the signature platform, and if the target identity information matches the identity information, determining that the signature information is secure; if not, determining that the signature information is unsafe; If it is determined that the signature information is expired or unsafe, an alarm message corresponding to the signature information is generated.

7. The method according to claim 1, characterized in that The receiving the address of the second electronic invoice file returned from the signature platform and obtained based on the unexpired signature information corresponding to the signature information, and obtaining the second electronic invoice file corresponding to the unexpired signature information based on the address, comprises: After receiving the message from the signature platform, the address corresponding to the second electronic invoice file uploaded to the cloud storage service platform is returned; Based on an interface corresponding to the cloud storage service platform, the second electronic invoice file corresponding to the address is received.

8. An electronic invoice verification device, characterized in that: The device comprises: An acquisition module is used to acquire the electronic file to be verified and the signature information corresponding to the electronic file to be verified, and to determine the timeliness of the signature information, including: determining the timeliness of the time information in the signature information; wherein the time information is obtained by parsing the certificate character string based on a preset decoding algorithm; the certificate character string is obtained by identifying the start position and the end position corresponding to the signature area in the electronic file to be verified carrying the signature information according to a regular expression, and based on the start position and the end position, intercepting the character string corresponding to the information of the signature area in the electronic file to be verified carrying the signature information, Based on the number of characters corresponding to each group when the character string is grouped, which is determined by the encoding algorithm and the characteristics of the character set corresponding to the encoding algorithm, and the corresponding relationship between the number of characters in each group and the number of elements in the character set, the character string is divided into multiple groups, the characters of each group are respectively mapped to the corresponding elements in the character set, and each mapped element is arranged in sequence to obtain an encrypted character string, which is obtained by adding a certificate start symbol to the starting position of the encrypted character string and adding a certificate end symbol to the ending position of the encrypted character string; the certificate start symbol and the certificate end symbol are used to represent the starting position and the ending position of the certificate respectively; A first generating module, configured to obtain a first electronic invoice file corresponding to the signature information if the signature information has not expired; A sending module, for sending a message containing the electronic file to be verified and the signature information to a message queue through a corresponding first coroutine if the signature information expires, so that the message queue concurrently sends the received message to the signature platform through a corresponding second coroutine; wherein, by adjusting the corresponding relationship between the first coroutine, the second coroutine and the message respectively, a one-to-one correspondence relationship or a one-to-many correspondence relationship is established between the coroutine and the message; The second generation module is used to receive the address of the second electronic invoice file returned from the signature platform based on the unexpired signature information corresponding to the signature information, and obtain the second electronic invoice file corresponding to the unexpired signature information based on the address, including: when the electronic file to be verified is an electronic invoice file to be issued without filling in the signature information, obtaining the unexpired signature information in the second electronic invoice file, and updating the signature information corresponding to the electronic file to be verified in the database to the unexpired signature information in the second electronic invoice file; when the electronic file to be verified is an electronic invoice file containing signature information, obtaining the unexpired signature information corresponding to the signature information returned by the signature platform, updating the signature information in the electronic file to be verified to the unexpired signature information, and obtaining the second electronic invoice file containing the unexpired signature information.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 7 are implemented.

10. A computer-readable storage medium having a computer program stored thereon, 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 7 are implemented.

Citation Information

Patent Citations

  • Electronic signature digital certificate updating method and device and storage medium

    CN114817889A

  • Electronic certificate identification processing method and device, equipment and medium

    CN116051303A