Webpage data acquisition method and device, target terminal and storage medium

The method and device enhance invoice verification by automatically displaying both invoice and goods detail information on the same page, addressing the need for multiple screenshots and enhancing user experience.

CN119179821AActive Publication Date: 2024-12-24SHENZHEN QIANHAI HUANRONG LIANYI INFORMATION TECHNOLOGY SERVICES CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202411242907.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-05
Publication Date
2024-12-24
Estimated Expiration
2044-09-05

AI Technical Summary

Technical Problem

Traditional automated invoice verification systems require users to take multiple screenshots to view complete invoice information, including invoice and goods detail information, which affects user experience.

Method used

A method and device that automatically detect the presence of a goods detail button in the invoice verification result page, adjust display parameters to include both invoice and goods detail information on the same page, and generate a long screenshot or PDF for simultaneous viewing.

Benefits of technology

Enables users to view complete invoice information without the need for multiple screenshots, improving user experience by providing seamless access to both invoice and goods detail information.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119179821A_ABST
    Figure CN119179821A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses a webpage data acquisition method and device, a target terminal and a storage medium. The method comprises the steps that in response to an invoice checking request for a target invoice, an invoice checking result page of the target invoice is displayed, and the invoice checking result page comprises invoice information; a cargo detail button in the invoice checking result page is clicked, a cargo detail window corresponding to the target invoice is displayed, window position parameters are obtained, and the cargo detail window comprises cargo detail information; current page display parameters are adjusted according to the window position parameters and the result page position parameters, so that the current display page of the target terminal displays an invoice checking result page and a cargo detail window at the same time; and obtaining page display information corresponding to the current display page. The page display information obtained by implementing the method provided by the embodiment of the invention comprises the invoice information and the cargo detail information at the same time, so that a user can conveniently check the complete information of the invoice, and the user experience is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of data processing technology, and in particular to a method, device, target terminal and storage medium for acquiring web page data. Background Art

[0002] The invoice verification results of the existing invoice verification system can be displayed in one of the following two ways. First, the invoice information and the corresponding goods detail information are displayed on the invoice verification result page; second, the invoice verification result page displays the invoice information, and the specific goods detail information is hidden in the goods detail button on the invoice verification result page.

[0003] Traditional automated invoice verification technology usually only takes a simple screenshot of the invoice verification result. For the second type of invoice verification result, it is necessary to click the goods details button to make the page display the goods details before taking another screenshot. At this time, the user needs to view two screenshots to obtain the complete information of the invoice, which affects the user experience. Summary of the invention

[0004] The embodiments of the present application provide a method, device, target terminal and storage medium for obtaining web page data, which can enable the obtained page display information (long screenshot or PDF) to include invoice information and goods detail information at the same time, making it convenient for users to view the complete information of the invoice, thereby improving the user experience.

[0005] In a first aspect, an embodiment of the present application provides a method for acquiring webpage data, the method being applied to a target terminal, the method comprising:

[0006] In response to an invoice verification request for a target invoice, displaying an invoice verification result page for the target invoice, the invoice verification result page including invoice information;

[0007] Detecting whether there is a goods details button on the invoice verification result page;

[0008] If the goods detail button exists, click the goods detail button to display the goods detail window corresponding to the target invoice to obtain the window position parameter corresponding to the goods detail window, wherein the goods detail window includes goods detail information;

[0009] Adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal simultaneously displays the invoice verification result page and the goods detail window;

[0010] The page display information corresponding to the currently displayed page is obtained, wherein the page display information includes the invoice information and the goods detail information.

[0011] In a second aspect, an embodiment of the present application further provides a device for acquiring web page data, wherein the device for acquiring web page data is deployed in a target terminal and comprises:

[0012] A sending and receiving unit, used to obtain an invoice verification request of a target invoice;

[0013] A processing unit is used to respond to an invoice verification request for a target invoice, display an invoice verification result page of the target invoice, and the invoice verification result page includes invoice information; detect whether there is a goods detail button in the invoice verification result page; if the goods detail button exists, click the goods detail button to display a goods detail window corresponding to the target invoice, so as to obtain a window position parameter corresponding to the goods detail window, and the goods detail window includes goods detail information; adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal displays the invoice verification result page and the goods detail window at the same time; obtain the page display information corresponding to the current display page, and the page display information includes the invoice information and the goods detail information.

[0014] In a third aspect, an embodiment of the present application further provides a target terminal, which includes a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the above method when executing the computer program.

[0015] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, wherein the storage medium stores a computer program, wherein the computer program includes program instructions, and wherein the program instructions can implement the above method when executed by a processor.

[0016] The embodiment of the present application provides a method, device, target terminal and storage medium for obtaining web page data. The method includes: in response to an invoice verification request for a target invoice, displaying an invoice verification result page of the target invoice, wherein the invoice verification result page includes invoice information; detecting whether there is a goods detail button in the invoice verification result page; if there is a goods detail button, clicking the goods detail button to display a goods detail window corresponding to the target invoice, so as to obtain a window position parameter corresponding to the goods detail window, wherein the goods detail window includes goods detail information; adjusting the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal simultaneously displays the invoice verification result page and the goods detail window; obtaining the page display information corresponding to the current display page, wherein the page display information includes the invoice information and the goods detail information. In the embodiment of the present application, when it is detected that a goods details window is hidden in the invoice verification result page, the window position parameters corresponding to the goods details window are automatically obtained, and the current page display parameters are adjusted according to the window position parameters and the result page position parameters, so that the current display page simultaneously displays the invoice verification result page and the goods details window, and the page display information (long screenshot or PDF) obtained through the current display page includes both the invoice information and the goods details information, which makes it convenient for users to view the complete information of the invoice, thereby improving the user experience. BRIEF DESCRIPTION OF THE DRAWINGS

[0017] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0018] Figure 1 A flowchart of a method for acquiring web page data provided in an embodiment of the present application;

[0019] Figure 2 A flowchart of a method for acquiring web page data provided by another embodiment of the present application;

[0020] Figure 3 A schematic block diagram of a device for acquiring web page data provided in an embodiment of the present application;

[0021] Figure 4 A schematic block diagram of a target terminal provided in an embodiment of the present application. DETAILED DESCRIPTION

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

[0023] It should be understood that when used in this specification and the appended claims, the terms "include" and "comprises" indicate the presence of described features, integers, steps, operations, elements and / or components, but do not exclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or combinations thereof.

[0024] It should also be understood that the terms used in this application specification are only for the purpose of describing specific embodiments and are not intended to limit the application. As used in this application specification and the appended claims, unless the context clearly indicates otherwise, the singular forms "a", "an" and "the" are intended to include plural forms.

[0025] It should be further understood that the term “and / or” used in the specification and appended claims refers to any combination and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0026] The embodiments of the present application provide a method, device, target terminal and storage medium for acquiring web page data.

[0027] The executor of the web page data acquisition method may be the web page data acquisition device provided in the embodiment of the present application, or a target terminal integrated with the web page data acquisition device, wherein the web page data acquisition device may be implemented in hardware or software, and the target terminal may be a smart phone, tablet computer, PDA, or laptop computer, etc.

[0028] Figure 1 FIG. 1 is a flow chart of a method for obtaining web page data provided in an embodiment of the present application. Figure 1 As shown, the method includes the following steps S110-S150.

[0029] S110. In response to an invoice verification request for a target invoice, an invoice verification result page of the target invoice is displayed, wherein the invoice verification result page includes invoice information.

[0030] Specifically, the invoice verification request is used to request the invoice verification information of the target invoice from the invoice verification system. When the target terminal obtains the invoice verification request for the target invoice, it automatically accesses the website corresponding to the invoice verification system through Selenium, and automatically enters the invoice identification of the target invoice in the invoice information input window corresponding to the invoice verification system, where the invoice identification includes the invoice code and / or invoice number; then the invoice verification system returns the page information of the invoice verification result page to the target terminal, and at this time, the target terminal displays the invoice verification result page based on the page information.

[0031] S120, detecting whether there is a goods details button in the invoice verification result page; if so, executing step S130, if not, executing step S150.

[0032] Since the invoice verification system provides two display pages for invoice verification results, in the first type, both the invoice information and the corresponding goods detail information are displayed on the invoice verification result page; in the second type, the invoice verification result page displays the invoice information, while the specific goods detail information is hidden in the goods detail button on the invoice verification result page.

[0033] If it is the first display page, there is no need to reorganize the page data and execute step S150. If it is the second display page, it is necessary to reorganize the page data through steps S130-S140 and then execute step S150 to ensure that the invoice information and the goods detail information can be displayed simultaneously on the same display page.

[0034] Specifically, this embodiment can determine whether there is a goods details button in the invoice verification result page by detecting whether there is a characteristic value of the goods details button in the page source code. For example, the button text of each button in the detection page source code is obtained. If there is a button text of "View the goods details list", it is determined that there is a goods details button in the invoice verification result page. Otherwise, it is determined that there is no goods details button in the invoice verification result page.

[0035] Among them, if there is a goods details button in the invoice verification result page, it means that the current invoice verification result page does not display the goods details information. If there is no goods details button, it means that the current invoice verification result page displays both invoice information and goods details information.

[0036] S130. Click the goods detail button to display the goods detail window corresponding to the target invoice to obtain the window position parameters corresponding to the goods detail window, wherein the goods detail window includes goods detail information.

[0037] In this embodiment, in order to determine the window position parameters corresponding to the goods details window, it is first necessary to simulate clicking the goods details button through Selenium, wait for the web page to load the goods details window, and then the target terminal determines the window position parameters corresponding to the goods details window through the current page display parameters.

[0038] S140. Adjust the current page display parameters according to the window position parameters and the result page position parameters corresponding to the invoice verification result page, so that the current display page of the target terminal displays the invoice verification result page and the goods detail window at the same time.

[0039] In this embodiment, in order to display the invoice information and the goods detail information simultaneously in the current display page so that the user can obtain these two pieces of information simultaneously through a long screenshot or PDF, it is necessary to reorganize the web page data and adjust the current page display parameters.

[0040] For example, the goods details window is originally displayed in front of the invoice verification result page, blocking the invoice verification result page; by adjusting the window position parameters, the goods details window and the invoice verification result page are displayed simultaneously, and simultaneous display means that the goods details window does not block the invoice verification result page. For example, by adjusting the window position parameters and the recognition result page position parameters, in the page source code of the currently displayed page, the window position parameters are spliced ​​to the position above or below (bottom) of the recognition result page position parameters, so that in the currently displayed page of the target terminal, the goods details window is displayed above or below the invoice verification result page.

[0041] In some embodiments, step S140 includes: obtaining the result page position parameter; splicing the window position parameter at the bottom of the result page position parameter to adjust the current page display parameter.

[0042] Specifically, after determining the window position parameters corresponding to the goods details window, the preset js statement is executed through Selenium to adjust the window position parameters (top parameters) of the goods details window, and the window position parameters are spliced ​​at the bottom of the page parameters corresponding to the invoice inspection results to complete the adjustment of the current page display parameters, thereby realizing intelligent recognition and reorganization of web page data.

[0043] It can be seen that in this embodiment, by automatically splicing the window position parameters at the bottom of the invoice display position parameters, the web page data of the target terminal display page is reorganized, so that the invoice information and the goods detail information are displayed at the same time in the current display page, and the goods detail information is displayed at the bottom of the invoice information for user viewing.

[0044] S150. Obtain page display information corresponding to the currently displayed page, wherein the page display information includes the invoice information and the goods detail information.

[0045] In this embodiment, after adjusting the current page display parameters of the target terminal, in the current display page, the goods detail window is spliced ​​at the bottom of the invoice verification result page, thereby achieving the simultaneous acquisition of invoice information and the goods detail information on the same page.

[0046] Among them, when the invoice verification result page returned by the invoice verification system already includes invoice information and corresponding goods detail information, the invoice verification result page does not include a goods detail button, and the currently displayed page is the invoice verification result page.

[0047] In some embodiments, after acquiring the page display information corresponding to the currently displayed page, the method further includes:

[0048] The page display information is sent to a remote server; a request for obtaining an invoice verification result of the target invoice is sent to the remote server; and the page display information is received from the remote server based on the request for obtaining the invoice verification result.

[0049] It can be seen that through this embodiment, the acquired page display information can be sent to the remote server, so that the user can obtain the corresponding information anytime and anywhere through different terminals. When the user needs to obtain the page display information, the user requests the corresponding page display information from the remote server.

[0050] In addition, in some embodiments, after obtaining the page display information corresponding to the currently displayed page, the page display information may also be stored locally.

[0051] In some embodiments, before displaying the invoice verification result page of the target invoice in response to the invoice verification request for the target invoice, the method further includes:

[0052] Obtaining a total invoice verification request for a plurality of invoices to be checked; determining the target invoice from the plurality of invoices to be checked; triggering the invoice verification request for the target invoice; after obtaining the page display information corresponding to the currently displayed page, the method further comprises: updating an unprocessed invoice to be checked among the plurality of invoices to be checked to the target invoice, and returning to the step of executing the invoice verification request triggering the target invoice, until the plurality of invoices to be checked are all processed.

[0053] It can be seen that, through this embodiment, one invoice verification general request can trigger invoice verification operations for multiple invoices to be verified, thereby improving the efficiency of invoice verification.

[0054] To summarize, the embodiment of the present application automatically obtains the window position parameters corresponding to the goods details window when it detects that a goods details window is hidden in the invoice verification result page, and adjusts the current page display parameters according to the window position parameters and the result page position parameters, so that the current display page simultaneously displays the invoice verification result page and the goods details window, and the page display information (long screenshot or PDF) obtained through the current display page includes both invoice information and goods details information, which makes it convenient for users to view the complete information of the invoice, thereby improving the user experience.

[0055] Figure 2 FIG. 1 is a flow chart of a method for obtaining web page data provided by another embodiment of the present application. Figure 2 As shown, the method for acquiring web page data in this embodiment includes steps S210-S270.

[0056] S210. In response to an invoice verification request for a target invoice, an invoice verification result page of the target invoice is displayed, wherein the invoice verification result page includes invoice information.

[0057] S220, detecting whether there is a goods details button in the invoice verification result page, if so, executing step S230, if not, executing step S250.

[0058] S230. Click the goods detail button to display the goods detail window corresponding to the target invoice to obtain the window position parameters corresponding to the goods detail window, wherein the goods detail window includes goods detail information.

[0059] S240. Adjust the current page display parameters according to the window position parameters and the result page position parameters corresponding to the invoice verification result page, so that the current display page of the target terminal displays the invoice verification result page and the goods detail window at the same time.

[0060] Among them, steps S210-S240 are similar to steps S110-140 in the above embodiment and are not repeated here.

[0061] S250. Determine whether the number of goods details in the goods detail information is greater than a preset threshold; if so, execute step S270; if not, execute step S260.

[0062] In this embodiment, for invoices with a large number of goods details, taking a long screenshot of the page may easily cause the browser to crash due to the excessive length of the web page content, affecting the inspection efficiency, and may consume precious inspection times due to multiple inspections.

[0063] To this end, the present application sets different methods for obtaining page display information according to the number of goods details. Specifically, a number of goods details is set, for example 1000. At this time, if the number of goods details in the goods details information in the goods details window exceeds 1000, it is determined that the current web page content is too long. In order to avoid the browser crash caused by the excessive length of the web page content, at this time, through step S270, the current display page is converted to PDF to obtain the page display information corresponding to the current display page; if the number of goods details in the goods details in the goods details window does not exceed 1000, at this time, through step S260, the page display information corresponding to the current display page is obtained through a long screenshot.

[0064] S260: Perform long screenshot processing on the currently displayed page to obtain a target long screenshot including the invoice information and the goods detail information.

[0065] Specifically, if the number of goods details in the goods detail information is less than or equal to the preset threshold, at this time, the page display information corresponding to the current display page is obtained through the long screenshot. In some embodiments, Selenium obtains the target long screenshot through the following steps:

[0066] The screen parameters of the target terminal are obtained; the currently displayed page is adaptively scaled according to the screen parameters to obtain an adaptive page; and the adaptive page is long-shot processed to obtain the target long-shot.

[0067] It can be seen that this embodiment can automatically scale the length and width of the page by adaptively scaling the currently displayed page to display all the information on the page, thereby ensuring the integrity of the content of the page to be screenshotted. In addition, compared with screenshots that are continuously spliced ​​by scrolling, long screenshots will not have repeated content, restoring the real website access experience and facilitating user browsing.

[0068] S270. Perform PDF conversion processing on the currently displayed page according to the page source code of the currently displayed page to obtain a target PDF containing the invoice information and the goods detail information.

[0069] Specifically, if the number of goods details in the goods detail information is greater than a preset threshold, at this time, it is necessary to obtain the page display information corresponding to the current display page by performing PDF conversion on the current display page. In some embodiments, the target PDF is obtained by the following steps:

[0070] The CSS file access path in the page source code is adjusted to an absolute path to obtain a processed web page source code; and the processed web page source code is converted into the target PDF through a preset PDF conversion tool.

[0071] Among them, the preset PDF conversion tool is wkhtmltopdf (an HTML to PDF tool). Before performing PDF conversion, this embodiment first adjusts the css file access path in the page source code to an absolute path, thereby ensuring that the converted target PDF can retain the original style of the website and improve the user experience.

[0072] In some embodiments, after acquiring the page display information corresponding to the currently displayed page, the method further includes:

[0073] The page display information is sent to a remote server; a request for obtaining an invoice verification result of the target invoice is sent to the remote server; and the page display information is received from the remote server based on the request for obtaining the invoice verification result.

[0074] It can be seen that through this embodiment, the acquired page display information can be sent to the remote server, so that the user can obtain the corresponding information anytime and anywhere through different terminals. When the user needs to obtain the page display information, the user requests the corresponding page display information from the remote server.

[0075] In addition, in some embodiments, after obtaining the page display information corresponding to the currently displayed page, the page display information may also be stored locally.

[0076] In some embodiments, before displaying the invoice verification result page of the target invoice in response to the invoice verification request for the target invoice, the method further includes:

[0077] Obtaining a total invoice verification request for a plurality of invoices to be checked; determining the target invoice from the plurality of invoices to be checked; triggering the invoice verification request for the target invoice; after obtaining the page display information corresponding to the currently displayed page, the method further comprises: updating an unprocessed invoice to be checked among the plurality of invoices to be checked to the target invoice, and returning to the step of executing the invoice verification request triggering the target invoice, until the plurality of invoices to be checked are all processed.

[0078] It can be seen that, through this embodiment, one invoice verification general request can trigger invoice verification operations for multiple invoices to be verified, thereby improving the efficiency of invoice verification.

[0079] To summarize, the embodiment of the present application automatically obtains the window position parameters corresponding to the goods details window when it detects that a goods details window is hidden in the invoice verification result page, and adjusts the current page display parameters according to the window position parameters and the result page position parameters, so that the current display page simultaneously displays the invoice verification result page and the goods details window, and the page display information (long screenshot or PDF) obtained through the current display page includes both invoice information and goods details information, which makes it convenient for users to view the complete information of the invoice, thereby improving the user experience.

[0080] Figure 3 is a schematic block diagram of a webpage data acquisition device 300 provided in an embodiment of the present application. Figure 3 As shown, corresponding to the above webpage data acquisition method, the present application also provides a webpage data acquisition device 300. The webpage data acquisition device 300 includes a unit for executing the above webpage data acquisition method, and the webpage data acquisition device 300 can be configured in a terminal such as a desktop computer, a tablet computer, a laptop computer, etc. Figure 3 The webpage data acquisition device 300 includes a transceiver unit 301 and a processing unit 302 .

[0081] The transceiver unit 301 is used to obtain an invoice verification request of a target invoice;

[0082] The processing unit 302 is used to respond to an invoice verification request for a target invoice, display an invoice verification result page of the target invoice, and the invoice verification result page includes invoice information; detect whether there is a goods detail button in the invoice verification result page; if the goods detail button exists, click the goods detail button to display a goods detail window corresponding to the target invoice, so as to obtain a window position parameter corresponding to the goods detail window, and the goods detail window includes goods detail information; adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal displays the invoice verification result page and the goods detail window at the same time; obtain the page display information corresponding to the current display page, and the page display information includes the invoice information and the goods detail information.

[0083] In some embodiments, when executing the step of obtaining the page display information corresponding to the currently displayed page, the processing unit 302 is specifically configured to:

[0084] Determine whether the number of goods details in the goods detail information is greater than a preset threshold; if it is less than or equal to the preset threshold, perform long screenshot processing on the current display page to obtain a target long screenshot containing the invoice information and the goods detail information; if it is greater than the preset threshold, perform PDF conversion processing on the current display page according to the page source code of the current display page to obtain a target PDF containing the invoice information and the goods detail information.

[0085] In some embodiments, when the processing unit 302 performs the step of taking a long screenshot of the currently displayed page to obtain a target long screenshot including the invoice information and the goods detail information, it is specifically configured to:

[0086] The screen parameters of the target terminal are obtained; the currently displayed page is adaptively scaled according to the screen parameters to obtain an adaptive page; and the adaptive page is long-shot processed to obtain the target long-shot.

[0087] In some embodiments, when the processing unit 302 performs the step of converting the currently displayed page into a PDF according to the page source code of the currently displayed page to obtain a target PDF containing the invoice information and the goods detail information, it is specifically used to:

[0088] The CSS file access path in the page source code is adjusted to an absolute path to obtain a processed web page source code; and the processed web page source code is converted into the target PDF through a preset PDF conversion tool.

[0089] In some embodiments, when the processing unit 302 performs the step of adjusting the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, it is specifically used to:

[0090] Acquire the result page position parameter; splice the window position parameter at the bottom of the result page position parameter to adjust the current page display parameter.

[0091] In some embodiments, after the processing unit 302 executes the step of acquiring the page display information corresponding to the currently displayed page, the transceiver unit 301 is further configured to:

[0092] The page display information is sent to a remote server; a request for obtaining an invoice verification result of the target invoice is sent to the remote server; and the page display information is received from the remote server based on the request for obtaining the invoice verification result.

[0093] In some embodiments, before executing the step of displaying the invoice verification result page of the target invoice in response to the invoice verification request for the target invoice, the processing unit 302 is further configured to:

[0094] Obtaining, through the transceiver unit 301, a total invoice verification request for a plurality of invoices to be verified; determining the target invoice from the plurality of invoices to be verified; and triggering an invoice verification request for the target invoice;

[0095] At this time, after executing the step of acquiring the page display information corresponding to the currently displayed page, the processing unit 302 is further configured to:

[0096] An unprocessed invoice to be checked among the multiple invoices to be checked is updated to the target invoice, and the step of triggering the invoice verification request of the target invoice is returned to execute until the multiple invoices to be checked are all processed.

[0097] To summarize, when the web page data acquisition device 300 in the embodiment of the present application detects that a goods details window is hidden in the invoice verification result page, it automatically obtains the window position parameters corresponding to the goods details window, and adjusts the current page display parameters according to the window position parameters and the result page position parameters, so that the current display page displays the invoice verification result page and the goods details window at the same time, and the page display information (long screenshot or PDF) obtained through the current display page includes both invoice information and goods details information, which is convenient for users to view the complete information of the invoice, thereby improving user experience.

[0098] It should be noted that those skilled in the art can clearly understand that the specific implementation process of the above-mentioned web page data acquisition device and each unit can refer to the corresponding description in the aforementioned method embodiment, and for the convenience and brevity of description, it will not be repeated here.

[0099] The webpage data acquisition device can be implemented in the form of a computer program. Figure 4 Run on the target terminal shown.

[0100] See also Figure 4 , Figure 4 is a schematic block diagram of a target terminal provided in an embodiment of the present application, wherein the target terminal may be an electronic device having communication and display functions, such as a smart phone, a tablet computer, a laptop computer, or a desktop computer.

[0101] See also Figure 4 The target terminal 400 includes a processor 402 , a memory and a network interface 405 connected via a system bus 401 , wherein the memory may include a non-volatile storage medium 403 and an internal memory 404 .

[0102] The non-volatile storage medium 403 can store an operating system 4031 and a computer program 4032. The computer program 4032 includes program instructions, and when the program instructions are executed, the processor 402 can execute a method for acquiring web page data.

[0103] The processor 402 is used to provide computing and control capabilities to support the operation of the entire target terminal 400 .

[0104] The internal memory 404 provides an environment for the operation of the computer program 4032 in the non-volatile storage medium 403. When the computer program 4032 is executed by the processor 402, the processor 402 can execute a method for obtaining web page data.

[0105] The network interface 405 is used to communicate with other devices over the network. Figure 4 The structure shown in the figure is merely a block diagram of a partial structure related to the scheme of the present application, and does not constitute a limitation on the target terminal 400 to which the scheme of the present application is applied. The specific target terminal 400 may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0106] The processor 402 is used to run the computer program 4032 stored in the memory to implement the following steps:

[0107] In response to an invoice verification request for a target invoice, displaying an invoice verification result page for the target invoice, the invoice verification result page including invoice information;

[0108] Detecting whether there is a goods details button on the invoice verification result page;

[0109] If the goods detail button exists, click the goods detail button to display the goods detail window corresponding to the target invoice to obtain the window position parameter corresponding to the goods detail window, wherein the goods detail window includes goods detail information;

[0110] Adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal simultaneously displays the invoice verification result page and the goods detail window;

[0111] The page display information corresponding to the currently displayed page is obtained, wherein the page display information includes the invoice information and the goods detail information.

[0112] It should be understood that in the embodiment of the present application, the processor 402 may be a central processing unit (CPU), and the processor 402 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. Among them, the general-purpose processor may be a microprocessor or the processor may also be any conventional processor, etc.

[0113] It can be understood by those skilled in the art that all or part of the processes in the method for implementing the above embodiment can be completed by instructing the relevant hardware through a computer program. The computer program includes program instructions, and the computer program can be stored in a storage medium, which is a computer-readable storage medium. The program instructions are executed by at least one processor in the computer system to implement the process steps of the embodiment of the above method.

[0114] Therefore, the present application also provides a storage medium. The storage medium may be a computer-readable storage medium. The storage medium stores a computer program, wherein the computer program includes program instructions. When the program instructions are executed by a processor, the processor executes the following steps:

[0115] In response to an invoice verification request for a target invoice, displaying an invoice verification result page for the target invoice, the invoice verification result page including invoice information;

[0116] Detecting whether there is a goods details button on the invoice verification result page;

[0117] If the goods detail button exists, click the goods detail button to display the goods detail window corresponding to the target invoice to obtain the window position parameter corresponding to the goods detail window, wherein the goods detail window includes goods detail information;

[0118] Adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal simultaneously displays the invoice verification result page and the goods detail window;

[0119] The page display information corresponding to the currently displayed page is obtained, wherein the page display information includes the invoice information and the goods detail information.

[0120] The storage medium may be a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk, etc., which are computer-readable storage media that can store program codes.

[0121] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0122] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of each unit is only a logical function division, and there may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed.

[0123] The steps in the method of the embodiment of the present application can be adjusted in order, combined and deleted according to actual needs. The units in the device of the embodiment of the present application can be combined, divided and deleted according to actual needs. In addition, the functional units in the various embodiments of the present application can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.

[0124] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a storage medium. Based on this understanding, the technical solution of the present application is essentially or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, terminal, or network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present application.

[0125] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed in the present application, and these modifications or replacements should be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.

Claims

1. A method for acquiring web page data, characterized in that: The method is applied to a target terminal, and the method comprises: In response to an invoice verification request for a target invoice, displaying an invoice verification result page for the target invoice, the invoice verification result page including invoice information; Detecting whether there is a goods details button on the invoice verification result page; If the goods detail button exists, click the goods detail button to display the goods detail window corresponding to the target invoice to obtain the window position parameter corresponding to the goods detail window, wherein the goods detail window includes goods detail information; Adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal simultaneously displays the invoice verification result page and the goods detail window; The page display information corresponding to the currently displayed page is obtained, wherein the page display information includes the invoice information and the goods detail information.

2. The method according to claim 1, characterized in that The acquiring the page display information corresponding to the currently displayed page includes: Determine whether the number of goods details in the goods detail information is greater than a preset threshold; If it is less than or equal to the preset threshold, a long screenshot is processed on the currently displayed page to obtain a target long screenshot including the invoice information and the detailed information of the goods; If it is greater than the preset threshold, the current displayed page is converted into PDF according to the page source code of the current displayed page to obtain a target PDF containing the invoice information and the goods detail information.

3. The method according to claim 2, characterized in that The long screenshot processing of the currently displayed page to obtain a target long screenshot containing the invoice information and the goods detail information includes: Acquiring screen parameters of the target terminal; Adaptively scaling the currently displayed page according to the screen parameters to obtain an adaptive page; The adaptive page is processed into a long screenshot to obtain the target long screenshot.

4. The method according to claim 2, characterized in that: The step of converting the currently displayed page into PDF according to the page source code of the currently displayed page to obtain a target PDF containing the invoice information and the goods detail information includes: Adjust the CSS file access path in the page source code to an absolute path to obtain the processed web page source code; The processed web page source code is converted into the target PDF through a preset PDF conversion tool.

5. The method according to claim 1, characterized in that: The adjusting the current page display parameters according to the window position parameters and the result page position parameters corresponding to the invoice verification result page includes: Obtaining the result page position parameter; The window position parameters are spliced ​​at the bottom of the result page position parameters to adjust the current page display parameters.

6. The method according to claim 1, characterized in that After acquiring the page display information corresponding to the currently displayed page, the method further includes: Sending the page display information to a remote server; Sending an invoice verification result acquisition request of the target invoice to the remote server; Receive the page display information returned by the remote server based on the invoice verification result acquisition request.

7. The method according to any one of claims 1 to 6, characterized in that Before displaying the invoice verification result page of the target invoice in response to the invoice verification request for the target invoice, the method further includes: Get the total invoice verification request for multiple invoices to be verified; Determining the target invoice from the plurality of invoices to be checked; triggering an invoice verification request for the target invoice; After acquiring the page display information corresponding to the currently displayed page, the method further includes: An unprocessed invoice to be checked among the multiple invoices to be checked is updated to the target invoice, and the step of triggering the invoice verification request of the target invoice is returned to execute until the multiple invoices to be checked are all processed.

8. A device for acquiring web page data, characterized in that: The webpage data acquisition device is deployed on the target terminal and includes: A sending and receiving unit, used to obtain an invoice verification request of a target invoice; A processing unit is used to respond to an invoice verification request for a target invoice, display an invoice verification result page of the target invoice, and the invoice verification result page includes invoice information; detect whether there is a goods detail button in the invoice verification result page; if the goods detail button exists, click the goods detail button to display a goods detail window corresponding to the target invoice, so as to obtain a window position parameter corresponding to the goods detail window, and the goods detail window includes goods detail information; adjust the current page display parameter according to the window position parameter and the result page position parameter corresponding to the invoice verification result page, so that the current display page of the target terminal displays the invoice verification result page and the goods detail window at the same time; obtain the page display information corresponding to the current display page, and the page display information includes the invoice information and the goods detail information.

9. A target terminal, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the method for acquiring web page data according to any one of claims 1 to 7 is implemented.

10. A storage medium, characterized in that: The storage medium stores a computer program, wherein the computer program includes program instructions, and when the program instructions are executed by a processor, the processor executes the method for acquiring web page data according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Electronic invoice receiving and checking method and system

    CN111737967A

  • Invoice crawler checking method and device, computer equipment and storage medium

    CN113536091A

  • Information viewing method and device and storage medium

    CN116909457A

  • Digital-to-electronic invoice visualization method and device, computer equipment and storage medium

    CN116975141A

  • Information reference support device, method, and program

    JP2012243134A