Digital electronic invoice sharing cloud printing method and cloud server

Through cloud servers and intelligent matching algorithms, the cloud printing and sharing of electronic invoices is realized, solving the problems of inefficiency in printing, geographical restrictions and security in the existing technology, meeting the large-scale and high-concurrency printing needs, and improving user experience and data security.

CN120045148AActive Publication Date: 2025-05-27WUHAN FEIYU YIKE TECH CO LTD
View PDF 12 Cites 0 Cited by

Patent Information

Application Number
CN202510518309.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-24
Publication Date
2025-05-27
Estimated Expiration
2045-04-24

AI Technical Summary

Technical Problem

The existing electronic invoice printing technology relies on local printing equipment, resulting in inefficient printing and unable to meet large-scale and high-concurrency printing needs, especially in the enterprise environment, affecting work efficiency and difficult to meet cross-regional and cross-platform printing needs.

Method used

Provide a cloud printing method for digital invoice sharing, which receives digital invoice files uploaded by users through a cloud server, verifies the validity of the file, obtains the user's geographical location, matches the target printing service provider, generates a printing task, and sends it to the target printing service provider terminal to perform printing tasks. After the printing task is completed, the invoice copy is returned to the cloud server, encrypted, and an invoice sharing link is generated for users to download.

Benefits of technology

Through cloud computing technology and intelligent matching algorithms, the electronic invoice printing process is comprehensively optimized, printing efficiency is improved, large-scale and high-concurrency printing needs are met, inefficiency, geographical restrictions and security problems in traditional methods are solved, and user experience and data security are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120045148A_ABST
    Figure CN120045148A_ABST
Patent Text Reader

Abstract

The invention discloses a digital and electronic invoice sharing cloud printing method and a cloud server, and relates to the technical field of cloud platforms, and the method comprises the steps: obtaining a digital and electronic invoice file; verifying the digital-to-electronic invoice file, obtaining the current geographic position of the user terminal after verification succeeds, and determining a target printing service provider terminal based on the printing parameters and the current geographic position; generating a printing task according to the printing parameters and the digital-to-electronic invoice file; sending the printing task to a target printing service provider terminal, wherein the target printing service provider terminal is used for returning the invoice copy to the cloud server; responding to the received invoice copy, encrypting the invoice copy, and generating an invoice sharing link based on the encrypted invoice copy; the invoice sharing link is sent to the user terminal, and the user terminal is used for receiving the invoice sharing link and decrypting the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that a user clicks the invoice sharing link through the user terminal to download the invoice copy.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the technical field of cloud platforms, and in particular, to a method for sharing and cloud-printing digital invoices and a cloud server. Background Art

[0002] With the popularization of electronic invoices, the demand for printing and sharing electronic invoices by enterprises and individuals is increasing day by day. As a digital financial voucher, electronic invoices have the advantages of environmental protection, convenience, easy storage, etc., and have gradually replaced traditional paper invoices. However, although electronic invoices have been highly digitized in terms of issuance, transmission, and storage, in actual use, many scenarios still require printing electronic invoices in paper form, such as reimbursement, archiving, contract signing, etc. This demand makes the printing of electronic invoices an important part of the daily operations of enterprises and individuals.

[0003] However, existing electronic invoice printing technologies mostly rely on local printing devices, resulting in low printing efficiency and being unable to meet the large-scale and high-concurrency printing requirements. Especially in the enterprise environment, financial personnel need to frequently handle a large number of electronic invoice printing tasks, and existing technical solutions often cannot efficiently complete these tasks, seriously affecting work efficiency. In addition, with the popularization of electronic invoices, the geographical distribution of printing needs is becoming more and more extensive, and traditional local printing devices are difficult to meet the cross-regional and cross-platform printing requirements.

[0004] Currently, the printing technology of electronic invoices mainly relies on local printing devices, and its core process includes the following steps: 1. Download the electronic invoice file: The user downloads the electronic invoice file (usually in PDF format) from the electronic invoice platform or email. 2. Connect to the local printing device: The user transfers the electronic invoice file to the local printer. 3. Configure the printing parameters: The user needs to manually configure the printing parameters before printing, such as paper size, number of copies, double-sided printing, etc. 4. Execute the printing task: The local printing device executes the printing task according to the configured printing parameters to generate paper invoices.

[0005] Although this technical solution can meet the requirements in personal or small-scale scenarios, in enterprise or large-scale scenarios, due to the limited processing capacity of local printing devices, multiple printing tasks cannot be processed simultaneously. When multiple users need to print electronic invoices, they often need to queue up and wait, resulting in low printing efficiency. In addition, with the popularization of electronic invoices, the geographical distribution of printing needs is becoming more and more extensive, and traditional local printing devices are difficult to meet the cross-regional and cross-platform printing requirements, further exacerbating the problem of low printing efficiency. Summary of the Invention

[0006] The embodiments of the present application provide a method for sharing and cloud-printing digital invoices and a cloud server, which are used to effectively improve printing efficiency.

[0007] To achieve the above object, the embodiments of the present application adopt the following technical solutions: In a first aspect, a method for sharing and cloud printing of digital electronic invoices is provided, which is applied to a cloud server. The method includes: In response to receiving an upload signal of a digital electronic invoice file uploaded by a user through a user terminal, obtain the digital electronic invoice file; Verify the digital electronic invoice file, and after successful verification, obtain the current geographical location of the user terminal, and based on the printing parameters input by the user and the current geographical location, determine a target printing service provider terminal; Generate a printing task according to the printing parameters and the digital electronic invoice file; Send the printing task to the target printing service provider terminal, where the target printing service provider terminal is used to execute the printing task and generate an invoice copy, and return the invoice copy to the cloud server; In response to receiving the invoice copy, encrypt the invoice copy and generate an invoice sharing link based on the encrypted invoice copy; Send the invoice sharing link to the user terminal, where the user terminal is used to receive the invoice sharing link and decrypt the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that the user can click the invoice sharing link through the user terminal to download the invoice copy.

[0008] In a possible implementation manner of the first aspect, after sending the printing task to the printing service provider terminal, it includes: Receive in real time the printing status returned by the printing service provider terminal, where the printing status includes printing success, printing failure or printing in progress; Package the printing status into a status notification message and send the status notification message to the user terminal.

[0009] In another possible implementation manner of the first aspect, the verification of the digital electronic invoice file includes: Parse the digital electronic invoice file to extract file header information and content data; Verify whether the file header information conforms to a preset tax file format standard; and Verify whether the content data conforms to a preset tax content rule; When both the file header information and the content data pass the verification, confirm that the digital electronic invoice file verification is successful.

[0010] In another possible implementation of the first aspect, the printing parameters include the number of copies, printing quality, and printing service type. Determining the target printing service provider terminal based on the user-input printing parameters and the current geographical location includes: Parse the current geographical location to obtain the user's geographical coordinates; From a preset list of printing service provider terminals, obtain the geographical coordinates and service capabilities of each printing service provider terminal; For each of the printing service provider terminals, calculate the Euclidean distance between the user's geographical coordinates and the geographical coordinates of the printing service provider terminal as the distance factor of the printing service provider terminal; According to the printing service type, obtain the corresponding basic weight value from a preset service type weight table; According to the printing quality, obtain the corresponding quality weight value from a preset printing quality weight table; Take the sum of the basic weight value and the basic weight value as the service capacity weight; For each of the printing service provider terminals, take the weighted sum of the reciprocal of the distance factor and the service capacity weight as the matching score of the printing service provider terminal; Take the printing service provider terminal with the highest matching score as the target printing service provider terminal.

[0011] In another possible implementation of the first aspect, generating a printing task according to the printing parameters and the digital electronic invoice file includes: Obtain the unique code of the target printing service provider terminal; Generate a printing task description file according to the printing parameters. The printing task description file includes a file identifier, the number of copies, the printing quality, and the unique code of the target printing service provider terminal; Associate the digital electronic invoice file with the printing task description file to generate a printing task package; Digitally sign the printing task package to obtain a printing task.

[0012] In another possible implementation of the first aspect, encrypting the invoice copy includes: Encrypt the invoice copy using a symmetric encryption algorithm to generate an encrypted invoice copy; Encrypt the key of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate an encrypted key; Package the encrypted invoice copy and the encrypted key into a data packet; Compress the data packet to generate a compressed data packet; Base64 encode the compressed data packet to generate the encrypted invoice copy; Before encrypting the invoice copy, it further includes: Calculate the hash value of the invoice copy and encapsulate the hash value as blockchain transaction data; Broadcast the blockchain transaction data to nodes in the blockchain network, where the nodes in the blockchain network are used to write the blockchain transaction data into the blockchain through a consensus mechanism.

[0013] In another possible implementation manner of the first aspect, generating an invoice sharing link based on the encrypted invoice copy includes: Generate a unique file access identifier based on the encrypted invoice copy; Obtain the user identity and user permission level through the user terminal; Generate an access token according to the user identity and the user permission level; Obtain the validity period of the access token from a preset permission validity period table according to the user permission level; Obtain the number of user accesses from a preset user access times table according to the user identity; Bind the validity period and the number of accesses to the access token, and the bound access token is used to limit the number of user accesses within the validity period; Combine the file access identifier and the bound access token to generate a sharing link parameter; Perform a hash process on the sharing link parameter to generate a sharing link identifier; Combine the sharing link identifier with a preset domain name to generate an invoice sharing link, where the invoice sharing link includes the validity period and the number of accesses.

[0014] In another possible implementation manner of the first aspect, generating an access token according to the user identity and the user permission level includes: Generate a user unique identifier according to the user identity; Generate a permission identifier according to the user permission level; Combine the user unique identifier and the permission identifier to generate an access token.

[0015] In another possible implementation manner of the first aspect, the user terminal receives the invoice sharing link and decrypts the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, including: The user terminal parses the invoice sharing link and extracts the file access identifier and the access token; The user terminal sends a decryption request to the cloud server, which is used to obtain the access token through the decryption request, verify the validity of the access token, and return the encrypted invoice copy after successful verification; The user terminal decrypts the encryption key using an asymmetric encryption algorithm, and decrypts the encrypted invoice copy using the decrypted key to obtain the invoice copy.

[0016] In a second aspect, the present application provides a cloud server, including: A communication device for establishing communication connections with a user terminal and a printing service provider terminal; A processor configured to: Upon receiving an upload signal for the digital electronic invoice file uploaded by the user through the user terminal, obtain the digital electronic invoice file; Verify the digital electronic invoice file, and after successful verification, obtain the current geographical location of the user terminal, and determine a target printing service provider terminal based on the printing parameters input by the user and the current geographical location; Generate a printing task according to the printing parameters and the digital electronic invoice file; Send the printing task to the target printing service provider terminal, which is used to execute the printing task, generate an invoice copy, and return the invoice copy to the cloud server; Upon receiving the invoice copy, encrypt the invoice copy, and generate an invoice sharing link based on the encrypted invoice copy; Send the invoice sharing link to the user terminal, which is used to receive the invoice sharing link and decrypt the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that the user can download the invoice copy by clicking the invoice sharing link through the user terminal.

[0017] Through the above technical solution, users can directly upload the digital electronic invoice file to the cloud server through the terminal device without relying on local printing devices, greatly simplifying the operation process. After receiving the upload signal, the cloud server will automatically verify the validity of the file to ensure the legality and security of the printed content. Secondly, it can obtain the current geographical location of the user terminal and, combined with the printing parameters input by the user, automatically match the most suitable printing service provider, which not only solves the problem that traditional local printing devices cannot meet the cross-regional and cross-platform printing requirements, but also greatly improves the distribution efficiency of printing tasks. The cloud server generates a standardized printing task based on the printing parameters and the invoice file and sends it to the target printing service provider terminal, realizing the automation and standardization of the printing process and effectively reducing human operation errors. After the printing service provider terminal executes the printing task and generates an invoice copy, it returns it to the cloud server, and the cloud server immediately encrypts the invoice copy and generates a secure invoice sharing link. This encryption mechanism ensures the security and privacy of invoice information and prevents the leakage of sensitive information. Finally, users can easily download and view the invoice copy through the received sharing link without relying on local printing devices again. This cloud printing and sharing mechanism not only improves the printing efficiency, but also provides users with a more flexible and convenient way to obtain invoices. Overall, through cloud computing technology and intelligent matching algorithms, this solution comprehensively optimizes the electronic invoice printing process, effectively solving the problems of low efficiency, geographical restrictions, and security in traditional methods. It can handle a large number of printing requests simultaneously, meet the high-concurrency requirements in the enterprise environment, and significantly improve the work efficiency of financial personnel. In addition, the cross-regional and cross-platform characteristics of this solution enable users to easily complete the electronic invoice printing task at any location and using any device, greatly enhancing the user experience. By introducing an encryption mechanism and a secure sharing link, this solution also enhances the data security in the electronic invoice processing process and effectively protects the sensitive information of enterprises and individuals. In summary, this solution effectively solves many problems existing in the existing electronic invoice printing technology by introducing a cloud server and a shared printing mechanism, significantly improves the printing efficiency, and meets the large-scale and high-concurrency printing requirements.

[0018] Other features and advantages of the embodiments of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 It is a flowchart of a method for sharing and cloud printing digital electronic invoices provided by an embodiment of the present application; Figure 2 It is a schematic flowchart of encrypting an invoice copy provided by an embodiment of the present application; Figure 3A schematic flow chart of generating an invoice sharing link based on an encrypted invoice copy provided by an embodiment of the present application; Figure 4 A structural block diagram of a cloud server provided by an embodiment of the present application. Detailed implementation manners

[0020] To make the objectives, technical solutions, and advantages of the embodiments of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present application. It should be understood that the specific implementation manners described herein are only used to illustrate and explain the embodiments of the present application, and are not used to limit the embodiments of the present application. All other embodiments obtained by those of ordinary skill in the art based on the embodiments in the present application without creative efforts shall fall within the protection scope of the present application.

[0021] It should be noted that if there are directional indications (such as up, down, left, right, front, back...) involved in the embodiments of the present application, the directional indications are only used to explain the relative positional relationship and movement conditions between components in a specific posture (as shown in the drawings). If the specific posture changes, the directional indications will also change accordingly.

[0022] In addition, if there are descriptions involving "first", "second", etc. in the embodiments of the present application, the descriptions of "first", "second", etc. are only for descriptive purposes, and cannot be understood as indicating or implying their relative importance or implicitly indicating the quantity of the indicated technical features. Thus, the features defined with "first" and "second" may explicitly or implicitly include at least one such feature. In addition, the technical solutions between various embodiments may be combined with each other, but it must be based on the fact that those of ordinary skill in the art can implement them. When the combination of technical solutions is contradictory or cannot be implemented, it should be considered that such a combination of technical solutions does not exist and is not within the protection scope required by the present application.

[0023] Figure 1 Schematically shows a schematic flow chart of a digital electronic invoice sharing cloud printing method according to an embodiment of the present application. As Figure 1 shown, an embodiment of the present application provides a digital electronic invoice sharing cloud printing method, which is applied to a cloud server. The method may include the following steps.

[0024] S110. In response to receiving an upload signal of a digital electronic invoice file uploaded by a user through a user terminal, obtain the digital electronic invoice file; S120. Verify the digital electronic invoice file, and after successful verification, obtain the current geographical location of the user terminal, and determine a target printing service provider terminal based on the printing parameters input by the user and the current geographical location; S130. Generate a printing task based on the printing parameters and the digital electronic invoice file; S140. Send the printing task to the target printing service provider terminal, which is used to execute the printing task, generate an invoice copy, and return the invoice copy to the cloud server; S150. In response to receiving the invoice copy, encrypt the invoice copy and generate an invoice sharing link based on the encrypted invoice copy; S160. Send the invoice sharing link to the user terminal, which is used to receive the invoice sharing link, decrypt the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that the user can download the invoice copy by clicking the invoice sharing link through the user terminal.

[0025] In this embodiment, the user terminal may be a device with a processor such as a tablet computer, desktop computer, laptop computer, handheld computer, wearable device, notebook computer, ultra-mobile personal computer (UMPC), netbook, etc. Of course, the user terminal may also be a server. The specific form of the user terminal in this application embodiment is not particularly limited.

[0026] When the user uploads the digital electronic invoice file through a terminal device (such as a mobile phone, computer, etc.), the cloud server will receive an upload signal. This signal is usually transmitted through the network and contains the file data uploaded by the user. The cloud server will first parse this signal and extract the digital electronic invoice file from it. The digital electronic invoice file is usually stored in a specific format (such as PDF, XML, etc.) and contains detailed invoice information such as invoice number, invoicing date, amount, commodity information, etc. To ensure the integrity and security of the file, the cloud server will perform a preliminary verification on the file, checking whether the file size, format meet the requirements, and whether there are signs of damage or tampering. If the file passes the preliminary verification, the cloud server will store it in a temporary storage area and wait for subsequent processing. The implementation effect of this step is to ensure that the digital electronic invoice file can be received and stored safely and accurately, laying a foundation for subsequent processing steps.

[0027] After obtaining the digital electronic invoice file, the cloud server will conduct a detailed verification on it. The verification process includes parsing the file header information and content data, checking whether the file header information conforms to the preset tax file format standard, and whether the content data conforms to the preset tax content rules. For example, the file header information may include the invoice version number, encoding method, etc., while the content data includes the specific information of the invoice, such as the invoicing party, the recipient, the commodity details, etc. If both the file header and content data pass the verification, the cloud server will confirm that the digital electronic invoice file verification is successful. Next, the cloud server will obtain the current geographical location of the user terminal. This is usually achieved through technologies such as GPS, Wi-Fi positioning, or IP address positioning. After obtaining the geographical location, the cloud server will determine the most suitable target printing service provider terminal from the preset list of printing service provider terminals based on the printing parameters (such as the number of copies, printing quality, printing service type, etc.) input by the user and the current geographical location. The implementation effect of this step is to ensure the legality and security of the digital electronic invoice file, and through the intelligent matching algorithm, provide the most suitable printing service provider for the user, improving the allocation efficiency of printing tasks.

[0028] After determining the target printing service provider terminal, the cloud server will generate a standardized printing task based on the printing parameters input by the user and the digital electronic invoice file. The printing parameters include the number of copies, printing quality, printing service type, etc., and these parameters will be parsed and generate a printing task description file. The printing task description file usually contains information such as file identification, number of copies, printing quality, and the unique code of the target printing service provider terminal. The cloud server will associate the digital electronic invoice file with the printing task description file to generate a printing task package. To ensure the security and integrity of the printing task, the cloud server will perform a digital signature on the printing task package. The digital signature is generated through an encryption algorithm and can prevent the printing task from being tampered with during transmission. After generating the printing task, the cloud server will store it in the task queue and wait to be sent to the target printing service provider terminal. The implementation effect of this step is to realize the automation and standardization of printing tasks, reduce human operation errors, and ensure the security and integrity of printing tasks.

[0029] After generating a printing task, the cloud server will send it to the target printing service provider's terminal. The sending process usually occurs over the network, and the cloud server will use a secure communication protocol (such as HTTPS) to ensure the security of data transmission. After receiving the printing task, the target printing service provider's terminal will first verify the validity of the digital signature to ensure that the printing task has not been tampered with. After successful verification, the printing service provider will execute the printing task according to the parameters in the printing task description file. During the printing process, the printing service provider will monitor the printing status in real-time and return status information (such as printing successful, printing failed, or printing in progress) to the cloud server. After the printing task is completed, the printing service provider will generate a copy of the invoice and return it to the cloud server. The invoice copy is usually stored in the form of an electronic file and contains the same information as the original digital electronic invoice file. The implementation effect of this step is to achieve the automated execution and status monitoring of the printing task, ensure the efficient completion of the printing task, and provide a basis for subsequent invoice sharing.

[0030] When the cloud server receives the invoice copy returned by the printing service provider's terminal, it will first encrypt it. The encryption process usually uses a symmetric encryption algorithm (such as AES) to encrypt the invoice copy to generate an encrypted invoice copy. To ensure the security of the encryption key, the cloud server will use an asymmetric encryption algorithm (such as RSA) to encrypt the key of the symmetric encryption algorithm to generate an encrypted key. The encrypted invoice copy and the encrypted key will be encapsulated into a data packet, compressed, and Base64 encoded to generate the final encrypted invoice copy. Next, based on the encrypted invoice copy, the cloud server will generate a unique file access identifier and obtain the user identity and user permission level through the user terminal. According to the user identity and user permission level, the cloud server will generate an access token and bind it to the file access identifier to generate an invoice sharing link. The invoice sharing link usually contains an expiration date and access count limit to ensure the security and controllability of the link. The implementation effect of this step is to ensure the security and privacy of the invoice copy, prevent the leakage of sensitive information, and provide a convenient way for users to share invoices.

[0031] After generating the invoice sharing link, the cloud server will send it to the user terminal. After receiving the invoice sharing link, the user terminal will first parse the link to extract the file access identifier and the access token. The user terminal will send a decryption request to the cloud server. After receiving the request, the cloud server will verify the validity of the access token. After successful verification, the cloud server will return the encrypted invoice copy. The user terminal decrypts the encryption key using the asymmetric encryption algorithm and decrypts the encrypted invoice copy with the decrypted key to obtain the original invoice copy. The user can download and view the invoice copy by clicking on the invoice sharing link. The implementation effect of this step is to achieve the secure download and viewing of the invoice copy, ensuring that users can conveniently obtain and use the invoice copy, thus enhancing the user experience.

[0032] Through the above steps, this technical solution realizes the cloud printing and sharing of digital electronic invoices, solves the problems of low efficiency, geographical restrictions, and security of traditional local printing devices, and significantly improves the printing efficiency and user experience.

[0033] In this embodiment, the user can directly upload the digital electronic invoice file to the cloud server through the terminal device without relying on local printing devices, greatly simplifying the operation process. After receiving the upload signal, the cloud server will automatically verify the validity of the file to ensure the legality and security of the printed content. Secondly, it can obtain the current geographical location of the user terminal and, combined with the printing parameters input by the user, automatically match the most suitable printing service provider, which not only solves the problem that traditional local printing devices cannot meet the cross-regional and cross-platform printing requirements but also greatly improves the allocation efficiency of printing tasks. The cloud server generates a standardized printing task based on the printing parameters and the invoice file and sends it to the target printing service provider terminal, realizing the automation and standardization of the printing process and effectively reducing human operation errors. After the printing service provider terminal executes the printing task and generates an invoice copy, it returns it to the cloud server, and the cloud server immediately encrypts the invoice copy and generates a secure invoice sharing link. This encryption mechanism ensures the security and privacy of invoice information and prevents the leakage of sensitive information. Finally, the user can conveniently download and view the invoice copy through the received sharing link without relying on local printing devices again. This cloud printing and sharing mechanism not only improves the printing efficiency but also provides users with a more flexible and convenient way to obtain invoices. Overall, through cloud computing technology and intelligent matching algorithms, this solution comprehensively optimizes the process of electronic invoice printing, effectively solving the problems of low efficiency, geographical restrictions, and security in traditional methods. It can handle a large number of printing requests simultaneously, meet the high-concurrency requirements in an enterprise environment, and significantly improve the work efficiency of financial personnel. In addition, the cross-regional and cross-platform characteristics of this solution enable users to easily complete the printing task of electronic invoices at any location and using any device, greatly enhancing the user experience. By introducing an encryption mechanism and a secure sharing link, this solution also enhances the data security in the process of electronic invoice processing and effectively protects the sensitive information of enterprises and individuals. In summary, by introducing a cloud server and a shared printing mechanism, this solution effectively solves many problems existing in the existing electronic invoice printing technology, significantly improves the printing efficiency, and meets the large-scale and high-concurrency printing requirements.

[0034] In one implementation manner of this embodiment, after sending the printing task to the printing service provider terminal, the following steps are included: S210. Real-time receive the printing status returned by the printing service provider terminal, where the printing status includes printing success, printing failure, or printing in progress; S220. Package the printing status into a status notification message and send the status notification message to the user terminal.

[0035] After the printing task is sent to the printing service provider's terminal, the cloud server will receive the printing status information returned by the printing service provider's terminal in real time. The printing status information is generated by the printing service provider's terminal during the execution of the printing task and is used to reflect the current progress of the printing task. The printing status usually includes three types: printing successful, printing failed, or printing in progress. Printing successful means that the printing task has been successfully completed and the invoice copy has been generated and returned to the cloud server; printing failed means that the printing task has encountered problems during execution and cannot complete the printing; printing in progress means that the printing task is being executed but has not been completed. To ensure the real-time and accuracy of the printing status information, the printing service provider's terminal will transmit the printing status information to the cloud server in real time through a preset communication interface (such as API). After receiving the printing status information, the cloud server will first parse it and extract key status data, such as task ID, status type, timestamp, etc. Then, the cloud server will verify these status data to ensure their integrity and authenticity. For example, the cloud server will check whether the timestamp is within a reasonable range and whether the task ID matches the sent printing task. If the status data passes the verification, the cloud server will store it in the status log for subsequent query and analysis. The implementation effect of this step is to achieve real-time monitoring and recording of the printing task status, ensure the traceability and transparency of the printing task, and provide timely feedback information to users.

[0036] After receiving the printing status information and completing the verification, the cloud server will encapsulate it into a status notification message. A status notification message is a structured data format that usually contains fields such as task ID, status type, timestamp, status description, etc. For example, a status notification message for a successful print may contain the following: task ID is "12345", status type is "print successful", timestamp is "2023-10-01 12:00:00", and status description is "Invoice copy has been generated and returned to the cloud server". During the encapsulation process, the cloud server will fill the printing status information into the corresponding fields according to a preset message template and generate a unique message ID. To ensure the security and integrity of the status notification message, the cloud server will perform a digital signature on it. The digital signature is generated through an encryption algorithm and can prevent the message from being tampered with during transmission. After generating the status notification message, the cloud server will send it to the user terminal through a preset communication channel (such as SMS, email, push notification, etc.). After receiving the status notification message, the user terminal will first verify the validity of the digital signature to ensure that the message has not been tampered with. After successful verification, the user terminal will parse the message content, extract the key status information, and display it on the user interface. For example, users can view the current status of the printing task on the mobile APP to understand whether the printing task is successful, failed, or in progress. The implementation effect of this step is to achieve real-time notification and feedback of the printing task status, ensuring that users can timely understand the progress of the printing task and enhancing the user experience and satisfaction.

[0037] This embodiment realizes the real-time monitoring, recording, and notification of the printing task status, ensuring the traceability and transparency of the printing task. Receiving the printing status information in real time and timely feedback to users through the status notification message not only improves the execution efficiency of the printing task but also enhances the user's sense of control and trust in the printing process. The real-time monitoring and recording of the printing status enable quick location and resolution of problems during the printing task, reducing the time and resource waste caused by printing failures. The encapsulation and sending of the status notification message ensure that users can understand the progress of the printing task anytime and anywhere without frequent queries or waiting, greatly enhancing the user experience. In addition, through digital signature and message verification, the security and integrity of the status notification message are ensured, preventing information from being tampered with or forged. Overall, this technical solution significantly improves the management efficiency of the printing task and user satisfaction through the real-time status monitoring and notification mechanism, providing strong support for the cloud printing and sharing of electronic invoices.

[0038] In one implementation of this embodiment, verifying the digital electronic invoice file includes the following steps: S310. Parse the digital electronic invoice file and extract the file header information and content data; S320. Verify whether the file header information conforms to the preset tax file format standard; and S330. Verify whether the content data conforms to the preset tax content rules; S340. When both the file header information and the content data pass the verification, confirm that the digital electronic invoice file verification is successful.

[0039] After receiving the digital electronic invoice file uploaded by the user, it is first necessary to parse it to extract key information. Digital electronic invoice files are usually stored in a specific format, such as PDF, XML, or other structured data formats. The parsing process first reads the binary data of the file and decomposes it into two parts: file header information and content data according to the specifications of the file format. The file header information is usually located at the beginning of the file and contains metadata of the file, such as file version number, encoding method, creation time, file size, etc. These information are crucial for verifying the legality and integrity of the file. The content data is the main part of the file and contains specific information of the invoice, such as invoice number, invoicing date, amount, commodity details, information of the issuer and the recipient, etc. During the parsing process, special parsing tools or libraries (such as PDF parsing libraries or XML parsers) will be used to read the file content line by line and extract the required fields according to predefined rules. For example, in a PDF format invoice file, the corresponding data may be located and extracted by identifying specific text tags (such as "Invoice Number:"). After parsing, the file header information and the content data will be stored in different data structures respectively for subsequent verification steps. The implementation effect of this step is to ensure that the key information of the digital electronic invoice file can be accurately extracted, providing basic data support for subsequent verification steps.

[0040] After extracting the file header information, it needs to be verified to ensure that it complies with the preset tax file format standards. The tax file format standards are usually formulated by the tax authorities and stipulate the basic structure and metadata requirements of the digital electronic invoice files. The verification process first checks whether the key fields in the file header information are complete, such as the file version number, encoding method, creation time, etc. Then, it verifies one by one whether the values of these fields meet the preset standards. For example, the file version number may need to be consistent with the latest version supported by the current tax authorities, the encoding method may need to be UTF-8, and the creation time needs to be within a reasonable range (such as not exceeding the current date). In addition, other metadata in the file header information will also be checked, such as whether the file size meets the expectation and whether the file type is consistent with the uploaded file. If any field in the file header information does not meet the preset standards, the verification process will terminate immediately and return a verification failure result. If all fields pass the verification, the file header information will be marked as valid and proceed to the next step of content data verification. The implementation effect of this step is to ensure that the basic structure and metadata of the digital electronic invoice files meet the requirements of the tax authorities and prevent illegal or non-compliant files from entering the subsequent processing process.

[0041] After the file header information passes the verification, it is necessary to further verify whether the content data complies with the preset tax content rules. The tax content rules are usually formulated by the tax authorities and stipulate the format and value range of the specific data in the digital electronic invoice files. The verification process first checks whether the key fields in the content data are complete, such as the invoice number, issue date, amount, commodity details, information of the issuer and the recipient, etc. Then, it verifies one by one whether the values of these fields meet the preset rules. For example, the invoice number may need to comply with specific coding rules (such as length, character set, etc.), the issue date needs to be within a reasonable range (such as not exceeding the current date), the amount needs to be a positive number and comply with the currency format, and the commodity details need to include information such as the commodity name, quantity, unit price, and total price. In addition, other information in the content data will also be checked, such as whether the tax registration numbers of the issuer and the recipient comply with the regulations and whether the invoice amount is consistent with the total price in the commodity details. If any field in the content data does not meet the preset rules, the verification process will terminate immediately and return a verification failure result. If all fields pass the verification, the content data will be marked as valid and proceed to the next step of comprehensive verification. The implementation effect of this step is to ensure that the specific data of the digital electronic invoice files meet the requirements of the tax authorities and prevent illegal or non-compliant data from entering the subsequent processing process.

[0042] After both the file header information and the content data have passed the verification, a comprehensive verification is required to confirm the overall legality of the digital electronic invoice file. The comprehensive verification process first checks the consistency between the file header information and the content data. For example, whether the file version number in the file header information is consistent with the invoice version in the content data, and whether the creation time in the file header information is consistent with the invoice issuance date in the content data. Then, it checks the consistency between the various fields in the content data. For example, whether the invoice amount is consistent with the total price in the commodity details, and whether the tax registration numbers of the invoice issuer and the recipient comply with the regulations. If there is an inconsistency between the file header information and the content data or between the various fields in the content data, the verification process will terminate immediately and return a verification failure result. If all checks pass, the digital electronic invoice file will be marked as verified successfully and enter the subsequent processing flow. The implementation effect of this step is to ensure the overall legality and consistency of the digital electronic invoice file, preventing illegal or non-compliant files from entering the subsequent processing flow.

[0043] This embodiment realizes the comprehensive verification of the digital electronic invoice file, ensuring the legality and compliance of the file. The parsing process accurately extracts the file header information and the content data, providing the basic data support for the subsequent verification steps. The verification of the file header information ensures that the basic structure and metadata of the file meet the requirements of the tax department, preventing illegal or non-compliant files from entering the subsequent processing flow. The verification of the content data ensures that the specific data of the file meet the requirements of the tax department, preventing illegal or non-compliant data from entering the subsequent processing flow. The comprehensive verification process ensures the consistency between the file header information and the content data, preventing inconsistent files from entering the subsequent processing flow. Overall, this technical solution significantly improves the security and reliability of the digital electronic invoice file through a multi-level verification mechanism, providing a solid foundation for the subsequent printing and sharing processes.

[0044] In one implementation manner of this embodiment, the printing parameters include the number of copies, printing quality, and printing service type. Based on the printing parameters input by the user and the current geographical location, a target printing service provider terminal is determined, including the following steps: S410. Parse the current geographical location to obtain the user's geographical coordinates; S420. Obtain the geographical coordinates and service capabilities of each printing service provider terminal from the preset list of printing service provider terminals; S430. For each printing service provider terminal, calculate the Euclidean distance between the user's geographical coordinates and the geographical coordinates of the printing service provider terminal as the distance factor of the printing service provider terminal; S440. According to the printing service type, obtain the corresponding basic weight value from the preset service type weight table; S450. Obtain the corresponding quality weight value from a preset print quality weight table according to the print quality; S460. Use the sum of the base weight value and the base weight value as the service capacity weight; S470. For each print service provider terminal, use the weighted sum of the reciprocal of the distance factor and the service capacity weight as the matching degree score of the print service provider terminal; S480. Use the print service provider terminal with the highest matching degree score as the target print service provider terminal.

[0045] Before determining the target print service provider terminal, it is first necessary to obtain the geographical location information of the user. The geographical location of the user is usually obtained through the positioning function of the terminal device (such as mobile phones, computers, etc.), and may come from technologies such as GPS, Wi-Fi positioning, or IP address positioning. The obtained geographical location information is usually represented in the form of longitude and latitude. For example, the central location of Beijing is represented by 39.9042 degrees north latitude and 116.4074 degrees east longitude. To ensure the accuracy and availability of the geographical location information, the cloud server will parse and verify the obtained geographical location data. The parsing process will first convert the original geographical location data into a standard longitude and latitude format, for example, converting the degree-minute-second format into a decimal format. Then, the cloud server will check whether the longitude and latitude values are within a reasonable range (such as latitude between -90 and 90 degrees, longitude between -180 and 180 degrees), and whether there are obvious positioning errors (such as longitude and latitude values of 0, which may indicate positioning failure). If the geographical location data passes the verification, the cloud server will store it as the user's geographical coordinates for subsequent matching calculations. The implementation effect of this step is to ensure the accuracy and availability of the user's geographical location, providing basic data support for the subsequent matching of print service provider terminals.

[0046] After obtaining the user's geographical coordinates, the cloud server retrieves the geographical coordinates and service capabilities of each printing service provider terminal from a preset list of printing service provider terminals. The list of printing service provider terminals is usually a structured data table that contains basic information about each terminal, such as the terminal ID, geographical coordinates (latitude and longitude), and service capabilities (e.g., supported printing service types, print quality, maximum number of copies, etc.). The geographical coordinates are used to calculate the distance between the user and the printing service provider terminal, and the service capabilities are used to evaluate whether the terminal can meet the user's printing needs. The retrieval process first queries the list of printing service provider terminals and extracts the records of each terminal. Then, the cloud server parses the records of each terminal to extract the geographical coordinates and service capability information. For example, the record of a printing service provider terminal may contain the following information: the terminal ID is "PRT001", the geographical coordinates are 39.9042 degrees north latitude and 116.4074 degrees east longitude, and the service capabilities include support for color printing, a maximum of 100 copies, and support for high-resolution printing. The implementation effect of this step is to ensure that the basic information of the printing service provider terminals can be accurately extracted, providing basic data support for subsequent distance calculation and service capability evaluation.

[0047] After obtaining the user's geographical coordinates and the geographical coordinates of each printing service provider terminal, the cloud server calculates the Euclidean distance between the user and each terminal as the distance factor. The Euclidean distance is a commonly used distance metric for calculating the straight-line distance between two points. The calculation formula is: Distance = , where (x1, y1) represents the user's geographical coordinates and (x2, y2) represents the geographical coordinates of the printing service provider terminal. For example, if the user's geographical coordinates are 39.9042 degrees north latitude and 116.4074 degrees east longitude, and the geographical coordinates of the printing service provider terminal are 39.9092 degrees north latitude and 116.3974 degrees east longitude, then the distance = = = ≈ 0.0112 degrees. Since the actual distance corresponding to one degree of latitude and longitude varies depending on the geographical location, it is usually necessary to convert the degrees into the actual distance (e.g., kilometers). For example, in Beijing, one degree of latitude is approximately equal to 111 kilometers, and one degree of longitude is approximately equal to 85 kilometers. Therefore, 0.0112 degrees is approximately equal to 1.25 kilometers. After the calculation is completed, the cloud server stores the distance factor as an attribute of each printing service provider terminal for subsequent matching degree calculation. The implementation effect of this step is to ensure that the distance between the user and the printing service provider terminal can be accurately calculated, providing basic data support for subsequent matching degree evaluation.

[0048] After calculating the distance factor, the cloud server will obtain the corresponding basic weight value from a preset service type weight table according to the printing service type input by the user. The service type weight table is usually a structured data table that contains the weight values of different printing service types. For example, the weight value of the ordinary printing service is 1, the weight value of the fast printing service is 2, and the weight value of the high-quality printing service is 3. The obtaining process will first query the service type weight table and extract the record corresponding to the printing service type input by the user. Then, the cloud server will parse the record and extract the basic weight value. For example, if the printing service type selected by the user is the high-quality printing service, the basic weight value is 3. The implementation effect of this step is to ensure that the priorities of different printing service types can be accurately reflected, providing basic data support for subsequent matching degree evaluation.

[0049] After obtaining the basic weight value, the cloud server will obtain the corresponding quality weight value from a preset printing quality weight table according to the printing quality input by the user. The printing quality weight table is usually a structured data table that contains the weight values of different printing qualities. For example, the weight value of the ordinary printing quality is 1, the weight value of the high-resolution printing quality is 2, and the weight value of the ultra-high-resolution printing quality is 3. The obtaining process will first query the printing quality weight table and extract the record corresponding to the printing quality input by the user. Then, the cloud server will parse the record and extract the quality weight value. For example, if the printing quality selected by the user is the high-resolution printing quality, the quality weight value is 2. The implementation effect of this step is to ensure that the priorities of different printing qualities can be accurately reflected, providing basic data support for subsequent matching degree evaluation.

[0050] After obtaining the basic weight value and the quality weight value, the cloud server will add them together to obtain the service ability weight. For example, if the basic weight value is 3 and the quality weight value is 2, the service ability weight is 5. The service ability weight is used to evaluate the service ability of the printing service provider's terminal. The higher the weight value, the stronger the service ability of the terminal. The implementation effect of this step is to ensure that the service ability of the printing service provider's terminal can be accurately evaluated, providing basic data support for subsequent matching degree evaluation.

[0051] After calculating the service capacity weight, the cloud server will use the weighted sum of the reciprocal of the distance factor and the service capacity weight as the matching score for each printing service provider terminal. The calculation formula for the matching score is: matching score = (1 / distance factor) × distance weight + service capacity weight × capacity weight, where the distance weight and the capacity weight are preset weight coefficients used to adjust the proportion of the distance factor and the service capacity weight in the matching score. For example, if the distance weight is 0.6, the capacity weight is 0.4, the distance factor is 1.25 km, and the service capacity weight is 5, then the matching score = (1 / 1.25) × 0.6 + 5 × 0.4 = 0.8 × 0.6 + 2 = 0.48 + 2 = 2.48. After the calculation is completed, the cloud server will store the matching score as an attribute of each printing service provider terminal for subsequent use in target terminal selection. The implementation effect of this step is to ensure that the matching degree of the printing service provider terminal can be accurately evaluated, providing basic data support for subsequent target terminal selection.

[0052] After calculating the matching score for each printing service provider terminal, the cloud server will select the terminal with the highest matching score as the target printing service provider terminal. The selection process will first traverse the matching scores of all terminals to find the maximum value. Then, the cloud server will mark the terminal corresponding to this maximum value as the target terminal. For example, if the matching score of terminal A is 2.48, the matching score of terminal B is 2.30, and the matching score of terminal C is 2.10, then terminal A is selected as the target terminal. The implementation effect of this step is to ensure that the most suitable printing service provider terminal can be accurately selected, providing basic data support for subsequent printing task execution.

[0053] This embodiment realizes the intelligent matching of printing service provider terminals based on the user's geographical location and printing parameters. Parsing the geographical coordinates of the user's geographical location and the printing service provider terminal ensures the accuracy of distance calculation; obtaining and calculating the service capacity weight ensures the accurate evaluation of the terminal service capacity; calculating the matching score and selecting the target terminal ensures that the most suitable terminal can be accurately selected. Overall, this technical solution significantly improves the efficiency and accuracy of printing task allocation through a multi-level matching mechanism, providing users with a better and more convenient printing service experience.

[0054] In one implementation manner of this embodiment, a printing task is generated according to the printing parameters and the digital electronic invoice file, including the following steps: S510. Obtain the unique code of the target printing service provider terminal; S520. Generate a printing task description file according to the printing parameters. The printing task description file includes a file identifier, the number of copies to be printed, the printing quality, and the unique code of the target printing service provider terminal; S530. Associate the digital invoice file with the print task description file to generate a print task package; S540. Digitally sign the print task package to obtain a print task.

[0055] After determining the target print service provider terminal, it is first necessary to obtain the unique code of this terminal. The unique code is the identifier of the print service provider terminal, usually composed of numbers and letters, and is used to uniquely identify a terminal. The acquisition process first queries the list of print service provider terminals to find the record corresponding to the target terminal. Then, the cloud server parses the record and extracts the unique code. For example, the record of the target terminal may contain the following information: the terminal ID is "PRT001", the geographical coordinates are 39.9042 degrees north latitude and 116.4074 degrees east longitude, the service capabilities include supporting color printing, the maximum number of printed copies is 100, supporting high-resolution printing, etc., and the unique code is "PRT001-2023". The generation of the unique code is usually based on the terminal ID and timestamp to ensure its uniqueness and traceability. After obtaining the unique code, the cloud server stores it as an attribute of the print task for subsequent use in generating the print task description file. The implementation effect of this step is to ensure that the unique identifier of the target print service provider terminal can be accurately obtained, providing basic data support for the subsequent generation of the print task description file.

[0056] After obtaining the unique code of the target print service provider terminal, the cloud server generates a print task description file according to the print parameters input by the user. The print task description file is a structured data file that contains the basic information of the print task, such as file identifier, number of printed copies, print quality, and the unique code of the target print service provider terminal. The file identifier is the unique identifier of the print task, usually composed of numbers and letters, and is used to uniquely identify a print task. The number of printed copies is the number of prints specified by the user, such as 1 copy, 2 copies, etc. The print quality is the print resolution specified by the user, such as normal quality, high quality, etc. The generation process first creates an empty print task description file, and then fills the file identifier, number of printed copies, print quality, and the unique code of the target print service provider terminal into the corresponding fields. For example, a print task description file may contain the following information: the file identifier is "TASK001-2023", the number of printed copies is 2, the print quality is high quality, and the unique code of the target print service provider terminal is "PRT001-2023". After generation, the cloud server stores the print task description file as an attribute of the print task for subsequent use in generating the print task package. The implementation effect of this step is to ensure that the basic information of the print task can be accurately recorded, providing basic data support for the subsequent generation of the print task package.

[0057] After generating the print task description file, the cloud server associates the digital invoice file with the print task description file to generate a print task package. The print task package is a structured data packet that contains all the necessary information for the print task, such as the digital invoice file, the print task description file, etc. The association process first creates an empty print task package and then adds the digital invoice file and the print task description file to the corresponding fields. For example, a print task package may contain the following information: the digital invoice file is a PDF file, and the print task description file is a JSON file. After generation, the cloud server stores the print task package as an attribute of the print task for subsequent digital signature use. The implementation effect of this step is to ensure that all the necessary information of the print task can be accurately associated, providing basic data support for the subsequent digital signature.

[0058] After generating the print task package, the cloud server performs a digital signature on it to ensure the integrity and security of the print task. Digital signature is an encryption technology used to verify the source and integrity of data. The signature process first uses a hash algorithm (such as SHA-256) to calculate the hash value of the print task package, generating a hash value. Then, the cloud server encrypts the hash value using the private key to generate a digital signature. For example, if the hash value of the print task package is "a1b2c3d4e5f6g7h8i9j0" and the private key is "PRIVATEKEY123", then the digital signature is "SIGNATURE123". After generation, the cloud server adds the digital signature to the print task package to form the final print task. The implementation effect of this step is to ensure the integrity and security of the print task, preventing the print task from being tampered with or forged during transmission.

[0059] This embodiment realizes the generation and signature of the print task, ensuring the integrity and security of the print task. Obtaining the unique code of the target print service provider terminal ensures that the unique identifier of the terminal can be accurately obtained; generating the print task description file ensures that the basic information of the print task can be accurately recorded; associating the digital invoice file with the print task description file ensures that all the necessary information of the print task can be accurately associated; performing a digital signature on the print task package ensures the integrity and security of the print task. Overall, this technical solution significantly improves the security and reliability of the print task through a multi-level generation and signature mechanism, providing users with a better and safer print service experience.

[0060] In one implementation of this embodiment, encrypting the invoice copy includes the following steps: S610. Encrypt the invoice copy using a symmetric encryption algorithm to generate an encrypted invoice copy; S620. Encrypt the key of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate an encrypted key; S630. Package the encrypted invoice copy and the encrypted key into a data packet; S640. Compress the data packet to generate a compressed data packet; S650. Perform Base64 encoding on the compressed data packet to generate an encrypted invoice copy; Before encrypting the invoice copy, it further includes: S1. Calculate the hash value of the invoice copy and package the hash value into blockchain transaction data; S2. Broadcast the blockchain transaction data to the nodes in the blockchain network, where the nodes in the blockchain network are used to write the blockchain transaction data into the blockchain through a consensus mechanism.

[0061] Figure 2 The figure shows a schematic flowchart of a method for encrypting an invoice copy provided by an embodiment of the present application. As Figure 2 shown, before encrypting the invoice copy, it is first necessary to select a symmetric encryption algorithm. A symmetric encryption algorithm is an encryption technology that uses the same key for encryption and decryption. Common symmetric encryption algorithms include AES (Advanced Encryption Standard), DES (Data Encryption Standard), etc. Taking the AES algorithm as an example, the encryption process first generates a random symmetric key, such as a 128-bit or 256-bit key. Then, the invoice copy is encrypted using this key. During the encryption process, the data of the invoice copy is divided into fixed-size blocks (such as 128 bits), and each block undergoes multiple rounds of substitution, permutation, and confusion operations, and finally generates an encrypted data block. For example, if the invoice copy is a PDF file, the encryption process will divide its binary data into multiple 128-bit blocks, and then perform AES encryption on each block to generate an encrypted data block. After the encryption is completed, all the encrypted data blocks are combined into an encrypted invoice copy. The implementation effect of this step is to ensure the security of the data of the invoice copy during transmission and storage, and prevent unauthorized access and tampering.

[0062] After generating a copy of the encrypted invoice, the key of the symmetric encryption algorithm needs to be encrypted using an asymmetric encryption algorithm to ensure the security of the key. The asymmetric encryption algorithm is an encryption technology that uses a public key and a private key for encryption and decryption. Common asymmetric encryption algorithms include RSA, ECC (Elliptic Curve Cryptography), etc. Taking the RSA algorithm as an example, the encryption process first generates a pair of public and private keys. The public key is used for encryption, and the private key is used for decryption. Then, the public key is used to encrypt the symmetric key. During the encryption process, the data of the symmetric key is divided into blocks of a fixed size (such as 1024 bits or 2048 bits). Each block will go through modular exponentiation and padding operations, and finally generate an encrypted data block. For example, if the symmetric key is a 128-bit AES key, the encryption process will divide it into multiple 1024-bit blocks and then perform RSA encryption on each block to generate encrypted data blocks. After encryption, all the encrypted data blocks are combined into an encrypted key. The implementation effect of this step is to ensure the security of the symmetric key and prevent the key from being leaked or tampered with during transmission and storage.

[0063] After generating a copy of the encrypted invoice and the encrypted key, they need to be encapsulated into a data packet for easy transmission and storage. The encapsulation process first creates an empty data packet, and then adds the copy of the encrypted invoice and the encrypted key to the corresponding fields. For example, a data packet may contain the following information: the copy of the encrypted invoice is a binary file, and the encrypted key is a Base64-encoded string. After encapsulation, the data packet is stored as a structured data file, such as a JSON file or an XML file. The implementation effect of this step is to ensure that the copy of the encrypted invoice and the encrypted key can be accurately associated and stored, providing the basic data support for subsequent compression and encoding.

[0064] After encapsulating the data packet, it needs to be compressed to reduce the size of the data packet and improve the transmission efficiency. The compression process first selects a compression algorithm, such as ZIP, GZIP, or DEFLATE, etc. Then, the data packet is compressed using this algorithm. During the compression process, the data of the data packet is divided into multiple blocks, and each block will go through operations such as dictionary encoding and Huffman encoding, and finally generate compressed data blocks. For example, if the data packet is a JSON file, the compression process will divide its binary data into multiple blocks and then perform GZIP compression on each block to generate compressed data blocks. After compression, all the compressed data blocks are combined into a compressed data packet. The implementation effect of this step is to ensure that the size of the data packet can be effectively reduced, improving the efficiency of data transmission and storage.

[0065] After generating the compressed data packet, it needs to be Base64 encoded to facilitate transmission in text-based transmission media (such as emails, HTTP requests, etc.). Base64 encoding is a coding technique that converts binary data into text format. Common Base64 encoding standards include RFC 4648, etc. In the encoding process, the binary data of the compressed data packet is first divided into multiple 6-bit blocks, and then each block is converted into the corresponding Base64 character. For example, if the compressed data packet is a GZIP file, the encoding process will divide its binary data into multiple 6-bit blocks and then perform Base64 encoding on each block to generate a Base64-encoded string. After encoding, the Base64-encoded string is stored as an encrypted copy of the invoice. The implementation effect of this step is to ensure that the compressed data packet can be accurately converted into text format, improving the compatibility and security of data transmission.

[0066] Before encrypting the invoice copy, it is necessary to calculate its hash value and encapsulate the hash value as blockchain transaction data to ensure the integrity and immutability of the invoice copy. The hash value is a fixed-length string used to uniquely identify the content of the data. Common hash algorithms include SHA-256, MD5, etc. Taking the SHA-256 algorithm as an example, in the calculation process, the binary data of the invoice copy is first divided into multiple blocks, and then each block is subjected to hash calculation, and finally a 256-bit hash value is generated. For example, if the invoice copy is a PDF file, the calculation process will divide its binary data into multiple blocks and then perform SHA-256 hash calculation on each block to generate a 256-bit hash value. After calculation, the hash value is encapsulated as blockchain transaction data, such as a JSON file or an XML file. The implementation effect of this step is to ensure that the integrity of the invoice copy can be accurately verified, preventing the data from being tampered with during transmission and storage.

[0067] After generating the blockchain transaction data, it needs to be broadcast to the nodes in the blockchain network to ensure that the transaction data can be written into the blockchain. The blockchain network is a distributed network composed of multiple nodes, and each node maintains a complete copy of the blockchain. In the broadcast process, the blockchain transaction data is first sent to one or more nodes in the network, and then these nodes forward the transaction data to other nodes. For example, if the blockchain network is a Bitcoin network, the broadcast process will send its transaction data to multiple nodes in the network, and then these nodes will forward the transaction data to other nodes. After the broadcast is completed, the nodes in the blockchain network will write the transaction data into the blockchain through a consensus mechanism (such as proof of work, proof of stake, etc.). The implementation effect of this step is to ensure that the blockchain transaction data can be accurately written into the blockchain, preventing the data from being tampered with or forged during transmission and storage.

[0068] This embodiment realizes the encryption and blockchain storage of invoice copies, ensuring the security, integrity, and immutability of invoice copies. The symmetric encryption algorithm is used to encrypt the invoice copies to ensure the security of data during transmission and storage; the asymmetric encryption algorithm is used to encrypt the symmetric key to ensure the security of the key; the encrypted invoice copies and the encrypted key are encapsulated into data packets to ensure the accurate association and storage of data; the data packets are compressed to improve the efficiency of data transmission and storage; the compressed data packets are Base64 encoded to improve the compatibility and security of data transmission; the hash value of the invoice copies is calculated and encapsulated into blockchain transaction data to ensure the integrity and immutability of data; the blockchain transaction data is broadcast to the nodes in the blockchain network to ensure that the data can be accurately written into the blockchain. Overall, this technical solution significantly improves the security and reliability of invoice copies through a multi-level encryption and blockchain storage mechanism, providing users with a better and safer invoice management service experience.

[0069] In one implementation of this embodiment, generating an invoice sharing link based on the encrypted invoice copy includes the following steps: S710. Generate a unique file access identifier based on the encrypted invoice copy; S720. Obtain the user identity and user permission level through the user terminal; S730. Generate an access token according to the user identity and user permission level; S740. Obtain the validity period of the access token from the preset permission validity period table according to the user permission level; S750. Obtain the number of accesses of the user from the preset user access times table according to the user identity; S760. Bind the validity period and the number of accesses to the access token, and the bound access token is used to limit the number of accesses of the user within the validity period; S770. Combine the file access identifier and the bound access token to generate a sharing link parameter; S780. Perform a hash process on the sharing link parameter to generate a sharing link identifier; S790. Combine the sharing link identifier with the preset domain name to generate an invoice sharing link, where the invoice sharing link includes the validity period and the number of accesses.

[0070] Figure 3 Shows a schematic flow diagram of generating an invoice sharing link based on the encrypted invoice copy provided by an embodiment of the present application, as Figure 3As shown, before generating the invoice sharing link, it is first necessary to generate a unique file access identifier based on the encrypted invoice copy. The file access identifier is a string used to uniquely identify the encrypted invoice copy, usually composed of numbers and letters. The generation process first uses a hashing algorithm (such as SHA-256) to calculate the hash of the binary data of the encrypted invoice copy, generating a hash value of a fixed length. For example, if the encrypted invoice copy is a Base64-encoded string, the hashing calculation will convert it to binary data and then generate a 256-bit hash value. Then, the hash value will be converted into a shorter and more easily processed string, for example, by Base62 encoding the hash value into a string composed of numbers and letters. For example, a 256-bit hash value may be converted into a 10-bit Base62 string, such as "A1B2C3D4E5". After generation, the file access identifier will be stored as an attribute of the invoice sharing link for subsequent use in generating the sharing link parameters. The implementation effect of this step is to ensure that the encrypted invoice copy can be uniquely identified, providing the basic data support for subsequent sharing link generation.

[0071] After generating the file access identifier, it is necessary to obtain the user identity and user permission level through the user terminal. The user identity is the unique identifier of the user, usually composed of numbers and letters, such as the user ID or username. The user permission level is the access permission level of the user, usually represented by numbers or strings, such as "ordinary user", "advanced user", etc. The obtaining process first extracts the user identity and user permission level through the login information or session information of the user terminal. For example, if the user logs in through the mobile APP, the login information will contain the user ID and the permission level. Then, the cloud server will verify the user identity and user permission level to ensure their legality and validity. For example, the user ID needs to exist in the user database, and the permission level needs to be in the preset permission level list. The implementation effect of this step is to ensure that the user identity and user permission level can be accurately obtained, providing the basic data support for subsequent access token generation.

[0072] After obtaining the user identity and user privilege level, an access token needs to be generated based on this information. An access token is a string used to verify the user's identity and privileges, usually composed of numbers and letters. The generation process first combines the user identity and user privilege level into a structured data object, such as a JSON object. Then, a hash algorithm (such as SHA-256) is used to calculate the hash of this data object, generating a hash value of a fixed length. For example, if the user identity is "USER001" and the user privilege level is "Advanced User", the hash calculation will generate a 256-bit hash value. Then, the hash value is converted into a shorter and more easily processed string, for example, by Base62 encoding the hash value into a string composed of numbers and letters. For example, a 256-bit hash value may be converted into a 10-bit Base62 string, such as "E5F6G7H8I9". After generation, the access token is stored as an attribute of the invoice sharing link for subsequent use in generating sharing link parameters. The implementation effect of this step is to ensure that the user identity and user privilege level can be accurately verified, providing basic data support for subsequent sharing link generation.

[0073] After generating the access token, the validity period of the access token needs to be obtained from a preset privilege validity period table according to the user privilege level. The privilege validity period table is a structured data table that contains the validity periods corresponding to different privilege levels. For example, the validity period for ordinary users is 1 day, for advanced users is 7 days, and for administrators is 30 days. The obtaining process first queries the privilege validity period table to find the record corresponding to the user privilege level. Then, the cloud server parses the record and extracts the validity period. For example, if the user privilege level is "Advanced User", the validity period is 7 days. After obtaining the validity period, the cloud server stores it as an attribute of the access token for subsequent use in generating sharing link parameters. The implementation effect of this step is to ensure that the validity period of the access token can be accurately set, providing basic data support for subsequent sharing link generation.

[0074] After obtaining the validity period of the access token, it is necessary to obtain the user's access count from a preset user access count table according to the user identity. The user access count table is a structured data table that contains the access counts corresponding to different user identities. For example, the access count of user "USER001" is 5 times, and the access count of user "USER002" is 10 times. The obtaining process first queries the user access count table to find the record corresponding to the user identity. Then, the cloud server parses the record and extracts the access count. For example, if the user identity is "USER001", the access count is 5 times. After obtaining the access count, the cloud server stores it as an attribute of the access token for subsequent use in generating shared link parameters. The implementation effect of this step is to ensure that the user's access count can be accurately set, providing basic data support for subsequent shared link generation.

[0075] After obtaining the validity period and the access count, it is necessary to bind them to the access token to ensure that the access token limits the user's access count within the validity period. The binding process first creates a structured data object that contains the access token, the validity period, and the access count. For example, a data object may contain the following information: the access token is "E5F6G7H8I9", the validity period is 7 days, and the access count is 5 times. Then, the cloud server stores this data object as an attribute of the access token for subsequent use in generating shared link parameters. The implementation effect of this step is to ensure that the validity period and the access count of the access token can be accurately bound, providing basic data support for subsequent shared link generation.

[0076] After binding the validity period and the access count, it is necessary to combine the file access identifier and the bound access token to generate shared link parameters. The shared link parameters are a structured data object that contains the file access identifier and the access token. The generation process first creates an empty data object and then adds the file access identifier and the access token to the corresponding fields. For example, a shared link parameter may contain the following information: the file access identifier is "A1B2C3D4E5", and the access token is "E5F6G7H8I9". After generation, the shared link parameters are stored as an attribute of the invoice shared link for subsequent use in generating shared link identifiers. The implementation effect of this step is to ensure that the file access identifier and the access token can be accurately combined, providing basic data support for subsequent shared link identifier generation.

[0077] After generating the shared link parameters, they need to be hashed to generate a shared link identifier. The shared link identifier is a string used to uniquely identify the shared link, usually composed of numbers and letters. The hashing process first uses a hashing algorithm (such as SHA-256) to calculate the hash of the binary data of the shared link parameters, generating a hash value of a fixed length. For example, if the shared link parameters are a JSON object, the hash calculation will convert it to binary data and then generate a 256-bit hash value. Then, the hash value is converted into a shorter and more easily processable string, for example, by Base62 encoding the hash value into a string composed of numbers and letters. For example, a 256-bit hash value may be converted into a 10-bit Base62 string such as "J0K1L2M3N4". After generation, the shared link identifier is stored as an attribute of the invoice shared link for subsequent shared link generation. The effect of this step is to ensure that the shared link parameters can be uniquely identified, providing the basic data support for subsequent shared link generation.

[0078] After generating the shared link identifier, it needs to be combined with a preset domain name to generate an invoice shared link. The invoice shared link is a URL that contains the shared link identifier, expiration date, and number of accesses. The generation process first obtains the preset domain name, such as "https: / / example.com". Then, the shared link identifier, expiration date, and number of accesses are added to the path or query parameters of the URL. For example, an invoice shared link may be "https: / / example.com / share / J0K1L2M3N4?expiry=7&access=5", where "J0K1L2M3N4" is the shared link identifier, "expiry=7" indicates that the expiration date is 7 days, and "access=5" indicates that the number of accesses is 5 times. After generation, the invoice shared link is sent to the user terminal, and the user can access the encrypted invoice copy by clicking the link. The effect of this step is to ensure that the invoice shared link can be accurately generated and accessed, providing a convenient way for users to share invoices.

[0079] This embodiment realizes the generation and management of invoice sharing links, ensuring the security and controllability of invoice copies. A unique file access identifier is generated based on the encrypted invoice copy to ensure that the invoice copy can be uniquely identified; the user identity and user permission level are obtained through the user terminal to ensure that the user identity and permissions can be accurately verified; an access token is generated according to the user identity and permission level to ensure the accurate setting of access permissions; the validity period and access times are obtained according to the user permission level and identity to ensure the effectiveness and controllability of the access token; the validity period and access times are bound to the access token to ensure that the access token restricts the user's access times within the validity period; the file access identifier and the bound access token are combined to generate sharing link parameters to ensure the accurate generation of the sharing link; the sharing link parameters are hashed to generate a sharing link identifier to ensure the uniqueness and security of the sharing link; the sharing link identifier is combined with a preset domain name to generate an invoice sharing link to ensure that users can conveniently access the encrypted invoice copy. Overall, this technical solution significantly improves the security and convenience of invoice sharing through a multi-level generation and management mechanism, providing users with a better and more secure invoice management service experience.

[0080] In one implementation of this embodiment, an access token is generated according to the user identity and user permission level, including the following steps: S810. Generate a user unique identifier according to the user identity; S820. Generate a permission identifier according to the user permission level; S830. Combine the user unique identifier and the permission identifier to generate an access token.

[0081] Before generating an access token, it is first necessary to generate a unique user identifier based on the user's identity. The unique user identifier is a string used to uniquely identify a user, usually composed of numbers and letters. The generation process first extracts key fields from the user identity information, such as the user ID, username, registration time, etc. Then, a hash algorithm (such as SHA-256) is used to calculate the hash of these fields to generate a hash value of a fixed length. For example, if the user ID is "USER001", the username is "JohnDoe", and the registration time is "2023-01-01", the hash calculation will combine these fields into a string and then generate a 256-bit hash value. Then, the hash value is converted into a shorter and more easily processable string, for example, by Base62 encoding the hash value into a string composed of numbers and letters. For example, a 256-bit hash value may be converted into a 10-bit Base62 string, such as "U1V2W3X4Y5". After generation, the unique user identifier is stored as an attribute of the access token for subsequent use in generating permission identifiers. The implementation effect of this step is to ensure that the user identity can be uniquely identified, providing the basic data support for subsequent access token generation.

[0082] After generating the unique user identifier, it is necessary to generate a permission identifier based on the user's permission level. The permission identifier is a string used to identify the user's permission level, usually composed of numbers and letters. The generation process first extracts key fields from the user permission level information, such as the permission level name, permission level code, etc. Then, a hash algorithm (such as SHA-256) is used to calculate the hash of these fields to generate a hash value of a fixed length. For example, if the permission level name is "Advanced User" and the permission level code is "2", the hash calculation will combine these fields into a string and then generate a 256-bit hash value. Then, the hash value is converted into a shorter and more easily processable string, for example, by Base62 encoding the hash value into a string composed of numbers and letters. For example, a 256-bit hash value may be converted into a 10-bit Base62 string, such as "P1Q2R3S4T5". After generation, the permission identifier is stored as an attribute of the access token for subsequent use in generating the access token. The implementation effect of this step is to ensure that the user's permission level can be accurately identified, providing the basic data support for subsequent access token generation.

[0083] After generating the user unique identifier and the permission identifier, it is necessary to combine them to generate an access token. The access token is a string used to verify the user's identity and permissions, usually composed of numbers and letters. The generation process first creates a structured data object that contains the user unique identifier and the permission identifier. For example, a data object may contain the following information: the user unique identifier is "U1V2W3X4Y5", and the permission identifier is "P1Q2R3S4T5". Then, a hash algorithm (such as SHA-256) is used to calculate the hash of this data object, generating a hash value of a fixed length. For example, the hash calculation will generate a 256-bit hash value. Then, the hash value is converted into a shorter and more easily processed string. For example, the hash value is converted into a string composed of numbers and letters through Base62 encoding. For example, a 256-bit hash value may be converted into a 10-bit Base62 string, such as "A1B2C3D4E5". After generation, the access token is stored as an attribute of the invoice sharing link for subsequent use in generating the sharing link parameters. The implementation effect of this step is to ensure that the user's identity and permission level can be accurately verified, providing the basic data support for the subsequent generation of the sharing link.

[0084] This embodiment realizes the generation and management of the access token, ensuring the accurate verification of the user's identity and permission level. Generating the user unique identifier according to the user's identity ensures that the user's identity can be uniquely identified; generating the permission identifier according to the user's permission level ensures that the user's permission level can be accurately identified; combining the user unique identifier and the permission identifier to generate the access token ensures that the user's identity and permission level can be accurately verified. Overall, this technical solution significantly improves the security and reliability of the access token through a multi-level generation and management mechanism, providing users with a better and safer invoice management service experience.

[0085] In one implementation of this embodiment, the user terminal receives the invoice sharing link and decrypts the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, including the following steps: S910. The user terminal parses the invoice sharing link and extracts the file access identifier and the access token; S920. The user terminal sends a decryption request to the cloud server. The cloud server is used to obtain the access token through the decryption request, verify the validity of the access token, and return the encrypted invoice copy after successful verification; S930. The user terminal decrypts the encryption key using the asymmetric encryption algorithm and decrypts the encrypted invoice copy with the decrypted key to obtain the invoice copy.

[0086] When the user terminal receives an invoice sharing link, it first needs to parse the link to extract key information. An invoice sharing link is usually a URL that contains a file access identifier and an access token. The parsing process first decomposes the URL into multiple parts, such as the protocol (e.g., "https"), domain name (e.g., "example.com"), path (e.g., " / share / J0K1L2M3N4"), and query parameters (e.g., "expiry=7&access=5"). Then, the file access identifier and access token are extracted from the path and query parameters. For example, if the invoice sharing link is "https: / / example.com / share / J0K1L2M3N4?expiry=7&access=5", the file access identifier is "J0K1L2M3N4" and the access token is "E5F6G7H8I9". After extraction, the file access identifier and access token are stored as an attribute of the user terminal for subsequent decryption requests. The implementation effect of this step is to ensure that the key information in the invoice sharing link can be accurately extracted, providing basic data support for subsequent decryption requests.

[0087] After extracting the file access identifier and access token, the user terminal sends a decryption request to the cloud server. The decryption request is a structured data object that contains the file access identifier and access token. The sending process first creates an HTTP request and sends the decryption request as the request body to the API interface of the cloud server. For example, a decryption request may contain the following information: the file access identifier is "J0K1L2M3N4" and the access token is "E5F6G7H8I9". After receiving the decryption request, the cloud server first parses the request body to extract the file access identifier and access token. Then, the cloud server verifies the validity of the access token. The verification process first checks whether the access token is within the valid period, for example, by comparing the current time with the generation time of the access token. Then, the cloud server checks whether the access count of the access token exceeds the limit, for example, by querying the user access count table. If the access token passes the verification, the cloud server retrieves the encrypted invoice copy from the storage and returns it to the user terminal. For example, the encrypted invoice copy may be a Base64-encoded string. The implementation effect of this step is to ensure that the encrypted invoice copy can be accurately obtained, providing basic data support for subsequent decryption operations.

[0088] After receiving the encrypted invoice copy, the user terminal needs to decrypt it to obtain the original invoice copy. The decryption process first decrypts the encryption key using an asymmetric encryption algorithm (such as RSA). The encryption key is a symmetric key encrypted using an asymmetric encryption algorithm and usually consists of numbers and letters. The decryption process first decrypts the encryption key using the private key to generate the original symmetric key. For example, if the encryption key is a Base64-encoded string, the decryption process will convert it into binary data and then decrypt it using the private key to generate a 128-bit or 256-bit symmetric key. Then, the user terminal decrypts the encrypted invoice copy using the decrypted symmetric key. During the decryption process, the data of the encrypted invoice copy is divided into fixed-size blocks (such as 128 bits), and each block undergoes multiple rounds of substitution, permutation, and confusion operations to finally generate the decrypted data block. For example, if the encrypted invoice copy is a Base64-encoded string, the decryption process will convert it into binary data and then perform AES decryption on each block to generate the decrypted data block. After decryption is completed, all the decrypted data blocks are combined into an original invoice copy. For example, the original invoice copy may be a PDF file. The implementation effect of this step is to ensure that the encrypted invoice copy can be accurately decrypted and provide the user with the original invoice copy.

[0089] This embodiment realizes the parsing and decryption of the invoice sharing link, ensuring the security and controllability of the invoice copy. The user terminal parses the invoice sharing link and extracts the file access identifier and access token, ensuring that key information can be accurately obtained; the user terminal sends a decryption request to the cloud server, and the cloud server verifies the validity of the access token and returns the encrypted invoice copy, ensuring that the encrypted invoice copy can be accurately obtained; the user terminal decrypts the encryption key using an asymmetric encryption algorithm and decrypts the encrypted invoice copy using the decrypted key, ensuring that the encrypted invoice copy can be accurately decrypted. Overall, this technical solution significantly improves the security and convenience of invoice sharing through a multi-level parsing and decryption mechanism, providing users with a better and more secure invoice management service experience.

[0090] Figure 4 The structural block diagram of a cloud server provided by an embodiment of the present application is shown, as Figure 4 As shown, an embodiment of the present application further provides a cloud server, including: A communication device 10 for establishing a communication connection with the user terminal and the printing service provider terminal; A processor 20 configured to: In response to receiving an upload signal of the digital electronic invoice file uploaded by the user through the user terminal, obtain the digital electronic invoice file; Verify the digital electronic invoice file, and after successful verification, obtain the current geographical location of the user terminal, and determine the target printing service provider terminal based on the printing parameters input by the user and the current geographical location; Generate a printing task according to the printing parameters and the digital electronic invoice file; Send the printing task to the target printing service provider terminal, which is used to execute the printing task, generate an invoice copy, and return the invoice copy to the cloud server; In response to receiving the invoice copy, encrypt the invoice copy and generate an invoice sharing link based on the encrypted invoice copy; Send the invoice sharing link to the user terminal, which is used to receive the invoice sharing link and decrypt the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that the user can download the invoice copy by clicking the invoice sharing link on the user terminal.

[0091] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0092] The present application is described with reference to the flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, and the combination of processes and / or blocks in the flowchart and / or block diagram can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate a machine for realizing the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the function specified in one block or multiple blocks.

[0093] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer-readable memory generate a manufactured article including an instruction device, and the instruction device realizes the process Figure 1 one process or multiple processes and / or blocks Figure 1 a device for the function specified in one block or multiple blocks.

[0094] These computer program instructions can also be loaded onto a computer or other programmable data processing device, so that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in one process Figure 1 one process or multiple processes and / or blocks Figure 1 steps of the functions specified in one block or multiple blocks.

[0095] In a typical configuration, a computing device includes one or more processors (CPUs), an input / output interface, a network interface, and memory.

[0096] The memory may include non-permanent memory in the form of computer-readable media, random access memory (RAM) and / or non-volatile memory such as read-only memory (ROM) or flash memory (flash RAM). The memory is an example of computer-readable media.

[0097] Computer-readable media includes permanent and non-permanent, removable and non-removable media and can store information by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic disk storage or other magnetic storage devices, or any other non-transmission media that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transitory media such as modulated data signals and carrier waves.

[0098] It should also be noted that the term "comprising", "including" or any other variant thereof is intended to cover non-exclusive inclusion, so that a process, method, commodity or device comprising a series of elements not only includes those elements, but also includes other elements not expressly listed, or elements inherent to such process, method, commodity or device. Without further limitation, an element defined by the statement "comprising one..." does not exclude the existence of additional identical elements in the process, method, commodity or device comprising the element.

[0099] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, various changes and modifications can be made to the present application. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application shall be included within the scope of the claims of the present application.

Claims

1. A digital invoice shared cloud printing method, characterized in that: Applied to a cloud server, the method comprises: In response to receiving an upload signal from a user uploading a digital electricity invoice file through a user terminal, acquiring the digital electricity invoice file; Verifying the digital invoice file, and after successful verification, obtaining the current geographical location of the user terminal, and determining the target printing service provider terminal based on the printing parameters input by the user and the current geographical location; Generate a printing task according to the printing parameters and the digital invoice file; Sending the printing task to the target printing service provider terminal, the target printing service provider terminal is used to execute the printing task and generate an invoice copy, and return the invoice copy to the cloud server; In response to receiving the invoice copy, encrypting the invoice copy, and generating an invoice sharing link based on the encrypted invoice copy; The invoice sharing link is sent to the user terminal, and the user terminal is used to receive the invoice sharing link and decrypt the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that the user can download the invoice copy by clicking the invoice sharing link through the user terminal.

2. The method according to claim 1, characterized in that After sending the print task to the print service provider terminal, the method further comprises: receiving in real time the printing status returned by the printing service provider terminal, wherein the printing status includes printing success, printing failure or printing in progress; The printing status is encapsulated as a status notification message, and the status notification message is sent to the user terminal.

3. The method according to claim 1, characterized in that The verification of the digital invoice document includes: Parsing the digital invoice file to extract file header information and content data; Verify that the document header information complies with the preset tax document format standards; and Verifying whether the content data complies with preset tax content rules; When both the file header information and the content data are verified, it is confirmed that the digital invoice file is successfully verified.

4. The method according to claim 1, characterized in that: The printing parameters include the number of print copies, print quality and print service type, and the step of determining a target print service provider terminal based on the printing parameters input by the user and the current geographical location includes: Analyze the current geographic location to obtain the user's geographic coordinates; Obtaining the geographical coordinates and service capabilities of each print service provider terminal from a preset print service provider terminal list; For each of the print service provider terminals, calculating the Euclidean distance between the user's geographical coordinates and the geographical coordinates of the print service provider terminal as a distance factor of the print service provider terminal; According to the printing service type, obtaining a corresponding basic weight value from a preset service type weight table; According to the print quality, obtaining a corresponding quality weight value from a preset print quality weight table; The sum of the basic weight value and the basic weight value is used as the service capability weight; For each of the printing service provider terminals, taking the weighted sum of the inverse of the distance factor and the service capability weight as the matching score of the printing service provider terminal; The printing service provider terminal with the highest matching score is used as the target printing service provider terminal.

5. The method according to claim 4, characterized in that The step of generating a printing task according to the printing parameters and the digital invoice file includes: Obtaining a unique code of the target printing service provider terminal; Generate a print task description file according to the print parameters, the print task description file including a file identifier, the number of print copies, the print quality and the unique code of the target print service provider terminal; Associating the digital electricity invoice file with the print task description file to generate a print task package; The printing task package is digitally signed to obtain the printing task.

6. The method according to claim 1, characterized in that The encrypting the invoice copy comprises: Encrypting the invoice copy using a symmetric encryption algorithm to generate an encrypted invoice copy; Encrypting the key of the symmetric encryption algorithm using an asymmetric encryption algorithm to generate an encryption key; Encapsulating the encrypted invoice copy and the encryption key into a data packet; compressing the data packet to generate a compressed data packet; Base64 encoding the compressed data packet to generate an encrypted copy of the invoice; Prior to encrypting the invoice copy, the method further comprises: Calculating a hash value of the invoice copy and encapsulating the hash value as blockchain transaction data; The blockchain transaction data is broadcasted to nodes in the blockchain network, wherein the nodes in the blockchain network are used to write the blockchain transaction data into the blockchain through a consensus mechanism.

7. The method according to claim 6, characterized in that The step of generating an invoice sharing link based on the encrypted invoice copy includes: generating a unique file access identifier based on the encrypted copy of the invoice; Obtaining a user identity and a user authority level through the user terminal; Generate an access token based on the user identity and the user authority level; According to the user authority level, obtaining the validity period of the access token from a preset authority validity period table; According to the user identity, obtaining the user's access times from a preset user access times table; Binding the validity period and the number of visits to the access token, whereby the bound access token is used to limit the number of visits of the user within the validity period; Combining the file access identifier and the bound access token to generate a shared link parameter; Performing hash processing on the shared link parameter to generate a shared link identifier; The shared link identifier is combined with a preset domain name to generate an invoice shared link, wherein the invoice shared link includes the validity period and the number of visits.

8. The method according to claim 7, characterized in that The generating an access token according to the user identity and the user authority level includes: Generate a unique user identifier based on the user identity; Generate an authority identifier according to the user authority level; The user unique identifier and the authority identifier are combined to generate an access token.

9. The method according to claim 7, characterized in that: The user terminal receives the invoice sharing link and decrypts the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, including: The user terminal parses the invoice sharing link and extracts the file access identifier and the access token; The user terminal sends a decryption request to the cloud server, and the cloud server is used to obtain the access token through the decryption request, verify the validity of the access token, and return the encrypted copy of the invoice after the verification is passed; The user terminal decrypts the encryption key using an asymmetric encryption algorithm, and uses the decrypted key to decrypt the encrypted invoice copy to obtain the invoice copy.

10. A cloud server, characterized in that: include: A communication device for establishing a communication connection with a user terminal and a printing service provider terminal; The processor is configured as: In response to receiving an upload signal from a user uploading a digital electricity invoice file through a user terminal, acquiring the digital electricity invoice file; Verifying the digital invoice file, and after successful verification, obtaining the current geographical location of the user terminal, and determining the target printing service provider terminal based on the printing parameters input by the user and the current geographical location; Generate a printing task according to the printing parameters and the digital invoice file; Sending the printing task to the target printing service provider terminal, the target printing service provider terminal is used to execute the printing task and generate an invoice copy, and return the invoice copy to the cloud server; In response to receiving the invoice copy, encrypting the invoice copy, and generating an invoice sharing link based on the encrypted invoice copy; The invoice sharing link is sent to the user terminal, and the user terminal is used to receive the invoice sharing link and decrypt the encrypted invoice copy in the invoice sharing link to obtain the invoice copy, so that the user can download the invoice copy by clicking the invoice sharing link through the user terminal.

Citation Information

Patent Citations

  • Local printing method based on remote bill information and apparatus thereof

    CN102693597A

  • Invoice printing apparatus, invoice printing storage device, and invoice printing controller

    CN107221112A

  • A computer-based shared printing method and a computer-based shared printing system

    CN109408007A

  • Invoice access method and device based on block chain and electronic equipment

    CN110060111A

  • Electronic invoice management method and device, electronic equipment and storage medium

    CN110909383A