Page walking method and device
By overlaying and comparing pixel-level images of software development pages, the method addresses errors in manual perception, enhancing walkthrough efficiency and accuracy through automated code adjustment.
Patent Information
- Application Number
- CN202411166281.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-23
- Publication Date
- 2024-12-10
AI Technical Summary
Existing methods for developing software pages based on design drawings result in errors due to manual perception of component positions, leading to low efficiency and accuracy in the development and walkthrough stages, with manual comparison being subjective and time-consuming.
A method and device for overlaying a target page image with a development page image generated from code, comparing each pixel to determine errors, adjusting the code based on errors, and generating a walkthrough result image with error information to facilitate accurate restoration.
Improves the efficiency and accuracy of page walkthrough by enabling precise error detection and automatic code adjustment, reducing manual effort and subjective judgment.
Smart Images

Figure CN119105757A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a page scanning method and device. Background Art
[0002] When developing software, front-end developers need to develop pages based on the page design drawings provided by designers. In this process, developers usually perceive the position and details of each component in the page design drawing by eye, and then switch to the editor to develop the layout of the corresponding code, which may cause errors between the design page and the development page. In the later stage of the walkthrough, designers are often required to visually compare the errors between the development page and the design page and mark the error problems.
[0003] However, this method cannot achieve complete restoration of the development page to the design page. Whether in the development stage or the walkthrough stage, the efficiency of development and walkthrough is low and the accuracy is difficult to guarantee. Summary of the invention
[0004] In view of this, the embodiments of the present disclosure at least provide a page walkthrough method, device, electronic device, and storage medium, which can improve the efficiency and accuracy of page walkthrough.
[0005] In a first aspect, an embodiment of the present disclosure provides a page inspection method, including:
[0006] Acquire a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code;
[0007] Overlaying the development page image and the target page image;
[0008] The development page image after the overlay processing is compared with each pixel in the target page image to determine the error between the development page image and the target page image.
[0009] Optionally, after determining the error between the development page image and the target page image, the method further includes:
[0010] When the error does not meet the preset requirement, the following steps are executed in a loop until the determined error meets the preset requirement: a new development page image is generated based on the adjusted page development code, and an error between the new development page image and the target page image is determined.
[0011] Optionally, before generating a new development page image based on the adjusted page development code, the method further includes:
[0012] In response to the error not meeting a preset requirement or in response to obtaining operation data of a user adjusting the page development code, the page development code is adjusted.
[0013] Optionally, the overlay processing is performed based on a transparency value set by a user.
[0014] Optionally, after determining the error between the development page image and the target page image, the method further includes:
[0015] Generate and display a scan result image; the scan result image includes error information, and the error information includes error pixel position and error value.
[0016] Optionally, after determining the error between the development page image and the target page image, the method further includes:
[0017] A page scan report is generated and stored, wherein the page scan report includes error pixel positions, error values, and error rates.
[0018] Optionally, the method further comprises:
[0019] The page component indicated by the error information is highlighted in the scan result image.
[0020] In a second aspect, an embodiment of the present disclosure provides a page scanning device, including:
[0021] An acquisition module, used to acquire a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code;
[0022] An overlay module, used for overlaying the development page image and the target page image;
[0023] The comparison module is used to compare each pixel point in the development page image and the target page image after the overlay processing, and determine the error between the development page image and the target page image.
[0024] In a third aspect, an embodiment of the present disclosure further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processor and the memory communicate through the bus, and when the machine-readable instructions are executed by the processor, the steps in the above-mentioned first aspect, or any optional implementation of the first aspect are performed.
[0025] In a fourth aspect, an embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned first aspect, or any optional implementation of the first aspect are executed.
[0026] Any one of the above aspects or any implementation of any one of the aspects, by acquiring a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code; the development page image and the target page image are overlaid; and each pixel point in the development page image after the overlay processing is compared with the target page image to determine the error between the development page image and the target page image. Thus, by comparing each pixel point in the overlaid development page image and the target page image, the error between the two can be accurately obtained, thereby improving the efficiency and accuracy of the walkthrough.
[0027] In a further embodiment of the present disclosure, in response to the error not meeting the preset requirements or in response to obtaining the operation data of the user adjusting the page development code, the page development code is adjusted, a new development page image is generated based on the adjusted page development code, and the error between the new development page image and the target page image is determined. Thus, when the error between the development page image and the target page image does not meet the preset requirements, the code modified by the developer based on the error check can be obtained or the execution subject of the present disclosure embodiment can automatically adjust the code to achieve complete restoration of the development page and the target page.
[0028] In a further embodiment of the present disclosure, after determining the error between the development page image and the target page image, it also includes: generating and displaying a walkthrough result image; the walkthrough result image includes error information, the error information includes the error pixel position and the error value; and highlighting the page component indicated by the error information in the walkthrough result image. This enables walkthrough personnel, developers and other relevant personnel to more intuitively and accurately obtain the difference between the development page and the design page, so that the development page can be adjusted, further improving the efficiency and accuracy of page walkthroughs.
[0029] The effects of the above-mentioned page scanning device, electronic device and storage medium refer to the description of the above-mentioned page scanning method, which will not be repeated here. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] In order to more clearly illustrate the technical solutions of the embodiments of the present disclosure, the following is a brief introduction to the drawings required for use in the embodiments. The drawings herein are incorporated into the specification and constitute a part of the specification. These drawings illustrate embodiments consistent with the present disclosure and are used together with the specification to illustrate the technical solutions of the present disclosure. It should be understood that the following drawings only illustrate certain embodiments of the present disclosure and should not be regarded as limiting the scope. For ordinary technicians in this field, other relevant drawings can also be obtained based on these drawings without creative work.
[0031] Figure 1 A flow chart of a page inspection method provided by an embodiment of the present disclosure is shown;
[0032] Figure 2 A schematic diagram of a process flow of a page scanning method provided by an embodiment of the present disclosure is shown;
[0033] Figure 3 A schematic diagram of an overlay setting panel in a page walkthrough method provided by an embodiment of the present disclosure is shown;
[0034] Figure 4 A schematic diagram of an overlay after the overlay setting is completed in a page scanning method provided by an embodiment of the present disclosure is shown;
[0035] Figure 5 A schematic diagram of a walkthrough result diagram in a page walkthrough method provided by an embodiment of the present disclosure is shown;
[0036] Figure 6 A schematic diagram of a page scanning device provided by an embodiment of the present disclosure is shown;
[0037] Figure 7 An exemplary system architecture is shown in which embodiments of the present disclosure may be applied;
[0038] Figure 8 A schematic diagram of the structure of a computer system of a terminal device or a server used to implement an embodiment of the present disclosure is shown. DETAILED DESCRIPTION
[0039] In order to make the purpose, technical scheme and advantages of the embodiments of the present disclosure clearer, the technical scheme in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the embodiments of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0040] It should be noted that in the technical solution of the present invention, the collection, use, storage, sharing and transfer of user personal information involved are in compliance with the provisions of relevant laws and regulations, and it is necessary to inform the user and obtain the user's consent or authorization. When applicable, the user's personal information is de-identified and / or anonymized and / or encrypted.
[0041] Research has found that when developing software, front-end developers need to develop pages based on the page design drawings provided by designers. In this process, developers usually perceive the position and details of each component in the page design drawing by eye, and then switch to the editor to develop the layout of the corresponding code. Since developers often cannot accurately restore the design page, it is crucial to check the developed page in order to reduce errors in the development process.
[0042] However, the existing technology usually involves designers comparing the development page with the design page for walkthrough. This method cannot fully achieve complete consistency between the development page and the design page. Since developers only perceive the design page with their naked eyes during the development process, it is difficult to ensure that every detail can be accurately restored. Therefore, during the walkthrough stage, designers still need to spend a lot of time comparing page differences and marking problems, resulting in low walkthrough efficiency. In addition, since the walkthrough process relies on manual comparison, there is the possibility of subjective judgment and omissions, making it difficult to ensure accuracy.
[0043] Based on the above research, the embodiment of the present disclosure provides a page walkthrough method, which obtains a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code; the development page image and the target page image are overlaid; and each pixel in the development page image after the overlay processing is compared with the target page image to determine the error between the development page image and the target page image. Thus, by comparing each pixel of the development page image after the overlay and the target page image, the error between the two can be accurately obtained, thereby improving the efficiency and accuracy of the walkthrough. In addition, the present invention also adjusts the page development code in response to the error not meeting the preset requirements or in response to obtaining the operation data adjusted by the user for the page development code, generates a new development page image based on the adjusted page development code, and determines the error between the new development page image and the target page image. Thus, when the error between the development page image and the target page image does not meet the preset requirements, the code modified by the developer based on the mischeck can be obtained or the execution subject of the embodiment of the present disclosure can automatically adjust the code to achieve complete restoration of the development page and the target page. In addition, after determining the error between the development page image and the target page image, the present invention further includes: generating and displaying a walkthrough result image; the walkthrough result image includes error information, the error information includes the error pixel position and the error value; and highlighting the page component indicated by the error information in the walkthrough result image. This enables walkthrough personnel, developers and other related personnel to more intuitively and accurately obtain the difference between the development page and the design page, so that the development page can be adjusted, further improving the efficiency and accuracy of page walkthrough.
[0044] The raising of the above problems and the solutions are the results obtained by the inventor after practice and careful research. The discovery process of the above problems and the solutions proposed for the above problems should be the contributions made by the inventor to the present disclosure during the disclosure process.
[0045] The technical solutions in the present disclosure will be clearly and completely described below in conjunction with the drawings in the present disclosure. Obviously, the described embodiments are only part of the embodiments of the present disclosure, rather than all of the embodiments. The components of the present disclosure generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present disclosure provided in the drawings is not intended to limit the scope of the present disclosure claimed for protection, but merely represents the selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present disclosure.
[0046] It should be noted that similar reference numerals and letters denote similar items in the following drawings, and therefore, once an item is defined in one drawing, further definition and explanation thereof is not required in subsequent drawings.
[0047] To facilitate understanding of the present embodiment, a page walkthrough method disclosed in the present embodiment is first introduced in detail. The execution subject of the page walkthrough method provided in the present embodiment is generally a computer device with certain computing capabilities, and the computer device includes, for example: a terminal device or a server or other processing device. The terminal device may be a user equipment (UE), a mobile device, a user terminal, a terminal, a cellular phone, a cordless phone, a personal digital assistant (PDA), a handheld device, a computing device, a vehicle-mounted device, a wearable device, etc. In some possible implementations, the page walkthrough method may be implemented by a processor calling a computer-readable instruction stored in a memory.
[0048] See also Figure 1 FIG. 1 is a flow chart of a page inspection method provided by an embodiment of the present disclosure, wherein the method includes S101 to S103, wherein:
[0049] S101: Acquire a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code.
[0050] In the disclosed embodiment, the target page image may be a page design drawing provided by a designer, or any other image serving as a schematic diagram of the target page; the development page image may be the final page image obtained after the front-end developer writes code based on the target page image.
[0051] Figure 2 The following is a flow chart of a page scanning method provided by an embodiment of the present disclosure. Figure 2 As shown, the user can import the pre-stored development page image and target page image through the overlay import control in the walkthrough setting panel; the development page image here is generated based on the page development code written by the front-end developer, and the corresponding page can be screenshotted and saved after the corresponding development page is generated for uploading during the walkthrough. In addition, the user can also upload only the target page image, and for the development page image, the execution subject of the embodiment of the present disclosure can obtain the code of the development end, call the compiler to generate the corresponding development page based on the code, and then call the corresponding development page image.
[0052] S102: Overlaying the development page image and the target page image.
[0053] In this step, after obtaining the target page image and the development page image, the two images can be superimposed.
[0054] Figure 3 A schematic diagram of an overlay setting panel in a page walkthrough method provided for implementation of the present disclosure. In a specific implementation, Figure 3 As shown, after obtaining the target page image and the development page image, the "Show Overlay" control can be adjusted to a visible state to instruct the execution subject of the embodiment of the present disclosure to display the result after the overlay processing. Figure 3 In the overlay settings panel shown, users can also set the transparency of the target page image after overlaying the development page image; when the transparency is 1, the target page image can be fully displayed, and when the transparency is 0, the development page image can be fully displayed. During the inspection process, users can also adjust the transparency setting here at any time according to actual needs to obtain the inspection results.
[0055] In a preferred embodiment, Figure 3 As shown, the overlay effect can also be previewed in the overlay settings panel based on the transparency set by the user.
[0056] In the embodiment of the present disclosure, after completing the settings in the above-mentioned overlay setting panel, you can enter Figure 2 The "Start Walkthrough" steps are shown. Figure 4 A schematic diagram of an overlay after the overlay is set in a page inspection method provided in an embodiment of the present disclosure. In a specific implementation, after closing the overlay setting panel, the following may be displayed: Figure 4 In the overlay processing interface shown, the user can trigger the "walkthrough analysis" control in the interface to instruct the execution subject of the embodiment of the present disclosure to conduct a walkthrough based on the development page image and the target page image after the overlay processing. Figure 4 As shown, in the overlay diagram, the result after overlaying can be displayed according to the transparency and other information pre-set by the user. Based on the result after overlaying, relevant personnel can basically determine where the error occurs in the two page images. The method for further obtaining the accurate error is as described in S103, which will not be repeated here.
[0057] S103: Compare each pixel point in the development page image after the overlay processing and the target page image to determine an error between the development page image and the target page image.
[0058] In this step, in response to the user trigger Figure 4 The "Walk-through Analysis" control in the image can compare each pixel of the overlaid development page image and the target page image to determine the precise error between the two pages.
[0059] Figure 5A schematic diagram of a page scan result diagram in a page scan method provided by an embodiment of the present disclosure. Figure 5 As shown in FIG. 1 , the walkthrough result graph may include error information between the development page image and the target page image, such as error pixel position, error value, etc. Figure 5 The "14pt" and "10pt" marked in the figure are the error values between the development page image and the target page image. The error information not only saves the time of manual annotation for the walkthrough personnel, but also helps the front-end developers to make adjustments based on the error information when making code adjustments, thus improving the efficiency and accuracy of page walkthrough. Figure 5 As shown, the error information in the walkthrough result diagram and the page components indicated by the error information can be highlighted in the walkthrough result diagram to highlight the key points.
[0060] In an embodiment of the present disclosure, after determining the error between the development page image and the target page image, it also includes: when the error does not meet the preset requirements, looping the following steps until the determined error meets the preset requirements: generating a new development page image based on the adjusted page development code, and determining the error between the new development page image and the target page image.
[0061] In a specific implementation, the error rate of the walkthrough can also be displayed in the walkthrough result graph, such as Figure 5 In the schematic diagram shown, the error rate is 0.23%. Assuming that the preset requirement for the error rate is 1%, the error indicated by the inspection result meets the preset requirement and the subsequent process can be carried out; and assuming that the preset requirement for the error rate is 0.1%, the error indicated by the inspection result does not meet the preset requirement. At this time, the page development code can be adjusted, and a new development page image is generated based on the adjusted code, and the error between the new development page image and the target page image is determined again until the error obtained meets the preset requirement. It should be noted that the above-mentioned error rate as the preset error requirement is only a possible implementation method of the embodiment of the present disclosure. In actual applications, it can be set according to needs and based on the ability to achieve its function. The embodiment of the present disclosure does not limit this. For example, it can be combined with the pre-set page component weight to determine whether the error meets the preset requirement, and those components that need extra attention can be given a higher weight, and those components that play an auxiliary or decorative role can be not paid too much attention to whether they completely restore the target page image.
[0062] In the embodiment of the present disclosure, the page development code can be adjusted by the front-end developer based on the marked error information. After the code adjustment is completed, the adjusted code can be obtained by the execution subject of the embodiment of the present disclosure for re-checking. In addition, the page development code can also be adjusted by the execution subject of the embodiment of the present disclosure. For example, if the error information indicates that the page spacing of the target development page is 10pt, and the page spacing of the development page image is 14pt, the execution subject of the embodiment of the present disclosure can modify the part of the code that sets 14pt and modify its data to 10pt to complete the code adjustment for re-checking.
[0063] In the embodiment of the present disclosure, after determining the error between the development page image and the target page image, it also includes: generating and storing a page walkthrough report, wherein the page walkthrough report includes an error pixel position, an error value and an error rate.
[0064] In specific implementation, after each walkthrough is completed, a corresponding page walkthrough report can be generated, which can indicate the walkthrough results, such as error pixel location, error value, error rate, etc.; it can also indicate information such as front-end developers, walkthrough personnel, and walkthrough time.
[0065] According to a feasible embodiment of the present invention, the present invention can perform page walkthrough in the form of a plug-in or an application. The following takes the present invention as a plug-in in Flutter (a page toolkit for building applications with beautiful pages on various platforms) to implement page walkthrough as an example to illustrate a specific implementation method, which does not constitute an improper limitation of the present invention.
[0066] First, the target page image can be obtained from the designer and saved. Then, the ImagePicker plug-in can be used to obtain the target page image, and uploaded to the execution body of the embodiment of the present disclosure through the Dio interface tool. The corresponding image name is obtained from the execution body. The image name here is used for overlay display, and the image name is assigned to the uiFileName attribute (when uploading the development page image later, the name of the target page image saved to the back end can be uploaded together).
[0067] Secondly, the corresponding development page image resource data can be obtained according to the page development code written by the front-end developer. Specifically, the RenderPetaintBoundary object can be obtained through the screenshotWidgetKey of UICheckDialog, and the RenderRepaintBoundary can intercept the part wrapped by the RepaintBoundary; then the boundary.toImage() method is used to convert it into a ui.Image object, and then image.toByteData() is used to convert the image into byteData, and finally the bytaData is converted into the Uint8List type that the backend server can accept.
[0068] Then, the Unit8List data obtained in the previous step can be converted into a FormData object, and the image name returned when uploading the target page image can be passed to the uiFileName parameter of the / file interface. Then, the overlay component is used to overlay the image. The main function of the overlay component is to display the uploaded target page image on the upper layer of the development page image, and it cannot affect the interactive events such as clicks on the development page image.
[0069] Finally, the target page image after overlaying can be compared with the development page image. Specifically, the resembleF function can be called, and the resource path of the target page image can be found through uiFileName to generate image1; then the corresponding development page image can be found through / public / uploads / screenshot.png to generate image2; then, the name of the inspection result image can be generated through the timestamp, and the corresponding storage and docking resource path of the inspection result image can be configured; then the compare method of the resemblejs plug-in is called to compare image1 and image2 pixel by pixel, generate a inspection result map with marked differences, and then store it in the corresponding path; finally, the inspection result image and the inspection result image name are returned to the execution subject of the embodiment of the present disclosure for display.
[0070] According to a second aspect of the embodiment of the present disclosure, Figure 6 As shown, a page scanning device 600 is provided, comprising:
[0071] The acquisition module 601 is used to acquire a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code;
[0072] An overlay module 602 is used to overlay the development page image with the target page image;
[0073] The comparison module 603 is used to compare each pixel in the development page image after the overlay processing and the target page image to determine the error between the development page image and the target page image.
[0074] Optionally, the comparison module 603 is further used for:
[0075] When the error does not meet the preset requirement, the following steps are executed in a loop until the determined error meets the preset requirement: a new development page image is generated based on the adjusted page development code, and an error between the new development page image and the target page image is determined.
[0076] Optionally, the comparison module 603 is further used for:
[0077] In response to the error not meeting a preset requirement or in response to obtaining operation data of a user adjusting the page development code, the page development code is adjusted.
[0078] Optionally, the overlay processing is performed based on a transparency value set by a user.
[0079] Optionally, the comparison module 603 is further used for:
[0080] Generate and display a scan result image; the scan result image includes error information, and the error information includes error pixel position and error value.
[0081] Optionally, the comparison module 603 is further used for:
[0082] A page scan report is generated and stored, wherein the page scan report includes error pixel positions, error values, and error rates.
[0083] Optionally, the comparison module 603 is further used for:
[0084] The page component indicated by the error information is highlighted in the scan result image.
[0085] According to the third aspect of an embodiment of the present disclosure, there is provided an electronic device for page scanning, comprising: one or more processors; a storage device for storing one or more programs, wherein when the one or more programs are executed by the one or more processors, the one or more processors implement the method provided by the first aspect of the embodiment of the present disclosure.
[0086] According to a fourth aspect of an embodiment of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, and when the program is executed by a processor, the method provided by the first aspect of the embodiment of the present disclosure is implemented.
[0087] Figure 7An exemplary system architecture 700 to which the page walking method or the page walking apparatus implemented by the present disclosure can be applied is shown.
[0088] like Figure 7 As shown, system architecture 700 may include terminal devices 701, 702, 703, network 704 and server 705. Network 704 is used to provide a medium for communication links between terminal devices 701, 702, 703 and server 705. Network 704 may include various connection types, such as wired, wireless communication links or optical fiber cables, etc.
[0089] The user can use the terminal devices 701, 702, 703 to interact with the server 705 through the network 704 to receive or send messages, etc. Various communication client applications can be installed on the terminal devices 701, 702, 703, such as shopping applications, web browser applications, search applications, instant messaging tools, email clients, social platform software, etc. (only for example).
[0090] The terminal devices 701 , 702 , and 703 may be various electronic devices having a display screen and supporting web browsing, including but not limited to smart phones, tablet computers, laptop computers, and desktop computers.
[0091] The server 705 may be a server that provides various services, such as a backend management server (only an example) that provides support for shopping websites browsed by users using the terminal devices 701, 702, and 703. The backend management server may process the received page search request and feed back the processing result (only an example) to the terminal device.
[0092] It should be noted that the page inspection method provided in the embodiment of the present invention is generally executed by the server 705, and accordingly, the page inspection device is generally set in the server 705. The page inspection method provided in the embodiment of the present invention can also be executed by the terminal devices 701, 702, and 703, and accordingly, the page inspection device can be set in the terminal devices 701, 702, and 703.
[0093] It should be understood that Figure 7 The number of terminal devices, networks and servers in the embodiment is only for illustration. Any number of terminal devices, networks and servers may be provided according to implementation requirements.
[0094] Reference below Figure 8 , which shows a schematic diagram of the structure of a computer system 800 of a terminal device suitable for implementing an embodiment of the present invention. Figure 8 The terminal device shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0095] like Figure 8 As shown, the computer system 800 includes a central processing unit (CPU) 801, which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM) 802 or a program loaded from a storage part 808 to a random access memory (RAM) 803. In the RAM 803, various programs and data required for the operation of the system 800 are also stored. The CPU 801, the ROM 802, and the RAM 803 are connected to each other through a bus 804. An input / output (I / O) interface 805 is also connected to the bus 804.
[0096] The following components are connected to the I / O interface 805: an input section 806 including a keyboard, a mouse, etc.; an output section 807 including a cathode ray tube (CRT), a liquid crystal display (LCD), etc., and a speaker, etc.; a storage section 808 including a hard disk, etc.; and a communication section 809 including a network interface card such as a LAN card, a modem, etc. The communication section 809 performs communication processing via a network such as the Internet. A drive 810 is also connected to the I / O interface 805 as needed. A removable medium 811, such as a magnetic disk, an optical disk, a magneto-optical disk, a semiconductor memory, etc., is installed on the drive 810 as needed, so that a computer program read therefrom is installed into the storage section 808 as needed.
[0097] In particular, according to the embodiments disclosed in the present invention, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present invention include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program contains program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from the network through the communication part 809, and / or installed from the removable medium 811. When the computer program is executed by the central processing unit (CPU) 801, the above-mentioned functions defined in the system of the present invention are executed.
[0098] It should be noted that the computer-readable medium shown in the present invention may be a computer-readable signal medium or a computer-readable storage medium or any combination of the above two. The computer-readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In the present invention, a computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, device or device. In the present invention, a computer-readable signal medium may include a data signal propagated in a baseband or as part of a carrier wave, which carries a computer-readable program code. This propagated data signal may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, which may send, propagate or transmit a program for use by or in conjunction with an instruction execution system, apparatus or device. The program code contained on the computer-readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, optical cable, RF, etc., or any suitable combination of the above.
[0099] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a module, a program segment, or a part of a code, and the above-mentioned module, program segment, or a part of a code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram or flow chart, and the combination of the boxes in the block diagram or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0100] The modules involved in the embodiments of the present invention may be implemented by software or hardware. The modules described may also be set in a processor. For example, a processor includes an acquisition module, an overlay module, and a comparison module, wherein the names of these modules do not constitute a limitation on the modules themselves in certain cases. For example, the acquisition module may also be described as a "module for acquiring a target page image and a development page image corresponding to the target page".
[0101] As another aspect, the present invention further provides a computer-readable medium, which may be included in the device described in the above embodiment; or may exist independently without being assembled into the device. The above computer-readable medium carries one or more programs, and when the above one or more programs are executed by a device, the device implements the following method:
[0102] Acquire a target page image and a development page image corresponding to the target page; the development page image is generated based on a page development code;
[0103] Overlaying the development page image and the target page image;
[0104] The development page image after the overlay processing is compared with each pixel in the target page image to determine the error between the development page image and the target page image.
[0105] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present disclosure, which are used to illustrate the technical solutions of the present disclosure, rather than to limit them. The protection scope of the present disclosure is not limited thereto. Although the present disclosure is described in detail with reference to the above-described embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-described embodiments within the technical scope disclosed in the present disclosure, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be based on the protection scope of the claims.
Claims
1. A page inspection method, characterized in that: include: Acquire a target page image and a development page image corresponding to the target page; The development page image is generated based on the page development code; Overlaying the development page image and the target page image; The development page image after the overlay processing is compared with each pixel in the target page image to determine the error between the development page image and the target page image.
2. The method according to claim 1, characterized in that After determining the error between the development page image and the target page image, the method further includes: When the error does not meet the preset requirement, the following steps are executed in a loop until the determined error meets the preset requirement: a new development page image is generated based on the adjusted page development code, and an error between the new development page image and the target page image is determined.
3. The method according to claim 2, characterized in that Before generating a new development page image based on the adjusted page development code, it also includes: In response to the error not meeting a preset requirement or in response to obtaining operation data of a user adjusting the page development code, the page development code is adjusted.
4. The method according to claim 1, characterized in that The overlay processing is performed based on a transparency value set by the user.
5. The method according to claim 1, characterized in that After determining the error between the development page image and the target page image, the method further includes: Generate and display a scan result image; the scan result image includes error information, and the error information includes error pixel position and error value.
6. The method according to claim 1, characterized in that After determining the error between the development page image and the target page image, the method further includes: A page scan report is generated and stored, wherein the page scan report includes error pixel positions, error values, and error rates.
7. The method according to claim 5, characterized in that The method further comprises: The page component indicated by the error information is highlighted in the scan result image.
8. A page scanning device, characterized in that: include: An acquisition module, used for acquiring a target page image and a development page image corresponding to the target page; The development page image is generated based on the page development code; An overlay module, used for overlaying the development page image and the target page image; The comparison module is used to compare each pixel point in the development page image and the target page image after the overlay processing, and determine the error between the development page image and the target page image.
9. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method according to any one of claims 1 to 7.
10. A computer readable medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the method according to any one of claims 1 to 7 is implemented.
