Method and device for labeling knowledge points in PDF document, equipment and storage medium

By building the knowledge graph and associated nodes of PDF resources, users can intuitively and conveniently label PDF files, solving the problems of confusing knowledge point labeling and wrong labeling location in traditional annotation methods, and realizing diversified labeling of the same file by different users.

CN119849454APending Publication Date: 2025-04-18SHANGHAI SIRUI INFORMATION TECH CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411939431.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-18

AI Technical Summary

Technical Problem

Traditional PDF annotation methods lead to confusion in the knowledge point annotation, and the overall annotation of adjacent pictures and texts cannot be realized. The annotation of the same file by different users leads to confusion in data and the generation of redundant copies.

Method used

By building a knowledge graph for PDF resources, users can create and label knowledge points, use the associated nodes and relationships in the knowledge graph to label, and associate the label position information with the proportional value to solve the problem of errors in the dimensions of different PDF files.

Benefits of technology

It is implemented that without changing the source file, users can make different labels on the same PDF file, which improves the intuitiveness and convenience of labeling and solves the problem of wrong labeling location.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119849454A_ABST
    Figure CN119849454A_ABST
Patent Text Reader

Abstract

The invention discloses a method and device for marking knowledge points in a PDF document, equipment and a storage medium. The method comprises the following steps: in response to an annotation operation that a user creates a newly-added knowledge point associated with a PDF resource to be annotated with the knowledge point, constructing a knowledge graph corresponding to the PDF resource based on the newly-added knowledge point; newly-added associated nodes in the knowledge graph serve as points to be marked, all knowledge points contained in the points to be marked are selected from the PDF resources to be marked, and marking information corresponding to all the knowledge points is obtained; and obtaining parameter information of the PDF resources, determining a proportion value between the parameter information and the labeling position information in the labeling information, and associating the proportion value and the knowledge points with the user and storing the proportion value and the knowledge points. According to the technical scheme, the knowledge points needing to be displayed in the resources can be displayed more visually and conveniently, different users can carry out different annotations on the same file under the condition that the source file is not changed, and the problem that the size annotation positions of different PDF files are wrong is solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer software technology, and in particular to a method, device, equipment and storage medium for marking knowledge points in a PDF document. Background Art

[0002] In traditional PDF annotation, users will constantly draw boxes in PDF for annotation. As a result, as the number of knowledge points increases, the PDF content will appear very messy, and it is difficult to sort out which knowledge points are there and where the knowledge points are marked. Especially when encountering adjacent positions, overlaps are likely to occur, which makes it even more difficult for users to understand. In addition, in the traditional web-based online PDF display function, there are many limitations in annotation. First, it is impossible to classify adjacent images and texts as one knowledge point, that is, it is impossible to annotate within an arbitrary range; second, all users annotate the same file, causing data confusion, and each user copies a PDF resource for annotation, which inevitably produces a large number of redundant copies. Summary of the invention

[0003] In view of this, the present invention provides a method, device, equipment and storage medium for marking knowledge points in PDF documents, which can more intuitively and conveniently display the knowledge points that need to be displayed in resources. Without changing the source file, different users can make different annotations on the same file, and the ratio value between the parameter information and the annotation position information in the annotation information and the knowledge point are associated with the user, which can solve the problem of errors in the size annotation positions of different PDF files.

[0004] According to one aspect of the present invention, an embodiment of the present invention provides a method for marking knowledge points in a PDF document, the method comprising:

[0005] In response to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with knowledge points, a knowledge graph corresponding to the PDF resource is constructed based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and an association relationship between each of the new associated nodes;

[0006] The newly added associated nodes in the knowledge graph are used as points to be annotated, and each knowledge point contained under the points to be annotated is selected from the PDF resource for knowledge point annotating to obtain annotation information corresponding to each of the knowledge points;

[0007] Parameter information of the PDF resource is obtained, a ratio value between the parameter information and the annotation position information in the annotation information is determined, and the ratio value and the knowledge point are associated with the user and stored in a database.

[0008] According to another aspect of the present invention, an embodiment of the present invention further provides a device for marking knowledge points in a PDF document, the device comprising:

[0009] A knowledge graph construction module, configured to respond to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with a knowledge point, and to construct a knowledge graph corresponding to the PDF resource based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and an association relationship between the new associated nodes;

[0010] A knowledge point annotation module is used to take the newly added associated nodes in the knowledge graph as points to be annotated, and select each knowledge point contained under the points to be annotated from the PDF resource for knowledge point annotation, so as to obtain annotation information corresponding to each of the knowledge points;

[0011] The knowledge point association storage module is used to obtain parameter information of the PDF resource, determine the ratio value between the parameter information and the annotation position information in the annotation information, and associate the ratio value with the knowledge point and the user and store them in a database.

[0012] According to another aspect of the present invention, an embodiment of the present invention further provides an electronic device, the electronic device comprising:

[0013] at least one processor; and

[0014] a memory communicatively connected to the at least one processor; wherein,

[0015] The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for marking knowledge points in a PDF document according to any embodiment of the present invention.

[0016] According to another aspect of the present invention, an embodiment of the present invention further provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for marking knowledge points in a PDF document described in any embodiment of the present invention when executed.

[0017] According to another aspect of the present invention, an embodiment of the present invention further provides a computer program product, characterized in that the computer program product includes a computer program, and when the computer program is executed by a processor, the method for marking knowledge points in a PDF document described in any embodiment of the present invention is implemented.

[0018] The technical effect of the present invention is that a knowledge graph corresponding to a PDF resource is constructed by adding new knowledge points, the newly added associated nodes in the knowledge graph are used as points to be annotated, and the various knowledge points contained under the points to be annotated are selected from the PDF resource for knowledge point annotation. Based on this, the parameter information of the PDF resource and the ratio value between the annotation information are determined, and the ratio value and the knowledge point are associated and stored with the corresponding annotation user, so that the knowledge points that need to be displayed in the resource can be displayed more intuitively and conveniently. Without changing the source file, different users can make different annotations on the same file, and the ratio value and the knowledge point between the parameter information and the annotation position information in the annotation information are associated with the user, which can solve the problem of errors in the size annotation positions of different PDF files.

[0019] It should be understood that the contents described in this section are not intended to identify the key or important features of the embodiments of the present invention, nor are they intended to limit the scope of the present invention. Other features of the present invention will become easily understood through the following description. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0021] Figure 1 A flowchart of a method for marking knowledge points in a PDF document provided by an embodiment of the present invention;

[0022] Figure 2 A schematic diagram of a process in which, after a marking point is clicked to display a marking box, the marking box moves relatively with the sliding of a PDF file, provided by an embodiment of the present invention;

[0023] Figure 3 A flowchart of another method for marking knowledge points in a PDF document provided by an embodiment of the present invention;

[0024] Figure 4 A schematic diagram of resource selection provided by an embodiment of the present invention;

[0025] Figure 5 A schematic diagram of constructing a knowledge graph provided by an embodiment of the present invention;

[0026] Figure 6 A schematic diagram of another knowledge graph construction provided by an embodiment of the present invention;

[0027] Figure 7 A schematic diagram of a PDF resource with a mask provided by an embodiment of the present invention;

[0028] Figure 8 A schematic diagram of drawing a label rectangle on a PDF resource using a mouse is provided in one embodiment of the present invention;

[0029] Fig. 9 A schematic diagram of adding annotations to marked knowledge points provided by an embodiment of the present invention;

[0030] Fig.10 A flowchart of a method for displaying a PDF file, marking knowledge points, saving the PDF file, and sliding a marking box when the PDF file is slid is provided in one embodiment of the present invention;

[0031] Fig.11 A structural block diagram of a device for marking knowledge points in a PDF document provided by an embodiment of the present invention;

[0032] Fig.12 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0033] In order to enable those skilled in the art to better understand the scheme of the present invention, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. 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 creative work should fall within the scope of protection of the present invention.

[0034] It should be noted that the terms "first", "second", etc. in the specification and claims of the present invention and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged where appropriate, so that the embodiments of the present invention described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any variations thereof are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device that includes a series of steps or units is not necessarily limited to those steps or units that are clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0035] In one embodiment, Figure 1A flowchart of a method for marking knowledge points in a PDF document provided by an embodiment of the present invention. This embodiment is applicable to the case of marking knowledge points in a PDF resource. The method can be executed by a device for marking knowledge points in a PDF document. The device for marking knowledge points in a PDF document can be implemented in the form of hardware and / or software. The device for marking knowledge points in a PDF document can be configured in an electronic device.

[0036] like Figure 1 As shown, the method for marking knowledge points in a PDF document in this embodiment specifically includes the following steps:

[0037] S110. In response to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with the knowledge point, a knowledge graph corresponding to the PDF resource is constructed based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and an association relationship between the new associated nodes.

[0038] The PDF resource may be understood as a PDF file that needs to be annotated with knowledge points, and the PDF file may be a PDF file of various resource types.

[0039] In this embodiment, the newly added knowledge point can be understood as the newly added knowledge point in the PDF resource. The user can first create the knowledge point that needs to be added, that is, the knowledge point that the user wants to annotate in the PDF resource is first added to the newly created knowledge point. It can be understood that after the user logs in to the PDF annotation system, use the mouse to click the new knowledge point button to enter the knowledge point name, knowledge point type, city pilot classification, related tags of the knowledge point, and knowledge point description corresponding to the newly added knowledge point. For example, the knowledge point name is an environmental variable, and the knowledge point classification includes: target knowledge, element knowledge, logical knowledge, method and skill knowledge, and portrait (cognitive) knowledge, from which the knowledge point classification corresponding to the environmental variable can be selected; the knowledge point type can also be selected (for example, using teaching); similarly, the same operation is performed when adding a state variable. In one embodiment, the newly added knowledge point includes at least: the knowledge point name, knowledge point type, knowledge point classification, knowledge point tag information and knowledge point description; wherein the knowledge point classification includes: target knowledge, element knowledge, logical knowledge, method and skill knowledge, and portrait knowledge.

[0040] In this embodiment, after the user creates a new knowledge point, the created knowledge point may include not only the newly added knowledge point, but also the knowledge points added by the user in the past. Of course, the knowledge points added in the past may also include the knowledge point name, knowledge point classification, knowledge point type, related tags, knowledge point creation time, knowledge point last modification time, etc.

[0041] In this embodiment, after creating a corresponding new knowledge point, the user can click Create Knowledge Spectrum Graph to create a knowledge graph. In response to the user's annotation operation of creating a new knowledge point associated with the PDF resource to be annotated with the knowledge point, a knowledge graph corresponding to the PDF resource is constructed based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and the association relationship between each new associated node. Specifically, the name of the knowledge graph corresponding to the PDF resource is determined, and in response to the user clicking the operation of adding an associated node and editing an associated relationship of the PDF resource, at least one associated node is added with the knowledge graph name as the central node, as well as the association relationship between the associated nodes, so as to construct a knowledge graph based on the pipe connection points and the association relationship. In some embodiments, when creating a knowledge graph, the user first clicks on the operation of creating a graph to display the resource options, enters the name of the knowledge graph to be created (for example, a certain technical knowledge graph) in the knowledge graph name, and then selects the resource. The resource selection may include but is not limited to resource name, resource type, resource classification, etc. After selecting the PDF resource that needs to be annotated (resource types include PDF, video, etc.), the interface will display the selected resource name, resource classification, resource type, resource introduction, content file and other information, and then the knowledge graph construction interface centered on the name of the created knowledge graph can be displayed. The knowledge graph interface may include operation buttons such as price adjustment associated nodes, edit associated nodes, and delete.

[0042] S120: taking the newly added associated nodes in the knowledge graph as points to be annotated, and selecting various knowledge points contained under the points to be annotated from the PDF resources for knowledge point annotating, to obtain annotation information corresponding to each knowledge point.

[0043] The points to be annotated are the knowledge points that need to be annotated in the next step. Users can select corresponding knowledge points from PDF resources to perform knowledge point annotation operations to obtain corresponding annotation information. The annotation information may include annotation position information and annotation annotation information. The annotation position information is the position information of the annotation drawing box when the user annotates the knowledge point. The annotation annotation information may include but is not limited to the knowledge point name, knowledge point type, label information corresponding to the knowledge point, and the added knowledge point annotation information.

[0044] In this embodiment, the newly added associated nodes in the knowledge graph can be understood as the newly added knowledge points, ability points and problem points associated with the PDF resources created by the user. For example, the newly added knowledge points can be environment variables, state management, one-way data synchronization, and two-way data synchronization. The problem points can be hands-on skills; and the ability points can be homework. In this embodiment, the newly added associated nodes in the knowledge graph are used as points to be annotated, and the various knowledge points contained under the points to be annotated are selected from the PDF resources for knowledge point annotation. When performing knowledge annotation, the PDF resources that need to be annotated with knowledge points are displayed, as well as all the pre-created newly added knowledge points that can be annotated (such as environment variables, state management, one-way data synchronization, two-way data synchronization, etc.), and one newly added knowledge point is selected in turn for resource annotation. Specifically, after selecting a knowledge point that can be annotated, click the annotation button, receive the user's annotation trigger operation on the point to be annotated contained in the annotation point page, add a mask layer in the PDF resource display area corresponding to the PDF annotation page, and then use the mouse to draw a annotation rectangle on the mask layer. In response to the completion operation of the mouse drawing the annotation box corresponding to the point to be marked on the mask layer, the information addition pop-up window corresponding to the annotation box is displayed, so that the user can add the knowledge point annotation corresponding to the point to be annotated in the information addition pop-up window. The annotation will display the knowledge point corresponding to the annotation box, the knowledge point type, and the corresponding related tags. The knowledge point can be annotated, and then the annotated data information can be saved.

[0045] S130 , obtaining parameter information of the PDF resource, determining a ratio value between the parameter information and the annotation position information in the annotation information, and associating the ratio value and the knowledge point with the user and storing them in a database.

[0046] The parameter information includes: width information and height information corresponding to the PDF resource.

[0047] In this embodiment, the width and height information corresponding to the PDF resource is obtained, the upper left corner of the PDF resource is used as the coordinate origin, the position information of the annotation rectangle under the coordinate origin is determined, the ratio value between the position information and the width and height information corresponding to the PDF resource is calculated, the ratio value, the knowledge point and the user who annotated the knowledge point are associated and stored in a database, so that when a user clicks on a marked knowledge point, the position information of the marked knowledge point relative to the PDF resource is obtained, and the position is converted according to the position information and the stored ratio value, so that the PDF resource will slide to the corresponding marked position and display the annotation box, and the knowledge point annotation will pop up when the mouse moves to the annotation box.

[0048] The technical solution of the embodiment of the present invention constructs a knowledge graph corresponding to a PDF resource by adding new knowledge points, takes the newly added associated nodes in the knowledge graph as points to be annotated, and selects each knowledge point contained under the points to be annotated from the PDF resource for knowledge point annotation. Based on this, the parameter information of the PDF resource and the ratio value between the annotation information are determined, and the ratio value and the knowledge point are associated and stored with the corresponding annotation user. This can more intuitively and conveniently display the knowledge points that need to be displayed in the resource. Without changing the source file, different users can perform different annotations on the same file, and the ratio value and the knowledge point between the parameter information and the annotation position information in the annotation information are associated with the user, which can solve the problem of errors in the size annotation positions of different PDF files.

[0049] In one embodiment, the marking method further includes:

[0050] Classify the annotation information corresponding to each knowledge point into the annotated list;

[0051] In response to a user clicking on a marked knowledge point in the marked list, first position information of the marked knowledge point relative to the PDF resource is obtained, and position conversion is performed according to the first position information and the ratio value stored in the database to obtain target position information after position conversion;

[0052] Automatically slide to the annotated knowledge point in the PDF resource according to the target position information, and display the annotation box of the annotated knowledge point.

[0053] The marked list can be understood as a knowledge point page table marked by the user on the PDF resource, and the marked list can include the knowledge points, problem points and ability points marked by the user. The first position information refers to the position information of the marked box position of the marked knowledge point relative to the PDF resource.

[0054] In this embodiment, in response to a user clicking on a marked knowledge point in the marked list, first position information of the marked knowledge point relative to the PDF resource is obtained, and a position conversion is performed based on the first position information and the proportional value stored in the database to obtain the target position information after the position conversion. The target position information is automatically slid to the marked knowledge point of the PDF resource, and a marking box of the marked knowledge point is displayed to realize the PDF file display function. The marking box will move relatively with the sliding of the PDF to solve the problem of incorrect marking position when the size of the PDF file changes.

[0055] In one embodiment, the further embodiment includes: when an event of the mouse moving to the marking box is received, the marking annotation information corresponding to the marked knowledge point is popped up.

[0056] For example, to better understand the click annotation point, the design size of different PDF displays can accurately locate the annotation box, and the PDF can quickly scroll to the annotation box position. Figure 2 A flowchart of an embodiment of the present invention is provided in which after clicking a mark point to display a mark box, the mark box moves relatively with the PDF slide, such as Figure 2 As shown, the specific steps are as follows:

[0057] a1. Use the mouse to click on the marked knowledge point in the marked list to obtain the position information of the marked knowledge point relative to the PDF resource.

[0058] a2. Obtain the stored conversion ratio value from the database, and use the conversion ratio value to perform position conversion on the position information.

[0059] a3. The PDF resource will slide to the corresponding annotation position and display the annotation box.

[0060] a4. When receiving the event of the mouse moving to the annotation box, the annotation information corresponding to the annotated knowledge point will pop up.

[0061] In one embodiment, Figure 3 A flowchart of another method for marking knowledge points in a PDF document provided by an embodiment of the present invention. Based on the above embodiments, this embodiment further refines the knowledge graph corresponding to the PDF resource based on the newly added knowledge points, selects each knowledge point contained under the point to be marked from the PDF resource to mark the knowledge points, obtains the marking information corresponding to each knowledge point, and determines the ratio value between the parameter information and the marking position information in the marking information.

[0062] like Figure 3 As shown, the method for marking knowledge points in a PDF document in this embodiment may specifically include the following steps:

[0063] S310. In response to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with the knowledge point, determine a knowledge graph name corresponding to the PDF resource.

[0064] In this embodiment, in response to the user creating an annotation operation of a newly added knowledge point associated with the PDF resource to be annotated, the user can fill in the knowledge graph name of the constructed knowledge graph in the displayed knowledge graph name filling box, thereby constructing the knowledge graph name corresponding to the selected PDF resource. Exemplarily, the knowledge graph name corresponding to the PDF resource is A technology knowledge graph.

[0065] S320. Receive the PDF resource selected by the user, and in response to the user clicking the operation of adding associated nodes and editing associated relationships of the PDF resource, add at least one new associated node with the knowledge graph name as the central node, as well as the associated relationships between the associated nodes.

[0066] Among them, the newly added associated nodes include knowledge points, ability points and problem points; the knowledge points include at least one newly added knowledge point; each newly added associated node corresponds to a corresponding associated direction; among them, the associated directions include: forward, directional and bidirectional.

[0067] In this embodiment, the PDF resource selected by the user is received, and the user can click on operations such as adding associated nodes and editing associated relationships to construct a knowledge graph under the name of the knowledge graph. Specifically, when at least one newly added associated node is added with the name of the knowledge graph as the central node, the newly added associated node includes the corresponding associated directions corresponding to each associated node; wherein the associated directions include: forward, direction and bidirectional; after selecting the newly added associated nodes and the associated directions, click OK to directly construct the corresponding knowledge graph. Exemplarily, click on technology A to add a newly added associated node corresponding to technology A, including selecting the node's associated direction as forward, selecting the associated node knowledge point, and then selecting the newly added knowledge point (environmental variable, state management), and click OK to directly construct the corresponding knowledge graph, and the created knowledge point is bound to the PDF resource.

[0068] S330. Bind the newly added associated nodes and associated relationships to the PDF resources to construct a knowledge graph corresponding to the PDF resources.

[0069] In this embodiment, after adding at least one associated node with the knowledge graph name as the central node and the associated relationship between the associated nodes, the associated nodes and the associated relationship are bound to the PDF resource to construct the knowledge graph corresponding to the PDF resource.

[0070] For example, to better understand the construction of knowledge graphs, Figure 4 A schematic diagram of resource selection provided by an embodiment of the present invention, Figure 5 A schematic diagram of constructing a knowledge graph provided by an embodiment of the present invention, Figure 6 A schematic diagram of another knowledge graph construction provided by an embodiment of the present invention. Figure 4 As shown, select resources and select the knowledge graph name corresponding to the PDF resource. The PDF resource corresponds to the corresponding resource name, resource type, course label, resource classification, content file and other related information. After the user selects the resource, the knowledge graph can be constructed, as shown in Figure 5As shown in the figure, when constructing the knowledge graph, the associated nodes and associated relationships that need to be added and the deletion operations of the corresponding associated nodes will be displayed. After adding the newly added associated nodes and associated relationships, the schematic diagram is as follows Figure 6 As shown, the knowledge points, ability points and problem points added to the knowledge graph can be displayed.

[0071] S340. The newly added associated nodes in the knowledge graph are used as points to be annotated, and the PDF annotation page and annotation trigger page corresponding to the PDF resource are displayed; wherein the annotation trigger page includes a page of points to be annotated and a page of annotated points.

[0072] In this embodiment, the newly added associated nodes in the knowledge graph are used as points to be annotated, and the PDF annotation page and annotation trigger page corresponding to the PDF resource are displayed. The annotation trigger page includes a page of points to be annotated and a page of annotated points. It can be understood that when annotating knowledge points, the entire annotation page can be divided into three small pages, including: a PDF resource display page, a display page of annotable knowledge points in the PDF resource, and a display page of annotated knowledge points in the PDF resource.

[0073] S350: receiving a user's annotation triggering operation on a point to be annotated contained in a page of points to be annotated, and adding a mask to a PDF resource display area corresponding to the PDF annotation page.

[0074] In this embodiment, when a user triggers a markup operation on a point to be marked contained in a point to be marked page, a mask is added to the PDF resource display area corresponding to the PDF markup page. The mask can be understood as a semi-transparent or opaque layer superimposed on the existing content, which is used to highlight certain information, provide interactive functions or enhance user experience. The mask can separate the PDF markup page from the point to be marked page and the marked point page area, thereby enhancing the layering and visual clarity of the interface.

[0075] S360, in response to the completion of the operation of drawing a labeling box corresponding to the point to be marked on the mask by the mouse, displaying an information adding pop-up window corresponding to the labeling box, so that the user can add a knowledge point annotation corresponding to the point to be marked in the information adding pop-up window.

[0076] The knowledge point annotation includes at least: the knowledge point name, the knowledge point type, the label information corresponding to the knowledge point, and the added knowledge point annotation information.

[0077] In this embodiment, in response to the completion of the operation of drawing a label box corresponding to the point to be marked on the mask by the mouse, an information addition pop-up window corresponding to the label box is displayed, so that the user can add the knowledge point name corresponding to the point to be marked, the knowledge point type, the label information corresponding to the knowledge point, and the added knowledge point annotation information in the information addition pop-up window.

[0078] Exemplarily, in order to better understand the resource click annotation, that is, after selecting one of the bound knowledge points, click annotation, the PDF resource display part will add a mask, annotation box drawing, that is, drawing an annotation rectangle on the PDF resource with the mouse, and lifting the mouse to pop up a confirmation bar, and annotation box confirmation, that is, after clicking the confirmation icon, a note box pops up to add notes to the marked knowledge point, and then the data is saved, respectively corresponding to the process, Figure 7 A schematic diagram of a PDF resource with a mask provided by an embodiment of the present invention. Figure 8 A schematic diagram of drawing a label rectangle on a PDF resource using a mouse is provided in one embodiment of the present invention. Fig. 9 A schematic diagram of adding annotations to marked knowledge points provided by an embodiment of the present invention.

[0079] S370: Acquire parameter information of the PDF resource, establish a rectangular coordinate system with the upper left corner of the PDF resource, and determine second position information of the annotation box in the rectangular coordinate system.

[0080] In this embodiment, width information and height information corresponding to the PDF resource are obtained, the width information can represent the x-axis position information corresponding to the PDF resource, and the height information can represent the y-axis position information of the PDF resource. In this embodiment, a rectangular coordinate system is established with the upper left corner of the PDF resource, and the second position information of the annotation box in the rectangular coordinate system is determined. The second position information may include the x-axis coordinate and the y-axis coordinate of the annotation box.

[0081] S380, calculating a first ratio value between the x-axis coordinate in the second position information and the width information.

[0082] In this embodiment, a first ratio value between the x-axis coordinate in the second position information and the width information is calculated.

[0083] S390, calculating a second ratio value between the y-axis coordinate in the second position information and the height information.

[0084] In this embodiment, a second ratio value between the y-axis coordinate in the second position information and the height information is calculated.

[0085] S3100: Use the first ratio value and the second ratio value as target ratio values ​​between the parameter information and the annotation position information in the annotation information, and associate the ratio value and the knowledge point with the user and store them in a database.

[0086] In this embodiment, the first ratio value between the x-axis coordinate and the width information in the second position information, and the second ratio value between the y-axis coordinate and the height information in the second position information are used as the target ratio value between the parameter information and the annotated position information in the annotation information, and the ratio value and the knowledge point are associated with the user and stored in the database, so as to monitor the PDF sliding event and calculate the position of the annotation box in real time.

[0087] The technical solution of the embodiment of the present invention receives a PDF resource selected by a user, and in response to the user clicking on the operation of adding associated nodes and editing associated relationships of the PDF resource, adds at least one associated node and the associated relationships between the associated nodes with the name of the knowledge graph as the central node, binds the associated nodes and the associated relationships with the PDF resource to construct a knowledge graph corresponding to the PDF resource, and can further more intuitively and conveniently display the knowledge points that need to be displayed in the resource; by displaying the PDF annotation page, the page of points to be annotated, and the page of annotated points corresponding to the PDF resource, a user's annotation trigger operation on the points to be annotated contained in the page of points to be annotated is received, a mask is added to the PDF resource display area corresponding to the PDF annotation page, and in response to the completion operation of the mouse drawing the annotation box corresponding to the point to be marked on the mask, the information corresponding to the annotation box is added A pop-up window is displayed to allow the user to add knowledge point annotations corresponding to the points to be annotated in the information adding pop-up window. Based on this, a rectangular coordinate system is established with the upper left corner of the PDF resource, the second position information of the annotation box in the rectangular coordinate system is determined, the first ratio value between the x-axis coordinate and the width information in the second position information is calculated, the second ratio value between the y-axis coordinate and the height information in the second position information is calculated, the first ratio value and the second ratio value are used as the target ratio value between the parameter information and the annotation position information in the annotation information, and the ratio value and the knowledge point are associated with the user and stored in the database. It can be further realized that different users can make different annotations on the same file without changing the source file, and the ratio value and the knowledge point between the parameter information and the annotation position information in the annotation information are associated with the user, which can solve the problem of errors in the size annotation positions of different PDF files.

[0088] For example, to better understand the PDF file display, knowledge point marking, saving, and the method of sliding the annotation box when the PDF file is slid, Fig.10 A flowchart of a method for displaying a PDF file, marking knowledge points, saving the PDF file, and sliding the annotation box when the PDF file is slid is provided in one embodiment of the present invention, such as Fig.10 As shown, the specific process of PDF file display, knowledge point marking, saving, and the method of sliding the annotation box when the PDF file slides is as follows:

[0089] b1. Display PDF resources, as well as the PDF annotation page and annotation trigger page corresponding to the PDF resources.

[0090] b2. The user selects knowledge points for annotation on the annotation trigger page.

[0091] b3. Add a mask to the PDF resource display area corresponding to the PDF annotation page.

[0092] b4. The user draws a labeling box corresponding to the knowledge point to be marked on the mask.

[0093] b5. After the annotation box is drawn, a pop-up window for adding information corresponding to the annotation box is displayed, so that the user can add knowledge point annotations corresponding to the points to be annotated in the pop-up window for adding information.

[0094] b6. After adding the knowledge point annotations, classify them into the marked pages.

[0095] b7. Establish a rectangular coordinate system with the upper left corner of the PDF resource to determine the position information of the annotation box relative to the PDF resource.

[0096] b8. Calculate the ratio of the width and height of the annotation box to the width and height of the PDF file.

[0097] b9. Associate the proportion value and knowledge point with the user and upload them to the server, and store them in the database.

[0098] b10. The user clicks on a marked knowledge point in the marked page to obtain position information of the marked knowledge point relative to the PDF resource.

[0099] b11. Perform position conversion according to the position information and the ratio value stored in the database to obtain the target position information after position conversion.

[0100] b12. Slide to the marked position according to the target position information PDF.

[0101] b13. When receiving the event of the mouse moving to the annotation box, the annotation annotation information corresponding to the annotated knowledge point will pop up.

[0102] In this embodiment, based on the PC-side PDF file display function, the knowledge points that need to be displayed in the display resources are more intuitive and convenient; based on the PC-side PDF file display function, the key content is marked with a frame, and the source file is not changed, so that different users can mark the same file differently; based on the PC-side PDF file display function, the PDF display area has different design sizes, and the marked knowledge points can be clicked to accurately locate the mark box, and the PDF quickly scrolls to the mark box position; based on the PC-side PDF file display function, the mark box will move relatively with the PDF sliding. In this embodiment, the project uses the modern front-end technology stack Vue 3, Vite and Element Plus, combined with JavaScript language, to create an efficient and responsive Web application for PC users. The project follows the MVI (Model-View-Intent) architecture model to ensure the maintainability and testability of the code. Through the responsive system and componentization characteristics of Vue 3, a high-performance user interface can be quickly built. At the same time, as a front-end construction tool, Vite provides fast hot module replacement and development server, which greatly improves development efficiency. Element Plus is a Vue 3-based component library prepared for developers, designers, and product managers, making the interface design both beautiful and practical.

[0103] In one embodiment, Fig.11 This is a structural block diagram of a knowledge point annotation device in a PDF document provided by an embodiment of the present invention. The system is suitable for the situation when the knowledge points of PDF resources are annotated. The device can be implemented by hardware / software. It can be configured in an electronic device to implement a knowledge point annotation method in a PDF document in an embodiment of the present invention.

[0104] like Fig.11 As shown, the annotation device includes: a knowledge graph construction module 1110, a knowledge point annotation module 1120 and a knowledge point association storage module 1130;

[0105] The knowledge graph construction module 1110 is used to respond to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with a knowledge point, and to construct a knowledge graph corresponding to the PDF resource based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and an association relationship between each of the new associated nodes;

[0106] The knowledge point annotation module 1120 is used to take the newly added associated nodes in the knowledge graph as the points to be annotated, and select each knowledge point contained under the points to be annotated from the PDF resource for knowledge point annotation, so as to obtain annotation information corresponding to each of the knowledge points;

[0107] The knowledge point association storage module 1130 is used to obtain parameter information of the PDF resource, determine the ratio value between the parameter information and the annotation position information in the annotation information, and associate the ratio value with the knowledge point and the user and store them in a database.

[0108] In an embodiment of the present invention, a knowledge graph construction module constructs a knowledge graph corresponding to a PDF resource by adding new knowledge points. A knowledge point annotation module uses the newly added associated nodes in the knowledge graph as points to be annotated, and selects various knowledge points contained under the points to be annotated from the PDF resource for knowledge point annotation. Based on this, a knowledge point association storage module determines the parameter information of the PDF resource and the ratio value between the annotation information, and associates and stores the ratio value and the knowledge point with the corresponding annotation user, which can more intuitively and conveniently display the knowledge points that need to be displayed in the resource. Without changing the source file, different users can perform different annotations on the same file, and the ratio value and the knowledge point between the parameter information and the annotation position information in the annotation information are associated with the user, which can solve the problem of errors in the size annotation positions of different PDF files.

[0109] In one embodiment, the marking method further includes:

[0110] A classification module, used for classifying the annotation information corresponding to each of the knowledge points into an annotated list;

[0111] a position conversion module, configured to obtain first position information of the marked knowledge point relative to the PDF resource in response to the user clicking on the marked knowledge point in the marked list, and perform position conversion according to the first position information and the ratio value stored in the database to obtain target position information after position conversion;

[0112] The sliding module is used to automatically slide to the marked knowledge point of the PDF resource according to the target position information and display the marking frame of the marked knowledge point.

[0113] In one embodiment, the marking method further includes:

[0114] The annotation information display module is used to pop up the annotation information corresponding to the marked knowledge point when receiving the event that the mouse moves to the marking box.

[0115] In one embodiment, the knowledge graph construction module 1110 includes:

[0116] A graph name determination unit, used to determine the name of the knowledge graph corresponding to the PDF resource;

[0117] The association relationship determination unit is used to receive the PDF resource selected by the user, and in response to the user clicking the operation of adding an association node and editing an association relationship of the PDF resource, add at least one newly added association node with the name of the knowledge graph as the central node, and the association relationship between the newly added association nodes; wherein the newly added association nodes include knowledge points, ability points and problem points; the knowledge points include at least one newly added knowledge point; each of the newly added association nodes corresponds to a corresponding association direction; wherein the association direction includes: forward, direction and bidirectional;

[0118] The graph construction unit is used to bind the newly added associated nodes and the associated relationships with the PDF resources to construct a knowledge graph corresponding to the PDF resources.

[0119] In one embodiment, the knowledge point annotation module 1120 includes:

[0120] A page display unit, used to display the PDF annotation page and annotation trigger page corresponding to the PDF resource; wherein the annotation trigger page includes a page of points to be annotated and a page of annotated points;

[0121] A mask adding unit, configured to receive a marking triggering operation of the user on the to-be-annotated point contained in the to-be-annotated point page, and add a mask to a PDF resource display area corresponding to the PDF marking page;

[0122] A pop-up display unit is used to respond to the completion operation of drawing a labeling box corresponding to the point to be marked on the mask by the mouse, and display an information adding pop-up window corresponding to the labeling box, so that the user can add the knowledge point annotation corresponding to the point to be marked in the information adding pop-up window; wherein the knowledge point annotation includes at least: the knowledge point name, the knowledge point type, the label information corresponding to the knowledge point and the added knowledge point annotation information.

[0123] In one embodiment, the parameter information includes: width information and height information;

[0124] Accordingly, the knowledge point association storage module 1130 includes:

[0125] A position information determining unit, configured to establish a rectangular coordinate system with the upper left corner of the PDF resource, and determine second position information of the annotation box in the rectangular coordinate system;

[0126] A first ratio value determining unit, configured to calculate a first ratio value between the x-axis coordinate in the second position information and the width information;

[0127] A second ratio value determining unit, used to calculate a second ratio value between the y-axis coordinate in the second position information and the height information;

[0128] The target ratio value determining unit is used to use the first ratio value and the second ratio value as the target ratio value between the parameter information and the marked position information in the marked information.

[0129] In one embodiment, the newly added knowledge points include at least: knowledge point name, knowledge point type, knowledge point classification, knowledge point label information and knowledge point description; wherein, the knowledge point classification includes: target knowledge, element knowledge, logical knowledge, method and skill knowledge, and portrait knowledge.

[0130] The device for marking knowledge points in a PDF document provided by an embodiment of the present invention can execute the method for marking knowledge points in a PDF document provided by any embodiment of the present invention, and has functional modules and beneficial effects corresponding to the execution method.

[0131] In one embodiment, Fig.12 A schematic diagram of the structure of an electronic device provided for an embodiment of the present invention. The electronic device 10 is intended to represent various forms of digital computers, such as laptop computers, desktop computers, workstations, personal digital assistants, servers, blade servers, mainframe computers, and other suitable computers. The electronic device may also represent various forms of mobile devices, such as personal digital processing, cellular phones, smart phones, wearable devices (such as helmets, glasses, watches, etc.) and other similar computing devices. The components shown herein, their connections and relationships, and their functions are merely examples and are not intended to limit the implementation of the present invention described and / or required herein.

[0132] like Fig.12 As shown, the electronic device 10 includes at least one processor 11, and a memory connected to the at least one processor 11, such as a read-only memory (ROM) 12, a random access memory (RAM) 13, etc., wherein the memory stores a computer program that can be executed by at least one processor, and the processor 11 can perform various appropriate actions and processes according to the computer program stored in the read-only memory (ROM) 12 or the computer program loaded from the storage unit 18 to the random access memory (RAM) 13. In the RAM 13, various programs and data required for the operation of the electronic device 10 can also be stored. The processor 11, the ROM 12, and the RAM 13 are connected to each other through a bus 14. An input / output (I / O) interface 15 is also connected to the bus 14.

[0133] A number of components in the electronic device 10 are connected to the I / O interface 15, including: an input unit 16, such as a keyboard, a mouse, etc.; an output unit 17, such as various types of displays, speakers, etc.; a storage unit 18, such as a disk, an optical disk, etc.; and a communication unit 19, such as a network card, a modem, a wireless communication transceiver, etc. The communication unit 19 allows the electronic device 10 to exchange information / data with other devices through a computer network such as the Internet and / or various telecommunication networks.

[0134] The processor 11 may be a variety of general and / or special processing components with processing and computing capabilities. Some examples of the processor 11 include, but are not limited to, a central processing unit (CPU), a graphics processing unit (GPU), various special artificial intelligence (AI) computing chips, various processors running machine learning model algorithms, a digital signal processor (DSP), and any appropriate processor, controller, microcontroller, etc. The processor 11 executes the various methods and processes described above, such as a method for marking knowledge points in a PDF document.

[0135] In some embodiments, the method for marking knowledge points in a PDF document may be implemented as a computer program, which is tangibly contained in a computer-readable storage medium, such as a storage unit 18. In some embodiments, part or all of the computer program may be loaded and / or installed on the electronic device 10 via the ROM 12 and / or the communication unit 19. When the computer program is loaded into the RAM 13 and executed by the processor 11, one or more steps of the method for marking knowledge points in a PDF document described above may be performed. Alternatively, in other embodiments, the processor 11 may be configured to execute the method for marking knowledge points in a PDF document in any other appropriate manner (e.g., by means of firmware).

[0136] Various implementations of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field programmable gate arrays (FPGAs), application specific integrated circuits (ASICs), application specific standard products (ASSPs), systems on chips (SOCs), load programmable logic devices (CPLDs), computer hardware, firmware, software, and / or combinations thereof. These various implementations can include: being implemented in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which can be a special purpose or general purpose programmable processor that can receive data and instructions from a storage system, at least one input device, and at least one output device, and transmit data and instructions to the storage system, the at least one input device, and the at least one output device.

[0137] The computer program for implementing the method of the present invention can be written in any combination of one or more programming languages. These computer programs can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable PDF document knowledge point annotation device, so that when the computer program is executed by the processor, the functions / operations specified in the flow chart and / or block diagram are implemented. The computer program can be executed completely on the machine, partially on the machine, as a stand-alone software package, partially on the machine and partially on a remote machine, or completely on a remote machine or server.

[0138] In the context of the present invention, a computer-readable storage medium may be a tangible medium that may contain or store a computer program for use by or in combination with an instruction execution system, device or equipment. A computer-readable storage medium may include, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, devices or equipment, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium may be a machine-readable signal medium. A more specific example of a machine-readable storage medium may include an electrical connection based on one or more lines, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.

[0139] To provide interaction with a user, the systems and techniques described herein may be implemented on an electronic device having: a display device (e.g., a CRT (cathode ray tube) or LCD (liquid crystal display) monitor) for displaying information to the user; and a keyboard and a pointing device (e.g., a mouse or trackball) through which the user can provide input to the electronic device. Other types of devices may also be used to provide interaction with the user; for example, the feedback provided to the user may be any form of sensory feedback (e.g., visual feedback, auditory feedback, or tactile feedback); and input from the user may be received in any form (including acoustic input, voice input, or tactile input).

[0140] The systems and techniques described herein may be implemented in a computing system that includes backend components (e.g., as a data server), or a computing system that includes middleware components (e.g., an application server), or a computing system that includes frontend components (e.g., a user computer with a graphical user interface or a web browser through which a user can interact with implementations of the systems and techniques described herein), or a computing system that includes any combination of such backend components, middleware components, or frontend components. The components of the system may be interconnected by any form or medium of digital data communication (e.g., a communication network). Examples of communication networks include: a local area network (LAN), a wide area network (WAN), a blockchain network, and the Internet.

[0141] A computing system may include a client and a server. The client and the server are generally remote from each other and usually interact through a communication network. The client and server relationship is generated by computer programs running on the corresponding computers and having a client-server relationship with each other. The server may be a cloud server, also known as a cloud computing server or cloud host, which is a host product in the cloud computing service system to solve the defects of difficult management and weak business scalability in traditional physical hosts and VPS services.

[0142] It should be understood that the various forms of processes shown above can be used to reorder, add or delete steps. For example, the steps described in the present invention can be executed in parallel, sequentially or in different orders, as long as the desired results of the technical solution of the present invention can be achieved, and this document does not limit this.

[0143] The above specific implementations do not constitute a limitation on the protection scope of the present invention. It should be understood by those skilled in the art that various modifications, combinations, sub-combinations and substitutions can be made according to design requirements and other factors. Any modification, equivalent substitution and improvement made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims

1. A method for marking knowledge points in a PDF document, characterized in that: The marking method comprises: In response to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with knowledge points, a knowledge graph corresponding to the PDF resource is constructed based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and an association relationship between each of the new associated nodes; The newly added associated nodes in the knowledge graph are used as points to be annotated, and each knowledge point contained under the points to be annotated is selected from the PDF resource for knowledge point annotating to obtain annotation information corresponding to each of the knowledge points; Parameter information of the PDF resource is obtained, a ratio value between the parameter information and the annotation position information in the annotation information is determined, and the ratio value and the knowledge point are associated with the user and stored in a database.

2. The method according to claim 1, characterized in that The marking method further includes: Classify the annotation information corresponding to each of the knowledge points into an annotated list; In response to the user clicking on a marked knowledge point in the marked list, first position information of the marked knowledge point relative to the PDF resource is obtained, and position conversion is performed according to the first position information and the ratio value stored in the database to obtain target position information after position conversion; Automatically slide to the marked knowledge point of the PDF resource according to the target position information, and display the marking box of the marked knowledge point.

3. The method according to claim 2, characterized in that The marking method further includes: When an event of the mouse being moved to the marking box is received, the marking annotation information corresponding to the marked knowledge point is popped up.

4. The method according to claim 1, characterized in that: The constructing the knowledge graph corresponding to the PDF resource based on the newly added knowledge points includes: Determine the name of the knowledge graph corresponding to the PDF resource; Receive the PDF resource selected by the user, and in response to the user clicking the operation of adding associated nodes and editing associated relationships of the PDF resource, add at least one newly added associated node with the knowledge graph name as the central node, and the associated relationships between the newly added associated nodes; wherein the newly added associated nodes include knowledge points, ability points and problem points; the knowledge points include at least one newly added knowledge point; each of the newly added associated nodes corresponds to a corresponding associated direction; wherein the associated directions include: forward, directional and bidirectional; The newly added associated nodes and the associated relationships are bound to the PDF resource to construct a knowledge graph corresponding to the PDF resource.

5. The method according to claim 1, characterized in that The step of selecting each knowledge point contained in the to-be-annotated point from the PDF resource to perform knowledge point annotation, and obtaining annotation information corresponding to each knowledge point, includes: Display the PDF annotation page and annotation trigger page corresponding to the PDF resource; wherein the annotation trigger page includes a page of points to be annotated and a page of annotated points; Receiving a trigger operation of the user to mark the point to be marked contained in the page of points to be marked, adding a mask to a PDF resource display area corresponding to the PDF marking page; In response to the completion operation of drawing a labeling box corresponding to the point to be marked on the mask by the mouse, an information adding pop-up window corresponding to the labeling box is displayed, so that the user can add knowledge point annotations corresponding to the point to be marked in the information adding pop-up window; wherein, the knowledge point annotations include at least: the knowledge point name, the knowledge point type, the label information corresponding to the knowledge point and the added knowledge point annotation information.

6. The method according to claim 1, characterized in that The parameter information includes: width information and height information; Correspondingly, determining the ratio value between the parameter information and the annotated position information in the annotated information includes: Establishing a rectangular coordinate system with the upper left corner of the PDF resource, and determining second position information of the annotation box in the rectangular coordinate system; Calculating a first ratio value between the x-axis coordinate in the second position information and the width information; Calculating a second ratio value between the y-axis coordinate in the second position information and the height information; The first ratio value and the second ratio value are used as target ratio values ​​between the parameter information and the annotated position information in the annotated information.

7. The method according to claim 1, characterized in that The newly added knowledge points include at least: knowledge point name, knowledge point type, knowledge point classification, knowledge point label information and knowledge point description; wherein, the knowledge point classification includes: target knowledge, element knowledge, logical knowledge, method and skill knowledge, and portrait knowledge.

8. A device for marking knowledge points in a PDF document, characterized in that: The marking device comprises: A knowledge graph construction module, configured to respond to a user's annotation operation of creating a new knowledge point associated with a PDF resource to be annotated with a knowledge point, and to construct a knowledge graph corresponding to the PDF resource based on the new knowledge point; wherein the knowledge graph includes at least two new associated nodes and an association relationship between the new associated nodes; A knowledge point annotation module is used to take the newly added associated nodes in the knowledge graph as points to be annotated, and select each knowledge point contained under the points to be annotated from the PDF resource for knowledge point annotation, so as to obtain annotation information corresponding to each of the knowledge points; The knowledge point association storage module is used to obtain parameter information of the PDF resource, determine the ratio value between the parameter information and the annotation position information in the annotation information, and associate the ratio value with the knowledge point and the user and store them in a database.

9. An electronic device, characterized in that: The electronic device comprises: at least one processor; and a memory communicatively connected to the at least one processor; wherein, The memory stores a computer program executable by the at least one processor, and the computer program is executed by the at least one processor so that the at least one processor can execute the method for marking knowledge points in a PDF document according to any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a processor to implement the method for marking knowledge points in a PDF document according to any one of claims 1 to 7 when executed.