Electronic invoice acquisition method and device, electronic equipment and storage medium
By receiving electronic invoice download requests from users, extracting domain names and routing information, selecting proxy download servers, and obtaining supplier proxy IP addresses, the problem of being unable to download electronic invoices was solved, and the processing efficiency of reconciliation business was improved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- PINGAN YIQIANBAO E COMMERCE CO LTD
- Filing Date
- 2023-02-10
- Publication Date
- 2026-05-05
AI Technical Summary
When processing reconciliation transactions, the inability to access the supplier's server normally resulted in the inability to download electronic invoices, which seriously affected the processing of reconciliation transactions.
By receiving the user's electronic invoice download request, the system extracts the first domain name, full address, and routing information, selects a proxy download server, obtains the supplier's proxy IP address, uses the proxy download server to send an access request to obtain the electronic invoice, and forwards it to the user.
It improved the accuracy and success rate of electronic invoice downloads, enhanced the efficiency of reconciliation processes, and resolved the issue of being unable to access the supplier's server.
Smart Images

Figure CN116245587B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer network technology, specifically to an electronic invoice acquisition method, acquisition device, electronic device, and storage medium. Background Technology
[0002] Reconciliation refers to the process of verifying accounts between parties involved in economic transactions, such as reconciliation between a payment company and a supplier. With the development of computer network technology, reconciliation is now almost entirely conducted via computer networks. During the reconciliation process, users need to download the supplier's electronic invoices for reconciliation. However, in some technologies, situations arise where access to the supplier's server is unavailable, preventing the download of electronic invoices and severely impacting the processing of reconciliation transactions. Summary of the Invention
[0003] The purpose of this application is to provide an electronic invoice acquisition method, acquisition device, electronic device, and storage medium to solve the technical problem in related technologies where, during reconciliation processing, the inability to access the supplier's server results in the inability to download electronic invoices, severely impacting the reconciliation process. To provide a basic understanding of some aspects of the disclosed embodiments, a brief summary is given below. This summary is not intended as a general description, nor is it intended to identify key / important components or describe the scope of protection of these embodiments. Its sole purpose is to present some concepts in a simple form as a prelude to the detailed description that follows.
[0004] According to one aspect of the embodiments of this application, an electronic invoice acquisition method is provided, including:
[0005] Receive electronic invoice download requests sent by the user client;
[0006] Extract the first domain name, full address, and routing information from the electronic invoice retrieval request;
[0007] Based on the first domain name and the full address, a proxy download server is selected;
[0008] Obtain the supplier's proxy IP address based on the aforementioned proxy download server;
[0009] Using the proxy download server, an access request carrying the first domain name and the routing information is sent to the supplier server according to the supplier proxy IP address, so that the supplier server can obtain the electronic invoice corresponding to the routing information after receiving the access request, and send the electronic invoice to the proxy download server;
[0010] Receive the electronic invoice forwarded by the proxy download server and forward the electronic invoice to the user terminal.
[0011] In some embodiments of this application, extracting the first domain name, full address, and routing information from the electronic invoice retrieval request includes:
[0012] Extract the first URL information from the electronic invoice retrieval request;
[0013] Extract the first domain name, the full address, and the routing information from the first URL information.
[0014] In some embodiments of this application, extracting the first domain name, the full address, and the routing information from the first URL information includes:
[0015] The first URL information is parsed by using a parallel processing method and calling a preset parsing rule to obtain the first domain name, the full address, and the routing information.
[0016] In some embodiments of this application, the step of using a parallel processing method to parse the first URL information by invoking a preset parsing rule to obtain the first domain name, the full address, and the routing information includes:
[0017] For the first URL information, the Map / Reduce parallel method is used to traverse the trie corresponding to each preset parsing rule in turn until the parsing result corresponding to the first URL information is generated. The parsing result includes the first domain name, the full address and the routing information.
[0018] In some embodiments of this application, obtaining the supplier proxy IP address based on the proxy download server includes:
[0019] Determine the attribute information of the proxy download server;
[0020] Select a supplier proxy IP address that matches the attribute information from a plurality of preset supplier proxy IP addresses.
[0021] In some embodiments of this application, obtaining the supplier proxy IP address based on the proxy download server includes:
[0022] Obtain a preset IP address from the proxy download server;
[0023] Access the target server corresponding to the preset IP address;
[0024] Receive the supplier proxy IP address pushed by the target server.
[0025] In some embodiments of this application, sending an access request carrying the first domain name and the routing information to the supplier server based on the supplier proxy IP address includes:
[0026] The supplier proxy IP address is inserted after the protocol information of the first URL information and before the first domain name to obtain the second URL information;
[0027] Construct the access request corresponding to the second URL information;
[0028] The access request is sent to the supplier server that has the supplier's proxy IP address.
[0029] According to another aspect of the embodiments of this application, an electronic invoice acquisition device is provided, comprising:
[0030] The receiving module is used to receive electronic invoice download requests sent by the user terminal;
[0031] The extraction module is used to extract the first domain name, full address, and routing information from the electronic invoice retrieval request;
[0032] The selection module is used to select a proxy download server based on the first domain name and the full address;
[0033] The acquisition module is used to obtain the supplier's proxy IP address based on the proxy download server;
[0034] An access request sending module is used to send an access request carrying the first domain name and the routing information to the supplier server based on the supplier agent IP address using the proxy download server, so that the supplier server can obtain the electronic invoice corresponding to the routing information after receiving the access request and send the electronic invoice to the proxy download server.
[0035] The electronic invoice forwarding module is used to receive the electronic invoice forwarded by the agent download server and forward the electronic invoice to the user terminal.
[0036] According to another aspect of the embodiments of this application, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the electronic invoice acquisition method described in any of the preceding claims.
[0037] According to another aspect of the embodiments of this application, a computer-readable storage medium is provided having a computer program stored thereon, which is executed by a processor to implement the electronic invoice acquisition method described in any of the preceding claims.
[0038] One aspect of the technical solution provided in this application embodiment may include the following beneficial effects:
[0039] The electronic invoice acquisition method provided in this application extracts a first domain name, full address, and routing information from the electronic invoice acquisition request. Based on the first domain name and the full address, a proxy download server is selected. Based on the proxy download server, the supplier proxy IP address is obtained. Using the proxy download server, an access request carrying the first domain name and the routing information is sent to the supplier server according to the supplier proxy IP address. This allows the supplier server to obtain the electronic invoice corresponding to the routing information after receiving the access request, and send the electronic invoice to the proxy download server. The supplier server also receives the electronic invoice forwarded by the proxy download server and forwards the electronic invoice to the user terminal. This method enables more accurate access to the supplier server where the electronic invoice is located, greatly improving the accuracy of electronic invoice download, the success rate of electronic invoice acquisition, and the processing efficiency of reconciliation business. It solves the technical problem in related technologies where the inability to access the supplier server normally during reconciliation business processing leads to the inability to download electronic invoices, which seriously affects the processing of reconciliation business.
[0040] Other features and advantages of this application will be set forth in the following description and will be apparent in part from the description, or some features and advantages may be inferred from the description or determined without doubt, or may be learned by practicing embodiments of this application. Attached Figure Description
[0041] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0042] Figure 1 The diagram illustrates the application environment of the electronic invoice acquisition method according to an embodiment of this application.
[0043] Figure 2 A flowchart of an electronic invoice acquisition method according to an embodiment of this application is shown.
[0044] Figure 3 A block diagram of an electronic invoice acquisition device according to an embodiment of this application is shown.
[0045] Figure 4 A block diagram of an electronic device structure according to an embodiment of this application is shown.
[0046] Figure 5 A schematic diagram of a computer-readable storage medium according to an embodiment of this application is shown.
[0047] The purpose, functional features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation
[0048] To make the objectives, technical solutions, and advantages of this application clearer, the application will be further described below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application. All other embodiments obtained by those skilled in the art based on the embodiments in this application without inventive effort are within the scope of protection of this application.
[0049] It will be understood by those skilled in the art that, unless otherwise defined, all terms used herein (including technical and scientific terms) have the same meaning as commonly understood by one of ordinary skill in the art to which this application pertains. It should also be understood that terms such as those defined in general dictionaries should be understood to have a meaning consistent with their meaning in the context of the prior art, and should not be interpreted in an idealized or overly formal sense unless specifically defined as herein.
[0050] The reconciliation process requires downloading suppliers' e-invoices. Each supplier's reconciliation files are hosted on servers with varying domain names. If each domain required a VPN to bypass security restrictions, the reconciliation process would be impossible. This is because the e-invoice download address is returned by the supplier's server via an API, and the returned content is merely a URL. However, the reconciliation logic needs to download the actual e-invoice image from this URL. If the code only bypasses the VPN after each "domain unreachable" exception, the process becomes extremely cumbersome and unsustainable.
[0051] Suppliers often use different platforms to store e-invoices, and the URLs provided by suppliers through their interfaces are uncontrollable. Furthermore, the domain names within each URL can vary widely, leading to uncontrollable business processes and hindering reconciliation operations. This often results in e-invoices being undownloadable, severely impacting the operation of the reconciliation logic. The sheer number and uncontrollable nature of the domains corresponding to e-invoice URLs, coupled with the need to bypass firewalls for every single domain encountered, leads to extremely low efficiency and significantly disrupts the normal operation of reconciliation.
[0052] In response to the problem in related technologies where electronic invoices cannot be downloaded due to the inability to access the supplier's server during reconciliation processing, which seriously affects the processing of reconciliation business, this application provides an electronic invoice acquisition method.
[0053] The electronic invoice acquisition method provided in this application embodiment can be applied to, for example, Figure 1 In this application environment, there are user clients, backend servers, proxy download servers, and multiple supplier servers. The backend server receives e-invoice download requests from the user client, extracts the first domain name, full address, and routing information from the request, selects a proxy download server based on the first domain name and full address, obtains the supplier proxy IP address from the proxy download server, and uses the proxy download server to send an access request carrying the first domain name and routing information to the supplier server based on the supplier proxy IP address. Upon receiving the access request, the supplier server obtains the e-invoice corresponding to the routing information and sends it to the proxy download server; it also receives the e-invoice forwarded by the proxy download server and forwards it to the user client. The user client can be, but is not limited to, various personal computers, laptops, smartphones, tablets, and portable wearable devices. The backend server, proxy download server, and supplier servers can all be implemented using independent servers or a server cluster consisting of multiple servers. The following detailed description of specific embodiments further illustrates this application.
[0054] like Figure 2 As shown, one embodiment of this application provides an electronic invoice acquisition method, applied to a backend server, including:
[0055] S10. Receive the electronic invoice download request sent by the user terminal.
[0056] The electronic invoice download request contains a URL for retrieving the electronic invoice. A URL, or Uniform Resource Locator, is a method used by the World Wide Web services on the Internet to specify the location of information.
[0057] S20. Extract the first domain name, full address, and routing information from the electronic invoice retrieval request.
[0058] In one implementation, extracting the first domain name, full address, and routing information from the electronic invoice retrieval request includes: extracting first URL information from the electronic invoice retrieval request; and extracting the first domain name, the full address, and the routing information from the first URL information.
[0059] For example, the first URL information could be http: / / www.financeforum.com / srch / item.rem?t=kl6. Here, the first URL information carries the first domain name financeforum.com and the routing information / srch / item.rem?t=kl6.
[0060] For example, the first URL information could be http: / / www.economy.com / srch / item.pub?s=qww1. Here, the first URL information carries the first domain name economy.com and the routing information / srch / item.pub?s=qww1.
[0061] For example, extracting the first domain name, the full address, and the routing information from the first URL information includes:
[0062] The first URL information is parsed by using a parallel processing method and calling a preset parsing rule to obtain the first domain name, the full address, and the routing information.
[0063] For example, the step of using a parallel processing method to parse the first URL information by invoking a preset parsing rule to obtain the first domain name, the full address, and the routing information includes:
[0064] For the first URL information, the Map / Reduce parallel method is used to traverse the trie corresponding to each preset parsing rule in turn until the parsing result corresponding to the first URL information is generated. The parsing result includes the first domain name, the full address and the routing information.
[0065] S30. Select a proxy download server based on the first domain name and the full address.
[0066] In a specific example, the backend system checks if a proxy download server IP address corresponding to the full address exists in its cache. If such an IP address exists, a proxy download server corresponding to that IP address is randomly selected to download the e-invoice. If no such IP address exists, the system checks if a proxy download server domain name exists in its cache. If so, a proxy download server domain name is randomly selected to download the e-invoice. If no domain name exists in the cache, the cache for domain names and full addresses is initialized, a mapping relationship is established between all proxy download server IP addresses and domain names / full addresses, and then a proxy download server IP address is randomly selected from the cache to download the e-invoice. During the e-invoice download process on the proxy download server, if a download error occurs (e.g., a "domain unreachable" error), the corresponding proxy download server IP address is removed from the domain name / full address mapping. One of the remaining proxy IP addresses in the domain name / full address mapping is selected to attempt a re-download. If, after multiple attempts, all proxy download server IP addresses fail to download the e-invoice, a message indicating that the download is unsuccessful is sent.
[0067] In some examples, the company owning the proxy download server can set up a fixed vendor proxy IP address on the internet, and the vendor server corresponding to that vendor proxy IP address provides proxy services to the proxy download server. Alternatively, the company can set up multiple proxy IP addresses on the internet, each corresponding to a proxy download server. By selecting a suitable proxy IP address from among these multiple addresses as the vendor proxy IP address, the vendor server corresponding to that vendor proxy IP address can provide faster and more efficient proxy services to the proxy download server.
[0068] S40. Obtain the supplier's proxy IP address based on the proxy download server.
[0069] In one implementation, obtaining the supplier proxy IP address based on the proxy download server includes: determining the attribute information of the proxy download server; and selecting a supplier proxy IP address that matches the attribute information from a plurality of preset supplier proxy IP addresses.
[0070] The attribute information of the proxy download server may include at least one of the following: geographical information and carrier information. For example, geographical information may be a provincial, municipal, or district-level classification; carrier information may include one of the various carriers. For instance, the attribute information of the proxy download server may be determined to include: geographical information as province A, and carrier information as carrier B.
[0071] The geographical information of multiple preset supplier proxy IP addresses can cover the whole country, and the operator information can include multiple operators. The proxy download server can select one supplier proxy IP address with geographical information of province A and operator information of operator B from multiple preset supplier proxy IP addresses as the supplier proxy IP address that matches the attribute information.
[0072] If no proxy IP address with region information of province A and operator information of operator B can be found, the proxy download server can select the proxy IP address with operator information of operator B and region information closest to province A as the supplier proxy IP address that matches the attribute information.
[0073] In another implementation, obtaining the supplier proxy IP address based on the proxy download server includes: obtaining a preset IP address from the proxy download server; accessing the target server corresponding to the preset IP address; and receiving the supplier proxy IP address pushed by the target server.
[0074] In this embodiment, to facilitate the integration and access of the proxy download server, a preset IP address, such as tlm specialcast ip, can be set within the proxy download server. All proxy download servers across the network can access the server corresponding to this preset IP address.
[0075] After accessing the server corresponding to a preset IP address, the proxy download server can receive the supplier proxy IP address pushed by the server corresponding to the preset IP address. Upon receiving the access from the proxy download server, the server corresponding to the preset IP address can first determine the attribute information of the proxy download server, then select the supplier proxy IP address that matches the attribute information from a pool of preset proxy IP addresses, and push the supplier proxy IP address to the proxy download server.
[0076] The process of determining the attribute information of the proxy download server by the server corresponding to the preset IP address, and identifying the supplier proxy IP address that matches the attribute information from multiple preset proxy IP addresses, can reduce the processing steps of the proxy download server and improve operating efficiency.
[0077] S50. Using the proxy download server, an access request carrying the first domain name and the routing information is sent to the supplier server according to the supplier proxy IP address, so that the supplier server can obtain the electronic invoice corresponding to the routing information after receiving the access request, and send the electronic invoice to the proxy download server.
[0078] In one implementation, sending an access request carrying the first domain name and the routing information to the supplier server based on the supplier proxy IP address includes:
[0079] The supplier proxy IP address is inserted after the protocol information of the first URL information and before the first domain name to obtain the second URL information;
[0080] Construct the access request corresponding to the second URL information;
[0081] The access request is sent to the supplier server that has the supplier's proxy IP address.
[0082] The destination IP address of the access request is the provider's proxy IP address, and the request content is the first domain name and routing information of the first URL.
[0083] In one example, the first URL information is http: / / mnpq / user?id=201, where the protocol information is http: / / ; the first domain name is mnpq; and the routing information is / user?id=201.
[0084] Assuming the supplier's proxy IP address is 3.7.5.6, inserting the supplier's proxy IP address after the protocol information and before the first domain name in the first URL information results in the second URL information as: http: / / 3.7.5.6 / mnpq / user?id=201.
[0085] After receiving an access request, the supplier server can determine the second domain name corresponding to the first domain name, determine the IP address corresponding to the second domain name based on the Domain Name System (DNS) server in the network, access the IP address, obtain the electronic invoice corresponding to the routing information, and send the electronic invoice back to the agent download server.
[0086] S60. Receive the electronic invoice forwarded by the proxy download server and forward the electronic invoice to the user terminal.
[0087] The proxy download server forwards the electronic invoice sent by the supplier server to the proxy download server, which then forwards the electronic invoice to the backend server, which in turn forwards it to the user.
[0088] The electronic invoice acquisition method provided in this application extracts a first domain name, full address, and routing information from the electronic invoice acquisition request. Based on the first domain name and the full address, a proxy download server is selected. Based on the proxy download server, the supplier proxy IP address is obtained. Using the proxy download server, an access request carrying the first domain name and the routing information is sent to the supplier server according to the supplier proxy IP address. This allows the supplier server to obtain the electronic invoice corresponding to the routing information after receiving the access request, and send the electronic invoice to the proxy download server. The supplier server also receives the electronic invoice forwarded by the proxy download server and forwards the electronic invoice to the user terminal. This method enables more accurate access to the supplier server where the electronic invoice is located, greatly improving the accuracy of electronic invoice download, the success rate of electronic invoice acquisition, and the processing efficiency of reconciliation business. It solves the technical problem in related technologies where the inability to access the supplier server normally during reconciliation business processing leads to the inability to download electronic invoices, which seriously affects the processing of reconciliation business.
[0089] like Figure 3 As shown, another embodiment of this application provides an electronic invoice acquisition device, applied to a backend server, comprising:
[0090] The receiving module is used to receive electronic invoice download requests sent by the user terminal;
[0091] The extraction module is used to extract the first domain name, full address, and routing information from the electronic invoice retrieval request;
[0092] The selection module is used to select a proxy download server based on the first domain name and the full address;
[0093] The acquisition module is used to obtain the supplier's proxy IP address based on the proxy download server;
[0094] An access request sending module is used to send an access request carrying the first domain name and the routing information to the supplier server based on the supplier agent IP address using the proxy download server, so that the supplier server can obtain the electronic invoice corresponding to the routing information after receiving the access request and send the electronic invoice to the proxy download server.
[0095] The electronic invoice forwarding module is used to receive the electronic invoice forwarded by the agent download server and forward the electronic invoice to the user terminal.
[0096] In one implementation, the extraction module includes:
[0097] The first extraction unit is used to extract the first URL information from the electronic invoice retrieval request;
[0098] The second extraction unit is used to extract the first domain name, the full address, and the routing information from the first URL information.
[0099] In one implementation, the extraction of the first domain name, the full address, and the routing information from the first URL information performed by the second extraction unit includes:
[0100] The first URL information is parsed by using a parallel processing method and calling a preset parsing rule to obtain the first domain name, the full address, and the routing information.
[0101] In one implementation, the step of using a parallel processing method to parse the first URL information by invoking preset parsing rules to obtain the first domain name, the full address, and the routing information includes:
[0102] For the first URL information, the Map / Reduce parallel method is used to traverse the trie corresponding to each preset parsing rule in turn until the parsing result corresponding to the first URL information is generated. The parsing result includes the first domain name, the full address and the routing information.
[0103] In one implementation, the acquisition module may include:
[0104] A determining unit is used to determine the attribute information of the proxy download server;
[0105] The selection unit is used to select a supplier proxy IP address that matches the attribute information from a plurality of preset supplier proxy IP addresses.
[0106] In one implementation, the acquisition module may include:
[0107] A preset IP address acquisition unit is used to acquire a preset IP address from the proxy download server;
[0108] An access unit is used to access the target server corresponding to the preset IP address;
[0109] The supplier proxy IP address receiving unit is used to receive the supplier proxy IP address pushed by the target server.
[0110] In one implementation, sending an access request carrying the first domain name and the routing information to the supplier server based on the supplier proxy IP address includes:
[0111] The supplier proxy IP address is inserted after the protocol information of the first URL information and before the first domain name to obtain the second URL information;
[0112] Construct the access request corresponding to the second URL information;
[0113] The access request is sent to the supplier server that has the supplier's proxy IP address.
[0114] The electronic invoice acquisition device provided in this application extracts a first domain name, full address, and routing information from the electronic invoice acquisition request. Based on the first domain name and the full address, a proxy download server is selected. Based on the proxy download server, the supplier proxy IP address is obtained. Using the proxy download server, an access request carrying the first domain name and the routing information is sent to the supplier server according to the supplier proxy IP address. This allows the supplier server to obtain the electronic invoice corresponding to the routing information after receiving the access request, and send the electronic invoice to the proxy download server. The device also receives the electronic invoice forwarded by the proxy download server and forwards it to the user terminal. This device enables more accurate access to the supplier server where the electronic invoice is located, greatly improving the accuracy of electronic invoice download, the success rate of electronic invoice acquisition, and the processing efficiency of reconciliation business. It solves the technical problem in related technologies where the inability to access the supplier server normally during the processing of reconciliation business results in the inability to download electronic invoices, which seriously affects the processing of reconciliation business.
[0115] Another embodiment of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the electronic invoice acquisition method described in any of the above embodiments.
[0116] like Figure 4 As shown, the electronic device 10 may include: a processor 100, a memory 101, a bus 102 and a communication interface 103. The processor 100, the communication interface 103 and the memory 101 are connected through the bus 102. The memory 101 stores a computer program that can run on the processor 100. When the processor 100 runs the computer program, it executes the method provided in any of the foregoing embodiments of this application.
[0117] The memory 101 may include high-speed random access memory (RAM), and may also include non-volatile memory, such as at least one disk storage device. Communication between this system network element and at least one other network element is achieved through at least one communication interface 103 (which can be wired or wireless), such as the Internet, wide area network, local area network, metropolitan area network, etc.
[0118] Bus 102 can be an ISA bus, PCI bus, or EISA bus, etc. The bus can be divided into address bus, data bus, control bus, etc. Memory 101 is used to store programs. After receiving an execution instruction, processor 100 executes the program. The methods disclosed in any of the foregoing embodiments of this application can be applied to processor 100, or implemented by processor 100.
[0119] Processor 100 may be an integrated circuit chip with signal processing capabilities. In implementation, each step of the above method can be completed by the integrated logic circuitry in the hardware of processor 100 or by instructions in software form. The processor 100 may be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it may also be a Digital Signal Processor (DSP), an Application-Specific Integrated Circuit (ASIC), an Off-the-shelf Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor may be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly embodied in the execution of a hardware decoding processor, or executed by a combination of hardware and software modules in the decoding processor. The software modules may reside in random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, registers, or other mature storage media in the art. The storage medium is located in memory 101. The processor 100 reads the information in memory 101 and, in conjunction with its hardware, completes the steps of the above method.
[0120] The electronic devices and methods provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods they employ, operate, or implement.
[0121] Another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which is executed by a processor to implement the electronic invoice acquisition method described in any of the above embodiments. Reference Figure 5 As shown, the computer-readable storage medium is an optical disc 20, on which a computer program (i.e., a program product) is stored. When the computer program is run by a processor, it executes the methods provided in any of the aforementioned embodiments.
[0122] It should be noted that examples of computer-readable storage media may also 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 optical and magnetic storage media, which will not be elaborated here.
[0123] The computer-readable storage medium provided in the above embodiments of this application and the method provided in the embodiments of this application are based on the same inventive concept and have the same beneficial effects as the methods adopted, run or implemented by the applications stored therein.
[0124] It should be noted that:
[0125] The term "module" is not intended to be limited to a specific physical form. Depending on the application, a module can be implemented as hardware, firmware, software, and / or a combination thereof. Furthermore, different modules may share common components or even be implemented using the same components. Clear boundaries may or may not exist between different modules.
[0126] The algorithms and displays provided herein are not inherently related to any particular computer, virtual device, or other equipment. Various general-purpose devices can also be used with the examples based on this. The required structure for constructing such devices is obvious from the above description. Furthermore, this application is not directed to any particular programming language. It should be understood that the content of this application described herein can be implemented using various programming languages, and the above description of specific languages is for the purpose of disclosing the best mode of implementation of this application.
[0127] It should be understood that although the steps in the flowcharts of the accompanying figures are shown sequentially as indicated by the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the accompanying figures may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily completed at the same time, but can be executed at different times, and their execution order is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the sub-steps or stages of other steps.
[0128] The embodiments described above merely illustrate the implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A method for obtaining electronic invoices, characterized in that, include: Receive electronic invoice download requests sent by the user client; Extract the first domain name, full address, and routing information from the electronic invoice retrieval request; Based on the first domain name and the full address, a proxy download server is selected; Obtain the supplier's proxy IP address based on the aforementioned proxy download server; Using the proxy download server, an access request carrying the first domain name and the routing information is sent to the supplier server according to the supplier proxy IP address, so that the supplier server can obtain the electronic invoice corresponding to the routing information after receiving the access request and send the electronic invoice to the proxy download server; if a download error occurs during the electronic invoice download process of the proxy download server, the IP address of the proxy download server is deleted from the mapping value between the first domain name and the full address; Receive the electronic invoice forwarded by the proxy download server and forward the electronic invoice to the user terminal.
2. The method according to claim 1, characterized in that, The step of extracting the first domain name, full address, and routing information from the electronic invoice retrieval request includes: Extract the first URL information from the electronic invoice retrieval request; Extract the first domain name, the full address, and the routing information from the first URL information.
3. The method according to claim 2, characterized in that, The step of extracting the first domain name, the full address, and the routing information from the first URL information includes: The first URL information is parsed by using a parallel processing method and calling a preset parsing rule to obtain the first domain name, the full address, and the routing information.
4. The method according to claim 3, characterized in that, The method of using parallel processing to parse the first URL information by invoking preset parsing rules to obtain the first domain name, the full address, and the routing information includes: For the first URL information, the Map / Reduce parallel method is used to traverse the trie corresponding to each preset parsing rule in turn until the parsing result corresponding to the first URL information is generated. The parsing result includes the first domain name, the full address and the routing information.
5. The method according to claim 1, characterized in that, The step of obtaining the supplier's proxy IP address based on the proxy download server includes: Determine the attribute information of the proxy download server; Select a supplier proxy IP address that matches the attribute information from a plurality of preset supplier proxy IP addresses.
6. The method according to claim 1, characterized in that, The step of obtaining the supplier's proxy IP address based on the proxy download server includes: Obtain a preset IP address from the proxy download server; Access the target server corresponding to the preset IP address; Receive the supplier proxy IP address pushed by the target server.
7. The method according to claim 2, characterized in that, The step of sending an access request carrying the first domain name and the routing information to the supplier server based on the supplier proxy IP address includes: The supplier proxy IP address is inserted after the protocol information of the first URL information and before the first domain name to obtain the second URL information; Construct the access request corresponding to the second URL information; The access request is sent to the supplier server that has the supplier's proxy IP address.
8. An electronic invoice acquisition device, characterized in that, include: The receiving module is used to receive electronic invoice download requests sent by the user terminal; The extraction module is used to extract the first domain name, full address, and routing information from the electronic invoice retrieval request; The selection module is used to select a proxy download server based on the first domain name and the full address; The acquisition module is used to obtain the supplier's proxy IP address based on the proxy download server; An access request sending module is used to send an access request carrying the first domain name and the routing information to the supplier server based on the supplier agent IP address using the proxy download server, so that the supplier server can obtain the electronic invoice corresponding to the routing information after receiving the access request and send the electronic invoice to the proxy download server; if a download error occurs during the electronic invoice download process of the proxy download server, the IP address of the proxy download server is deleted from the mapping value between the first domain name and the full address; The electronic invoice forwarding module is used to receive the electronic invoice forwarded by the agent download server and forward the electronic invoice to the user terminal.
9. An electronic device, characterized in that, The device includes a memory, a processor, and a computer program stored in the memory and executable on the processor, the processor executing the program to implement the electronic invoice acquisition method as described in any one of claims 1-7.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that, The program is executed by the processor to implement the electronic invoice acquisition method as described in any one of claims 1-7.
Citation Information
Patent Citations
Method for generating electronic invoice download link and server
CN106651477A
Method and system for analyzing URL address
CN107257390A
Network data access method and device and electronic equipment
CN109787951A