CN-116245587-B - Electronic invoice acquisition method, electronic invoice acquisition device, electronic equipment and storage medium
Abstract
The application discloses an electronic invoice acquisition method, an electronic invoice acquisition device, electronic equipment and a storage medium. The method comprises the steps of extracting a first domain name, a full address and routing information from an electronic invoice acquisition request, selecting a proxy download server according to the first domain name and the full address, acquiring a provider proxy IP address based on the proxy download server, sending an access request carrying the first domain name and the routing information to the provider server according to the provider proxy IP address by using the proxy download server, so that the provider server acquires an electronic invoice corresponding to the routing information after receiving the access request, sends the electronic invoice to the proxy download server, receives the electronic invoice forwarded by the proxy download server and forwards the electronic invoice to a user side, the provider server where the electronic invoice is located can be accessed more accurately, the accuracy of downloading the electronic invoice is improved, the acquisition success rate of the electronic invoice is improved, and the processing efficiency of reconciliation service is improved.
Inventors
- HE HUI
Assignees
- 平安壹钱包电子商务有限公司
Dates
- Publication Date
- 20260505
- Application Date
- 20230210
Claims (10)
- 1. An electronic invoice acquisition method is characterized by comprising the following steps: receiving an electronic invoice downloading request sent by a user; extracting a first domain name, a full address and routing information from the electronic invoice acquisition request; selecting a proxy download server according to the first domain name and the full address; Acquiring a provider proxy IP address based on the proxy download server; The agent downloading server is utilized to send an access request carrying the first domain name and the routing information to a provider server according to the provider agent IP address, so that the provider server obtains an electronic invoice corresponding to the routing information after receiving the access request, and sends the electronic invoice to the agent downloading server; in the process of downloading the electronic invoice by the proxy download server, if the download abnormality occurs, deleting the IP address of the proxy download server from the mapping values of the first domain name and the full address; and receiving the electronic invoice forwarded by the proxy download server and forwarding the electronic invoice to the user side.
- 2. The method of claim 1, wherein the extracting the first domain name, full address, and routing information from the electronic invoice capture request comprises: extracting first URL information from the electronic invoice acquisition request; And extracting the first domain name, the full address and the routing information from the first URL information.
- 3. The method of claim 2, wherein the extracting the first domain name, the full address, and the routing information from the first URL information comprises: And calling a preset analysis rule by adopting a parallel processing method to analyze the first URL information to obtain the first domain name, the full address and the routing information.
- 4. The method of claim 3, wherein the parsing the first URL information using a parallel processing method to call a preset parsing rule to obtain the first domain name, the full address, and the routing information includes: And traversing dictionary trees corresponding to each preset analysis rule in sequence in a Map/Reduce parallel mode aiming at the first URL information until an analysis result corresponding to the first URL information is generated, wherein the analysis result comprises the first domain name, the full address and the routing information.
- 5. The method of claim 1, wherein the obtaining a vendor proxy IP address based on the proxy download server comprises: determining attribute information of the proxy download server; And selecting the provider agent IP address matched with the attribute information from a plurality of preset provider agent IP addresses.
- 6. The method of claim 1, wherein the obtaining a vendor proxy IP address based on the proxy download server comprises: Acquiring a preset IP address from the proxy download server; accessing a target server corresponding to the preset IP address; and receiving the provider proxy IP address pushed by the target server.
- 7. The method of claim 2, wherein the sending an access request carrying the first domain name and the routing information to a vendor server according to the vendor proxy IP address comprises: inserting the provider agent IP address into the protocol information of the first URL information and before the first domain name to obtain second URL information; constructing the access request corresponding to the second URL information; the access request is sent to a vendor server having the vendor proxy IP address.
- 8. An electronic invoice capture device, comprising: the receiving module is used for receiving an electronic invoice downloading request sent by the user side; The extraction module is used for extracting a first domain name, a full address and routing information from the electronic invoice acquisition request; The selecting module is used for selecting a proxy download server according to the first domain name and the full address; the acquisition module is used for acquiring the provider proxy IP address based on the proxy download server; The access request sending module is used for sending an access request carrying the first domain name and the routing information to the provider server according to the provider proxy IP address by utilizing the proxy download server, so that the provider server obtains an electronic invoice corresponding to the routing information after receiving the access request and sends the electronic invoice to the proxy download server; and the electronic invoice forwarding module is used for receiving the electronic invoice forwarded by the proxy download server and forwarding the electronic invoice to the user side.
- 9. An electronic device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, the processor executing the program to implement the electronic invoice capture method of any one of claims 1 to 7.
- 10. A computer-readable storage medium having stored thereon a computer program, wherein the program is executed by a processor to implement the electronic invoice capture method of any one of claims 1 to 7.
Description
Electronic invoice acquisition method, electronic invoice acquisition device, electronic equipment and storage medium Technical Field The present application relates to the field of computer networks, and in particular, to a method and an apparatus for acquiring an electronic invoice, an electronic device, and a storage medium. Background The reconciliation service refers to a service for checking accounts between both parties having economic relations, such as a reconciliation service between a payment company and a provider. With the development of computer network technology, accounting services are almost entirely performed through computer networks. During the course of the reconciliation service, the user needs to download the electronic invoice of the provider for reconciliation. In the related art, when the account checking service is processed, the situation that the provider server cannot be normally accessed to cause the electronic invoice to be downloaded exists, and the processing of the account checking service is seriously influenced. Disclosure of Invention The application aims to provide an electronic invoice acquisition method, an electronic invoice acquisition device, electronic equipment and a storage medium, which are used for solving the technical problem that in the related art, when an account checking service is processed, the account checking service is seriously affected due to the fact that an electronic invoice cannot be downloaded because a provider server cannot be normally accessed. The following presents a simplified summary in order to provide a basic understanding of some aspects of the disclosed embodiments. This summary is not an extensive overview and is intended to neither identify key/critical elements nor delineate the scope of such embodiments. Its sole purpose is to present some concepts in a simplified form as a prelude to the more detailed description that is presented later. According to an aspect of an embodiment of the present application, there is provided an electronic invoice obtaining method, including: receiving an electronic invoice downloading request sent by a user; extracting a first domain name, a full address and routing information from the electronic invoice acquisition request; selecting a proxy download server according to the first domain name and the full address; Acquiring a provider proxy IP address based on the proxy download server; The agent downloading server is utilized to send an access request carrying the first domain name and the routing information to a provider server according to the provider agent IP address, so that the provider server obtains an electronic invoice corresponding to the routing information after receiving the access request, and sends the electronic invoice to the agent downloading server; and receiving the electronic invoice forwarded by the proxy download server and forwarding the electronic invoice to the user side. In some embodiments of the present application, the extracting the first domain name, the full address, and the routing information from the electronic invoice capture request includes: extracting first URL information from the electronic invoice acquisition request; And extracting the first domain name, the full address and the routing information from the first URL information. In some embodiments of the present application, the extracting the first domain name, the full address, and the routing information from the first URL information includes: And calling a preset analysis rule by adopting a parallel processing method to analyze the first URL information to obtain the first domain name, the full address and the routing information. In some embodiments of the present application, the calling a preset parsing rule by using a parallel processing method to parse the first URL information to obtain the first domain name, the full address, and the routing information includes: And traversing dictionary trees corresponding to each preset analysis rule in sequence in a Map/Reduce parallel mode aiming at the first URL information until an analysis result corresponding to the first URL information is generated, wherein the analysis result comprises the first domain name, the full address and the routing information. In some embodiments of the present application, the obtaining, based on the proxy download server, a provider proxy IP address includes: determining attribute information of the proxy download server; And selecting the provider agent IP address matched with the attribute information from a plurality of preset provider agent IP addresses. In some embodiments of the present application, the obtaining, based on the proxy download server, a provider proxy IP address includes: Acquiring a preset IP address from the proxy download server; accessing a target server corresponding to the preset IP address; and receiving the provider proxy IP address pushed by the target server. In some embodiments