Method and device for adding file endorsement and electronic equipment

By introducing a slice loading mechanism between the client and the server, the problem of slow loading of large files and not timely sign synchronization in the signing batch have been solved.

CN119357138AInactive Publication Date: 2025-01-24AEROSPACE FOXIT SOFTWARE (BEIJING) CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202411899400.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-23
Publication Date
2025-01-24
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

When processing large files, the client loads slowly and takes a long time, and the sign-and-approval synchronization is not timely, resulting in poor user experience.

Method used

By introducing a slice loading mechanism between the client and the server, the client determines the slice page range of the target page based on the page number information and data volume information sent by the server, and sends a slice request to the server. The server divides the target page into multiple The sliced ​​document is sent to the client, and the client adds signatures to the sliced ​​document.

Benefits of technology

The waiting time for the first loading has been reduced, the online signing approval efficiency of the layout document is improved, the overall operating experience is improved, and the bandwidth consumption is reduced, making the system more adaptable, especially suitable for use in the mobile end or low bandwidth environment.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119357138A_ABST
    Figure CN119357138A_ABST
Patent Text Reader

Abstract

The invention provides a method and device for adding a file endorsement and electronic equipment, and relates to the technical field of electronic documents, the method is applied to a client, and the method comprises the steps that the endorsement file is added based on page number information of a to-be-added endorsement file sent by a server, data volume information of the to-be-added endorsement file and a data volume condition transmitted by a target page in the to-be-added endorsement file; determining at least one slice page range corresponding to a target page in the to-be-added endorsement file; sending a slice request carrying each slice page range to a server; receiving the slice document sent by the server; the slice document is obtained by slicing the target page based on each slice page range by the server; and adding the endorsement in the to-be-added endorsement file based on the slice document. According to the method and the device, the online endorsement efficiency and the operation experience of the layout document are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of electronic documents, and in particular to a method, device and electronic equipment for adding document signature and approval. Background Art

[0002] In the Open Fixed Document (OFD) review and annotation system, there are two main implementation methods: one is the complete document transmission method, which transmits the entire document from the server to the client at one time; the other is the server-side rendering method, which completes the document parsing and rendering work on the server side.

[0003] However, when facing large files, the above two implementation methods usually have problems such as slow loading, long time, and untimely signing and approval synchronization, thereby reducing the signing and approval efficiency. Summary of the invention

[0004] The present invention provides a method, device and electronic device for adding file approval, which are used to solve the problems of slow loading, long time, untimely synchronization of approval and the like on the client side for large files in the prior art, thereby reducing the defects of user experience, improving the efficiency of online approval of layout documents, and enhancing the overall operating experience.

[0005] The present invention provides a method for adding a document signature, which is applied to a client and includes: Determine at least one slice page range corresponding to the target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page in the file to be added for approval; the data volume condition is used to characterize the transmission speed of the file to be added for approval; Sending a slice request carrying each of the slice page ranges to the server; Receiving a slicing document sent by the server; the slicing document is obtained by the server slicing the target page based on each slicing page range; Based on the slice document, add approval to the file to be added with approval.

[0006] According to a method for adding file approval provided by the present invention, the method determines at least one slice page range corresponding to a target page in the file to be added for approval based on the page number information of the file to be added for approval sent by a server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page transmitted in the file to be added for approval, including: determining the target page based on the page number information of the file to be added for approval and the data volume information of the file to be added for approval; determining at least one slice page number corresponding to the target page based on the data volume information of the target page and the data volume condition of the target page transmitted; and determining the at least one slice page range based on each of the slice page numbers.

[0007] According to a method for adding file approval provided by the present invention, sending a slice request carrying each slice page range to the server includes: creating a corresponding thread for each slice page range; based on the thread corresponding to each slice page range, sending the corresponding slice page range to the server.

[0008] According to a method for adding file approval provided by the present invention, the approval is added to the file to be added based on the slice document, including: parsing the slice document and displaying the first page in the slice document; preloading the first n pages of the first page and the last n pages of the first page, where n is an integer greater than or equal to 1; in response to the user's operation of adding approval, adding approval on the page to be approved in the file to be added; the page to be approved is one or more of the first page, the first n pages, and the last n pages.

[0009] The present invention also provides a method for adding a file signature, which is applied to a server and includes: Obtaining information about the number of pages of the document to be added for approval and information about the amount of data of the document to be added for approval; Sending the page number information of the file to be added for approval and the data volume information of the file to be added for approval to the client; the page number information of the file to be added for approval and the data volume information of the file to be added for approval are used by the client to determine at least one slice page range corresponding to the target page in the file to be added for approval; Receiving a slicing request sent by the client and carrying the range of each slicing page; Based on each of the slice page ranges, slicing the target page to obtain a slice document; The slice document is sent to the client; the slice document is used by the client to add approval to the file to be added.

[0010] According to a method for adding file approval provided by the present invention, the target page is sliced ​​based on each slice page range to obtain a slice document, including: based on the slice page range, the target page is sliced ​​to obtain the document content corresponding to the slice page range and the data volume corresponding to the slice page range; based on the data volume corresponding to the slice page range, the number of slice pages corresponding to the slice page range is adjusted to obtain a target number of slice pages; based on the target number of slice pages, the document content is sliced ​​to obtain an initial slice document; the initial slice document, the identifier corresponding to the initial slice document and the attribute information corresponding to the initial slice document are encapsulated to obtain the slice document.

[0011] According to a method for adding file approval provided by the present invention, after sending the slice document to the client, the method also includes: receiving the approved slice document sent by the client; the approved slice document is obtained by the client in response to the user's submission operation for approval, integrating the approval time, user identification, approval text and approval image; merging the approved slice document into the file to be added for approval, to obtain the target file for adding approval.

[0012] The present invention also provides a device for adding a document signature, comprising the following modules: A determination module, configured to determine at least one slice page range corresponding to a target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition for transmission of the target page in the file to be added for approval; the data volume condition is used to characterize the transmission speed of the file to be added for approval; A first sending module, used for sending a slice request carrying each slice page range to the server; A first receiving module is used to receive a slicing document sent by the server; the slicing document is obtained by the server slicing the target page based on each slicing page range; An adding module is used to add approval to the file to be added based on the slice document.

[0013] The present invention further provides a device for adding a document signature, comprising the following modules: An acquisition module, used to acquire the page number information of the document to be added for approval and the data volume information of the document to be added for approval; The second sending module is used to send the page number information of the file to be added for approval and the data volume information of the file to be added for approval to the client; the page number information of the file to be added for approval and the data volume information of the file to be added for approval are used by the client to determine at least one slice page range corresponding to the target page in the file to be added for approval; A second receiving module is used to receive a slicing request sent by the client and carrying the range of each slicing page; A slicing module, used for slicing the target page based on each slicing page range to obtain a slicing document; The third sending module is used to send the slice document to the client; the slice document is used by the client to add approval to the file to be added.

[0014] The present invention also provides an electronic device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein when the processor executes the computer program, the method for adding file signature and approval as described in any one of the above methods is implemented.

[0015] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the method for adding a file signature as described in any one of the above is implemented.

[0016] The present invention also provides a computer program product, comprising a computer program, wherein when the computer program is executed by a processor, the method for adding file approval as described in any one of the above methods is implemented.

[0017] The method, device and electronic device for adding file approval provided by the present invention determine at least one slice page range corresponding to the target page in the file to be added based on the page number information of the file to be added sent by the server, the data volume information of the file to be added sent by the server and the data volume condition of the target page in the file to be added, and send a slice request carrying each slice page range to the server, so that the server divides the target page into multiple slice documents according to the slice page range and sends them to the client, and the client adds the approval to the file to be added according to the slice document. In this way, by using slice loading, the client only requests the document page fragments that need to be displayed, and there is no need to load the entire document at one time, which reduces the waiting time for the initial loading, improves the efficiency of online approval of layout documents, improves the overall operating experience, and reduces bandwidth consumption, making the system more adaptable, especially suitable for use on mobile terminals or in low-bandwidth environments. BRIEF DESCRIPTION OF THE DRAWINGS

[0018] In order to more clearly illustrate the technical solutions in the present invention or the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0019] Figure 1 This is one of the flow charts of the method for adding document approval provided by the present invention.

[0020] Figure 2 This is the second flow chart of the method for adding document approval provided by the present invention.

[0021] Figure 3 This is the third flow chart of the method for adding document approval provided by the present invention.

[0022] Figure 4 It is a structural schematic diagram of a first device for adding document signature and approval provided by the present invention.

[0023] Figure 5 It is a structural schematic diagram of a second device for adding document signature and approval provided by the present invention.

[0024] Figure 6 It is a structural schematic diagram of the electronic device provided by the present invention. DETAILED DESCRIPTION

[0025] In order to make the purpose, technical solution and advantages of the present invention clearer, the technical solution of the present invention will be clearly and completely described below in conjunction with the drawings of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0026] At present, although the complete document transmission method is simple and easy to implement, for large-file contract documents, the transmission time is long and the system response is slow, resulting in poor user experience. In an environment with limited network bandwidth, the long loading time may even cause the request to time out and fail. Although the server-side rendering method reduces the processing burden on the client, it will cause the display to be unsmooth due to network delays, and the client and server need to communicate frequently to transmit images or texts, which brings high transmission pressure and affects the user experience. Therefore, when facing large files, the above two implementation methods usually have problems such as slow loading, long time, and untimely signing and approval synchronization, thereby reducing the user experience.

[0027] Based on the above problems, the present invention provides a method for adding file approval. By adopting slice loading, the client only requests the document page fragment that needs to be displayed, and there is no need to load the entire document at one time, thereby reducing the waiting time for the initial loading, improving the efficiency of online approval of layout documents, enhancing the overall operating experience, and reducing bandwidth consumption, making the system more adaptable, and particularly suitable for use on mobile terminals or in low-bandwidth environments.

[0028] Combine the following Figure 1-Figure 3 The method for adding file signatures and approvals of the present invention is described. The method for adding file signatures and approvals is applicable to adding signatures and approvals to any file. The execution subject of the method can be an electronic device or a device for adding file signatures and approvals set in the electronic device. The device for adding file signatures and approvals can be implemented by software, hardware, or a combination of both.

[0029] Figure 1 This is one of the flow charts of the method for adding a document signature provided by the present invention, such as Figure 1 As shown, the method is applied to the client and includes the following: Step 101: determine at least one slice page range corresponding to the target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page transmitted in the file to be added for approval.

[0030] The data volume condition is used to characterize the transmission speed of the file to be added for signature and approval; The slicing page range is the range for slicing the target page in the file to be added for signature and approval.

[0031] Here, the client includes but is not limited to mobile phones, computers, tablets, etc.

[0032] Here, approval refers to any form of content added by a user to a document, including but not limited to user signature, annotations to a document, modification to a document, or adding an image to a document.

[0033] Here, the data volume information refers to the size of the space occupied by the file to be added for approval.

[0034] Here, the target page may be a page that the client needs to load at one time, or a page that requires the user to add a signature. The target page includes one or more pages.

[0035] The data volume condition for the target page to be added to the signature approval file can be obtained from the client or from the server, which is not limited in the present invention.

[0036] In one embodiment, the data amount condition for target page transfer may be any appropriate threshold, such as 5 megabytes (MB), 6 MB, etc.

[0037] In one embodiment, after the client initiates a request to the server to obtain basic information of the file to be added for approval, the server responds to the request and sends the client information about the number of pages in the file to be added for approval and the amount of data in the file to be added for approval. Here, in addition to the number of pages and amount of data in the file to be added for approval, the basic information may also include the types of operations supported by the file.

[0038] Here, the method for determining the slice page range can be any appropriate method, for example, the slice page range is determined based on the mapping relationship between the number of pages information, the data volume information, the data volume conditions of the target page transmitted in the file to be added for approval, and the slice page range; for another example, the slice page range is calculated based on the number of pages information, the data volume information, and the data volume conditions of the target page transmitted in the file to be added for approval.

[0039] Exemplarily, the method determines at least one slice page range corresponding to the target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page transmitted in the file to be added for approval, including: determining the target page based on the page number information of the file to be added for approval and the data volume information of the file to be added for approval; determining at least one slice page number corresponding to the target page based on the data volume information of the target page and the data volume condition of the target page transmitted; and determining the at least one slice page range based on each slice page number.

[0040] Here, the data volume information of the target page can be sent by the server to the client after the client makes a request to the server; or it can be sent by the server to the client after the client initiates a request to the server to obtain the basic information of the document to be added for approval, and the basic information includes the data volume of each page of the document. The present invention does not limit the method for obtaining the data volume information of the target page.

[0041] It should be noted that if the data volume of the target page is less than the threshold, there is no need to adjust the number of slice pages; if the data volume of the target page is greater than the threshold, the transmission efficiency will be under pressure, and the number of slice pages needs to be divided into two groups to reduce the number of slice pages for each document, and continue to determine whether the data volume after reducing the number of slice pages is less than the threshold. If it is greater than the threshold, continue to group until the data volume is less than the threshold, and use the final number of slice pages as the slice page range.

[0042] In another embodiment, the data volume condition for the target page transmission may also be whether the data volume of the target page is less than a preset threshold. If the data volume of the target page meets the data volume condition, the slice page is not adjusted; if not, the slice page is divided into two groups, and it is further determined whether the data volume after grouping meets the data volume condition. If the data volume condition is not met, the grouping is continued until the data volume condition is met to obtain the slice page range.

[0043] For example, the document to be added for signature and approval contains 50 pages of content and a data volume of 30 megabytes. The slicing loading method of 5 pages at a time is adopted. Here, the target pages are pages 1 to 5. The client requests the document data volume of pages 1 to 5 from the server, and determines whether the document data volume is less than the fast transmission condition (i.e., the data volume condition). If it is less, the slicing page range is determined to be pages 1 to 5; otherwise, the slicing page range is reduced and pages 1 to 5 are sent separately, for example, 1 to 3 are divided into one slicing page range, and 4 to 5 are divided into another slicing page range.

[0044] In the embodiment of the present invention, the number of slice pages is dynamically adjusted according to the data volume of the page content, which can not only meet the requirements of fast transmission, but also avoid transmission congestion by reducing the number of slice pages when the document content is large. This flexible slicing method not only improves transmission efficiency, but also avoids excessive occupation of system resources.

[0045] Step 102: Send a slice request carrying the range of each slice page to the server.

[0046] Here, the client can send one request carrying the slice page range to the server at a time, or send multiple slice requests carrying the slice page range at the same time.

[0047] Exemplarily, a specific method for simultaneously sending multiple slice requests carrying slice page ranges includes: creating a corresponding thread for each slice page range; and sending the corresponding slice page range to the server based on the thread corresponding to each slice page range.

[0048] Here, a thread is the smallest unit in which the operating system can perform computational scheduling. Multiple threads can be executed concurrently in the same process. That is, sending a slice request is a process, and the process sending the slice request can concurrently send multiple slice page ranges to the server.

[0049] In the embodiment of the present invention, a multi-threaded request is initiated on the client, so that page loading can be processed in parallel, which improves the loading speed and response speed, and further enhances the user experience when opening a document for the first time.

[0050] Step 103: Receive the slice document sent by the server.

[0051] The slicing document is obtained by the server slicing the target page based on the slicing page ranges.

[0052] Here, the slice document is a part of the document to be approved.

[0053] In an embodiment of the present invention, the server may send the slice document by breakpoint resume transmission or multi-thread transmission.

[0054] In one embodiment, in order to better ensure the integrity of the document, the slice document may include a document identifier (ID).

[0055] Step 104: Based on the slice document, add approval to the file to be added.

[0056] In the embodiment of the present invention, after receiving the slice document, the client determines from the slice document a page to which approval needs to be added, and adds the approval to the page.

[0057] Furthermore, adding approvals to the file to be added based on the slice document includes: parsing the slice document and displaying the first page in the slice document; preloading the first n pages of the first page and the last n pages of the first page; in response to the user's operation of adding approvals, adding approvals on the pages to be added in the file to be added, where n is an integer greater than or equal to 1; the pages to be added are one or more of the first page, the first n pages, and the last n pages.

[0058] Here, the first page may be a page specified by the user; or may be a starting page of the slice document.

[0059] Here, after parsing the slice document, the document content in the slice document is obtained and stored in the cache, and then the first page is loaded and displayed on the client. The client automatically preloads the first n pages and the next n pages, and displays the first n pages or the next n pages according to the user's page turning instructions.

[0060] In the embodiment of the present invention, the setting of preloading pages (current page, previous page, next page) ensures a smooth experience for users when turning pages without any perception, avoiding the phenomenon of freezing. For smaller documents, all pages can be preloaded at one time, improving the reading and approval fluency of users.

[0061] It should be noted that the number of preloaded pages can be a pre-set appropriate number of pages, such as 3 pages, the previous page (nk), the current page (n), and the next page (n+k), where k=1 (the k value can be adjusted according to actual needs to adjust the number of preloaded pages). The sliced ​​document must contain at least 3 pages of content. If the total number of pages in the document is less than 3, all of them are loaded. If it is greater than 3 pages, and the last sliced ​​document has less than 3 pages, all the remaining pages are loaded.

[0062] In an embodiment of the present invention, based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page in the file to be added for approval, at least one slice page range corresponding to the target page in the file to be added for approval is determined, and a slice request carrying each slice page range is sent to the server, so that the server divides the target page into multiple slice documents according to the slice page range and sends them to the client, and the client adds the approval to the file to be added for approval according to the slice document. In this way, by adopting slice loading, the client only requests the document page fragments that need to be displayed, and there is no need to load the entire document at one time, which reduces the waiting time for the initial loading, improves the efficiency of online approval of layout documents, improves the overall operating experience, and reduces bandwidth consumption, making the system more adaptable, especially suitable for use on mobile terminals or in low-bandwidth environments.

[0063] Figure 2 FIG. 2 is a flow chart of the method for adding a document signature provided by the present invention. Figure 2 As shown, the method is applied to the server and includes the following: Step 201: Obtain page number information of the document to be added for approval and data volume information of the document to be added for approval.

[0064] Step 202: Send the page number information of the file to be added for approval and the data volume information of the file to be added for approval to the client.

[0065] The page number information of the file to be added for approval and the data volume information of the file to be added for approval are used by the client to determine at least one slice page range corresponding to the target page in the file to be added for approval.

[0066] Step 203: Receive a slice request sent by the client and carrying the range of each slice page.

[0067] Here, the way the client sends a slice request can refer to the above step 201 and will not be repeated here.

[0068] Step 204: based on each of the slice page ranges, slice the target page to obtain a slice document.

[0069] Furthermore, based on each of the slicing page ranges, the target page is sliced ​​to obtain a slice document, including: based on the slicing page range, the target page is sliced ​​to obtain the document content corresponding to the slicing page range and the data volume corresponding to the slicing page range; based on the data volume corresponding to the slicing page range, the number of slice pages corresponding to the slicing page range is adjusted to obtain a target number of slice pages; based on the target number of slice pages, the document content is sliced ​​to obtain an initial slicing document; the initial slicing document, the identifier corresponding to the initial slicing document and the attribute information corresponding to the initial slicing document are encapsulated to obtain the slicing document.

[0070] Here, the attribute information is also called metadata information, which may include data volume information of the initial slice document and page number information of the initial slice document.

[0071] It should be noted that after receiving the slice page range, the server parses the file to be added for approval, extracts the target page, and slices the target page according to the slice page range to obtain the document content corresponding to the slice page range and the data volume corresponding to the slice page range. Then, it is determined whether the data volume corresponding to the slice page range is less than the threshold value. If it is less than, there is no need to adjust the number of slice pages; if it is greater, the slice page range needs to be grouped to reduce the number of slice pages until the data volume after reducing the number of slice pages is less than the threshold value to obtain the target number of slice pages; according to the target number of slice pages, the document content is continued to be sliced ​​to obtain the initial slice document, and the initial slice document, the identifier corresponding to the initial slice document, and the attribute information corresponding to the slice document are encapsulated to obtain the slice document.

[0072] In the embodiment of the present invention, if the document is complex and the amount of data on a single page is large, the number of slice pages is further adjusted through the server to ensure that the slice document is suitable for fast transmission.

[0073] Step 205: Send the slice document to the client.

[0074] The slice document is used by the client to add approval to the file to be added.

[0075] In an embodiment of the present invention, the client determines at least one slice page range corresponding to the target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page in the file to be added for approval, and sends a slice request carrying each slice page range to the server, so that the server divides the target page into multiple slice documents according to the slice page range and sends them to the client. The client adds the approval to the file to be added for approval based on the slice documents. In this way, by using slice loading, the client only requests the document page fragments that need to be displayed, and there is no need to load the entire document at one time, which reduces the waiting time for the initial loading, improves the efficiency of online approval of layout documents, improves the overall operating experience, and reduces bandwidth consumption, making the system more adaptable, especially suitable for use on mobile terminals or in low-bandwidth environments.

[0076] Furthermore, after sending the slice document to the client, the method also includes: receiving the approved slice document sent by the client; the approved slice document is obtained by the client in response to the user's submission operation for approval, integrating the approval time, user identification, approval text and approval image; merging the approved slice document into the file to be added for approval, to obtain the target file for adding approval.

[0077] Here, the approved slice document only contains the page where the approval information is located.

[0078] It should be noted that when the user triggers the approval completion operation, the client will assemble the approval page (number of pages >= 1) information, create a new slice document, and transmit it back to the server.

[0079] It should be noted that the method of merging the signed and approved sliced ​​document into the file to be added for approval can be any appropriate method, for example, extracting the front and back document fragments of the signed and approved sliced ​​document on the file to be added for approval, generating new sliced ​​documents respectively, and then splicing the three sliced ​​documents in sequence to generate a new approved document; for example, replacing the corresponding documents and contents in the file to be added for approval with the files and resource contents in the sliced ​​document to ensure the correctness of the document and form a new approved document.

[0080] In an embodiment of the present invention, the server may merge the approved sliced ​​documents into the file to be added for approval after each approval is completed, or after all approvals are completed, the document is closed to trigger a stitching operation.

[0081] In an embodiment of the present invention, the approved sliced ​​document only transmits the page content changed by the user, which reduces the amount of data transmitted. In the scenario where the document is frequently approved, the response speed of the system is ensured and the processing efficiency of the approval is improved.

[0082] The following is an application scenario of adding file approval provided by the present invention.

[0083] In this application scenario, an online contract review and approval system is developed. Users can browse and sign contract documents through the client. The document uses the OFD (Open Fixed-layout Document) format.

[0084] Figure 3 FIG. 3 is a flow chart of the method for adding a document signature provided by the present invention. Figure 3 As shown, the interaction between the client and the server includes: Step 301: The client requests basic document information from the server.

[0085] Step 302: The server returns basic document information to the client.

[0086] Specifically, the client sends a HyperText Transfer Protocol (HTTP) request to the server, which includes the ID of the file to be added for approval, the number of pages and data volume of the file to be added for approval, and the types of operations supported by the file to be added for approval; after receiving the request, the server reads the basic information of the document (for example, the total number of pages, file size, supported operation types, etc.), and encapsulates it into an object notation (JavaScript Object Notation, JSON) format and returns it to the client; the client parses the JSON data and reads that the total number of pages of the contract is 50 pages, the file size is 30MB, and the types of operations supported by the document are: approval, etc.

[0087] Step 303: The client sends a multi-threaded request for a slice document to the server.

[0088] For example, the client estimates the loading strategy based on the total number of pages and the file size, and decides to adopt the slicing loading method of 5 pages at a time, and initially loads the first 5 pages. Specifically, multi-threaded request setting: the client creates multiple threads, each thread is responsible for requesting a page segment, and requests pages 1-5 in parallel; slicing request sending: each thread sends the slicing page range (for example, "requesting pages 1 to 5") and the document ID to the server.

[0089] Step 304: The server returns the slice document to the client.

[0090] The server dynamically segments the OFD document and generates corresponding slices according to the requested page range. Specifically, document parsing: the server uses the OFD parser to load the target document; page extraction: the server extracts the page content, resources, metadata information, etc. according to the requested page range (such as pages 1-5); dynamic segmentation: the server dynamically determines the number of slice pages according to the page data volume. If the document is complex and the single page data volume is large, the number of pages can be reduced to ensure that the slice document is suitable for fast transmission; packaging and return: the server packages the slice document ID, page content, metadata and other information into an independent OFD document slice and returns it to the client; output data: return the slice document (OFD format file of pages 1-5).

[0091] Step 305: The client receives the slice document, displays the current page, and loads the first n pages and the next n pages.

[0092] The client receives the slice document and preloads it. The client receives and displays the slice documents on pages 1-5, and preloads them for a smoother reading experience. Specifically, slice parsing: the slice documents (pages 1-5) received by the client are decoded and stored in the cache; current page loading: page 1 is loaded by default (or the starting page specified by the user) and rendered to the interface; preloading mechanism: the client automatically preloads page 2 (the page after the current page, if the previous page exists, it also needs to be loaded). If the user jumps to an unloaded page (for example, page 6), a new request is triggered to load a new slice document; output data: currently displayed page, page 1, preloaded page, page 2.

[0093] Step 306: The user adds a signature on the page through the client.

[0094] Step 307: The client generates a signed and approved slice document and sends it to the server.

[0095] User approval operation, the user signs on page 2, and clicks "Submit" after completing the signature. Specifically, approval generation: the client integrates the user's signature information (such as signature image, text annotation) to generate a new "approval slice document", which only contains the page where the approval content is located (page 2); data encapsulation: the approval slice document contains page content and approval metadata (such as approval time, user ID, signature image, etc.); data transmission: the client sends the approval slice document to the server; output data: approval slice document (page 2, including approval information).

[0096] Step 308: The server puts the signed slice document into the cache queue.

[0097] Step 309: The server merges the signed and approved slice document into the file to be added for approval, generating a complete file including the approval.

[0098] The server-side approval merge operation, after receiving the approval slice document, merges the approval content back to the original document. Specifically, cache queue: the server puts the approval slice document into the cache queue and waits for the merge operation; select the merge method; merge execution: the server operates according to the selected merge method to generate a new version of the contract document containing the approval content; output data: the merged document version (including the approval on page 2). Among them, the merge method can include the following two methods: Method 1: Extract the context of the approved page, generate slice documents separately, and stitch them together in order to form a complete document.

[0099] Method 2: Directly replace the original content of the approval page to update the approval data.

[0100] Step 310: The user performs a page turning operation on the client.

[0101] Step 311: The client sends the next round of loading requests to the server.

[0102] Client page turning operation and loop loading: After the user finishes reading page 5, he turns the page down to page 6, triggering a new page loading request. Specifically, page judgment: the client judges that page 6 is not in the current slice cache; slice request: the client initiates a new request to request the slice document of pages 6-10; server response: the server generates the slice document of pages 6-10 according to the slice process introduced in step 3 and returns it to the client; repeated loading: after the client receives the slice document, it updates the cache again according to the preloading method of step 4; output data: slice document (pages 6-10), load page 6 and preload page 7, and recycle page 4 resources (if page 4 has been loaded).

[0103] The device for adding a document signature provided by the present invention is described below. The device for adding a document signature described below and the method for adding a document signature described above can be referred to each other.

[0104] Figure 4 is a schematic diagram of the structure of the first device for adding a document signature provided by the present invention, such as Figure 4 As shown, the first device 400 for adding a file for review and approval includes: a determination module 401, a first sending module 402, a first receiving module 403 and an adding module 404, wherein: The determination module 401 is used to determine at least one slice page range corresponding to the target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page in the file to be added for approval; the data volume condition is used to characterize the transmission speed of the file to be added for approval; A first sending module 402 is used to send a slice request carrying each slice page range to the server; The first receiving module 403 is used to receive a slicing document sent by the server; the slicing document is obtained by the server slicing the target page based on each slicing page range; The adding module 404 is used to add approval to the file to be added based on the slice document.

[0105] In an example embodiment, the determination module 401 is specifically used to: determine the target page based on the page number information of the file to be added for approval and the data volume information of the file to be added for approval; continuously adjust the number of slice pages based on the data volume information of the target page and the data volume condition of the target page transmission; and determine the at least one slice page range based on the number of slice pages.

[0106] In an exemplary embodiment, the first sending module 402 is specifically used to: create a corresponding thread for each of the slice page ranges; and send the corresponding slice page range to the server based on the thread corresponding to each of the slice page ranges.

[0107] In an exemplary embodiment, the adding module 404 is specifically used to: parse the slice document and display the first page in the slice document; preload the first n pages of the first page and the last n pages of the first page, where n is an integer greater than or equal to 1; in response to the user's adding operation for the approval, add the approval on the page to be approved in the file to be added; the page to be approved is one or more of the first page, the first n pages, and the last n pages.

[0108] Figure 5 A schematic diagram of the structure of the second device for adding a document signature provided by the present invention is as follows: Figure 5 As shown, the second device 500 for adding file approval includes: an acquisition module 501, a second sending module 502, a second receiving module 503, a slicing module 504, and a third sending module 505, wherein: An acquisition module 501 is used to acquire the page number information of the document to be added for approval and the data volume information of the document to be added for approval; The second sending module 502 is used to send the page number information of the file to be added for approval and the data volume information of the file to be added for approval to the client; the page number information of the file to be added for approval and the data volume information of the file to be added for approval are used by the client to determine at least one slice page range corresponding to the target page in the file to be added for approval; The second receiving module 503 is used to receive a slicing request carrying each slicing page range sent by the client; A slicing module 504 is used to slice the target page based on each of the slice page ranges to obtain a slice document; The third sending module 505 is used to send the slice document to the client; the slice document is used by the client to add approval to the file to be added with approval.

[0109] In an example embodiment, the slicing module 504 is specifically used to: based on the slicing page range, slice the target page to obtain the document content corresponding to the slicing page range and the data volume corresponding to the slicing page range; based on the data volume corresponding to the slicing page range, adjust the number of slicing pages corresponding to the slicing page range to obtain the target number of slicing pages; based on the target number of slicing pages, slice the document content to obtain an initial slicing document; encapsulate the initial slicing document, the identifier corresponding to the initial slicing document, and the attribute information corresponding to the initial slicing document to obtain the slicing document.

[0110] In an exemplary embodiment, the second device 500 for adding file approval also includes a merging module. After sending the slice document to the client, the merging module is further specifically used to: receive the approved slice document sent by the client; the approved slice document is obtained by the client in response to the user's submission operation for approval, integrating the approval time, user identification, approval text and approval image; merge the approved slice document into the file to be added for approval, to obtain the target file for adding approval.

[0111] Figure 6 is a schematic diagram of the structure of the electronic device provided by the present invention, such as Figure 6As shown, the electronic device may include: a processor 610, a communication interface 620, a memory 630 and a communication bus 640, wherein the processor 610, the communication interface 620 and the memory 630 communicate with each other through the communication bus 640. The processor 610 may call the logic instructions in the memory 630 to execute the method for adding a file to be signed and approved, the method comprising: based on the page number information of the file to be added and approved and the data volume information of the file to be added and approved sent by the server, determining at least one slicing page range corresponding to the target page in the file to be added and approved; the slicing page range is the range for slicing the target page in the file to be added and approved; sending a slicing request carrying each of the slicing page ranges to the server; receiving a slicing document sent by the server; the slicing document is obtained by the server slicing the target page based on each of the slicing page ranges; adding a signature to the file to be added and approved based on the slicing document.

[0112] In addition, the logic instructions in the above-mentioned memory 630 can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when it is sold or used as an independent product. Based on such an understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.

[0113] On the other hand, the present invention also provides a computer program product, which includes a computer program. The computer program can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the method provided by the above-mentioned methods to execute the method of adding file approval, the method including: based on the page number information of the file to be added and the data volume information of the file to be added, determining at least one slicing page range corresponding to the target page in the file to be added; the slicing page range is the range for slicing the target page in the file to be added; sending a slicing request carrying each of the slicing page ranges to the server; receiving a slicing document sent by the server; the slicing document is obtained by the server slicing the target page based on each of the slicing page ranges; and adding an approval in the file to be added based on the slicing document.

[0114] On the other hand, the present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, is implemented to execute the methods provided by the above-mentioned methods for executing the method of adding file approval, the method comprising: determining at least one slicing page range corresponding to a target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server and the data volume information of the file to be added for approval; the slicing page range is the range for slicing the target page in the file to be added for approval; sending a slicing request carrying each of the slicing page ranges to the server; receiving a slicing document sent by the server; the slicing document is obtained by the server slicing the target page based on each of the slicing page ranges; and adding an approval in the file to be added for approval based on the slicing document.

[0115] The device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. Ordinary technicians in this field can understand and implement it without paying creative labor.

[0116] Through the description of the above implementation methods, those skilled in the art can clearly understand that each implementation method can be implemented by means of software plus a necessary general hardware platform, and of course, can also be implemented by hardware. Based on this understanding, the above technical solution is essentially or the part that contributes to the prior art can be embodied in the form of a software product, and the computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, a disk, an optical disk, etc., including a number of instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in each embodiment or some parts of the embodiments.

[0117] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, rather than to limit it. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present invention.

Claims

1. A method for adding a document signature, applied to a client, characterized in that: include: Determine at least one slice page range corresponding to the target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page in the file to be added for approval; the data volume condition is used to characterize the transmission speed of the file to be added for approval; Sending a slice request carrying each of the slice page ranges to the server; Receiving the slice document sent by the server; The slicing document is obtained by the server slicing the target page based on each slicing page range; Based on the slice document, add approval to the file to be added with approval.

2. The method for adding document approval according to claim 1, characterized in that: The determining, based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition of the target page in the file to be added for approval, at least one slice page range corresponding to the target page in the file to be added for approval comprises: Determining the target page based on the page number information of the document to be added for approval and the data volume information of the document to be added for approval; Determine at least one slice page number corresponding to the target page based on the data volume information of the target page and the data volume condition of the target page transmission; Based on the number of slice pages, at least one slice page range is determined.

3. The method for adding document approval according to claim 1 or 2, characterized in that: The sending a slice request carrying each slice page range to the server includes: Creating a corresponding thread for each of the slice page ranges; Based on the threads corresponding to each of the slice page ranges, the corresponding slice page ranges are sent to the server.

4. The method for adding document approval according to claim 1 or 2, characterized in that: The adding of the approval to the file to be added based on the slice document includes: Parsing the slice document and displaying the first page in the slice document; Preloading the first n pages of the first page and the last n pages of the first page, where n is an integer greater than or equal to 1; In response to the user's adding operation for approval, the approval is added on the page to be approved in the file to be added; the page to be approved is one or more of the first page, the first n pages, and the last n pages.

5. A method for adding a document signature, applied to a server, characterized in that: include: Obtaining information about the number of pages of the document to be added for approval and information about the amount of data of the document to be added for approval; Sending to the client the page number information of the file to be added for approval and the data volume information of the file to be added for approval; The page number information of the file to be added for approval and the data volume information of the file to be added for approval are used by the client to determine at least one slice page range corresponding to the target page in the file to be added for approval; Receiving a slicing request sent by the client and carrying the range of each slicing page; Based on each of the slice page ranges, slicing the target page to obtain a slice document; Sending the slice document to the client; The slice document is used by the client to add approval to the file to be added with approval.

6. The method for adding document approval according to claim 5, characterized in that: The step of slicing the target page based on each of the slicing page ranges to obtain a slicing document includes: Based on each of the slice page ranges, the target page is sliced ​​to obtain the document content corresponding to each of the slice page ranges and the data volume corresponding to each of the slice page ranges; Based on the amount of data corresponding to the slice page range, the number of slice pages corresponding to the slice page range is adjusted to obtain a target number of slice pages; Based on the target number of slice pages, the document content is sliced ​​to obtain an initial slice document; The initial slicing document, the identifier corresponding to the initial slicing document, and the attribute information corresponding to the initial slicing document are encapsulated to obtain the slicing document.

7. The method for adding document approval according to claim 5 or 6, characterized in that: After sending the slice document to the client, the method further includes: Receiving the approved slice document sent by the client; the approved slice document is obtained by integrating the approval time, user identification, approval text and approval image in response to the user's submission operation for approval by the client; The approved slice document is merged into the file to be added for approval to obtain the target file for adding approval.

8. A device for adding document signature, characterized in that: include: A determination module, configured to determine at least one slice page range corresponding to a target page in the file to be added for approval based on the page number information of the file to be added for approval sent by the server, the data volume information of the file to be added for approval sent by the server, and the data volume condition for transmission of the target page in the file to be added for approval; the data volume condition is used to characterize the transmission speed of the file to be added for approval; A first sending module, used for sending a slice request carrying each slice page range to the server; A first receiving module, used for receiving a slice document sent by the server; The slicing document is obtained by the server slicing the target page based on each slicing page range; An adding module is used to add approval to the file to be added based on the slice document.

9. A device for adding document signature, characterized in that: include: An acquisition module, used to acquire the page number information of the document to be added for approval and the data volume information of the document to be added for approval; The second sending module is used to send the page number information of the file to be added for approval and the data volume information of the file to be added for approval to the client; The page number information of the file to be added for approval and the data volume information of the file to be added for approval are used by the client to determine at least one slice page range corresponding to the target page in the file to be added for approval; A second receiving module is used to receive a slicing request sent by the client and carrying the range of each slicing page; A slicing module, used for slicing the target page based on each slicing page range to obtain a slicing document; A third sending module, used for sending the slice document to the client; The slice document is used by the client to add approval to the file to be added with approval.

10. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the method for adding a document approval as described in any one of claims 1 to 4 or the method for adding a document approval as described in any one of claims 5 to 7 is implemented.

Citation Information

Patent Citations

  • Method and system for generating separated electronic signature of PDF (Portable Document Format) file and storage medium

    CN114117544A

  • Method for converting layout data stream file into OFD file

    CN114118007A

  • File transmission method and device

    CN115037741A

  • Method for realizing offline transmission annotation of pdf file based on open-source Gawan system

    CN118827660A

  • Page data transmission controlling method and related device

    WO2020253057A1