Page display method and system, computer device and storage medium
By determining the parsing method based on the image file format and browser information on the client side, it supports the display of image files in multiple browsers, solving the problems of browser limitations and complex maintenance in traditional technologies, and realizing convenient image file display.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- TAIPING FINANCIAL SERVICE CENT (SHANGHAI) CO LTD
- Filing Date
- 2023-05-26
- Publication Date
- 2026-06-02
AI Technical Summary
Traditional image retrieval methods only support IE8 and above, requiring the installation of a retrieval .exe program and writing to the registry, making client upgrades and maintenance complex and cumbersome, and also not supporting multiple browsers.
By obtaining the image file format and browser information, the file parsing method is determined, supporting multi-threaded decoding or format conversion, enabling the display of image files on different browsers, and performing image rendering and loading on the client side.
It supports multiple browsers, reduces server-side image processing resource consumption, and simplifies subsequent upgrade and maintenance processes.
Smart Images

Figure CN116647734B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of video playback technology, and in particular to a page display method, system, computer device, storage medium, and computer program product. Background Technology
[0002] With the widespread application of web (website) front-end technologies, HTML5 technology has become extremely popular on the internet. Through HTML5, more and more multimedia content can be displayed directly on the front end, making it more convenient and faster for business users to access multimedia data such as images.
[0003] In traditional technology, ActiveX controls based on the IE (Internet Explorer, web browser) kernel are typically used to access images from the imaging system.
[0004] However, the above image retrieval methods only support IE browsers above IE8. Furthermore, these methods require installing the retrieval exe program, writing to the registry, and adding the corresponding page to the code project, which involves a large workload and makes client upgrades and maintenance quite complex and cumbersome. Summary of the Invention
[0005] Therefore, it is necessary to provide a page display method, system, computer device, computer-readable storage medium, and computer program product that can support multiple browsers and is easy to maintain, in order to address the above-mentioned technical problems.
[0006] Firstly, this application provides a page display method. The method is applied to a client and includes:
[0007] Obtain the image file format;
[0008] The file parsing method is determined based on the image file format and browser information. The image file is then parsed based on the file parsing method to obtain the image file stream corresponding to the image file information.
[0009] Each page of the video file stream is rendered to obtain a rendered image. The rendered images are then loaded and displayed until all rendered images corresponding to the video file stream have been displayed.
[0010] In one embodiment, the file parsing method is determined based on the image file format and browser information, and the file is parsed based on the file parsing method to obtain the image file stream corresponding to the image file information, including:
[0011] When the image file format is inconsistent with the target format, directly obtain the image file stream corresponding to the image file information;
[0012] When the image file format matches the target format, obtain the browser information; the browser information includes: browser type and browser version number.
[0013] When the browser type and the target type are the same, and the browser version number and the target version number are the same, the image file corresponding to the image file information is decoded by multiple threads to obtain the image file stream corresponding to the image file information.
[0014] When the browser type and target type are inconsistent, or the browser version number and target version number are inconsistent, the server is called to perform format conversion on the image file corresponding to the image file information, and the image file stream corresponding to the format-converted image file information is obtained.
[0015] In one embodiment, loading and displaying the rendered image includes:
[0016] Get the identifier of each rendered image from a set of multiple rendered images;
[0017] For each rendered image, obtain the loading progress of the rendered image;
[0018] When the loading progress indicates loading failure, the rendered image is decoded based on its identifier to obtain its encoding.
[0019] The rendered image is loaded based on the encoding.
[0020] In one embodiment, before obtaining the image file format, the method further includes:
[0021] Send a first access request to the server, and the server will send the access information in the first access request to the image system.
[0022] Obtain the request response result returned by the server based on the first request;
[0023] When the request response contains a temporary token, the temporary token is sent to the client. The temporary token is used by the image system to verify the client's identity when the client sends a second access request to the image system based on the temporary token, and then sends the corresponding image file to the client after the identity verification is completed.
[0024] Secondly, this application also provides a page display method, which is applied to an imaging system and includes:
[0025] Receive the second access request sent by the client;
[0026] The system queries the image file corresponding to the second access request and sends the image file to the client. After receiving the image file, the client obtains the image file format; determines the file parsing method based on the image file format and browser information; parses the image file based on the file parsing method to obtain the image file stream corresponding to the image file information; renders each page of the image file stream to obtain the rendered image; loads and displays the rendered image until all the rendered images corresponding to the image file stream have been displayed.
[0027] In one embodiment, the second access request sent by the client carries a temporary token; after receiving the second access request sent by the client, the method further includes:
[0028] The client's identity is verified based on a temporary token.
[0029] In one embodiment, before receiving a second access request sent by the client, the process includes:
[0030] Receive the first access request sent by the server;
[0031] Verify the identity of the information requested in the first request transmitted from the server.
[0032] When authentication is successful, respond to the first access request and send verification information carrying a temporary token to the server; when authentication fails, send verification information carrying a failure message to the server.
[0033] In one embodiment, sending the image file to the client includes:
[0034] Based on the temporary token, obtain the corresponding browser interface;
[0035] Based on the browser interface, obtain the browser category and browser version number corresponding to the browser as browser information;
[0036] Based on the temporary token, obtain the corresponding image file identifier, pagination information, and image file type;
[0037] For each image file identifier, based on the pagination information, the multiple paginated images corresponding to the image file identifier are traversed to obtain the image file information;
[0038] Send the image file information and browser information to the client.
[0039] In one embodiment, the first access request includes encrypted parameters encrypted with a public key; obtaining the client's identity information and the server's identity information, and authenticating the client and server, including:
[0040] Obtain the private key corresponding to the public key, decrypt the encrypted parameters using the private key, and obtain the identity information of the client corresponding to the first access request, as well as the identity information of the server corresponding to the first access request;
[0041] The client is first authenticated based on its identity information. After the first authentication is successful, the server is second authenticated based on its identity information.
[0042] If the second authentication is successful, the authentication of both the client and the server is successful; if either the first or second authentication fails, the authentication of both the client and the server fails.
[0043] In one embodiment, before sending image file information to the client based on a temporary token, the method further includes:
[0044] Get the transmission time from sending the temporary token to the server to receiving the temporary token sent by the client;
[0045] If the transmission time exceeds the preset expiration time, a token expiration notification will be sent to the client.
[0046] Thirdly, this application also provides an image retrieval system, the system comprising: a client, a server, and an image system terminal;
[0047] The server is used to receive the first access request sent by the client, and transmit the access information in the first access request to the image system to obtain the image file format from the image system.
[0048] The client is used to execute the steps in the page display method described in any of the above embodiments.
[0049] Fourthly, this application also provides a computer device. The computer device includes a memory and a processor, the memory storing a computer program, and the processor executing the computer program to implement the steps of the page display method described in any of the above embodiments.
[0050] Fifthly, this application also provides a computer device readable storage medium. The computer device readable storage medium stores a computer program thereon, which, when executed by a processor, implements the steps of the page display method described in any of the above embodiments.
[0051] Sixthly, this application also provides a computer program product. The computer program product includes a computer program that, when executed by a processor, implements the steps of the page display method described in any of the above embodiments.
[0052] The aforementioned page display method, apparatus, computer equipment, storage medium, and computer program product first acquire the image file format, then determine the file parsing method based on the image file format and browser information, and then parse the image file according to the file parsing method to obtain the image file stream corresponding to the image file information. Further, each page of the image file stream is rendered to obtain a rendered image, which is then loaded and displayed until all rendered images corresponding to the image file stream have been displayed. Determining different file parsing methods based on different image file formats and browser information supports the display of multiple image file formats on different browsers. Furthermore, the image rendering process of the image file stream is performed on the client side, which reduces the server's resource consumption for image processing and ensures the convenience of subsequent upgrades and maintenance. Attached Figure Description
[0053] Figure 1 This is an application environment diagram of a page display method in one embodiment;
[0054] Figure 2 This is a flowchart illustrating the application of a page display method to a client in one embodiment;
[0055] Figure 3 This is a schematic diagram of the image retrieval process in one embodiment;
[0056] Figure 4 This is a schematic diagram illustrating the process of a client requesting access to an image system in another embodiment;
[0057] Figure 5 This is an internal structural diagram of a computer device in one embodiment. Detailed Implementation
[0058] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0059] The page display method provided in this application embodiment can be applied to, for example, Figure 1In the application environment shown, client 102 can communicate with both image system 106 and server 104 via network. Client 102 can establish a communication connection with image system 106 through server 104 or directly with image system 106. The data storage system can store the data that server 104 needs to process. The data storage system can be located in the cloud or on another network server. First, client 102 obtains the image file format from image system 106, then determines the file parsing method based on the image file format and browser information, and then parses the image file according to the file parsing method to obtain the image file stream corresponding to the image file information. Further, client 102 renders each page of the image file stream to obtain rendered images, loads and displays the rendered images until all rendered images corresponding to the image file stream have been displayed. Determining different file parsing methods based on different image file formats and browser information supports displaying multiple image file formats on different browsers. Furthermore, the image rendering process of the image file stream is performed on the client side, which reduces the resource consumption of the server for image processing and ensures the convenience of subsequent upgrades and maintenance.
[0060] The server 104 and the imaging system terminal 106 can be implemented using a standalone server or a server cluster consisting of multiple servers. The client 102 can be installed on a terminal, which can be a web front-end.
[0061] The page display method provided in this application embodiment can be applied to a system including a client, a server, and an imaging system, and is implemented through the interaction between the client, the server, and the imaging system.
[0062] In one embodiment, such as Figure 2 As shown, a page display method is provided. Taking the application of this method to the client as an example, the method includes the following steps 202 to 206.
[0063] Step 202: Obtain the image file format.
[0064] In this embodiment, the image file format may include, but is not limited to: TIFF format (TagImageFileFormat), multi-page TIFF format, and images with various encoding formats.
[0065] In another embodiment, the image file format may also be a picture in a common encoding format.
[0066] Specifically, obtaining the image file format can be achieved by recognizing the format of the image file obtained from the image system. For example, it can be done by recognizing the file extension or by recognizing the format of the image file's previous frame. No specific limitations are made here.
[0067] Step 204: Determine the file parsing method based on the image file format and browser information, and parse the image file based on the file parsing method to obtain the image file stream corresponding to the image file information.
[0068] In this embodiment, browser information may include, but is not limited to, browser type and browser version number.
[0069] In this embodiment, based on the image file format and browser information, it can be determined whether the current browser supports the image file format, and based on whether the browser supports the image file format, the file parsing method for the image file can be determined.
[0070] In this embodiment, the file parsing method for image files may include, but is not limited to:
[0071] (1) When the browser supports the image file format, directly obtain the image file stream corresponding to the image file information.
[0072] (2) When the browser does not support the image file format but supports HTML5, the image file corresponding to the image file information is decoded by multiple threads to obtain the image file stream corresponding to the image file information.
[0073] (3) When the browser does not support the image file format and does not support HTML5, the server is called to convert the image file image corresponding to the image file information to obtain the image file stream corresponding to the converted image file information.
[0074] Step 206: Render each page of the image file stream to obtain a rendered image, load and display the rendered image until all rendered images corresponding to the image file stream have been displayed.
[0075] In this embodiment, after the client obtains the image file stream corresponding to the image file information, it can obtain the width and height of each page of the image file stream, and render each page of the image file stream on the canvas to obtain the rendered image.
[0076] In this embodiment, the client loads multiple rendered images onto the page. During the loading process, it determines whether the rendered image (img) has been loaded successfully. If one rendered image fails to load, the client can load the failed rendered image by decoding base64 data.
[0077] In the above page display method, the image file format is first obtained. Then, based on the image file format and browser information, the file parsing method is determined. The image file is then parsed according to the parsing method to obtain the image file stream corresponding to the image file information. Further, each page of the image file stream is rendered to obtain a rendered image. These rendered images are then loaded and displayed until all rendered images corresponding to the image file stream have been displayed. Determining different file parsing methods based on different image file formats and browser information supports the display of multiple image file formats on different browsers. Furthermore, the image rendering process of the image file stream is performed on the client side, which reduces the server's resource consumption for image processing and ensures ease of subsequent upgrades and maintenance.
[0078] In some embodiments, such as Figure 3 As shown, the file parsing method is determined based on the image file format and browser information. The file is then parsed according to this method to obtain the image file stream corresponding to the image file information. This includes: when the image file format is inconsistent with the target format, directly obtaining the image file stream corresponding to the image file information; when the image file format is consistent with the target format, obtaining browser information, including browser type and browser version number; when the browser type and target type are consistent, and the browser version number is consistent with the target version number, performing multi-threaded decoding on the image file image corresponding to the image file information to obtain the image file stream corresponding to the image file information; when the browser type and target type are inconsistent, or the browser version number is inconsistent with the target version number, calling the server to perform format conversion on the image file image corresponding to the image file information to obtain the format-converted image file stream corresponding to the image file information.
[0079] In this embodiment, the target format may include, but is not limited to: TIFF format (TagImageFile Format), multi-page TIFF format, and images of various different encoding formats.
[0080] In this embodiment, the target type may include, but is not limited to, browsers that support HTML5, such as IE11 (Internet Explorer 11), Google Chrome, and Firefox.
[0081] In this embodiment, when the image file format, browser type, and browser version number are consistent with the target format and target version number, the image file corresponding to the image file information is decoded using multi-threading to obtain the image file stream corresponding to the image file information. For example, when the image file format is TIFF and the browser type and version both support HTML5, the client calls the image system's image file download interface to obtain the image file stream (TIFF file stream), and uses JS (Javascript) to parse the TIFF file stream to obtain the image stream of each page in the TIFF file.
[0082] In another embodiment, such as Figure 3 As shown, when the image file format is consistent with the target format, but the browser type is inconsistent with the target type, or the browser version number is inconsistent with the target version number, the client can also call the image system's download and conversion TIFF file stream interface to obtain the jpg (JointPhotographicExpertsGroup) conversion file stream of each page in the TIFF file, and obtain the image file stream corresponding to the format-converted image file information.
[0083] In some embodiments, such as Figure 3 As shown, loading and displaying a rendered image includes: obtaining the identifier of each rendered image among multiple rendered images; obtaining the loading progress of each rendered image; when the loading progress indicates loading failure, decoding the rendered image based on its identifier to obtain its encoding; and loading the rendered image based on the encoding.
[0084] In this embodiment, when the loading progress indicates loading failure, the client can obtain the base64 corresponding to the failed rendering image and load it.
[0085] In some embodiments, such as Figure 4 As shown, before obtaining the image file format, the process includes: sending a first access request to the server, and having the server send the access information in the first access request to the image system; obtaining the request response result returned by the server based on the first access request; when the request response result carries a temporary token, sending the temporary token to the client, the temporary token is used by the image system to verify the client's identity when the client sends a second access request to the image system based on the temporary token, and after the identity verification is completed, sending the corresponding image file to the client.
[0086] In this embodiment, the access information in the first access request sent by the client to the server is the client's identity information, which may include, but is not limited to, parameters such as client identifier, username, and password. When multiple clients access the image system, they are only allowed to initiate access requests to the image system through the server, ensuring the security of the access process.
[0087] In this embodiment, when the server sends the first access request to the image system, the information sent may also include the server's identity information. This server identity information may include, but is not limited to, the server's IP address (Internet Protocol).
[0088] In another embodiment, when the server sends the first access request to the image system, the information sent may also include a preset expiration time of the temporary token.
[0089] Based on the same inventive concept, this application also provides a page display method, which is described using an image system as an example. The method includes the following steps: receiving a second access request sent by a client; querying the image file corresponding to the second access request and sending the image file to the client; after receiving the image file, the client obtains the image file format; determining the file parsing method based on the image file format and browser information; parsing the image file based on the file parsing method to obtain the image file stream corresponding to the image file information; rendering each page of the image file stream to obtain a rendered image; loading and displaying the rendered image until all rendered images corresponding to the image file stream have been displayed.
[0090] In this embodiment, the imaging system queries the image file corresponding to the second access request sent by the client, and sends the image file information corresponding to the image file to the client. The image file information includes at least the image file itself, and may also include, but is not limited to, image file identifiers and pagination information.
[0091] In this embodiment, the image file identifier may include, but is not limited to, number, encoding, character mark, etc.
[0092] In this embodiment, the imaging system can traverse the image files based on the image file identifier.
[0093] In some embodiments, the second access request sent by the client carries a temporary token; after receiving the second access request sent by the client, the method further includes: verifying the client's identity based on the temporary token.
[0094] In some embodiments, such as Figure 4As shown, before receiving the second access request sent by the client, the process includes: receiving the first access request sent by the server; verifying the identity of the access information in the first access request transmitted by the server; when the identity verification is successful, responding to the first access request and sending verification information carrying a temporary token to the server; when the identity verification fails, sending verification information carrying a failure message to the server.
[0095] In this embodiment, the access information in the first access request transmitted by the server may include, but is not limited to, client identity information and server identity information.
[0096] In this embodiment, the imaging system can first verify the client's identity information, and then verify the server's identity information after the client's identity verification is successful.
[0097] In this embodiment, the verification information carrying a temporary token sent from the imaging system to the server may include, but is not limited to, a timestamp.
[0098] In some embodiments, such as Figure 3 As shown, sending an image file to the client includes: obtaining the corresponding browser interface based on a temporary token; obtaining the browser category and browser version number as browser information based on the browser interface; obtaining the corresponding image file identifier, pagination information, and image file type based on the temporary token; for each image file identifier, traversing multiple paginated images corresponding to the image file identifier based on the pagination information to obtain image file information; and sending the image file information and browser information to the client.
[0099] In this embodiment, the imaging system can invoke the imaging system interface based on the temporary token to obtain the access information corresponding to the temporary token. The access information may include, but is not limited to: a browser interface (e.g., the navigator interface) and the identifier of the image file to be accessed corresponding to the temporary token.
[0100] In this embodiment, the imaging system can obtain browser information based on a browser interface (such as the navigator interface) provided by the browser. This browser information may include, but is not limited to, browser type and browser version number.
[0101] In some embodiments, such as Figure 4As shown, the first access request includes encrypted parameters encrypted with a public key; obtaining the client's identity information and the server's identity information, and authenticating the client and server, including: obtaining the private key corresponding to the public key, decrypting the encrypted parameters with the private key to obtain the client's identity information and the server's identity information corresponding to the first access request; performing a first authentication on the client based on the client's identity information; if the first authentication is successful, performing a second authentication on the server based on the server's identity information; if the second authentication is successful, the authentication of the client and server is successful; if the first authentication fails or the second authentication fails, the authentication of the client and server fails.
[0102] In this embodiment, the image system can compare the pre-configured IP with the server IP in the first access request. When the server IP matches (is the same as) one of the pre-configured IPs, the second authentication is successful.
[0103] In this embodiment, the imaging system performs a second authentication on the server based on the authorized-IP mapping table, the authorized IP list, and other methods.
[0104] In some embodiments, such as Figure 4 As shown, before sending image file information to the client based on the temporary token, the process also includes: obtaining the transmission time from sending the temporary token to the server to obtaining the temporary token sent by the client; and sending a token expiration prompt to the client when the transmission time exceeds a preset expiration time.
[0105] In this embodiment, when the image system sends a temporary token to the server, it can also carry a timestamp. When the image system receives a second access request carrying a temporary token from the client, it can determine the transmission time of the temporary token based on the timestamp corresponding to the temporary token, and then verify the expiration time of the temporary token based on the transmission time and the preset expiration time.
[0106] In this embodiment, different temporary tokens may correspond to different preset expiration times.
[0107] It should be understood that although the steps in the flowcharts of the embodiments described above are shown sequentially according to the arrows, these steps are not necessarily executed in the order indicated by the arrows. Unless explicitly stated herein, there is no strict order restriction on the execution of these steps, and they can be executed in other orders. Moreover, at least some steps in the flowcharts of the embodiments described above may include multiple steps or multiple stages. These steps or stages are not necessarily completed at the same time, but can be executed at different times. The execution order of these steps or stages is not necessarily sequential, but can be performed alternately or in turn with other steps or at least some of the steps or stages of other steps.
[0108] Based on the same inventive concept, embodiments of this application also provide an image retrieval system, including: a client, a server, and an image system terminal.
[0109] In this embodiment, the server is used to receive the first access request sent by the client, and transmit the access information in the first access request to the image system to obtain the image file format from the image system; the client is used to execute the steps in the page display method described in any of the above embodiments.
[0110] In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as follows: Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computing and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores data such as preset expiration times and image file information. The network interface communicates with external terminals via a network connection. When executed by the processor, the computer program implements a page display method.
[0111] Those skilled in the art will understand that Figure 5 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.
[0112] In one embodiment, a computer device is provided, including a memory and a processor. The memory stores a computer program, and the processor executes the computer program to perform the following steps: acquiring an image file format; determining a file parsing method based on the image file format and browser information; parsing the image file based on the file parsing method to obtain an image file stream corresponding to the image file information; rendering each page of the image file stream to obtain a rendered image; loading and displaying the rendered image until all rendered images corresponding to the image file stream have been displayed.
[0113] In one embodiment, when the processor executes the computer program, it further implements determining the file parsing method based on the image file format and browser information, and parsing the file based on the file parsing method to obtain the image file stream corresponding to the image file information. This may include: when the image file format is inconsistent with the target format, directly obtaining the image file stream corresponding to the image file information; when the image file format is consistent with the target format, obtaining browser information, including browser type and browser version number; when the browser type is consistent with the target type and the browser version number is consistent with the target version number, performing multi-threaded decoding on the image file image corresponding to the image file information to obtain the image file stream corresponding to the image file information; when the browser type is inconsistent with the target type or the browser version number is inconsistent with the target version number, calling the server to perform format conversion on the image file image corresponding to the image file information to obtain the image file stream corresponding to the format-converted image file information.
[0114] In one embodiment, when the processor executes the computer program, it also loads and displays the rendered image, which may include: obtaining the identifier of each of the multiple rendered images; obtaining the loading progress of each rendered image; when the loading progress indicates loading failure, decoding the rendered image based on the identifier to obtain the encoding of the rendered image; and loading the rendered image based on the encoding.
[0115] In one embodiment, before the processor executes the computer program to acquire the image file format, it may further include: sending a first access request to the server, and sending the access information in the first access request to the image system through the server; acquiring the request response result returned by the server based on the first access request; when the request response result carries a temporary token, sending the temporary token to the client, the temporary token being used by the image system to verify the client's identity when the client sends a second access request to the image system based on the temporary token, and sending the corresponding image file to the client after the identity verification is completed.
[0116] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, it performs the following steps: obtaining an image file format; determining a file parsing method based on the image file format and browser information; parsing the image file based on the file parsing method to obtain an image file stream corresponding to the image file information; rendering each page of the image file stream to obtain a rendered image; loading and displaying the rendered image until all rendered images corresponding to the image file stream have been displayed.
[0117] In one embodiment, when the computer program is executed by the processor, it further implements determining the file parsing method based on the image file format and browser information, and parsing the file based on the file parsing method to obtain the image file stream corresponding to the image file information. This may include: when the image file format is inconsistent with the target format, directly obtaining the image file stream corresponding to the image file information; when the image file format is consistent with the target format, obtaining browser information, including browser type and browser version number; when the browser type is consistent with the target type and the browser version number is consistent with the target version number, performing multi-threaded decoding on the image file image corresponding to the image file information to obtain the image file stream corresponding to the image file information; when the browser type is inconsistent with the target type or the browser version number is inconsistent with the target version number, calling the server to perform format conversion on the image file image corresponding to the image file information to obtain the image file stream corresponding to the format-converted image file information.
[0118] In one embodiment, when the computer program is executed by the processor, it further implements loading and displaying the rendered image, which may include: obtaining the identifier of each rendered image among a plurality of rendered images; obtaining the loading progress of each rendered image; when the loading progress indicates loading failure, decoding the rendered image based on the identifier of the rendered image to obtain the encoding of the rendered image; and loading the rendered image based on the encoding.
[0119] In one embodiment, before the computer program is executed by the processor to acquire the image file format, it may further include: sending a first access request to the server, and sending the access information in the first access request to the image system through the server; obtaining the request response result returned by the server based on the first access request; when the request response result carries a temporary token, sending the temporary token to the client, the temporary token is used by the image system to verify the client's identity when the client sends a second access request to the image system based on the temporary token, and sending the corresponding image file to the client after the identity verification is completed.
[0120] In one embodiment, a computer program product is provided, including a computer program that, when executed by a processor, performs the following steps: acquiring an image file format; determining a file parsing method based on the image file format and browser information; parsing the image file based on the file parsing method to obtain an image file stream corresponding to the image file information; rendering each page of the image file stream to obtain a rendered image; loading and displaying the rendered image until all rendered images corresponding to the image file stream have been displayed.
[0121] In one embodiment, when the computer program is executed by the processor, it further implements determining the file parsing method based on the image file format and browser information, and parsing the file based on the file parsing method to obtain the image file stream corresponding to the image file information. This may include: when the image file format is inconsistent with the target format, directly obtaining the image file stream corresponding to the image file information; when the image file format is consistent with the target format, obtaining browser information, including browser type and browser version number; when the browser type is consistent with the target type and the browser version number is consistent with the target version number, performing multi-threaded decoding on the image file image corresponding to the image file information to obtain the image file stream corresponding to the image file information; when the browser type is inconsistent with the target type or the browser version number is inconsistent with the target version number, calling the server to perform format conversion on the image file image corresponding to the image file information to obtain the image file stream corresponding to the format-converted image file information.
[0122] In one embodiment, when the computer program is executed by the processor, it further implements loading and displaying the rendered image, which may include: obtaining the identifier of each rendered image among a plurality of rendered images; obtaining the loading progress of each rendered image; when the loading progress indicates loading failure, decoding the rendered image based on the identifier of the rendered image to obtain the encoding of the rendered image; and loading the rendered image based on the encoding.
[0123] In one embodiment, before the computer program is executed by the processor to acquire the image file format, it may further include: sending a first access request to the server, and sending the access information in the first access request to the image system through the server; obtaining the request response result returned by the server based on the first access request; when the request response result carries a temporary token, sending the temporary token to the client, the temporary token is used by the image system to verify the client's identity when the client sends a second access request to the image system based on the temporary token, and sending the corresponding image file to the client after the identity verification is completed.
[0124] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties.
[0125] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM). The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0126] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0127] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this application should be determined by the appended claims.
Claims
1. A page display method, characterized in that, The method is applied to the client and includes: Obtain the image file format; Based on the image file format and browser information, the file parsing method is determined, and the image file is parsed based on the file parsing method to obtain the image file stream corresponding to the image file information; Each page of the image file stream is rendered to obtain a rendered image. The rendered image is then loaded and displayed until all rendered images corresponding to the image file stream have been displayed. The process of loading and displaying the rendered image includes: Obtain the identifier of each of the multiple rendered images; For each rendered image, obtain the loading progress of the rendered image; When the loading progress indicates loading failure, the rendered image is decoded based on its identifier to obtain its encoding. The rendered image is loaded based on the encoding.
2. The method according to claim 1, characterized in that, The process of determining the file parsing method based on the image file format and browser information, and parsing the file based on the file parsing method to obtain the image file stream corresponding to the image file information includes: When the image file format is inconsistent with the target format, the image file stream corresponding to the image file information is directly obtained; When the image file format is consistent with the target format, browser information is obtained; the browser information includes: browser type and browser version number; When the browser type is consistent with the target type and the browser version number is consistent with the target version number, the image file corresponding to the image file information is decoded in a multi-threaded manner to obtain the image file stream corresponding to the image file information. When the browser type is inconsistent with the target type, or the browser version number is inconsistent with the target version number, the server is called to perform format conversion on the image file corresponding to the image file information to obtain the image file stream corresponding to the format-converted image file information.
3. The method according to claim 1, characterized in that, Before obtaining the image file format, the process also includes: Send a first access request to the server, and send the access information in the first access request to the image system through the server; Obtain the request response result returned by the server based on the first access request; When the request response contains a temporary token, the temporary token is sent to the client. The temporary token is used by the image system to verify the client's identity when the client sends a second access request to the image system based on the temporary token, and then sends the corresponding image file to the client after the identity verification is completed.
4. A page display method, characterized in that, The method is applied to the imaging system and includes: Receive the second access request sent by the client; The system queries the image file corresponding to the second access request and sends the image file to the client. After receiving the image file, the client obtains the image file format; determines the file parsing method based on the image file format and browser information; parses the image file based on the file parsing method to obtain the image file stream corresponding to the image file information; renders each page of the image file stream to obtain a rendered image; loads and displays the rendered image until all rendered images corresponding to the image file stream have been displayed. The process of loading and displaying the rendered image includes: Obtain the identifier of each of the multiple rendered images; For each rendered image, obtain the loading progress of the rendered image; When the loading progress indicates loading failure, the rendered image is decoded based on its identifier to obtain its encoding. The rendered image is loaded based on the encoding.
5. The method according to claim 4, characterized in that, The second access request sent by the client carries a temporary token; After receiving the second access request sent by the client, the method further includes: The client's identity is verified based on the temporary token.
6. The method according to claim 5, characterized in that, Before receiving the second access request sent by the client, the following steps are included: Receive the first access request sent by the server; Verify the identity of the information requested in the first request transmitted from the server. When the authentication is successful, in response to the first access request, a verification message carrying a temporary token is sent to the server; when the authentication fails, a verification message carrying a failure message is sent to the server.
7. The method according to claim 6, characterized in that, Sending the image file to the client includes: Based on the temporary token, obtain the corresponding browser interface; Based on the browser interface, obtain the browser category and browser version number corresponding to the browser as browser information; Based on the temporary token, obtain the corresponding image file identifier, pagination information, and image file type; For each image file identifier, based on the pagination information, the multiple paginated images corresponding to the image file identifier are traversed to obtain the image file information; The image file information and the browser information are sent to the client.
8. The method according to claim 6, characterized in that, The first access request includes encrypted parameters encrypted with a public key; obtaining the client's identity information and the server's identity information, and authenticating the client and the server, including: Obtain the private key corresponding to the public key, and decrypt the encryption parameters using the private key to obtain the identity information of the client corresponding to the first access request, and the identity information of the server corresponding to the first access request; The client is first authenticated based on its identity information. After the first authentication is successful, the server is second authenticated based on its identity information. If the second authentication is successful, the authentication of the client and the server is successful; if the first authentication or the second authentication fails, the authentication of the client and the server fails.
9. The method according to claim 6, characterized in that, Before sending the image file information to the client based on the temporary token, the method further includes: Obtain the transmission time from sending the temporary token to the server to obtaining the temporary token sent by the client; If the transmission time exceeds the preset expiration time, a token expiration notification is sent to the client.
10. An image retrieval system, characterized in that, The system includes: a client, a server, and an imaging system terminal; The server is used to receive the first access request sent by the client, and transmit the access information in the first access request to the image system terminal so as to obtain the image file format from the image system terminal; The client is used to perform the steps in the page display method according to any one of claims 1 to 3.
11. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the method according to any one of claims 1 to 3 or 4 to 9.
12. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the computer program is executed by a processor, it implements the steps of the method according to any one of claims 1 to 3 or 4 to 9.
13. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the steps of the method according to any one of claims 1 to 3 or 4 to 9.