Online document annotation method and device, equipment and medium
By performing image conversion and coordinate calculation on the document page content, the annotation content and parameters are obtained, which solves the problem of poor compatibility between document annotation tools and achieves efficient annotation and storage.
Patent Information
- Application Number
- CN202510704335.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-28
- Publication Date
- 2025-09-19
AI Technical Summary
In the prior art, document annotations between different tools and different types of files have poor compatibility, making it difficult to achieve seamless conversion and annotation, and having poor practicality.
The image is converted by obtaining the page content of the file to be processed, the image scaling ratio is determined, the image coordinates are calculated and sorted, and the mouse operation information is obtained to determine the annotation content and parameters, which are stored in the browser.
It improves the compatibility and practicality of document annotations, ensures the intuitiveness and neatness of pictures, and improves the efficiency of annotations and the accuracy of information storage.
Smart Images

Figure CN120672903A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the fields of big data technology and data processing technology, and in particular to an online document annotation method, device, equipment and medium. Background Art
[0002] With the development of the internet, more and more people are using it for learning and work. When annotating documents on a webpage, this requires entering the annotations in code, which is then recorded in the backend data. While some tools offer annotation capabilities for specific document types, poor compatibility between different tools and between different file types makes seamless conversion and annotation difficult, resulting in limited practicality. Therefore, a technical solution is urgently needed to address these issues. Summary of the Invention
[0003] Embodiments of the present invention provide an online document annotation method, apparatus, device, and medium to improve the problem of poor practicality of document annotation on web pages using codes and existing tools in the prior art.
[0004] An online document annotation method, comprising: Obtaining a file to be processed, and performing image conversion on page contents in the file to be processed to obtain conversion images corresponding to each page content and conversion parameter information thereof; Determining a picture scaling ratio corresponding to each of the conversion pictures according to the conversion parameter information of the conversion pictures; Scaling all the conversion images according to the image scaling ratio to obtain target images corresponding to the conversion images and their initial parameter information; Determine the image coordinates corresponding to each target image according to a preset coordinate formula and initial parameter information, and sort all the target images using all the image coordinates to obtain a list of images corresponding to the file to be processed; Acquiring mouse operation information for the picture list, and determining annotation content corresponding to the picture list and annotation parameters corresponding to the annotation content according to the mouse operation information; The relative positions are determined according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, and all the target images, all the annotation contents and all the relative positions are stored in the browser.
[0005] An online document annotation device, comprising: A file conversion module is used to obtain a file to be processed and perform image conversion on the page content in the file to be processed to obtain conversion images corresponding to each page content and conversion parameter information thereof; A scaling ratio module, configured to determine a scaling ratio corresponding to each of the conversion images based on the conversion parameter information of the conversion images; A picture scaling module, configured to scale all the conversion pictures using the picture scaling ratio to obtain target pictures corresponding to the conversion pictures and their initial parameter information; A picture coordinate module, configured to determine the picture coordinates corresponding to each target picture according to a preset coordinate formula and initial parameter information, and sort all the target pictures by all the picture coordinates to obtain a picture list corresponding to the file to be processed; A picture annotation module, configured to obtain mouse operation information for the picture list, and determine annotation content corresponding to the picture list and annotation parameters corresponding to the annotation content according to the mouse operation information; The relative position module is used to determine the relative position according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, and store all the target images, all the annotation contents and all the relative positions in the browser.
[0006] A computer device includes a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the computer program, the online document annotation method is implemented.
[0007] A computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the online document annotation method is implemented.
[0008] The present invention provides an online document annotation method, device, equipment, and medium. The method realizes the acquisition of converted images and conversion parameter information by performing image conversion on the page content in the processed file, thereby enhancing compatibility, thereby realizing the calculation of the image scaling ratio, and then realizing the scaling of all images, ensuring the intuitiveness of all images. Through a preset coordinate formula, the calculation of the coordinates of all images and the determination of initial parameter information are realized, thereby realizing the sorting of all images, ensuring the neatness of all images. Through mouse operation information, the acquisition of annotation content and annotation parameters is realized, thereby facilitating the modification of annotation content, improving practicality, and improving the efficiency of online document annotation, thereby realizing the calculation of relative positions and realizing the storage of information. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments of the present invention. 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 paying any creative labor.
[0010] Figure 1 is a schematic diagram of an application environment of an online document annotation method according to an embodiment of the present invention; Figure 2 is a flow chart of an online document annotation method according to an embodiment of the present invention; Figure 3 is a flow chart of step S20 of the online document annotation method according to one embodiment of the present invention; Figure 4 is a flowchart of step S20 of the online document annotation method in another embodiment of the present invention; Figure 5 is a principle block diagram of an online document annotation device according to an embodiment of the present invention; Figure 6 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0011] 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 them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0012] The online document annotation method provided by the embodiment of the present invention can be applied as follows: Figure 1 Specifically, the online document annotation method is applied in an online document annotation device, which includes Figure 1The client and server shown communicate with each other through a network to solve the problem in the prior art that local stylization of images cannot achieve the expected effect. The server can be an independent server or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, content delivery networks (CDNs), and big data and artificial intelligence platforms. The client, also known as the user end, refers to a program that corresponds to the server and provides classification services to customers. The client can be installed on, but is not limited to, various computers, laptops, smartphones, tablets, and portable wearable devices.
[0013] In one embodiment, if Figure 2 As shown, an online document annotation method is provided, which is applied in Figure 1 The server in the example is used as an example, and the steps are as follows: S10: Obtain a file to be processed, and perform image conversion on the page contents in the file to be processed to obtain conversion images corresponding to each page content and conversion parameter information thereof.
[0014] It is understandable that the to-be-processed file refers to a document in a web page that needs to be annotated. Converting an image refers to converting the page content from a document format to an image format.
[0015] Specifically, the webpage a user is browsing is determined, and the files within the current page of the webpage are identified, and the files to be processed are retrieved. Next, the page content within the file to be processed is converted to images. This involves reading the page content of the file to be processed to separate elements such as text, fonts, paragraphs, images, and vector graphics, and parsing layout information (such as margins, paragraph spacing, and table row and column structure). A rendering engine is then used to render the page content of the file to be processed onto a virtual canvas, converting text into corresponding glyph pixels and vector graphics into bitmaps. Embedded images are scaled and rendered accordingly. Finally, the content within the virtual canvas is converted into a pixel matrix and saved as a converted image. This yields a converted image corresponding to each page content. In another embodiment, a neural network model can be trained to convert the page content within the file to be processed into images, thereby yielding a converted image corresponding to each page content. After the page content of the file to be processed is converted, the images can have the same or different sizes. For example, in a medical setting, when a doctor is viewing an online document and needs to annotate certain information, direct annotation is not possible. In this case, the document needs to be converted to an image.
[0016] S20: Determine the image scaling ratio corresponding to each of the conversion images according to the conversion parameter information of the conversion images.
[0017] The parameter information refers to information such as the width and height of the converted image. The image scaling ratio refers to the ratio of the image's dimensions (width and height) to its original dimensions during the image enlargement or reduction process.
[0018] Specifically, when all pictures need to be displayed vertically, the picture width of each conversion picture is extracted from the parameter information according to the conversion parameter information of each conversion picture, and then the preset fixed width is obtained, the quotient of each picture width and the preset fixed width is calculated, and the result is determined as the picture scaling ratio corresponding to each conversion picture.
[0019] In another embodiment, when all images need to be displayed horizontally, the image height of each converted image is extracted from the conversion parameter information of each converted image. Then, a preset fixed height is obtained, and the quotient of each image height and the preset fixed height is calculated, and the result is determined as the image scaling ratio corresponding to each converted image. For example, in a medical scenario, when observing and annotating images of lesions at different time periods, horizontal arrangement is more intuitive and convenient. In this way, the height of all images is fixed to the same height.
[0020] S30 , performing scaling processing on all the conversion pictures according to the picture scaling ratio to obtain target pictures corresponding to the conversion pictures and initial parameter information thereof.
[0021] It can be understood that the target image refers to an image with the same width after all images are scaled according to the image scaling ratio.
[0022] Specifically, the image scaling ratio corresponding to each conversion image is obtained, and the conversion parameter information corresponding to each conversion image is obtained. Then, the conversion image is scaled according to the image scaling ratio and parameter information corresponding to the same conversion image, that is, the width and height of the conversion image are scaled by the image scaling ratio, so as to obtain the target image corresponding to each conversion image and determine the corresponding initial parameter information.
[0023] In another embodiment, in order to ensure the image quality after scaling, a preset algorithm is obtained, each conversion image is scaled using the preset algorithm and the image scaling ratio, and the image quality during the scaling process is adjusted to obtain the target image corresponding to each conversion image and its initial parameter information.
[0024] S40 , determining the image coordinates corresponding to each of the target images according to a preset coordinate formula and initial parameter information, and sorting all the target images according to all the image coordinates to obtain a list of images corresponding to the file to be processed.
[0025] Understandably, a preset coordinate formula refers to a pre-set formula for calculating the coordinates of each image. Image coordinates refer to the position coordinates of each target image on the current page. An image list refers to a collection of multiple images arranged and displayed in an ordered or structured manner.
[0026] Specifically, the reference point of each target image is extracted from the parameter information corresponding to each target image, and the reference point coordinates of the first target image on the current page are determined as the reference point. Then, the coordinates of each target image on the current page are calculated using a preset coordinate formula to obtain the image coordinates corresponding to each target image. For example, when the upper left corner is the reference point coordinate, the upper left corner coordinates of the second target image are the upper left corner coordinates of the first target image plus the scaled height of the first target image. Alternatively, the upper left corner coordinates of the second target image are the upper left corner coordinates of the first target image plus the scaled width of the first target image. Furthermore, all target images are sorted using all image coordinates, that is, all target images are spliced using all image coordinates, that is, the upper left corner of the current target image is spliced with the lower left corner of the previous target image, to obtain a list of images corresponding to the file to be processed. For example, when viewing an online case, the bottom of the converted case image is spliced with the top of the next image. In this way, an online case image list can be obtained, which facilitates annotation of online cases.
[0027] S50: Obtain mouse operation information for the picture list, and determine annotation content corresponding to the picture list and annotation parameters corresponding to the annotation content according to the mouse operation information.
[0028] Understandably, mouse operation information refers to the data generated by clicking a mouse on a target image. Annotation content refers to comments, comments, explanations, or suggested revisions to the target image, used to supplement, explain, question, or optimize the original text or content. Annotation parameters refer to the size and coordinates of the annotation box.
[0029] Specifically, the mouse operation information for the image list is obtained, and the annotation content corresponding to the image list and the annotation parameters corresponding to the annotation content are determined based on the mouse operation information. That is, by parsing the mouse operation information, the mouse operation information for different contents of different target images, namely the input annotator information and the input annotation content, is obtained, and the position information, annotation width, annotation height and other parameter information of each annotation content are recorded in the annotation column. In this way, the annotation content corresponding to each target image and the annotation parameters corresponding to the annotation content can be obtained. For example, in a medical scenario, when viewing an online document and needing to annotate the information, you can use the mouse to select the content to be annotated and enter the annotation content in the annotation box, thereby realizing the acquisition of the annotation content and annotation parameters.
[0030] S60 , determining relative positions according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, and storing all the target images, all the annotation contents and all the relative positions in the browser.
[0031] Understandably, relative position refers to the positional relationship of the annotation content relative to the target image.A browser is a software application used to access and display web pages, files, and resources on the Internet.
[0032] Specifically, the algorithm calculates the positional relationship between the target image and the annotation content using the parameter information and annotation parameters corresponding to the same target image. This involves calculating the deviation ratio within the current page and then determining the positional relationship. This allows the relative position of each target image and its corresponding annotation content to be determined. All target images, all annotations, and all relative positions are then stored in the browser for easy image restoration.
[0033] In an embodiment of the present invention, an online document annotation method realizes the acquisition of converted images and conversion parameter information by performing image conversion on the page content in the processed file, thereby enhancing compatibility, thereby realizing the calculation of image scaling ratio, and then realizing the scaling of all images, ensuring the intuitiveness of all images. Through a preset coordinate formula, the calculation of all image coordinates and the determination of initial parameter information are realized, thereby realizing the sorting of all images, ensuring the neatness of all images. Through mouse operation information, the acquisition of annotation content and annotation parameters is realized, thereby facilitating the modification of annotation content, improving practicality, and improving the efficiency of online document annotation, thereby realizing the calculation of relative positions and the storage of information.
[0034] In one embodiment, in step S10, image conversion is performed on the page contents in the to-be-processed file to obtain conversion images corresponding to the page contents and conversion parameter information thereof, including: S101, obtaining a preset image conversion model, and inputting the file to be processed into the preset image conversion model.
[0035] S102: Divide the file to be processed into pages using the segmentation layer in the preset image conversion model to obtain at least one page content.
[0036] S103: Perform image conversion on all the page contents through the conversion layer in the preset image conversion model to obtain conversion images corresponding to the page contents.
[0037] Understandably, the preset image conversion model refers to a pre-trained neural network model used to convert files into images. Page content refers to the content of a single page in the file to be processed, for example, the content of a PPT or a single page in a document.
[0038] Specifically, a preset image conversion model is obtained, and then the file to be processed is input into the preset image conversion model. Then, the file to be processed is divided into pages using the segmentation layer in the preset image conversion model. That is, the file to be processed is first scanned to determine information such as the file type, text, numbers, and number of pages. Then, according to the number of pages, the segmentation layer in the preset image conversion model is used to divide the file to be processed into pages, thereby obtaining at least one page content. Next, all page contents are converted using the conversion layer in the preset image conversion model. That is, all page contents are converted one by one using the preset algorithm and conversion algorithm in the conversion layer. During the conversion process, the clarity of the page image is adjusted using the preset algorithm, thereby obtaining a converted image corresponding to each page content.
[0039] In this embodiment, by presetting the image conversion model, the segmentation of the files to be processed is achieved, thereby achieving the acquisition of page data. Through the conversion layer, the conversion of page content is achieved, thereby achieving the acquisition of the converted image and ensuring the clarity of the converted image.
[0040] In one embodiment, if Figure 3 As shown, in step S20, that is, according to the conversion parameter information of the conversion picture, determining the picture scaling ratio corresponding to each of the conversion pictures includes: S201: Extract the picture width from the conversion parameter information of each conversion picture.
[0041] S202 : Obtain a preset fixed width, and determine a picture scaling ratio corresponding to each of the conversion pictures according to the picture width corresponding to each of the conversion pictures and the preset fixed width.
[0042] It is understandable that the image width refers to the size of the image in the horizontal direction. The preset fixed width refers to the preset size of the image in the horizontal direction.
[0043] Specifically, after obtaining the conversion images, the conversion parameter information for each conversion image is obtained. Then, the image width in the conversion parameter information for each conversion image is extracted to obtain the image width corresponding to each conversion image. Then, a preset fixed width is obtained, and based on the image width corresponding to each conversion image and the preset fixed width, the image scaling ratio corresponding to each conversion image is determined. In other words, the image scaling ratio is obtained by calculating the quotient of the image width of the conversion image and the preset fixed width. In this way, the quotient of the image width of each conversion image and the preset fixed width is calculated to obtain the image scaling ratio corresponding to each conversion image.
[0044] In this embodiment, the image width is extracted by converting the image conversion parameter information. By presetting a fixed width, the image scaling ratio is calculated, and the subsequent conversion image width is unified, which improves simplicity and intuitiveness.
[0045] In one embodiment, in step S40, determining the image coordinates corresponding to each target image according to a preset coordinate formula and initial parameter information includes: S401: Determine the reference coordinates of the first target image according to the initial parameter information of the target image.
[0046] S402, obtaining a preset coordinate formula, wherein the preset coordinate formula means that the image position coordinates of the current target image are the sum of the image position coordinates of the previous target image and the image zoom height.
[0047] S403: Determine the picture coordinates corresponding to each of the target pictures according to all the initial parameter information and the reference coordinates.
[0048] Understandably, the base coordinates refer to the coordinate position of the first target image on the current page. The image scale height refers to the height of the converted image after scaling, i.e., the height of the target image. The image position coordinates refer to the coordinate information of the reference point of the target image on the current page.
[0049] Specifically, after obtaining the target image, the page content of each target image is identified. The first target image, and determine the initial parameter information of the first target image, and determine the position information of the first target image in the current page, so as to obtain the reference coordinates of the first target image. Then obtain the preset coordinate formula, the preset coordinate formula means that the image position coordinates of the current target image are the sum of the image position coordinates of the previous target image and the image zoom height. Then, the position coordinates of each target image are calculated through the preset coordinate formula, the reference coordinates and the initial parameter information of each target image. For example, the position coordinates of the second target image are the reference coordinates of the first target image in the current page, plus the zoom height of the first target image, to obtain the image coordinates of the two target images. In this way, the position coordinates of all target images are determined, and the image coordinates corresponding to each target image can be obtained.
[0050] In this embodiment, the initial parameter information of the target images is used to determine the first target image, thereby determining the coordinates of the first target image on the current page, and then obtaining the reference coordinates. The positions of all target images are calculated using a preset coordinate formula, thereby obtaining the image coordinates.
[0051] In one embodiment, if Figure 4 As shown, in step S60, that is, determining the relative position according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, includes: S601: Extract the image coordinates of the target image in the current page from the update parameter information of the target image.
[0052] S602: Determine an annotation reference point of the annotation content according to the annotation parameters of the annotation content, and determine the annotation reference coordinates of the annotation reference point in the current page.
[0053] S603: Determine the relative position between the target image and the annotation content according to the image coordinates and the annotation reference coordinates.
[0054] Understandably, the annotation reference point refers to a relatively fixed point in the annotation content, such as one of the four vertices of the annotation content, the center point of the annotation content, or any fixed point within the annotation content area. The annotation reference coordinates refer to the coordinate position information of the annotation content on the current page.
[0055] Specifically, after determining the annotation content and annotation parameters, first extract the image coordinates of the target image in the current page from the update parameter information of the target image. Then, determine the annotation reference point of the annotation content based on the annotation parameters of the annotation content, that is, determine the annotation reference point of the annotation content through information such as the height and width in the annotation parameters. Then determine the coordinates of the annotation reference point, that is, the coordinate position of the annotation reference point in the current page, and determine it as the annotation reference coordinate. Next, determine the relative position between the target image and the annotation content based on the image coordinates and the annotation reference coordinates, that is, calculate the deviation ratio between the image coordinates and the annotation reference coordinates, and then determine the relative position between the target image and the annotation content based on the deviation ratio.
[0056] In this embodiment, the annotation reference point is obtained through the annotation parameters, thereby determining the annotation reference coordinates, and then calculating the relative position, thereby improving the accuracy and efficiency of subsequent restoration.
[0057] In one embodiment, step S60, that is, storing all the target images, all the annotation contents, and all the relative positions in the browser, includes: S604: scaling all the annotation contents according to the image scaling ratio to obtain scaling annotation parameters.
[0058] S605: Save all the zoom annotation parameters, all the target images, and all the relative positions in the browser.
[0059] It can be understood that the scaled annotation parameters refer to the parameter information of the annotation content after scaling, that is, the size and coordinate information.
[0060] Specifically, after obtaining the relative position, that is, after scaling the converted image, record the correspondence between the target image and the image scaling ratio, so as to obtain the image scaling ratio corresponding to each target image. Then, according to the image scaling ratio, all annotation contents are scaled, that is, the width and height of each annotation content corresponding to the target image are adjusted by the image scaling ratio corresponding to the same target image, so as to obtain the scaling annotation parameters corresponding to each annotation content. Then, all scaling annotation parameters, all target images and all relative positions are saved in the browser. For example, the information can be saved in a structured file. Among them, the image scaling ratio can also be saved together with the current page.
[0061] In this embodiment, the annotation content is scaled by the image scaling ratio, thereby obtaining the scaled annotation parameters, reducing the storage space, and further saving the relative position, which facilitates the subsequent restoration of the annotation content.
[0062] In one embodiment, after step S60, that is, after all the target images, all the annotation contents, and all the relative positions are stored in the browser, the process further includes: S70: After receiving the picture display instruction, all the annotation contents are restored to the updated page according to the relative position and the picture scaling ratio.
[0063] Understandably, the image display instruction refers to an image display command triggered in the updated page. For example, after the information is saved, the instruction can be triggered when the page is opened again. The updated page means that the page opened from the reopened page can be the same as the page opened last time.
[0064] Specifically, when the annotation content needs to be restored in the update page, the image display instruction is triggered. After receiving the image display instruction, the server obtains all target images, all annotation contents and all image zoom ratios. First, the annotation content is restored according to all annotation contents and all image zoom ratios, that is, the quotient of the annotation parameter information saved in the annotation content corresponding to the same target image and the image zoom ratio is calculated to restore the annotation content. Then, all target images and annotation contents are drawn on the canvas of the update page through the target image, the restored annotation content and the relative position to restore all annotation contents to the update page. For example, in a medical scenario, when a doctor visits the target patient for a follow-up visit, views the online case, and needs to view the annotation information, the image display instruction is triggered, and the case and annotation information are restored to the update page to facilitate the doctor's reading of the annotation information at that time.
[0065] In this embodiment, the annotation content is quickly restored through relative position and image scaling, thereby achieving accurate and efficient restoration of web page annotations, thereby improving the practicality of online document annotations.
[0066] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of the present invention.
[0067] In one embodiment, an online document annotation device is provided, which corresponds one-to-one to the online document annotation method in the above embodiment. Figure 5 As shown, the online document annotation device includes a file conversion module 10, a scaling module 20, an image scaling module 30, an image coordinate module 40, an image annotation module 50 and a relative position module 60. The functional modules are described in detail as follows: The file conversion module 10 is used to obtain a file to be processed and perform image conversion on the page contents in the file to be processed to obtain conversion images corresponding to the page contents and conversion parameter information thereof; A scaling ratio module 20, configured to determine a scaling ratio corresponding to each of the conversion images based on the conversion parameter information of the conversion images; The image scaling module 30 is configured to scale all the conversion images using the image scaling ratio to obtain target images corresponding to the conversion images and their initial parameter information; The image coordinate module 40 is used to determine the image coordinates corresponding to each target image according to a preset coordinate formula and initial parameter information, and sort all the target images according to all the image coordinates to obtain a list of images corresponding to the file to be processed; The picture annotation module 50 is configured to obtain mouse operation information for the picture list, and determine annotation content corresponding to the picture list and annotation parameters corresponding to the annotation content according to the mouse operation information; The relative position module 60 is used to determine the relative position according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, and store all the target images, all the annotation contents and all the relative positions in the browser.
[0068] In one embodiment, the apparatus further comprises: The picture restoration module is used to restore all the annotation contents to the updated page according to the relative position and the picture scaling ratio after receiving the picture display instruction.
[0069] In one embodiment, the file conversion module 10 includes: An image input unit, configured to obtain a preset image conversion model and input the file to be processed into the preset image conversion model; a page division unit, configured to divide the to-be-processed file into pages using the segmentation layer in the preset image conversion model to obtain at least one page content; The image conversion unit is used to perform image conversion on all the page contents through the conversion layer in the preset image conversion model to obtain a conversion image corresponding to the page content.
[0070] In one embodiment, the scaling module 20 includes: an information extraction unit, configured to extract a picture width from the conversion parameter information of each conversion picture; The ratio determination unit is used to obtain a preset fixed width and determine the image scaling ratio corresponding to each of the conversion images according to the image width corresponding to each of the conversion images and the preset fixed width.
[0071] In one embodiment, the image coordinate module 40 includes: A reference coordinate unit, configured to determine the reference coordinates of the first target image according to the initial parameter information of the target image; A formula acquisition unit, configured to acquire a preset coordinate formula, wherein the preset coordinate formula means that the image position coordinates of the current target image are the sum of the image position coordinates of the previous target image and the image zoom height; The picture coordinate unit is used to determine the picture coordinates corresponding to each of the target pictures according to all the initial parameter information and the reference coordinates.
[0072] In one embodiment, the relative position module 60 includes: A picture coordinate unit, configured to extract the picture coordinates of the target picture in the current page from the update parameter information of the target picture; An annotation coordinate unit, used to determine an annotation reference point of the annotation content according to the annotation parameters of the annotation content, and determine the annotation reference coordinates of the annotation reference point in the current page; A relative position unit is used to determine the relative position between the target image and the annotation content according to the image coordinates and the annotation reference coordinates.
[0073] In one embodiment, the relative position module 60 further includes: An annotation scaling unit, configured to scale all the annotation contents according to the image scaling ratio to obtain scaling annotation parameters; The information storage unit is used to save all the zoom annotation parameters, all the target images and all the relative positions in the browser.
[0074] The specific limitations of the online document annotation device can be found in the limitations of the online document annotation method described above and will not be further elaborated here. Each module in the online document annotation device described above may be implemented in whole or in part through software, hardware, or a combination thereof. Each of the modules described above may be embedded in or independent of a processor in a computer device in hardware form, or may be stored in a memory in a computer device in software form, so that the processor can call and execute the corresponding operations of each module.
[0075] In one embodiment, a computer device is provided. The computer device may be a server, and its internal structure diagram may be as follows: Figure 6As shown. The computer device includes a processor, a memory, a network interface and a database connected via a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store the data used in the online document annotation method in the above embodiment. The network interface of the computer device is used to communicate with an external terminal via a network connection. When the computer program is executed by the processor, the above-mentioned online document annotation method is implemented.
[0076] In one embodiment, a computer device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned online document annotation method when executing the computer program.
[0077] In one embodiment, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the online document annotation method described above is implemented.
[0078] Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiments can be implemented by instructing the relevant hardware through a computer program. The computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application may include non-volatile and / or volatile memory. Non-volatile memory may include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory may include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in many forms such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), Synchronous Link DRAM (SLDRAM), Rambus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0079] Those skilled in the art will clearly understand that for the sake of convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above.
[0080] The embodiments described above are only used to illustrate the technical solutions of the present invention, rather than to limit the same. Although the present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. 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 various embodiments of the present invention, and should all be included in the scope of protection of the present invention.
Claims
1. An online document annotation method, characterized in that: include: Obtaining a file to be processed, and performing image conversion on page contents in the file to be processed to obtain conversion images corresponding to each page content and conversion parameter information thereof; Determining a picture scaling ratio corresponding to each of the conversion pictures according to the conversion parameter information of the conversion pictures; Scaling all the conversion images according to the image scaling ratio to obtain target images corresponding to the conversion images and their initial parameter information; Determine the image coordinates corresponding to each target image according to a preset coordinate formula and initial parameter information, and sort all the target images using all the image coordinates to obtain a list of images corresponding to the file to be processed; Acquiring mouse operation information for the picture list, and determining annotation content corresponding to the picture list and annotation parameters corresponding to the annotation content according to the mouse operation information; The relative positions are determined according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, and all the target images, all the annotation contents and all the relative positions are stored in the browser.
2. The online document annotation method according to claim 1, wherein: The determining, based on the conversion parameter information of the conversion pictures, a picture scaling ratio corresponding to each of the conversion pictures includes: Extracting the picture width from the conversion parameter information of each conversion picture; A preset fixed width is obtained, and a picture scaling ratio corresponding to each of the conversion pictures is determined according to the picture width corresponding to each of the conversion pictures and the preset fixed width.
3. The online document annotation method according to claim 1, wherein: The determining of the image coordinates corresponding to each target image according to the preset coordinate formula and the initial parameter information includes: Determining the reference coordinates of the first target image according to the initial parameter information of the target image; Obtain a preset coordinate formula, where the preset coordinate formula means that the image position coordinates of the current target image are the sum of the image position coordinates of the previous target image and the image zoom height; The picture coordinates corresponding to each of the target pictures are determined according to all the initial parameter information and the reference coordinates.
4. The online document annotation method according to claim 1, wherein: The determining the relative position according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image includes: Extracting the image coordinates of the target image in the current page from the update parameter information of the target image; Determining an annotation reference point of the annotation content according to the annotation parameters of the annotation content, and determining an annotation reference coordinate of the annotation reference point in the current page; The relative position between the target image and the annotation content is determined according to the image coordinates and the annotation reference coordinates.
5. The online document annotation method according to claim 1, wherein: The performing image conversion on the page contents in the to-be-processed file to obtain conversion images corresponding to the page contents and conversion parameter information thereof includes: Obtaining a preset image conversion model, and inputting the file to be processed into the preset image conversion model; Dividing the to-be-processed file into pages using the segmentation layer in the preset image conversion model to obtain at least one page content; All the page contents are converted into images through the conversion layer in the preset image conversion model to obtain conversion images corresponding to the page contents.
6. The online document annotation method according to claim 1, wherein: The storing of all the target images, all the annotation contents and all the relative positions in the browser includes: Scaling all the annotation contents according to the image scaling ratio to obtain scaling annotation parameters; All the zoom annotation parameters, all the target images, and all the relative positions are saved in the browser.
7. The online document annotation method according to claim 1, wherein: After storing all the target images, all the annotation contents and all the relative positions in the browser, the method further includes: After receiving the picture display instruction, all the annotation contents are restored to the updated page according to the relative position and the picture scaling ratio.
8. An online document annotation device, characterized in that: include: A file conversion module is used to obtain a file to be processed and perform image conversion on the page content in the file to be processed to obtain conversion images corresponding to each page content and conversion parameter information thereof; A scaling ratio module, configured to determine a scaling ratio corresponding to each of the conversion images based on the conversion parameter information of the conversion images; A picture scaling module, configured to scale all the conversion pictures using the picture scaling ratio to obtain target pictures corresponding to the conversion pictures and their initial parameter information; A picture coordinate module, configured to determine the picture coordinates corresponding to each target picture according to a preset coordinate formula and initial parameter information, and sort all the target pictures by all the picture coordinates to obtain a picture list corresponding to the file to be processed; A picture annotation module, configured to obtain mouse operation information for the picture list, and determine annotation content corresponding to the picture list and annotation parameters corresponding to the annotation content according to the mouse operation information; The relative position module is used to determine the relative position according to the update parameter information of the target image and the annotation parameters of the annotation content corresponding to the target image, and store all the target images, all the annotation contents and all the relative positions in the browser.
9. A computer device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein: When the processor executes the computer program, the online document annotation method according to any one of claims 1 to 7 is implemented.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the online document annotation method according to any one of claims 1 to 7 is implemented.