PDF (Portable Document Format) file online annotation method and system, electronic equipment and storage medium

By converting PDF files into Word documents and generating privacy keys to calculate the annotation content, the problem of insufficient convenience and privacy protection in PDF annotation technology is solved, and a convenient and secure annotation process is achieved.

CN120449819APending Publication Date: 2025-08-08SHANGHAI ACCUR TESTING TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202510445045.8
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-10
Publication Date
2025-08-08

AI Technical Summary

Technical Problem

The existing PDF annotation technology has problems such as inconvenient annotation process and insufficient privacy protection of the annotation content, which leads to a decline in user experience and the easy access of others within the annotation.

Method used

By converting PDF files into Word documents, users annotate the Word documents, generate a privacy key and calculate the annotated content, obtain privacy comments, and determine whether to display the annotated content based on user access rights.

Benefits of technology

It improves the convenience and privacy security of PDF annotations, ensures that the annotated content is only visible to authorized users, and enhances the security and effectiveness of privacy protection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120449819A_ABST
    Figure CN120449819A_ABST
Patent Text Reader

Abstract

The invention discloses a PDF file online annotation method and system, electronic equipment and a storage medium, and relates to the technical field of PDF annotation, and the method comprises the following steps: a user uploads a PDF file, and converts the PDF file into a Word document; annotating the Word document by the user to obtain annotation content of the user; performing operation on the annotation content through a privacy security algorithm, and inputting a ciphertext obtained after operation into a ciphertext space to obtain a privacy annotation; storing the privacy annotation, and judging whether the annotation content can be displayed for the user or not based on the authority when the user accesses; the method and the device are used for solving the problems that in the existing PDF annotation technology, the annotation process is not convenient enough, privacy protection on annotation content is insufficient, the use experience of a user is reduced, and annotations are easily obtained by others.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of PDF annotation, and in particular to a PDF file online annotation method, system, electronic equipment and storage medium. Background Art

[0002] PDF annotation technology refers to a technology for annotating PDF files online. Its core purpose is to provide users with a more convenient way to annotate PDF files, or to ensure the privacy and security of users' annotations.

[0003] Existing PDF annotation technology usually requires users to download PDF-specific reading software to read PDF files, and then decode and annotate the PDF files. PDF-specific reading software is often accompanied by pop-up advertisements, which reduces the user experience. In addition, existing PDF annotation technology does not provide sufficient privacy protection for users. Annotations usually involve file modifications and suggestions, which are private data in some areas and need to be protected. For example, in a patent application with publication number CN117195830A, a "method for online annotation of layout documents" is disclosed. This solution ensures the privacy of the annotation content by setting hidden annotation content. This method is too simple, and others can also set it to display the annotation content, and cannot ensure the privacy of the annotation content. Existing PDF annotation technology also has the problems of inconvenient annotation process and insufficient privacy protection of annotation content, resulting in a reduced user experience and the annotation content being easily accessible to others. Summary of the Invention

[0004] The present invention aims to solve at least one of the technical problems in the prior art to a certain extent. The present invention converts the PDF file into a Word document by the user uploading the PDF file. The user annotates the Word document and obtains the user's annotation content. The Word document and the annotation content are then read. A privacy key is generated based on the Word document and the annotation content. The annotation content is calculated using the privacy key based on a privacy security algorithm to obtain a private annotation. Finally, the private annotation is stored and whether the annotation content can be displayed to the user is determined based on the user's access permissions. This solves the problem that the existing PDF annotation technology still has the problem of the annotation process being not convenient enough and the privacy protection of the annotation content being insufficient, which leads to a decline in user experience and the annotation content being easily accessible to others.

[0005] To achieve the above objectives, in a first aspect, the present application provides a method for online annotation of PDF files, comprising the following steps:

[0006] The user uploads a PDF file and converts the PDF file into a Word document;

[0007] The user annotates the Word document and obtains the user's annotation content;

[0008] The annotation content is calculated using a privacy-safe algorithm, and the ciphertext obtained after the calculation is entered into the ciphertext space to obtain a private annotation;

[0009] The private annotations are stored, and whether the annotation content can be displayed to the user is determined based on the user's access permissions.

[0010] Furthermore, when a user uploads a PDF file, converting the PDF file into a Word document includes the following sub-steps:

[0011] Get the PDF file uploaded by the user;

[0012] Convert PDF files to Word documents using document conversion technology.

[0013] Furthermore, the user annotates the Word document, and obtaining the user's annotation content includes the following sub-steps:

[0014] Users can annotate Word documents online;

[0015] Get the user's comments on the Word document, number the comments from top to bottom, and use the symbol W t Represents, where t is a non-zero natural number and t is the sequence number of W.

[0016] Furthermore, the annotation content is operated by a privacy-safe algorithm, and the ciphertext obtained after the operation is entered into the ciphertext space to obtain the private annotation, which includes the following sub-steps:

[0017] Read the Word document and annotation content, and generate a privacy key based on the Word document and annotation content;

[0018] Based on the privacy security algorithm, the annotation content is operated through the privacy key to obtain the private annotation.

[0019] Furthermore, reading the Word document and the annotation content and generating a privacy key based on the Word document and the annotation content includes the following sub-steps:

[0020] For any W t , find W t The page number in the Word document, marked as Y t ;

[0021] Find W t In Y t The ranking in order from top to bottom is marked as P t , P t Indicates the Yth t Page P t Annotation content;

[0022] Y t Placed in P t The first component is a number, marked as E t , E t Combining n in ascending order gets a string of numbers, which is named the privacy key.

[0023] Furthermore, based on the privacy security algorithm, the annotation content is operated using the privacy key to obtain the private annotation, which includes the following sub-steps:

[0024] For any annotation content W t , naming the operation object of the privacy security algorithm as the annotation to be calculated, converting the annotation to be calculated into A code, wherein the A code is the Unicode code of the converted annotation to be calculated, and converting the A code into a decimal code to obtain the B code;

[0025] Number the characters in the B code and mark them as S in order from left to right. i , where i is a non-zero natural number and is the serial number of S. The characters in the private key are numbered and marked as M in order from left to right. j , where j is a non-zero natural number and j is the sequence number of M;

[0026] Construct a 9×9 matrix, labeled G, and label the elements in G as H(n,m), where n and m are both non-zero natural numbers and (n,m) is the sequence number of H. H(n,m) represents the element in row n and column m.

[0027] Starting with j=1, get M j and M j+1 , M j Placed in H(M j ,M j+1 ), if H(M j ,M j+1 ) already has a number, then M j Place H(M j ,M j+1 ) at the end of the existing number, add one to j and repeat the analysis until j = max(j) and stop the analysis. max(j) is the maximum value of j. When j = max(j), the default value is M j+1 If M is 1, max(j) Place H(M max(j) ,1);

[0028] Mark H(n,m) with numbers as L(n,m), obtain the maximum value of n and m in L(n,m), and select the maximum value from the maximum values of n and m again, mark it as U, and calculate the average value of the numbers in L(n,m), mark it as Q;

[0029] Change G to a U×U matrix, labeled F1, fill the missing elements in F1 with Q, and rebuild the U×U matrix, labeled F2;

[0030] Calculate max(i) / (U×U), round up the result if it has decimals, mark the integer as D, start with i=1, and set S i To S i+D-1 Integrate into a group of characters, marked as R x , where x is a non-zero natural number and the index of R, i is added to D and integrated again until i is greater than max(i);

[0031] R is divided into two groups according to the order of x from small to large. x Enter F2 in sequence, first from left to right and then from top to bottom in the element grid;

[0032] Calculate F1+F2 to get F3, mark the number in the element at row n and column m in F3 as K(n,m), convert K(n,m) to hexadecimal and mark it as V1(n,m);

[0033] Get the number of digits in V1(n,m), mark it as C, calculate whether C%4 is zero, if so, add zero to the first digit of V1(n,m) so that C%4 is zero, % is the modulo operator;

[0034] For any V1(n,m), convert V1(n,m) into Chinese characters based on Unicode encoding in groups of four hexadecimal digits to obtain V2(n,m). Count the number of Chinese characters in V2(n,m) and mark it as h.

[0035] Number V2(n,m) from left to right and then from top to bottom, and use the symbol V3 z Indicates, where z is a non-zero natural number and z is the sequence number of V3;

[0036] V3 in order from left to right z The Chinese characters in the code are numbered and represented by the symbol V3(z,g), where g is a positive integer and (z,g) is the serial number of V3. V3(z,g) represents V3. z The gth Chinese character in ;

[0037] max(g) is max(h). For any value of z, if V3(z,g) does not exist, it is set to a space to construct the ciphertext space of max(g). The ciphertext space is the text line where V3(z,g) is placed. It has max(g) lines. V3(z,g) is entered into the g-th line in the order of z from small to large. After the entry is completed, the data in the ciphertext space is the privacy annotation.

[0038] Furthermore, storing the private annotations and determining whether the annotation content can be displayed to the user based on the user's access permissions includes the following sub-steps:

[0039] Verify the user's identity through account verification technology and verification code verification technology;

[0040] After verification, the user permissions are queried. If the user permissions are "guest", the annotation content will not be displayed to the user. If the user permissions are "management", the private annotations will be restored to the annotation content through the inverse operation of the privacy security algorithm and displayed to the user.

[0041] In a second aspect, the present application provides a PDF file online annotation system, comprising a document conversion module, a user annotation module, an annotation privacy module, and a user verification module; the document conversion module, the user annotation module, and the user verification module are respectively connected to the annotation privacy module data;

[0042] The document conversion module is used for users to upload PDF files and convert the PDF files into Word documents;

[0043] The user annotation module is used for users to annotate Word documents and obtain the user's annotation content;

[0044] The annotation privacy module is used to calculate the annotation content through a privacy security algorithm, and enter the ciphertext obtained after the calculation into the ciphertext space to obtain a private annotation;

[0045] The user verification module is used to store the privacy annotations and determine whether the annotation content can be displayed to the user based on the user's access authority.

[0046] In a third aspect, the present application provides an electronic device comprising a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the above method are performed.

[0047] In a fourth aspect, the present application provides a storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps in the above method are executed.

[0048] Beneficial effects of the present invention: The present invention converts a PDF file into a Word document by a user uploading a PDF file, and the user annotates the Word document, obtains the user's annotation content, then reads the Word document and the annotation content, and generates a privacy key based on the Word document and the annotation content. The advantage is that the user can annotate the PDF file through an online website without downloading special reading software, and when the annotation content is protected for privacy, a privacy key is generated based on the Word document and the annotation content. When the user adds or deletes annotations, the privacy key is changed in real time, thereby improving the convenience of PDF annotation and the privacy security of the annotation content.

[0049] The present invention calculates the annotation content through a privacy key based on a privacy security algorithm to obtain a private annotation, and finally stores the private annotation. It determines whether the annotation content can be displayed to the user based on the user's access authority. The advantage is that after being privatized by the privacy security algorithm, it is placed in the ciphertext space in a specific way, and in the privacy security algorithm, the privacy key accounts for a larger proportion in the numerical calculation process than the annotation content. The private annotation finally displayed can be regarded as encrypting the privacy key through the annotation content. The private annotation is closer to the privacy key than the annotation content, which improves the security and effectiveness of the privacy protection of the annotation content in the PDF annotation. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] Figure 1 It is a principle block diagram of the system of the present invention;

[0051] Figure 2 A flowchart of the steps of the privacy security algorithm of the present invention;

[0052] Figure 3 A flow chart of the steps of the method of the present invention

[0053] Figure 4 Schematic diagram of the structure of the electronic device of the present invention. DETAILED DESCRIPTION

[0054] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only 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 making creative efforts are within the scope of protection of the present invention.

[0055] Example 1, please refer to Figure 1As shown, the present application provides a PDF file online annotation system, including a document conversion module, a user annotation module, an annotation privacy module and a user verification module; the document conversion module, the user annotation module and the user verification module are respectively connected to the annotation privacy module data;

[0056] The document conversion module is used for users to upload PDF files and convert them into Word documents;

[0057] The document conversion module is configured with document conversion strategies, which include:

[0058] Get the PDF file uploaded by the user;

[0059] Convert PDF files to Word documents using document conversion technology;

[0060] In actual applications, users log in to the PDF annotation webpage and convert the PDF file into a Word document through existing document conversion technology for users to edit.

[0061] The user annotation module is used for users to annotate Word documents and obtain the user's annotation content;

[0062] The user annotation module is configured with a user annotation policy, which includes:

[0063] Users can annotate Word documents online;

[0064] Get the user's comments on the Word document, number the comments from top to bottom, and use the symbol W t Represents, where t is a non-zero natural number and t is the sequence number of W;

[0065] In actual application, the user's comments on the Word document are obtained. The comments are arranged vertically on the right side of the Word document. Therefore, the comments are numbered from top to bottom. In this embodiment, the extracted comments are W1 to W 18 When the user adds or deletes the annotation content, W t It will also change accordingly.

[0066] See also Figure 2 As shown, the annotation privacy module is used to operate the annotation content through a privacy-safe algorithm, and enter the ciphertext obtained after the operation into the ciphertext space to obtain a private annotation; the annotation privacy module includes a key generation unit and a privacy-safe calculation unit;

[0067] The key generation unit is used to read the Word document and the annotation content, and generate a privacy key based on the Word document and the annotation content;

[0068] The key generation unit is configured with a key generation strategy, which includes:

[0069] For any W t , find W t The page number in the Word document, marked as Y t ;

[0070] Find W t In Y t The ranking in order from top to bottom is marked as P t , P t Indicates the Yth t Page P t Annotation content;

[0071] Y t Placed in P t The first component is a number, marked as E t , E t Combining n in ascending order to get a string of numbers, named the privacy key;

[0072] In practical applications, for example, if W1 to W3 are all on the first page, then Y1 to Y3 are 1, W4 and W5 are on the second page, then Y4 and Y5 are 2, and so on. In the first page Y1, W1 is at the top, then P1 is 1, and so on, P2 and P3 are 2 and 3 respectively. In the second page Y2, W4 is at the top, then P4 is 1 and P5 is 2. Therefore, Y1 to Y5 are 1, 1, 1, 2 and 2 respectively, and P1 to P5 are 1, 2, 3, 1 and 2 respectively. Further, E1 to E5 are 11, 12, 13, 21 and 22 respectively, and the rest of E6 to E7 are 11, 12, 13, 21 and 22 respectively. 18 The acquisition process is the same as E1 to E5, and will not be described in detail in this embodiment. The final private key is 111213212231323334414243515253545556;

[0073] The privacy security calculation unit is used to calculate the annotation content based on the privacy security algorithm and the privacy key to obtain the private annotation;

[0074] The privacy-safe computing unit is configured with a privacy-safe computing strategy, which includes:

[0075] For any annotation content W t , the operation object of the privacy security algorithm is named as the annotation to be calculated, the annotation to be calculated is converted into A code, A code is the Unicode code of the converted annotation to be calculated, and A code is converted into decimal code to obtain B code;

[0076] Number the characters in the B code and mark them as S in order from left to right. i , where i is a non-zero natural number and is the serial number of S. The characters in the private key are numbered and marked as M in order from left to right. j , where j is a non-zero natural number and j is the sequence number of M;

[0077] In practical applications, this embodiment uses W1 as an example to explain the privacy security algorithm. t Analyze separately. In this embodiment, W1 is "unclear", that is, the annotation to be calculated is W1, and the A code is converted to "88688ff04e0d6e05". Then the hexadecimal is converted to decimal to obtain the B code "9829264449\u000533509". The B code is a 19-digit number, and the number is obtained from this. i , 1≤i≤19, the number in the private key is 36 bits, and the number is obtained from M j , 1≤j≤36;

[0078] Construct a 9×9 matrix, labeled G, and label the elements in G as H(n,m), where n and m are both non-zero natural numbers and (n,m) is the sequence number of H. H(n,m) represents the element in row n and column m.

[0079] Starting with j=1, get M j and M j+1 , M j Placed in H(M j ,M j+1 ), if H(M j ,M j+1 ) already has a number, then M j Place H(M j ,M j+1 ) at the end of the existing number, add one to j and repeat the analysis until j = max(j) and stop the analysis. max(j) is the maximum value of j. When j = max(j), the default value is M j+1 If M is 1, max(j) Place H(M max(j) ,1);

[0080] In practical applications, a 9×9 matrix is constructed because the maximum single number is 9, and the matrix G is constructed as Among them, the symbol "-" represents that the data in the element grid here is empty. Starting with j=1, M1 and M2 are obtained as 1 and 1 respectively. M1 is placed in H(M1,M2), that is, H(1,1). At this time, there is no number in H(1,1), so it can be directly placed. Then j+1 is added, and j=2 is added. M2 and M3 are obtained as 1 and 1 respectively. M2 is placed in H(M2,M3), that is, H(1,1). At this time, there is a number "1" in H(1,1), so M2 is placed at the end of the number "1". At this time, G is And so on, until all M are analyzed. j , and finally G is

[0081] Mark H(n,m) with numbers as L(n,m), obtain the maximum value of n and m in L(n,m), and select the maximum value from the maximum values of n and m again, mark it as U, and calculate the average value of the numbers in L(n,m), mark it as Q;

[0082] Change G to a U×U matrix, labeled F1, fill the missing elements in F1 with Q, and rebuild the U×U matrix, labeled F2;

[0083] Calculate max(i) / (U×U), round up the result if it has decimals, mark the integer as D, start with i=1, and set S i To S i+D-1 Integrate into a group of characters, marked as R x , where x is a non-zero natural number and the index of R, i is added to D and integrated again until i is greater than max(i);

[0084] In practical applications, the H(n,m) with numbers is marked as L(n,m), where the maximum values of n and m are 6 and 6, that is, U=6. The average value of L(n,m) is calculated, and Q is 11. The calculation result is retained as an integer, and G is changed to a 6×6 matrix, and finally F1 is obtained. The constructed F2 is a 6×6 blank matrix, and max(i) / (U×U)=19 / 36≈1 is calculated. The result is the integer after rounding up, that is, D=1. Starting with i=1, S1 to S1 are integrated into a group of characters, that is, each character is an R x , thus S1 to S 19 That is R1 to R 19 , 1≤x≤19;

[0085] R is divided into two groups according to the order of x from small to large. x Enter F2 in sequence, first from left to right and then from top to bottom in the element grid;

[0086] Calculate F1+F2 to get F3, mark the number in the element at row n and column m in F3 as K(n,m), convert K(n,m) to hexadecimal and mark it as V1(n,m);

[0087] Get the number of digits in V1(n,m), mark it as C, calculate whether C%4 is zero, if so, add zero to the first digit of V1(n,m) so that C%4 is zero, % is the modulo operator;

[0088] In actual application, after entering, F2 is It is worth noting that if there is a blank element in F2, a D+1-digit number is randomly generated in the blank element, and the final F2 is The final calculation of F3 is Convert to hexadecimal to get F3 Complement V1(n,m) to a four-digit number to obtain Since some smaller numbers in Unicode are empty, each V1(n,m) is increased by 100 to convert it into Chinese. When restoring it later, each V1(n,m) is reduced by 30 to obtain

[0089] For any V1(n,m), convert V1(n,m) into Chinese characters based on Unicode encoding in groups of four hexadecimal digits to obtain V2(n,m). Count the number of Chinese characters in V2(n,m) and mark it as h.

[0090] Number V2(n,m) from left to right and then from top to bottom, and use the symbol V3 z Indicates, where z is a non-zero natural number and z is the sequence number of V3;

[0091] In actual application, V1(n,m) is grouped into four hexadecimal digits, converted into Chinese characters based on Unicode encoding, and V2(n,m) is obtained and then numbered to obtain V31 to V3. 36 As shown in the figure below: as well as

[0092] Since some characters cannot be displayed, images are used for illustration in this embodiment. z Each of them has only one character, so we only need to construct a line of ciphertext space, that is, the privacy annotation is

[0093] V3 in order from left to right zThe Chinese characters in the code are numbered and represented by the symbol V3(z,g), where g is a positive integer and (z,g) is the serial number of V3. V3(z,g) represents V3. z The gth Chinese character in ;

[0094] max(g) is max(h). For any value of z, if V3(z,g) does not exist, it is set to a space to construct the ciphertext space of max(g). The ciphertext space is the text line where V3(z,g) is placed. It has max(g) rows. V3(z,g) is entered into the g-th row in the order of z from smallest to largest. After the entry is completed, the data in the ciphertext space is the privacy annotation;

[0095] In practical applications, in order to further fully explain this step, it is assumed in this embodiment that there are V31 to V33, which are "TSR", "Tr&", and "~%" respectively. For V31, V3(1,1) to V3(1,3) are numbered as "T", "S", and "R" respectively. Similarly, V3(2,1) to V3(2,4) are numbered as "Yes", "T", "r", and "&" respectively. V3(3,1) and V3(3,2) are "~" and "%" respectively. The maximum value of is 4, and V3(1,4), V3(3,3) and V3(3,4) do not exist, then they are set to spaces, and a 4-row ciphertext space is constructed. V3(1,1), V3(2,1) and V3(3,1) are placed in the first row in the order of z from small to large, and V3(1,2), V3(2,2) and V3(3,2) are placed in the second row in the order of z from small to large, and so on. The privacy annotations corresponding to V31 to V33 assumed in this embodiment are obtained as follows: The gray part represents the space.

[0096] The user verification module is used to store private annotations and determine whether the annotation content can be displayed to the user based on the user's access permissions;

[0097] The user authentication module is configured with a user authentication policy, which includes:

[0098] Verify the user's identity through account verification technology and verification code verification technology;

[0099] After verification, the user's permissions are checked. If the user's permissions are "guest", the annotation content will not be displayed to the user. If the user's permissions are "manager", the private annotation will be restored to the annotation content through the inverse operation of the privacy security algorithm and displayed to the user.

[0100] In actual applications, the user's identity is verified through existing account verification technology and verification code verification technology. Various identity authentication technologies such as portrait recognition can also be used. After the user completes the annotation and completes the privacy security algorithm, the annotation content is replaced with the corresponding private annotation, and the Word document is converted back into a PDF file. When the user sends a PDF file to others, the recipient's permissions can be selected as "guest" or "manager". The decryption process is the reverse operation process of the privacy security algorithm, which will not be described in detail in this embodiment.

[0101] Example 2, please refer to Figure 3 As shown, this application provides a PDF file online annotation method, including the following steps:

[0102] Step S1: The user uploads a PDF file and converts the PDF file into a Word document. Step S1 includes the following sub-steps:

[0103] Step S101, obtaining the PDF file uploaded by the user;

[0104] Step S102, converting the PDF file into a Word document using document conversion technology;

[0105] Step S2: The user annotates the Word document and obtains the user's annotation content. Step S2 includes the following sub-steps:

[0106] Step S201: The user annotates the Word document online;

[0107] Step S202: Obtain the user's comments on the Word document, number the comments in order from top to bottom, and use the symbol W t Represents, where t is a non-zero natural number and t is the sequence number of W;

[0108] Step S3, performing calculations on the annotation content using a privacy-safe algorithm, and entering the ciphertext obtained after the calculation into the ciphertext space to obtain a private annotation; Step S3 includes the following sub-steps:

[0109] Step S301: Read the Word document and annotation content, and generate a privacy key based on the Word document and annotation content;

[0110] Step S301 includes the following sub-steps:

[0111] Step S301.1 For any W t , find W t The page number in the Word document, marked as Y t ;

[0112] Step S301.2, search for W t In Yt The ranking in order from top to bottom is marked as P t , P t Indicates the Yth t Page P t Annotation content;

[0113] Step S301.3, Y t Placed in P t The first component is a number, marked as E t , E t Combining n in ascending order to get a string of numbers, named the privacy key;

[0114] Step S302: Based on a privacy security algorithm, the annotation content is calculated using a privacy key to obtain a private annotation;

[0115] Step S302 includes the following sub-steps:

[0116] Step S302.1, for any annotation content W t , the operation object of the privacy security algorithm is named as the annotation to be calculated, the annotation to be calculated is converted into A code, A code is the Unicode code of the converted annotation to be calculated, and A code is converted into decimal code to obtain B code;

[0117] Step S302.2: Number the characters in the B code and mark them as S in order from left to right. i , where i is a non-zero natural number and is the serial number of S. The characters in the private key are numbered and marked as M in order from left to right. j , where j is a non-zero natural number and j is the sequence number of M;

[0118] Step S302.3: Construct a 9×9 matrix, labeled G, and label the elements in G as H(n,m), where n and m are both non-zero natural numbers and (n,m) is the sequence number of H. H(n,m) represents the element in row n and column m.

[0119] Step S302.4, starting with j=1, obtain M j and M j+1 , M j Placed in H(M j ,M j+1 ), if H(M j ,M j+1 ) already has a number, then M j Place H(M j ,M j+1) at the end of the existing number, add one to j and repeat the analysis until j = max(j) and stop the analysis. max(j) is the maximum value of j. When j = max(j), the default value is M j+1 If M is 1, max(j) Place H(M max(j) ,1);

[0120] Step S302.5: Label H(n,m) where a number exists as L(n,m). Obtain the maximum value of n and m in L(n,m). Select the maximum value from the maximum values of n and m again, label it U. Calculate the average value of the numbers in L(n,m), label it Q.

[0121] Step S302.6: Change G to a U×U matrix, labeled F1, fill the missing elements in F1 with Q, and rebuild a U×U matrix, labeled F2.

[0122] Step S302.7, calculate max(i) / (U×U), round up the result if it has decimals, mark the integer as D, start with i=1, and add S i To S i+D-1 Integrate into a group of characters, marked as R x , where x is a non-zero natural number and the index of R, i is added to D and integrated again until i is greater than max(i);

[0123] Step S302.8: R x Enter F2 in sequence, first from left to right and then from top to bottom in the element grid;

[0124] Step S302.9: Calculate F1 + F2 to obtain F3. Label the number in the element at row n and column m in F3 as K(n,m). Convert K(n,m) to hexadecimal and label it as V1(n,m).

[0125] Step S302.10, obtain the number of digits in V1(n,m), marked as C, and calculate whether C%4 is zero. If so, add zeros to the first digit of V1(n,m) so that C%4 is zero, where % is the modulo operator;

[0126] Step S302.11: For any V1(n,m), convert V1(n,m) into Chinese characters based on Unicode encoding, with each four hexadecimal digits grouped together, to obtain V2(n,m). Count the number of Chinese characters in V2(n,m), marking it as h.

[0127] Step S302.12: number V2(n,m) from left to right and then from top to bottom, using the symbol V3 zIndicates, where z is a non-zero natural number and z is the sequence number of V3;

[0128] Step S302.13, V3 is sorted from left to right. z The Chinese characters in the code are numbered and represented by the symbol V3(z,g), where g is a positive integer and (z,g) is the serial number of V3. V3(z,g) represents V3. z The gth Chinese character in ;

[0129] In step S302.14, max(g) is equal to max(h). For any value of z, if V3(z,g) does not exist, it is set to a blank space. The ciphertext space of max(g) is constructed. The ciphertext space is the text line containing V3(z,g). It has max(g) rows. V3(z,g) is entered into the g-th row in ascending order of z. The data in the ciphertext space after entry is the privacy annotation.

[0130] Step S4, storing the private annotations and determining whether the annotation content can be displayed to the user based on the user's access permissions. Step S4 includes the following sub-steps:

[0131] Step S401: Verify the user's identity through account verification technology and verification code verification technology;

[0132] Step S402: After verification, query the user authority. If the user authority is "guest", the annotation content will not be displayed to the user. If the user authority is "manager", the private annotation will be restored to the annotation content through the inverse operation of the privacy security algorithm and displayed to the user.

[0133] Example 3, please refer to Figure 4 As shown, Figure 4 A schematic diagram of the structure of an electronic device is provided, which may include: a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus. The memory stores computer-readable instructions, and the processor can call the instructions in the memory. When the computer-readable instructions are executed by the processor, the steps of a method for online annotation of PDF files are executed to implement the following functions: a user uploads a PDF file and converts the PDF file into a Word document; the user annotates the Word document and obtains the user's annotation content; the annotation content is calculated using a privacy-safe algorithm, and the resulting ciphertext is entered into a ciphertext space to obtain a private annotation; the private annotation is stored, and whether the annotation content can be displayed to the user is determined based on the user's access permissions.

[0134] In addition, the logical instructions in the above-mentioned memory can be implemented in the form of a software functional unit and can be stored in a computer-readable storage medium when sold or used as an independent product. Based on this understanding, the technical solution of the present application, 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, which is stored in a storage medium and includes several instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.

[0135] Example 4. The present application also provides a computer-readable storage medium. The present application provides a storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps in the above-mentioned PDF file online annotation method are executed to achieve the following functions: the user uploads a PDF file and converts the PDF file into a Word document; the user annotates the Word document and obtains the user's annotation content; the annotation content is calculated using a privacy-safe algorithm, and the ciphertext obtained after the calculation is entered into the ciphertext space to obtain a private annotation; the private annotation is stored, and whether the annotation content can be displayed to the user is determined based on the user's access permissions.

[0136] Through the description of the above embodiments, the embodiments of the present invention can be provided as methods, systems or computer program products. Based on this understanding, the above technical solutions, in essence or in other words, the part that contributes to the prior art, can be embodied in the form of a software product, which can be stored in a computer-readable storage medium, such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling 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 certain parts of the embodiment.

[0137] In the embodiments provided in this application, it should be understood that the disclosed system or method can be implemented in other ways. The embodiments described above are merely illustrative. For example, the division of modules or units is only a logical function division. There may be other division methods in actual implementation. For example, multiple modules or units can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of systems, modules and units can be electrical, mechanical or other forms.

[0138] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application 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 application.

Claims

1. A PDF file online annotation method, characterized in that: The steps include: The user uploads a PDF file and converts the PDF file into a Word document; The user annotates the Word document and obtains the user's annotation content; The annotation content is calculated using a privacy-safe algorithm, and the ciphertext obtained after the calculation is entered into the ciphertext space to obtain a private annotation; The private annotations are stored and whether the annotation content can be displayed to the user is determined based on the user's access permissions.

2. A PDF file online annotation method according to claim 1, characterized in that: The user uploads a PDF file, and converting the PDF file into a Word document includes the following sub-steps: Get the PDF file uploaded by the user; Convert PDF files to Word documents using document conversion technology.

3. A PDF file online annotation method according to claim 2, characterized in that: When a user comments on a Word document, obtaining the user's comments includes the following sub-steps: Users can annotate Word documents online; Get the user's comments on the Word document, number the comments from top to bottom, and use the symbol W t Represents, where t is a non-zero natural number and t is the sequence number of W.

4. A PDF file online annotation method according to claim 3, characterized in that: The annotation content is calculated using a privacy-safe algorithm, and the ciphertext obtained after the calculation is entered into the ciphertext space to obtain the private annotation, which includes the following sub-steps: Read the Word document and annotation content, and generate a privacy key based on the Word document and annotation content; Based on the privacy security algorithm, the annotation content is operated through the privacy key to obtain the private annotation.

5. A PDF file online annotation method according to claim 4, characterized in that: Reading a Word document and annotations, and generating a privacy key based on the Word document and annotations includes the following sub-steps: For any W t , find W t The page number in the Word document, marked as Y t ; Find W t In Y t The ranking in order from top to bottom is marked as P t , P t Indicates the Yth t Page P t Annotation content; Y t Placed in P t The first component is a number, marked as E t , E t Combining n in ascending order gets a string of numbers, which is named the privacy key.

6. A PDF file online annotation method according to claim 5, characterized in that: Based on the privacy security algorithm, the annotation content is operated using the privacy key to obtain the private annotation, which includes the following sub-steps: For any annotation content W t , naming the operation object of the privacy security algorithm as the annotation to be calculated, converting the annotation to be calculated into A code, wherein the A code is the Unicode code of the converted annotation to be calculated, and converting the A code into a decimal code to obtain the B code; Number the characters in the B code and mark them as S in order from left to right. i , where i is a non-zero natural number and is the serial number of S. The characters in the private key are numbered and marked as M in order from left to right. j , where j is a non-zero natural number and j is the sequence number of M; Construct a 9×9 matrix, labeled G, and label the elements in G as H(n,m), where n and m are both non-zero natural numbers and (n,m) is the sequence number of H. H(n,m) represents the element in row n and column m. Starting with j=1, get M j and M j+1 , M j Placed in H(M j ,M j+1 ), if H(M j ,M j+1 ) already has a number, then M j Place H(M j ,M j+1 ) at the end of the existing number, add one to j and repeat the analysis until j = max(j) and stop the analysis. max(j) is the maximum value of j. When j = max(j), the default value is M j+1 If M is 1, max(j) Place H(M max(j) ,1); Mark H(n,m) with numbers as L(n,m), obtain the maximum value of n and m in L(n,m), and select the maximum value from the maximum values of n and m again, mark it as U, and calculate the average value of the numbers in L(n,m), mark it as Q; Change G to a U×U matrix, labeled F1, fill the missing elements in F1 with Q, and rebuild the U×U matrix, labeled F2; Calculate max(i) / (U×U), round up the result if it has decimals, mark the integer as D, start with i=1, and set S i To S i+D-1 Integrate into a group of characters, marked as R x , where x is a non-zero natural number and the index of R, i is added to D and integrated again until i is greater than max(i); R is divided into two groups according to the order of x from small to large. x Enter F2 in sequence, first from left to right and then from top to bottom in the element grid; Calculate F1+F2 to get F3, mark the number in the element at row n and column m in F3 as K(n,m), convert K(n,m) to hexadecimal and mark it as V1(n,m); Get the number of digits in V1(n,m), mark it as C, calculate whether C%4 is zero, if so, add zero to the first digit of V1(n,m) so that C%4 is zero, % is the modulo operator; For any V1(n,m), convert V1(n,m) into Chinese characters based on Unicode encoding in groups of four hexadecimal digits to obtain V2(n,m). Count the number of Chinese characters in V2(n,m) and mark it as h. Number V2(n,m) from left to right and then from top to bottom, and use the symbol V3 z Indicates, where z is a non-zero natural number and z is the sequence number of V3; V3 in order from left to right z The Chinese characters in the code are numbered and represented by the symbol V3(z,g), where g is a positive integer and (z,g) is the serial number of V3. V3(z,g) represents V3. z The gth Chinese character in ; max(g) is max(h). For any value of z, if V3(z,g) does not exist, it is set to a space to construct the ciphertext space of max(g). The ciphertext space is the text line where V3(z,g) is placed. It has max(g) lines. V3(z,g) is entered into the g-th line in the order of z from small to large. After the entry is completed, the data in the ciphertext space is the privacy annotation.

7. A PDF file online annotation method according to claim 6, characterized in that: Storing private annotations and determining whether to display the annotation content to the user based on the user's access permissions includes the following sub-steps: Verify the user's identity through account verification technology and verification code verification technology; After verification, the user's permissions are queried. If the user's permissions are "guest", the annotation content will not be displayed to the user. If the user's permissions are "manager", the private annotation will be restored to the annotation content through the inverse operation of the privacy security algorithm and displayed to the user.

8. A PDF file online annotation system, used to implement a PDF file online annotation method according to any one of claims 1 to 7, characterized in that: It includes a document conversion module, a user annotation module, an annotation privacy module and a user verification module; the document conversion module, the user annotation module and the user verification module are respectively connected to the annotation privacy module data; The document conversion module is used for users to upload PDF files and convert the PDF files into Word documents; The user annotation module is used for users to annotate Word documents and obtain the user's annotation content; The annotation privacy module is used to calculate the annotation content through a privacy-safe algorithm, and enter the ciphertext obtained after the calculation into the ciphertext space to obtain a private annotation; The user verification module is used to store the privacy annotations and determine whether the annotation content can be displayed to the user based on the user's access authority.

9. An electronic device, characterized in that: The method comprises a processor and a memory, wherein the memory stores computer-readable instructions. When the computer-readable instructions are executed by the processor, the steps in the method according to any one of claims 1 to 7 are executed.

10. A storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 7 are executed.

Citation Information

Patent Citations

  • Online annotation method for format document

    CN117195830A