A bill information page display method and API service device

By pre-built bill style pages and using NodeJS service to render bill information and generate PDF or image format files, the problems of unreliable data and missing styles of third-party platforms are solved, and the accurate and diversified display of bill information is achieved.

CN115426347BActive Publication Date: 2025-02-18EASY INFORMATION TECH ZHUHAI CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210990005.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-08-17
Publication Date
2025-02-18
Estimated Expiration
2042-08-17

AI Technical Summary

Technical Problem

In the prior art, the ticket face presented by the third-party platform is a front-end static page, and the data can be tampered with, which cannot guarantee the accuracy of the data, and users cannot directly save the ticket information. At the same time, third-party platforms are usually based on Java backend and lack the concept of front-end style, resulting in the rendered page files having no style and cannot meet the diverse needs of users.

Method used

By pre-built a ticket style page using Vue and UI components, and using NodeJS service to render the ticket information onto the page, generate files in PDF format or picture format, avoid data tampering, and store and read data through the file server.

Benefits of technology

It realizes the accuracy and diversity of ticket information displayed or downloaded on third-party servers, avoids data tampering, and improves response speed and data processing efficiency.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115426347B_ABST
    Figure CN115426347B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for displaying a bill information page and an API service device, including: when receiving a read request from a third-party server, determining whether a first file exists on a file server; if so, reading the first file from the file server through the third-party server to display or download the first file; otherwise, filling the acquired bill information into a bill style page through the NodeJS service, rendering the completed bill style page, uploading the rendered second file to the file server, reading the second file from the file server through the third-party server to display or download the second file; the bill style page is constructed using Vue and UI components, and the format of the second file is PDF format or image format. The present invention pre-constructs a bill style page to meet different style requirements, and renders the bill information into a PDF file or an image file to prevent data from being tampered with.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of page access and display, and in particular to a bill information page display method and an API service device. Background Art

[0002] Currently, users usually use third-party platforms to browse pages with ticket information. However, in the process of connecting with third-party platforms, since the tickets presented by third-party platforms are static pages on the front end and the data can be tampered with, the accuracy of the browsed data cannot be guaranteed, and users cannot use third-party platforms to directly save ticket information. In addition, when providing API services, there are compliance issues involved, and non-directly connected partners do not have the authority to directly generate tickets. Third-party platforms are usually based on Java backends, focusing more on data processing and business logic, and have no concept of front-end styles. Therefore, the rendered page files have no style and cannot meet the diverse needs of users. Summary of the invention

[0003] The present invention provides a method for displaying a bill information page and an API service device, which pre-builds a bill style page to flexibly handle different style issues, and renders a second file including the bill information into a PDF format file or a picture format file to avoid data tampering, so as to ensure the accuracy of the data displayed on a third-party server.

[0004] In order to solve the above technical problems, an embodiment of the present invention provides a method for displaying a bill information page, comprising:

[0005] When receiving a read request from a third-party server, determining whether there is a first file to be read on the file server;

[0006] If so, reading the first file from the file server through the third-party server, so as to display or download the first file on a page of the third-party server;

[0007] If it does not exist, the acquired bill information is filled into the bill style page through the NodeJS service, and the bill style page with the information filled in is rendered through the NodeJS service, and then the rendered second file is uploaded to the file server, and the second file is read from the file server through the third-party server to display or download the second file on the page of the third-party server; wherein the bill style page is pre-built using Vue and UI components, and the format of the second file is PDF format or picture format.

[0008] In implementing the embodiment of the present invention, Vue and UI components are used to pre-build a bill style page so that the bill information can be subsequently rendered on the bill style page. At the same time, the bill style page can be adaptively modified according to different application scenarios to flexibly handle different style issues. In addition, when the file server does not have the first file to be read, the bill style page filled with the bill information is rendered into a second file in PDF format or image format, and the third-party server is controlled to read the second file from the file server, so that the user can browse or download and save the second file through the third-party server, thereby avoiding tampering of the data displayed on the page and affecting the accuracy of the data.

[0009] As a preferred solution, the acquired bill information is filled into the bill style page through the NodeJS service, and the bill style page with the information filled in is rendered through the NodeJS service, and then the rendered second file is uploaded to the file server, and the second file is read from the file server through the third-party server to display or download the second file on the page of the third-party server, specifically:

[0010] Sending a ticket information acquisition request to a database, and receiving the ticket information sent by the database;

[0011] Filling the bill information into the bill style page through the NodeJS service, rendering the bill style page with the completed information filled in to obtain a second file, and then signing the second file to obtain first signature information corresponding to the second file;

[0012] receiving the second file and the first signature information sent by the NodeJS service, and uploading the second file and the first signature information to the file server;

[0013] storing the first address sent by the file server in the cache server, and sending the first address to the third-party server; wherein the first address is the storage address of the second file and the first signature information on the file server;

[0014] The second file and the first signature information are read from the file server through the third-party server according to the first address, so as to display or download the second file on a page of the third-party server.

[0015] The preferred solution for implementing the embodiment of the present invention uses NodeJS service, focusing on page and style rendering, to generate a second file in PDF format or image format according to the request, and stores the generated second file and the first signature information corresponding to the second file in the file server, so that the third-party server can read the file according to the received file storage address without generating it on the third-party server, thereby solving the problem that the third-party server does not have the qualifications to generate the ticket. At the same time, the file storage address is stored in the cache server, so that when the read request from the third-party server is received next time, the cache data that meets the current read request can be obtained according to the file storage address stored on the cache server - the second file and the first signature information corresponding to the second file, so as to reduce the data processing flow and improve the response speed.

[0016] As a preferred solution, after reading the second file and the first signature information from the file server according to the first address through the third-party server, the method further includes:

[0017] When the third-party server receives the user verification signal, the second file is signed by the third-party server to obtain corresponding second signature information, and the first signature information is compared and verified with the second signature information;

[0018] If the verification is successful, the second file is used as a file to be displayed on or downloaded from the web page of the third-party server;

[0019] If the verification fails, a verification failure message is displayed on the page of the third-party server.

[0020] According to a preferred solution for implementing the embodiment of the present invention, after the third-party server reads the second file and the first signature information from the file server, if the third-party server receives a user verification signal, it signs the second file again and compares the second signature information obtained by signing with the first signature information received to verify whether the second file received by the third-party server has been tampered with, thereby ensuring the accuracy of the file displayed on the page of the third-party server.

[0021] As a preferred solution, the first file is read from the file server through the third-party server to display or download the first file on a page of the third-party server, specifically:

[0022] receiving a second address sent by the cache server, and sending the second address to the third-party server; wherein the second address is a storage address of the first file and the third signature information corresponding to the first file on the file server;

[0023] Reading the first file and the third signature information from the file server according to the second address through the third-party server;

[0024] When the third-party server receives the user verification signal, the first file is signed by the third-party server to obtain corresponding fourth signature information, and the third signature information is compared and verified with the fourth signature information;

[0025] If the verification is successful, the first file is used as a file to be displayed on or downloaded from the web page of the third-party server;

[0026] If the verification fails, a verification failure message is displayed on the page of the third-party server.

[0027] According to a preferred solution for implementing the embodiment of the present invention, when the third-party server receives a user verification signal, it re-signs the received first file and compares and verifies the fourth signature information obtained by the signature with the third signature information received to verify whether the second address sent by the cache server is wrong, thereby avoiding reading files at the wrong address on the file server and verifying whether the first file read from the file server is tampered with, thereby ensuring the accuracy of the file displayed on the page of the third-party server.

[0028] As a preferred solution, the determining whether there is a first file to be read on the file server is specifically:

[0029] Obtaining the input parameters carried by the read request;

[0030] According to the input parameters, query the file server to determine whether there is a first file to be read on the file server;

[0031] The input parameter is the file ID corresponding to the first file.

[0032] A preferred solution for implementing the embodiment of the present invention is to obtain a file ID corresponding to the first file to be read according to a read request from a third-party server, so as to accurately query whether the first file to be read exists on the file server.

[0033] In order to solve the same technical problem, an embodiment of the present invention further provides an API service device, including:

[0034] A determination module, configured to determine whether a first file to be read exists on the file server when receiving a read request from a third-party server;

[0035] A first display module, configured to read the first file from the file server through the third-party server if the first file to be read exists on the file server, so as to display or download the first file on a page of the third-party server;

[0036] The second display module is used to fill the acquired bill information into the bill style page through the NodeJS service if the first file to be read does not exist on the file server, and render the bill style page with the completed information through the NodeJS service, and then upload the rendered second file to the file server, and read the second file from the file server through the third-party server to display or download the second file on the page of the third-party server; wherein the bill style page is pre-built using Vue and UI components, and the format of the second file is PDF format or image format.

[0037] As a preferred solution, the second display module specifically includes:

[0038] A first data transmission unit, configured to send a ticket information acquisition request to a database and receive the ticket information sent by the database when the first file to be read does not exist on the file server;

[0039] A rendering signature unit, used to fill the bill information into the bill style page through the NodeJS service, and render the bill style page with the completed information filled in to obtain a second file, and then sign the second file to obtain the first signature information corresponding to the second file;

[0040] a second data transmission unit, configured to receive the second file and the first signature information sent by the NodeJS service, and upload the second file and the first signature information to the file server;

[0041] A third data transmission unit, configured to store the first address sent by the file server in the cache server, and send the first address to the third-party server; wherein the first address is a storage address of the second file and the first signature information on the file server;

[0042] The first display unit is used to read the second file and the first signature information from the file server through the third-party server according to the first address, so as to display or download the second file on a page of the third-party server.

[0043] As a preferred solution, the API service device further includes:

[0044] The file verification module is used to sign the second file through the third-party server when the third-party server receives the user verification signal to obtain the corresponding second signature information, and compare and verify the first signature information and the second signature information; if the verification is successful, the second file is used as a file to be displayed or downloaded on the page of the third-party server; if the verification fails, the verification failure information is displayed on the page of the third-party server.

[0045] As a preferred solution, the first display module specifically includes:

[0046] a fourth data transmission unit, configured to receive a second address sent by a cache server when the first file to be read exists on the file server; wherein the second address is a storage address of the first file and the third signature information corresponding to the first file on the file server; send the second address to the third-party server, and then read the first file and the third signature information from the file server through the third-party server according to the second address;

[0047] The second display unit is used to sign the first file through the third-party server when the third-party server receives the user verification signal to obtain corresponding fourth signature information, and compare and verify the third signature information and the fourth signature information; if the verification is successful, the first file is displayed or downloaded on the page of the third-party server; if the verification fails, verification failure information is displayed on the page of the third-party server.

[0048] As a preferred solution, the judgment module specifically includes:

[0049] A data acquisition unit, configured to, when receiving a read request from the third-party server, acquire an input parameter carried in the read request; wherein the input parameter is a file ID corresponding to the first file;

[0050] The judging unit is used to query the file server according to the input parameters to judge whether there is a first file to be read on the file server. BRIEF DESCRIPTION OF THE DRAWINGS

[0051] Figure 1 : A flowchart of a method for displaying a bill information page provided in Embodiment 1 of the present invention;

[0052] Figure 2 : A structural diagram of an API service device provided in Example 1 of the present invention. DETAILED DESCRIPTION

[0053] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0054] Embodiment one:

[0055] Please refer to Figure 1 , is a method for displaying a bill information page provided by an embodiment of the present invention, the method comprising steps S1 to S3, each step is specifically as follows:

[0056] Step S1: when receiving a read request from a third-party server, determining whether there is a first file to be read on the file server.

[0057] As a preferred solution, step S1 includes step S11 to step S12, and each step is specifically as follows:

[0058] Step S11, obtaining an input parameter carried by the read request; wherein the input parameter is a file ID corresponding to the first file.

[0059] Step S12, query the file server according to the input parameters to determine whether there is a first file to be read on the file server. If there is a first file to be read on the file server, execute step S2; if there is no first file to be read on the file server, execute step S3.

[0060] In this embodiment, when the third-party server receives a read request, it calls the API service interface; the API service determines whether the first file to be read exists on the file server based on the identifier of the input parameter carried by the read request (that is, the unique ID corresponding to the first file to be read) through the API service interface. If the first file to be read exists on the file server, there is no need to regenerate the file that meets the read request. If the first file to be read does not exist on the file server, it is necessary to call other ports and devices to generate a file that meets the read request.

[0061] Step S2, reading the first file from the file server through the third-party server, so as to display or download the first file on a page of the third-party server.

[0062] As a preferred solution, step S2 includes step S21 to step S25, and each step is specifically as follows:

[0063] Step S21, receiving a second address sent by the cache server, and sending the second address to a third-party server; wherein the second address is a storage address of the first file and the third signature information corresponding to the first file on the file server.

[0064] Step S22: read the first file and the third signature information from the file server through the third-party server according to the second address.

[0065] In this embodiment, when it is determined that there is a first file to be read on the file server, the API service reads the cache data in the cache server to find the storage address of the first file and the third signature information corresponding to the first file on the file server - the second address, and the cache server returns the second address to the API service. Then, the API service sends the second address to the third-party server through the API service interface. Among them, the second address can be a file access link, and users using the third-party server can read the first file and the third signature information corresponding to the first file from the file server by clicking on the file access link.

[0066] It should be noted that, since the address stored in the cache server may be abnormal, or during the transmission process of the second address / first file and the third signature information corresponding to the first file, the second address / first file and the third signature information corresponding to the first file may be tampered with, resulting in inaccurate data finally displayed on the page of the third-party server. Therefore, through steps S23 to S25, the first file received by the third-party server is verified by comparing the third signature information and the fourth signature information generated by re-signing the received first file. Among them, if the third signature information and the fourth signature information are consistent, it indicates that the comparison verification between the third signature information and the fourth signature information has passed.

[0067] Step S23, when the third-party server receives the user verification signal, the first file is signed through the third-party server to obtain the corresponding fourth signature information, and the third signature information and the fourth signature information are compared and verified. If the verification passes, step S24 is executed; if the verification fails, step S25 is executed.

[0068] Step S24: Use the first file as a file to be displayed on or downloaded from a web page of a third-party server.

[0069] Step S25: Display verification failure information on the page of the third-party server.

[0070] Step S3, through the NodeJS service, fill the acquired bill information into the bill style page, and through the NodeJS service, render the bill style page with the information filled in, and then upload the rendered second file to the file server, and through the third-party server, read the second file from the file server to display or download the second file on the page of the third-party server; wherein, the bill style page is pre-built using Vue and UI components, the format of the second file is PDF format or image format, and the NodeJS service is connected to the Vue application.

[0071] As a preferred solution, step S3 includes step S31 to step S35, and each step is specifically as follows:

[0072] Step S31, sending a ticket information acquisition request to a database, and receiving the ticket information sent by the database.

[0073] In this embodiment, the API service limits the query conditions through parameters and obtains the corresponding ticket information from the database.

[0074] Step S32, through the NodeJS service, fill the bill information into the bill style page, and render the bill style page with the completed information filled in to obtain the second file, and then sign the second file to obtain the first signature information corresponding to the second file.

[0075] In this embodiment, the NodeJS service fills the ticket information obtained by the API service into the ticket style page pre-built using the Vue application and the UI component application, thereby obtaining the corresponding ticket page. Then, the NodeJS service renders the ticket page to obtain a second file in the format of PDF or image, and signs the second file to obtain the second signature information corresponding to the second file.

[0076] Step S33, receiving the second file and the first signature information sent by the NodeJS service, and uploading the second file and the first signature information to the file server.

[0077] Step S34, storing the first address sent by the file server in the cache server, and sending the first address to the third-party server; wherein the first address is the storage address of the second file and the first signature information on the file server.

[0078] Step S35, reading the second file and the first signature information from the file server through the third-party server according to the first address, so as to display or download the second file on the page of the third-party server.

[0079] In this embodiment, the NodeJS service renders the second file and the first signature information obtained by the signature, uploads the second file and the first signature information to the specified directory in the file server through the API service, and receives the storage address of the second file and the first signature information on the file server returned by the file server - the first address. Then, through the API service, the first address is cached to the cache server, and the first address is sent to the third-party server. Based on this, users using the third-party server can access and read the second file and the first signature information on the file server through the first address, so that the second file can be displayed or downloaded on the page of the third-party server. Among them, the user can execute steps S36 to S38 to use the first signature information to verify the second file received by the third-party server.

[0080] It should be noted that the file server sets a file validity period. When the storage time of a file in a specified directory exceeds the file validity period, the file will be automatically cleared to free up memory and prevent invalid files from occupying the file server storage capacity without limit.

[0081] As a preferred solution, after step S35 of "reading the second file and the first signature information from the file server according to the first address through the third-party server", a verification process for the second file is also included, and the process includes steps S36 to S38, and each step is specifically as follows:

[0082] Step S36, when the third-party server receives the user verification signal, the second file is signed through the third-party server to obtain the corresponding second signature information, and the first signature information and the second signature information are compared and verified. If the verification passes, step S37 is executed; if the verification fails, step S38 is executed.

[0083] Step S37: Use the second file as a file to be displayed on or downloaded from a web page of a third-party server.

[0084] Step S38: Display verification failure information on the page of the third-party server.

[0085] In this embodiment, when the user sees the verification failure information displayed on the page of the third-party server, if the user needs to obtain a new file, the user's file regeneration request is received through the third-party server, and the file regeneration request is used to call the API service interface to execute steps S31 to S35 to form a new second file.

[0086] Please refer to Figure 2 , is a structural diagram of an API service device provided by an embodiment of the present invention, wherein the API service comprises a judgment module 1, a first display module 2 and a second display module 3, and each module is specifically as follows:

[0087] A determination module 1, configured to determine whether there is a first file to be read on the file server when receiving a read request from a third-party server;

[0088] A first display module 2 is used for reading the first file from the file server through a third-party server if there is a first file to be read on the file server, so as to display or download the first file on a page of the third-party server;

[0089] The second display module 3 is used to fill the acquired bill information into the bill style page through the NodeJS service if the first file to be read does not exist on the file server, and render the bill style page with the completed information through the NodeJS service, and then upload the rendered second file to the file server, and read the second file from the file server through a third-party server to display or download the second file on the page of the third-party server; wherein the bill style page is pre-built using Vue and UI components, and the format of the second file is PDF format or image format.

[0090] As a preferred solution, the second display module 3 specifically includes a first data transmission unit 31, a rendering signature unit 32, a second data transmission unit 33, a third data transmission unit 34 and a first display unit 35, and the specific details of each unit are as follows:

[0091] The first data transmission unit 31 is used to send a ticket information acquisition request to the database when the first file to be read does not exist on the file server, and receive the ticket information sent by the database;

[0092] The rendering signature unit 32 is used to fill the bill information into the bill style page through the NodeJS service, and render the bill style page with the completed information filled in to obtain the second file, and then sign the second file to obtain the first signature information corresponding to the second file;

[0093] The second data transmission unit 33 is used to receive the second file and the first signature information sent by the NodeJS service, and upload the second file and the first signature information to the file server;

[0094] A third data transmission unit 34 is used to store the first address sent by the file server in the cache server, and send the first address to the third-party server; wherein the first address is the storage address of the second file and the first signature information on the file server;

[0095] The first display unit 35 is used to read the second file and the first signature information from the file server through the third-party server according to the first address, so as to display or download the second file on a page of the third-party server.

[0096] As a preferred option, please refer to Figure 2 , an API service device provided by an embodiment of the present invention further includes a file verification module 4, which is specifically as follows:

[0097] The file verification module 4 is used to sign the second file through the third-party server when the third-party server receives the user verification signal to obtain the corresponding second signature information, and compare and verify the first signature information and the second signature information; if the verification is successful, the second file is displayed or downloaded on the page of the third-party server; if the verification fails, the verification failure information is displayed on the page of the third-party server.

[0098] As a preferred solution, the first display module 2 specifically includes: a fourth data transmission unit 21 and a second display unit 22, and the specific details of each unit are as follows:

[0099] The fourth data transmission unit 21 is used to receive the second address sent by the cache server when there is a first file to be read on the file server; wherein the second address is the storage address of the first file and the third signature information corresponding to the first file on the file server; send the second address to the third-party server, and then read the first file and the third signature information from the file server according to the second address through the third-party server;

[0100] The second display unit 22 is used to sign the first file through the third-party server when the third-party server receives the user verification signal to obtain the corresponding fourth signature information, and compare and verify the third signature information and the fourth signature information; if the verification is successful, the first file is displayed or downloaded on the page of the third-party server; if the verification fails, the verification failure information is displayed on the page of the third-party server.

[0101] As a preferred solution, the judgment module 1 specifically includes a data acquisition unit 11 and a judgment unit 12, and the details of each unit are as follows:

[0102] The data acquisition unit 11 is used to acquire the input parameter carried by the read request when receiving the read request from the third-party server; wherein the input parameter is the file ID corresponding to the first file;

[0103] The determining unit 12 is used to query the file server according to the input parameters to determine whether there is a first file to be read on the file server.

[0104] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working process of the API service device described above can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.

[0105] Compared with the prior art, the embodiments of the present invention have the following beneficial effects:

[0106] The present invention provides a method for displaying a bill information page and an API service device. Before rendering the page, Vue and UI components are used to pre-build a bill style page, so that the bill information can be rendered on the bill style page through the NodeJS service later. At the same time, the bill style page can be adaptively modified according to different application scenarios or user needs to flexibly handle different style issues. In addition, when the file server does not have the first file to be read, the bill style page filled with the bill information is rendered into a second file in the format of PDF or picture, and the third-party server is controlled to read the second file from the file server, so that the user can browse or download the second file through the third-party server, thereby avoiding the data in the file browsed or downloaded by the user from being tampered with.

[0107] Furthermore, after the third-party server reads the second file and the first signature information from the file server, it responds to the user verification signal received by the third-party server, signs the second file again, and compares and verifies the second signature information obtained by signing with the first signature information received, thereby verifying whether the second file received by the third-party server has been tampered with, so as to further ensure the accuracy of the file displayed on the page of the third-party server. In addition, the storage address of the second file on the file server is stored in the cache server, so that when a read request from the third-party server is received next time, the cache data that meets the current read request - the second file and the first signature information corresponding to the second file can be obtained according to the address stored on the cache server, so as to reduce the data processing process and improve the response speed.

[0108] The specific embodiments described above further illustrate the purpose, technical solutions and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the scope of protection of the present invention. It is particularly pointed out that for those skilled in the art, any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention should be included in the scope of protection of the present invention.

Claims

1. A method for displaying a bill information page, characterized in that: include: When receiving a read request from a third-party server, determining whether there is a first file to be read on the file server; If so, reading the first file from the file server through the third-party server, so as to display or download the first file on a page of the third-party server; If it does not exist, the acquired bill information is filled into the bill style page through the NodeJS service, and the bill style page with the information filled in is rendered through the NodeJS service, and then the rendered second file is uploaded to the file server, and the second file is read from the file server through the third-party server to display or download the second file on the page of the third-party server; wherein the bill style page is pre-built using Vue and UI components, and the format of the second file is PDF format or image format; The step of reading the first file from the file server through the third-party server to display or download the first file on a page of the third-party server is specifically as follows: receiving a second address sent by the cache server, and sending the second address to the third-party server; wherein the second address is a storage address of the first file and the third signature information corresponding to the first file on the file server; Reading the first file and the third signature information from the file server according to the second address through the third-party server; When the third-party server receives the user verification signal, the first file is signed by the third-party server to obtain corresponding fourth signature information, and the third signature information is compared and verified with the fourth signature information; If the verification is successful, the first file is used as a file to be displayed on or downloaded from the web page of the third-party server; If the verification fails, a verification failure message is displayed on the page of the third-party server.

2. A method for displaying a bill information page according to claim 1, characterized in that: The method of filling the acquired bill information into the bill style page through the NodeJS service, rendering the bill style page with the information filled in through the NodeJS service, uploading the rendered second file to the file server, and reading the second file from the file server through the third-party server to display or download the second file on the page of the third-party server is as follows: Sending a ticket information acquisition request to a database, and receiving the ticket information sent by the database; Filling the bill information into the bill style page through the NodeJS service, rendering the bill style page with the completed information filled in to obtain a second file, and then signing the second file to obtain first signature information corresponding to the second file; receiving the second file and the first signature information sent by the NodeJS service, and uploading the second file and the first signature information to the file server; storing the first address sent by the file server in the cache server, and sending the first address to the third-party server; wherein the first address is the storage address of the second file and the first signature information on the file server; The second file and the first signature information are read from the file server through the third-party server according to the first address, so as to display or download the second file on a page of the third-party server.

3. A method for displaying a bill information page as claimed in claim 2, characterized in that: After reading the second file and the first signature information from the file server according to the first address through the third-party server, the method further includes: When the third-party server receives the user verification signal, the second file is signed by the third-party server to obtain corresponding second signature information, and the first signature information is compared and verified with the second signature information; If the verification is successful, the second file is used as a file to be displayed on or downloaded from the web page of the third-party server; If the verification fails, a verification failure message is displayed on the page of the third-party server.

4. A method for displaying a bill information page according to claim 1, characterized in that: The determining whether there is a first file to be read on the file server is specifically: Obtaining the input parameters carried by the read request; According to the input parameters, query the file server to determine whether there is a first file to be read on the file server; The input parameter is the file ID corresponding to the first file.

5. An API service device, characterized in that: include: A determination module, configured to determine whether a first file to be read exists on the file server when receiving a read request from a third-party server; A first display module, configured to read the first file from the file server through the third-party server if the first file to be read exists on the file server, so as to display or download the first file on a page of the third-party server; A second display module is used for filling the acquired bill information into the bill style page through the NodeJS service if the first file to be read does not exist on the file server, and rendering the bill style page with the completed information filled in through the NodeJS service, and then uploading the rendered second file to the file server, and reading the second file from the file server through the third-party server, so as to display or download the second file on the page of the third-party server; wherein the bill style page is pre-built using Vue and UI components, and the format of the second file is PDF format or image format; Wherein, the first display module specifically includes: a fourth data transmission unit, configured to receive a second address sent by a cache server when the first file to be read exists on the file server; wherein the second address is a storage address of the first file and the third signature information corresponding to the first file on the file server; send the second address to the third-party server, and then read the first file and the third signature information from the file server through the third-party server according to the second address; The second display unit is used to sign the first file through the third-party server when the third-party server receives the user verification signal to obtain corresponding fourth signature information, and compare and verify the third signature information and the fourth signature information; if the verification is successful, the first file is displayed or downloaded on the page of the third-party server; if the verification fails, verification failure information is displayed on the page of the third-party server.

6. An API service device as claimed in claim 5, characterized in that: The second display module specifically includes: A first data transmission unit, configured to send a ticket information acquisition request to a database and receive the ticket information sent by the database when the first file to be read does not exist on the file server; A rendering signature unit, used to fill the bill information into the bill style page through the NodeJS service, and render the bill style page with the completed information filled in to obtain a second file, and then sign the second file to obtain the first signature information corresponding to the second file; a second data transmission unit, configured to receive the second file and the first signature information sent by the NodeJS service, and upload the second file and the first signature information to the file server; A third data transmission unit, configured to store the first address sent by the file server in the cache server, and send the first address to the third-party server; wherein the first address is a storage address of the second file and the first signature information on the file server; The first display unit is used to read the second file and the first signature information from the file server through the third-party server according to the first address, so as to display or download the second file on a page of the third-party server.

7. An API service device as claimed in claim 6, characterized in that: Also includes: A file verification module, configured to sign the second file through the third-party server to obtain corresponding second signature information when the third-party server receives the user verification signal, and compare and verify the first signature information with the second signature information; If the verification is successful, the second file is used as a file to be displayed or downloaded on the page of the third-party server; if the verification fails, verification failure information is displayed on the page of the third-party server.

8. An API service device as claimed in claim 5, characterized in that: The judgment module specifically includes: A data acquisition unit, configured to, when receiving a read request from the third-party server, acquire an input parameter carried in the read request; wherein the input parameter is a file ID corresponding to the first file; The judging unit is used to query the file server according to the input parameters to judge whether the first file and the third signature information to be read exist on the file server.

Citation Information

Patent Citations

  • Pdf electronic invoice display method and device and computer equipment

    CN111127124A

  • Method and system for exporting foreground customized invoices

    CN114239484A