A hyperlink marking method, device, computer equipment, and storage medium

By using finite state automata and lists in HTML documents to extract target subtext and their identifiers and perform hyperlink tags, the problem of inefficient information extraction in HTML documents is solved, and efficient and accurate information query and data analysis are achieved.

CN119761308APending Publication Date: 2025-04-04SUZHOU LANGDONG NET TEC CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411944810.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-27
Publication Date
2025-04-04

AI Technical Summary

Technical Problem

Due to the mixing of structured and unstructured data, it is difficult to extract the required target information, resulting in inefficient information query and data analysis.

Method used

By obtaining the document to be marked, parsing the text content, using pre-set finite state automatons and lists, the target subtext and their identifiers are extracted, and hyperlink tags are performed in the document.

Benefits of technology

It realizes efficient and accurate subtext extraction and hyperlink addition, improving the efficiency of information query and data analysis.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119761308A_ABST
    Figure CN119761308A_ABST
Patent Text Reader

Abstract

The present application relates to a hyperlink marking method, device, computer equipment, and storage medium. The method comprises: obtaining a document to be marked, the document to be marked includes text content and non-text content; parsing the document to be marked to obtain the text content in the document to be marked; obtaining a target subtext in the text content and an identifier corresponding to the target subtext based on a preset finite state automaton, the preset finite state automaton includes a subtext and an identifier corresponding to the subtext; obtaining the position information of the target subtext in the text based on a preset list; and marking the subtext with a hyperlink in the document to be marked based on the position information and the identifier. The method can be used to quickly extract information.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of information technology, and in particular to a hyperlink marking method, device, computer equipment, and storage medium. Background Art

[0002] With the continuous advancement of big data technology, the demand for enterprise information query and business data analysis is growing, and many information platforms have emerged to provide convenient enterprise data query services for enterprises and individuals.

[0003] The enterprise information on the platform is usually presented to users in the form of HTML (HyperText Markup Language) pages, including rich enterprise details such as company name, registered address, and unique identifier (keyno) and other important information. However, HTML documents themselves are a mixture of structured and unstructured data, making it difficult to extract the required target information. Summary of the invention

[0004] Based on this, it is necessary to provide a hyperlink marking method, device, computer equipment, and storage medium to address the above technical issues.

[0005] In a first aspect, the present application provides a hyperlink marking method. The method comprises:

[0006] Acquire a document to be marked, wherein the document to be marked includes text content and non-text content;

[0007] Parsing the document to be marked to obtain text content in the document to be marked;

[0008] Based on a preset finite state automaton, a target subtext in the text content and an identifier corresponding to the target subtext are obtained, wherein the preset finite state automaton includes a subtext and an identifier corresponding to the subtext;

[0009] Based on a preset list, obtaining position information of the target subtext in the text;

[0010] Based on the position information and the identifier, a hyperlink mark is performed on the subtext in the document to be marked.

[0011] In one embodiment, parsing the document to be marked includes:

[0012] Based on the parsing library corresponding to the document to be marked, the document tags in the document to be marked are removed and the preset characters are replaced to obtain the parsed document to be marked.

[0013] In one embodiment, the setting process of the finite state automaton includes:

[0014] Acquire original data, where the original data includes subtext and identifier;

[0015] constructing a finite state automaton based on the subtext;

[0016] constructing a mapping between the subtext and the identifier, the subtext corresponding to the identifier;

[0017] The finite state automaton and the mapping are stored in a memory.

[0018] In one embodiment, the process of setting the list includes:

[0019] The positions of the characters in the document to be marked are calculated, and a list including the character contents and the starting and ending positions of the characters is created.

[0020] In one embodiment, the step of marking a subtext as a hyperlink in the document to be marked based on the position information and the identifier includes:

[0021] Based on a preset finite state automaton, obtaining a target subtext in the document to be marked;

[0022] Based on the list, obtaining the starting position and the ending position of the target subtext in the text;

[0023] Based on the start position and the end position, a hyperlink of the target subtext is created, wherein the hyperlink includes an identifier of the target subtext.

[0024] In one embodiment, the method further comprises:

[0025] Get raw data regularly;

[0026] A new finite state automaton is constructed based on the original data.

[0027] In a second aspect, the present application further provides a hyperlink marking device, the device comprising:

[0028] An acquisition module is used to acquire a document to be marked, wherein the document to be marked includes text content and non-text content;

[0029] A parsing module, used to parse the document to be marked to obtain the text content in the document to be marked;

[0030] A determination module, configured to obtain a target subtext in the text content and an identifier corresponding to the target subtext based on a preset finite state automaton, wherein the preset finite state automaton includes a subtext and an identifier corresponding to the subtext;

[0031] A positioning module, used for obtaining the position information of the target subtext in the text based on a preset list;

[0032] The marking module is used to mark the subtext as a hyperlink in the document to be marked based on the position information and the identifier.

[0033] In one embodiment, parsing the document to be marked includes:

[0034] Based on the parsing library corresponding to the document to be marked, the document tags in the document to be marked are removed and the preset characters are replaced to obtain the parsed document to be marked.

[0035] In one embodiment, the setting process of the finite state automaton includes:

[0036] Acquire original data, wherein the original data includes a target subtext and an identifier;

[0037] constructing a finite state automaton based on the target subtext;

[0038] constructing a mapping between the target subtext and the identifier, the target subtext corresponding to the identifier;

[0039] The finite state automaton and the mapping are stored in a memory.

[0040] In one embodiment, the process of setting the list includes:

[0041] The positions of the characters in the document to be marked are calculated, and a list including the character contents and the starting and ending positions of the characters is created.

[0042] In one embodiment, the step of marking a subtext as a hyperlink in the document to be marked based on the position information and the identifier includes:

[0043] Based on a preset finite state automaton, obtaining a target subtext in the text;

[0044] Based on the list, obtaining the starting position and the ending position of the target subtext in the text;

[0045] Based on the start position and the end position, a hyperlink of the target subtext is created, wherein the hyperlink includes an identifier of the target subtext.

[0046] In one embodiment, the device further comprises:

[0047] Get raw data regularly;

[0048] A new finite state automaton is constructed based on the original data.

[0049] In a third aspect, the present disclosure further provides a computer device, wherein the computer device comprises a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the hyperlink marking method when executing the computer program.

[0050] In a fourth aspect, the present disclosure further provides a computer-readable storage medium having a computer program stored thereon, and when the computer program is executed by a processor, the steps of the hyperlink marking method are implemented.

[0051] In a fifth aspect, the present disclosure further provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the hyperlink marking method are implemented.

[0052] The above hyperlink marking method has at least the following beneficial effects:

[0053] The embodiment scheme provided by the present disclosure can quickly obtain the target sub-text in the text content and the identifier corresponding to the target sub-text from the document to be marked based on a preset finite state automaton, and obtain the position information of the target sub-text in the text in combination with a preset list, and mark the sub-text with a hyperlink, thereby realizing efficient and accurate sub-text extraction and hyperlink adding.

[0054] It is to be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0055] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the conventional technology, the drawings required for use in the embodiments or the conventional technology descriptions will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0056] Figure 1 A diagram of an application environment of a hyperlink marking method in one embodiment;

[0057] Figure 2 A schematic diagram of a process flow of a hyperlink marking method in one embodiment;

[0058] Figure 3 is a structural block diagram of a hyperlink marking device in one embodiment;

[0059] Figure 4 is an internal structure diagram of a computer device in one embodiment;

[0060] Figure 5 The figure is a diagram of the internal structure of a server in one embodiment. DETAILED DESCRIPTION

[0061] In order to enable ordinary persons in the art to better understand the technical solutions of the present disclosure, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings.

[0062] It should be noted that the terms "first", "second", etc. in the specification and claims of the present disclosure 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 disclosure described here can be implemented in an order other than those illustrated or described here. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are only examples of devices and methods consistent with some aspects of the present disclosure as detailed in the attached claims. The terms "include", "comprise" or any other variant thereof are intended to cover non-exclusive inclusion, so that the process, method, product or device including a series of elements includes not only those elements, but also other elements that are not explicitly listed, or also includes elements inherent to such process, method, product or device. In the absence of more restrictions, it is not excluded that there are other identical or equivalent elements in the process, method, product or device including the elements. For example, if the words first, second, etc. are used to represent the name, they do not represent any specific order.

[0063] The present disclosure provides a hyperlink marking method, which can be applied to Figure 1 In the application environment shown. Among them, the terminal 102 communicates with the server 104 through the network. The data storage system can store the data that the server 104 needs to process. The data storage system can be integrated on the server 104, or it can be placed on the cloud or other network servers. Among them, the terminal 102 can be but is not limited to various personal computers, laptops, smart phones, tablets, Internet of Things devices and portable wearable devices. The Internet of Things devices can be smart speakers, smart TVs, smart air conditioners, smart car-mounted devices, etc. Portable wearable devices can be smart watches, smart bracelets, head-mounted devices, etc. The server 104 can be implemented with an independent server or a server cluster consisting of multiple servers.

[0064] In some embodiments of the present disclosure, Figure 2 As shown, a hyperlink marking method is provided, which is applied to Figure 1The method is described by taking the example of a server in processing text content. It is understandable that the method can be applied to a server, and can also be applied to a system including a terminal and a server, and is implemented through the interaction between the terminal and the server. In a specific embodiment, the method can include the following steps:

[0065] S202: Acquire a document to be marked, where the document to be marked includes text content and non-text content.

[0066] The document to be marked can be a document obtained from a database or platform, and can be an HTML (Hypertext Markup Language) web page, PDF (Portable Document Format) file, Word document and other formats. It can contain text content and non-text content. The text content can include company name, descriptive text, etc., and the non-text content can include pictures, labels, etc.

[0067] S204: Parse the document to be marked to obtain text content in the document to be marked.

[0068] Appropriate tools or libraries can be used to read and understand the structure of a document so that different elements in the document can be distinguished. For example, for an HTML document, tags, attributes, and the relationships between them, as well as the text content they surround, can be identified to obtain the text content in the document to be marked up.

[0069] S206: Based on a preset finite state automaton, a target subtext in the text content and an identifier corresponding to the target subtext are obtained, wherein the preset finite state automaton includes a subtext and an identifier corresponding to the subtext.

[0070] The pre-set finite state automaton includes a subtext and an identifier corresponding to the subtext. The text content of the document to be parsed is traversed, and a character is read each time and passed to the finite state automaton as input. The state of the finite state automaton can be updated according to the current character and the state transition rule of the finite state automaton. After obtaining the target subtext, the identifier corresponding to the target subtext can be obtained according to the preset mapping relationship.

[0071] S208: Based on the preset list, obtain the position information of the target subtext in the text.

[0072] The preset list contains the position information of all text contents and non-text contents in the document to be marked.

[0073] S210: Based on the position information and the identifier, hyperlink mark the subtext in the document to be marked.

[0074] The subtext in the marked document is located based on the position information, and a hyperlink including an identifier is added, so that the user can easily jump to the corresponding page by clicking the company name to obtain more company information.

[0075] In the above-mentioned hyperlink marking method, based on a pre-set finite state automaton, the target sub-text in the text content and the identifier corresponding to the target sub-text can be quickly obtained from the document to be marked, and combined with a pre-set list, the position information of the target sub-text in the text can be obtained, and the sub-text can be marked with a hyperlink, thereby realizing efficient and accurate sub-text extraction and hyperlink adding.

[0076] In some embodiments of the present disclosure, parsing the document to be marked includes:

[0077] Based on the parsing library corresponding to the document to be marked, the document tags in the document to be marked are removed and the preset characters are replaced to obtain the parsed document to be marked.

[0078] You can choose a suitable parsing library according to the format of the document to be marked up. Use the functions provided by the parsing library to remove unnecessary HTML tags. For example, in Jsoup, you can select specific tags through the select() method and call the remove() method to delete them, or use the text() method to directly extract the plain text content. If you need to keep certain specific tags, such as Tags can be distinguished during selection, and only non-target tags are removed. Iterates over all text nodes in the document and applies string replacement logic to replace the preset characters with the specified values ​​without destroying the original meaning of the text.

[0079] You can use HTML parsing libraries such as jsoup to remove HTML tags and non-company related characters, purify text data, and provide high-quality input for the finite state automaton algorithm. You can combine the finite state automaton algorithm with HTML document cleaning technology to achieve accurate company name extraction.

[0080] In some embodiments of the present disclosure, the setting process of the finite state automaton includes:

[0081] Acquire original data, where the original data includes subtext and identifier;

[0082] constructing a finite state automaton based on the subtext;

[0083] constructing a mapping between the subtext and the identifier, the subtext corresponding to the identifier;

[0084] The finite state automaton and the mapping are stored in a memory.

[0085] The finite state automaton algorithm is applied to the data preprocessing stage. The subtext is stored in the finite state automaton by constructing a state transition diagram. A mapping table is constructed to associate subtexts with their corresponding identifiers, so that the identifier can be quickly found when the finite state automaton matches a subtext. The constructed finite state automaton and mapping are stored in memory so that they can be directly accessed in the subsequent information extraction process.

[0086] In some embodiments of the present disclosure, the process of setting the list includes:

[0087] The positions of the characters in the document to be marked are calculated, and a list including the character contents and the starting and ending positions of the characters is created.

[0088] By calculating the positions of all tags and characters in HTML, a detailed character position list is generated, which provides an accurate basis for subsequent company name position marking, ensuring that hyperlinks can be accurately added to company names without affecting other text content.

[0089] In some embodiments of the present disclosure, the step of marking a subtext as a hyperlink in the document to be marked based on the position information and the identifier includes:

[0090] Based on a preset finite state automaton, obtaining a target subtext in the document to be marked;

[0091] Based on the list, obtaining the starting position and the ending position of the target subtext in the text;

[0092] Based on the start position and the end position, a hyperlink of the target subtext is created, wherein the hyperlink includes an identifier of the target subtext.

[0093] The finite state automaton for matching the target subtext is pre-built and loaded. The finite state automaton contains all preset target subtexts and their corresponding identifiers. The text content of the document to be marked is traversed, and each character is passed to the state transition function of the finite state automaton to obtain the target subtext and mark its start and end positions. A hyperlink including the identifier corresponding to the target subtext is added, so that users can easily jump to the corresponding page by clicking on the target subtext to obtain more company information.

[0094] In some embodiments of the present disclosure, the method further includes:

[0095] Get raw data regularly;

[0096] A new finite state automaton is constructed based on the original data.

[0097] It should be understood that, although the various steps in the flowcharts involved in the above-mentioned embodiments are displayed in sequence according to the indication of the arrows, these steps are not necessarily executed in sequence according to the order indicated by the arrows. Unless there is a clear explanation in this article, the execution of these steps does not have a strict order restriction, and these steps can be executed in other orders. Moreover, at least a part of the steps in the flowcharts involved in the above-mentioned embodiments can include multiple steps or multiple stages, and these steps or stages are not necessarily executed at the same time, but can be executed at different times, and the execution order of these steps or stages is not necessarily to be carried out in sequence, but can be executed in turn or alternately with other steps or at least a part of the steps or stages in other steps.

[0098] Based on the same inventive concept, the embodiment of the present disclosure also provides a hyperlink marking device for implementing the above-mentioned hyperlink marking method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme recorded in the above-mentioned method, so the specific limitations in the embodiment of the hyperlink marking device provided below can refer to the limitations of the hyperlink marking method above, and will not be repeated here.

[0099] The device may include a system (including a distributed system), software (application), module, component, server, client, etc. that uses the method described in the embodiments of this specification and is combined with necessary implementation hardware. Based on the same innovative concept, the device in one or more embodiments provided in the embodiments of the present disclosure is as described in the following embodiments. Since the implementation scheme and method of the device to solve the problem are similar, the implementation of the specific device in the embodiments of this specification can refer to the implementation of the aforementioned method, and the repetitions will not be repeated. As used below, the term "unit" or "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceived.

[0100] In one embodiment, Figure 3 As shown, a hyperlink marking device 300 is provided, and the device may be the aforementioned server, or a module, component, device, unit, etc. integrated in the server. The device 300 may include:

[0101] An acquisition module 302 is used to acquire a document to be marked, wherein the document to be marked includes text content and non-text content;

[0102] The parsing module 304 is used to parse the document to be marked to obtain the text content in the document to be marked;

[0103] A determination module 306, configured to obtain a target subtext in the text content and an identifier corresponding to the target subtext based on a preset finite state automaton, wherein the preset finite state automaton includes a subtext and an identifier corresponding to the subtext;

[0104] A positioning module 308, configured to obtain the position information of the target subtext in the text based on a preset list;

[0105] The marking module 310 is used to mark the subtext as a hyperlink in the document to be marked based on the position information and the identifier.

[0106] In one embodiment, parsing the document to be marked includes:

[0107] Based on the parsing library corresponding to the document to be marked, the document tags in the document to be marked are removed and the preset characters are replaced to obtain the parsed document to be marked.

[0108] In one embodiment, the setting process of the finite state automaton includes:

[0109] Acquire original data, wherein the original data includes a target subtext and an identifier;

[0110] constructing a finite state automaton based on the target subtext;

[0111] constructing a mapping between the target subtext and the identifier, the target subtext corresponding to the identifier;

[0112] The finite state automaton and the mapping are stored in a memory.

[0113] In one embodiment, the process of setting the list includes:

[0114] The positions of the characters in the document to be marked are calculated, and a list including the character contents and the starting and ending positions of the characters is created.

[0115] In one embodiment, the step of marking a subtext as a hyperlink in the document to be marked based on the position information and the identifier includes:

[0116] Based on a preset finite state automaton, obtaining a target subtext in the document to be marked;

[0117] Based on the list, obtaining the starting position and the ending position of the target subtext in the text;

[0118] Based on the start position and the end position, a hyperlink of the target subtext is created, wherein the hyperlink includes an identifier of the target subtext.

[0119] In one embodiment, the device further comprises:

[0120] Get raw data regularly;

[0121] A new finite state automaton is constructed based on the original data.

[0122] Regarding the device in the above embodiment, the specific manner in which each module performs operations has been described in detail in the embodiment of the method, and will not be elaborated here.

[0123] Each module in the above-mentioned hyperlink marking device can be implemented in whole or in part by software, hardware or a combination thereof. Each module can be embedded in or independent of a processor in a computer device in the form of hardware, or can be stored in a memory in a computer device in the form of software, so that the processor can call and execute the operations corresponding to each module.

[0124] 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 4 As shown. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, 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 text content. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a hyperlink marking method is implemented.

[0125] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 5 As shown. The computer device includes a processor, a memory, a communication interface, a display screen and an input device connected through a system bus. Among them, 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 and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The communication interface of the computer device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be achieved through WIFI, a mobile cellular network, NFC (near field communication) or other technologies. When the computer program is executed by the processor, a hyperlink marking method is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device shell, or an external keyboard, touchpad or mouse, etc.

[0126] Those skilled in the art will understand that Figure 4 , Figure 5 The structure shown in the figure is only a block diagram of a part of the structure related to the scheme of the present disclosure, and does not constitute a limitation on the computer device to which the scheme of the present disclosure is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0127] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the method described in any embodiment of the present disclosure is implemented.

[0128] In one embodiment, a computer program product is provided, including a computer program, which implements the method described in any embodiment of the present disclosure when executed by a processor.

[0129] A person of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment method can be completed by instructing the relevant hardware through a computer program, and 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 the memory, database or other medium used in the embodiments provided by the present disclosure can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetoresistive random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM). The database involved in each embodiment provided by the present disclosure may include at least one of a relational database and a non-relational database. Non-relational databases may include distributed databases based on blockchains, etc., but are not limited to this. The processor involved in each embodiment provided by the present disclosure may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic unit, a data processing logic unit based on quantum computing, etc., but are not limited to this.

[0130] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0131] The above-described embodiments only express several implementation methods of the present disclosure, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the present invention. It should be pointed out that, for a person of ordinary skill in the art, several modifications and improvements can be made without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure shall be subject to the attached claims.

Claims

1. A hyperlink marking method, characterized in that: The method comprises: Acquire a document to be marked, wherein the document to be marked includes text content and non-text content; Parsing the document to be marked to obtain text content in the document to be marked; Based on a preset finite state automaton, a target subtext in the text content and an identifier corresponding to the target subtext are obtained, wherein the preset finite state automaton includes a subtext and an identifier corresponding to the subtext; Based on a preset list, obtaining position information of the target subtext in the text; Based on the position information and the identifier, a hyperlink mark is performed on the subtext in the document to be marked.

2. The method according to claim 1, characterized in that The parsing of the document to be marked includes: Based on the parsing library corresponding to the document to be marked, the document tags in the document to be marked are removed and the preset characters are replaced to obtain the parsed document to be marked.

3. The method according to claim 1, characterized in that The setting process of the finite state automaton includes: Acquire original data, where the original data includes subtext and identifier; constructing a finite state automaton based on the subtext; constructing a mapping between the subtext and the identifier, the subtext corresponding to the identifier; The finite state automaton and the mapping are stored in a memory.

4. The method according to claim 1, characterized in that: The process of setting up the list includes: The positions of the characters in the document to be marked are calculated, and a list including the character contents and the starting and ending positions of the characters is created.

5. The method according to any one of claims 1 to 4, characterized in that: The step of marking a subtext with a hyperlink in the document to be marked based on the position information and the identifier includes: Based on a preset finite state automaton, obtaining a target subtext in the document to be marked; Based on the list, obtaining the starting position and the ending position of the target subtext in the text; Based on the start position and the end position, a hyperlink of the target subtext is created, wherein the hyperlink includes an identifier of the target subtext.

6. The method according to claim 3, characterized in that The method further comprises: Get raw data regularly; A new finite state automaton is constructed based on the original data.

7. A hyperlink marking device, characterized in that: The device comprises: An acquisition module is used to acquire a document to be marked, wherein the document to be marked includes text content and non-text content; A parsing module, used to parse the document to be marked to obtain the text content in the document to be marked; A determination module, configured to obtain a target subtext in the text content and an identifier corresponding to the target subtext based on a preset finite state automaton, wherein the preset finite state automaton includes a subtext and an identifier corresponding to the subtext; A positioning module, used for obtaining the position information of the target subtext in the text based on a preset list; The marking module is used to mark the subtext as a hyperlink in the document to be marked based on the position information and the identifier.

8. A computer device comprising a memory and a processor, wherein the memory stores a computer program, wherein: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 6 are implemented.

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

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 6 are implemented.