A webpage error word detection method, device and equipment and storage medium

By filtering relevant content based on page type and generating a text window for error detection in webpage error detection, the problem of high false positive rate and poor context understanding of existing tools is solved, and efficient and accurate error recognition is achieved.

CN121543586BActive Publication Date: 2026-05-01HANGZHOU HAOLINK INTELLIGENT TECHNOLOGY CO LTD +1
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
HANGZHOU HAOLINK INTELLIGENT TECHNOLOGY CO LTD
Filing Date
2026-01-15
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

Existing misspelling detection tools have a high false positive rate and poor contextual understanding ability, making it difficult to effectively identify misspelled words on web pages.

Method used

By determining the error type of the target webpage based on the page type, filtering relevant webpage content, generating candidate text, and using a text window for misspelling detection, fine-grained detection is performed in conjunction with a large language model.

Benefits of technology

It improves the efficiency and accuracy of misspelling detection, reduces the waste of computing power in irrelevant detection, and enhances contextual understanding capabilities.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121543586B_ABST
    Figure CN121543586B_ABST
Patent Text Reader

Abstract

The application discloses a webpage error detection method and device, equipment and a storage medium. The method comprises the following steps: determining the page type of a target page based on the access address or page attribute information of the target page, and determining the target webpage error type of the target page based on the page type and a preselected error prediction model which has completed training; screening the webpage content of the target webpage based on the target webpage error type, and generating candidate webpage text; performing slicing processing on the candidate webpage text to generate at least two text sub-objects, and determining the text window of the text sub-object according to the text density of the text keyword of the text sub-object; and performing error detection on the text sub-object according to the text window. Through the above scheme, the detection efficiency and detection accuracy of webpage error detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus, device, and storage medium for detecting misspelled words on web pages. Technical Field

[0001] This application relates to the field of data processing technology, specifically to a method, apparatus, device, and storage medium for detecting misspelled words on web pages. Background Technology

[0002] With the explosive growth of internet information, web pages have become the primary medium for information transmission. However, due to the uncontrollable nature of manual writing and editing processes, web pages often contain typos, which not only affect user experience but also reduce the credibility of the information.

[0003] Currently, most existing misspelling detection tools rely on dictionaries, rules, or shallow machine learning models, which suffer from high false positive rates, poor contextual understanding, and difficulty in recognizing new words. Therefore, there is an urgent need for a misspelling detection method specifically for web page content. Summary of the Invention

[0004] This application provides a method, apparatus, device, and storage medium for detecting misspelled words on web pages, so as to improve the detection efficiency and accuracy of misspelled word detection on web pages.

[0005] According to one aspect of this application, a method for detecting misspelled words on a webpage is provided, the method comprising:

[0006] Based on the access address or page attribute information of the target page, determine the page type of the target page, and based on the page type and the pre-trained error prediction model, determine the target webpage error type of the target page.

[0007] Based on the error type of the target webpage, the webpage content of the target webpage is filtered to generate candidate webpage text; wherein, the candidate webpage text refers to text content that is associated with the error type of the target webpage;

[0008] The candidate webpage text is sliced ​​to generate at least two text sub-objects, and the text window of the text sub-object is determined according to the text density of the text keywords in the text sub-object; wherein, the text window is used to represent the context relationship of the text sub-object;

[0009] The text sub-object is used to detect misspellings based on the text window.

[0010] According to another aspect of this application, a webpage misspelling detection device is provided, the device comprising:

[0011] The prediction module is used to determine the page type of the target page based on the access address or page attribute information of the target page, and to determine the target webpage error type of the target page based on the page type and the pre-trained error prediction model.

[0012] The content filtering module is used to filter the webpage content of the target webpage based on the error type of the target webpage and generate candidate webpage text; wherein, the candidate webpage text refers to text content that is associated with the error type of the target webpage;

[0013] The text window module is used to slice the candidate webpage text, generate at least two text sub-objects, and determine the text window of the text sub-object based on the text density of the text keywords in the text sub-object; wherein, the text window is used to represent the context relationship of the text sub-object;

[0014] The misspelling detection module is used to detect misspellings in the text sub-object based on the text window.

[0015] According to another aspect of this application, an electronic device is provided, the electronic device comprising:

[0016] One or more processors;

[0017] Memory, used to store one or more programs;

[0018] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the webpage misspelling detection methods provided in the embodiments of this application.

[0019] According to another aspect of this application, a computer-readable storage medium is provided, on which a computer program is stored, which, when executed by a processor, implements any of the webpage misspelling detection methods provided in the embodiments of this application.

[0020] According to another aspect of this application, a computer program product is provided, including a computer program that, when executed by a processor, implements any of the webpage misspelling detection methods provided in the embodiments of this application.

[0021] This application improves the efficiency and accuracy of error detection by pre-filtering the content of the target webpage based on the page type and the error types determined by the page type before performing error detection on the target webpage. This avoids wasting the model's computing power on irrelevant error type detection. In addition, it generates at least one text window as the target of error detection, realizing fine-grained error detection and further improving the detection accuracy. Attached Figure Description

[0022] Figure 1 is a flowchart of a webpage misspelling detection method according to Embodiment 1 of this application;

[0023] Figure 2 is a flowchart of a webpage misspelling detection method according to Embodiment 2 of this application;

[0024] Figure 3 is a schematic diagram of a webpage misspelling detection device according to Embodiment 3 of this application;

[0025] Figure 4 is a schematic diagram of the structure of an electronic device that implements the webpage misspelling detection method of Embodiment 4 of this application. Detailed Implementation

[0026] To enable those skilled in the art to better understand the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present application, and not all embodiments. Based on the embodiments in the present application, all other embodiments obtained by those of ordinary skill in the art without creative effort should fall within the scope of protection of the present application.

[0027] It should be noted that the terms "first," "second," etc., in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in orders other than those illustrated or described herein. Furthermore, the terms "comprising" and "having," and any variations thereof, are intended to cover non-exclusive inclusion; for example, a process, method, system, product, or apparatus that comprises a series of steps or units is not necessarily limited to those steps or units explicitly listed, but may include other steps or units not explicitly listed or inherent to such processes, methods, products, or apparatus.

[0028] Example 1

[0029] Figure 1 is a flowchart of a webpage misspelling detection method according to Embodiment 1 of this application. This embodiment is applicable to the detection of misspellings in webpage content and can be performed by a webpage misspelling detection device. This webpage misspelling detection device can be implemented in hardware and / or software and can be configured in a computer device, such as a server. As shown in Figure 1, the method includes:

[0030] S110. Based on the access address or page attribute information of the target page, determine the page type of the target page, and based on the page type and the pre-trained error prediction model, determine the target webpage error type of the target page.

[0031] Among them, the target web page error type can be used to characterize the web page error types that occur more frequently than a preset frequency threshold in the web page types to which the target page belongs; the training samples of the error prediction model can come from a web page sample database. Optionally, in the web page sample database, web page samples of different web page error types are stored classified by different web page types. It should be noted that the preset frequency threshold can be adaptively set by those skilled in the art.

[0032] The page attribute information can include page source code information, such as the tag attribute information of a web page. It should be noted that the web page type of a web page can be used to characterize the purpose of the page, and there are corresponding different web page error types. For example, e-commerce web pages may have price number errors and brand term errors, etc.

[0033] Optionally, in the embodiments of the present invention, a web page sample database can be established in advance. In this web page sample database, at least eight web page types and thirty-two web page error types are stored, and the number of samples can reach a scale of one hundred thousand. Exemplarily, in the web page sample database, web page samples with different web page errors of this web page type can be stored classified by web page type. For example, for e-commerce web pages, there may be web page samples such as "similar character error: product mouth - product" and "price number error: 99 - 69", and for government affairs web pages, there may be web page samples such as "validity period number error: 2024 - 2023" and "institution name typo: Civil Affairs Bureau - Minzheng Bureau", etc.

[0034] For the pre-constructed machine learning model, according to preset model parameters, such as parameters like learning rate, depth, and number of iterations, etc., the machine learning model can be trained based on the web page sample database, and the trained machine learning model is used as the error prediction model. It should be noted that the error prediction model can identify the web page type of the target page and output the common web page error types under this page type.

[0035] By pre-identifying the high-frequency web page error types in the target web page, subsequent detection of low-frequency web page errors is avoided, improving the detection efficiency.

[0036] S120. Screen the web page content of the target web page based on the target web page error type to generate candidate web page texts.

[0037] Among them, the candidate web page text can refer to the text content associated with the target web page error type.

[0038] Specifically, keyword matching can be performed on the content of the target webpage based on the error type of the target webpage, filtering out webpage content that has a textual association with the error type of the target webpage, and filtering out irrelevant and redundant webpage content.

[0039] It should be noted that the content of the target webpage can include the text content of the target webpage as well as the text content obtained after image recognition of the images on the target webpage.

[0040] Optionally, before performing image recognition on images on the target webpage, webpage images with a size smaller than a preset image size can be filtered out to avoid performing image recognition on irrelevant noisy images.

[0041] Optionally, before filtering the webpage content of the target webpage based on the error type of the target webpage, the method further includes: filtering webpage content in the target webpage that matches the first set of webpage tags according to the document object model of the target webpage and the first set of webpage tags; wherein, the first set of webpage tags is used to characterize useless webpage noise information in the target webpage.

[0042] The Document Object Model (DOM) can be used to represent the structural information of a target webpage. It should be noted that this structural information can include HTML (HyperText Markup Language) tags, tag content, and tag attributes.

[0043] In this embodiment of the invention, regular expressions can be used to integrate the useless information (such as obsolete tags, nested incorrect tags, and unclosed tags) removed from the first set of web page tags. Based on the integrated regular expressions, the web page information corresponding to the document object model of the target web page can be filtered and screened to remove useless noise information in the target web page and improve the data quality of the web page content in the target web page.

[0044] S130. Slice the candidate webpage text to generate at least two text sub-objects, and determine the text window of the text sub-object based on the text density of the text keywords in the text sub-objects.

[0045] The text window is used to represent the contextual relationship of text sub-objects and is the object to be checked for webpage errors.

[0046] Text keywords can refer to specific terms on the target page. For example, on e-commerce pages, product and material can be classified as text keywords.

[0047] Optionally, the candidate webpage text can be sliced ​​to generate at least two text sub-objects, including:

[0048] The candidate webpage text is subjected to text content recognition to identify punctuation marks in the candidate webpage text. These punctuation marks are then used as delimiters to slice the candidate webpage text, generating at least two text sub-objects.

[0049] Optionally, in this embodiment of the invention, for the segmented text sub-objects, if there are text sub-objects with a word count lower than the minimum word count threshold, these text sub-objects can be integrated and expanded into a single text window to avoid missed detections due to insufficient word count; if there are text sub-objects with a word count higher than the maximum word count threshold, a large language model can be further used to segment the excessively long text sub-objects to avoid reducing detection efficiency due to excessive word count. Optionally, the minimum word count threshold and the maximum word count threshold can be adaptively set according to those skilled in the art.

[0050] S140. Perform word error detection on the text sub-objects based on the text window.

[0051] Specifically, a large language model can be used to analyze the segmented text windows to determine whether there are typos or semantic errors within the text windows. Optionally, the settings of the large language model can be adapted according to those skilled in the art.

[0052] Optionally, in this embodiment of the invention, the results of the word error detection can also be visualized. For example, during the webpage development stage (before going live), the erroneous text is marked with an underline on the front-end page of the target webpage, and the webpage error type of the erroneous text and the correct text corresponding to the erroneous text are displayed. The detection personnel can also provide feedback on the erroneous text, such as whether the webpage error type of the erroneous text is correct.

[0053] Visualizing webpage errors improves the efficiency of error handling for inspectors.

[0054] This application embodiment filters the content of the target webpage based on the page type and the error type determined by the page type before performing error detection on the target webpage. This avoids wasting the model's computing power on irrelevant error type detection, thereby improving the efficiency and accuracy of error detection on the target webpage. In addition, it generates at least one text window as the target of error detection, thereby achieving fine-grained error detection and further improving the detection accuracy of error detection.

[0055] Example 2

[0056] Figure 2 is a flowchart of a webpage misspelling detection method according to Embodiment 2 of this application. Based on the technical solutions of the above embodiments, this embodiment refines "determining the text window of a text sub-object based on the text density of text keywords in the text sub-object" to "using a preset keyword recognition model to identify at least one text keyword present in the text sub-object; determining the text density of the text keyword based on the number of characters in the text keyword and the total number of characters in the text sub-object; and determining the text window of the text sub-object based on the text density range in which the text density is located." It should be noted that for parts not detailed in this embodiment, please refer to the relevant descriptions in other embodiments. As shown in Figure 2, the method includes:

[0057] S210. Using a preset keyword recognition model, identify at least one text keyword present in the text sub-object.

[0058] Among them, the keyword recognition model can refer to a pre-trained language model used to capture deep semantic relationships between contexts and identify keyword entities.

[0059] S220. Determine the text density of the text keyword based on the number of characters in the text keyword and the total number of characters in the text sub-objects.

[0060] Among them, text density can represent the proportion of the number of text keywords in a text sub-object to the total number of text words in the text sub-object.

[0061] S230. Determine the text window of the text sub-object based on the text density range in which the text density is located.

[0062] Optionally, based on the text density range in which the text density is located, the text window of the text sub-object is determined, including: if the text density is in a first text density range, then the text sub-object is taken as the target text sub-object, and a first preset number of preceding text sub-objects and a first preset number of following text sub-objects are determined for concatenation of the preceding and following text sub-objects; if the text density is in a second text density range, then the text sub-object is taken as the target text sub-object, and a second preset number of preceding text sub-objects and a second preset number of following text sub-objects are determined for concatenation of the preceding and following text sub-objects; text concatenation is performed on the target text sub-object according to the preceding and following text sub-objects to generate the text window of the target text sub-object; wherein, in the text window, the object identifiers of the preceding and following text sub-objects are the same, and the object identifiers of the target text sub-object and the preceding text sub-object are different.

[0063] Optionally, the first text interval density and the second text interval density represent different interval ranges, and the first preset quantity and the second preset quantity are also different. The first text interval density can be greater than the second text interval density, or it can be less than the second text interval density. The interval size relationship between the two, as well as the first preset quantity and the second preset quantity, can be adaptively set according to those skilled in the art.

[0064] It should be noted that during the process of generating a text window by concatenating preceding and following text, both the preceding and following text sub-objects can be assigned the same first object identifier, while the target text sub-object can be assigned a second object identifier different from the first object identifier. The first object identifier can be used to indicate that when performing error detection on the text window, error detection on text sub-objects with the first object identifier should be forcibly skipped. The second object identifier can be used to indicate that when performing error detection on the text window, error detection should only be performed on text sub-objects with the second object identifier. The preceding and following text sub-objects are only used to provide a contextual semantic environment for the target text sub-object and do not participate in the error detection of the target text sub-object.

[0065] Optionally, in this embodiment of the invention, during the process of concatenating the preceding and following texts, the text similarity between the preceding text sub-object and its preceding adjacent text sub-object, or the following text sub-object and its following adjacent text sub-object, can be further determined. If the text similarity is greater than a preset similarity threshold, the text sub-objects that are preceding the preceding text sub-object or following the following text sub-object can also be added to the object window of the target text sub-object to further improve the contextual completeness of the text window.

[0066] This application embodiment dynamically determines the preceding and following concatenation ranges of a text sub-object by using the text density of text keywords present in the text sub-object, generates a text window corresponding to the text sub-object, and performs word error detection on the text window, thereby improving the semantic environment of the text sub-object's context and simultaneously improving the detection accuracy of word errors.

[0067] Example 3

[0068] Figure 3 is a schematic diagram of a webpage misspelling detection device according to Embodiment 3 of this application. It is applicable to detecting misspellings in webpage content. This webpage misspelling detection device can be implemented in hardware and / or software and can be configured in a computer device, such as a server. As shown in Figure 3, the device includes:

[0069] The prediction module 310 is used to determine the page type of the target page based on the access address or page attribute information of the target page, and to determine the target webpage error type of the target page based on the page type and the pre-selected trained error prediction model.

[0070] The content filtering module 320 is used to filter the webpage content of the target webpage based on the error type of the target webpage and generate candidate webpage text; wherein, the candidate webpage text refers to text content that is associated with the error type of the target webpage;

[0071] The text window module 330 is used to slice the candidate webpage text to generate at least two text sub-objects, and determine the text window of the text sub-object based on the text density of the text keywords in the text sub-objects; wherein, the text window is used to represent the context relationship of the text sub-objects;

[0072] The misspelling detection module 340 is used to perform misspelling detection on the text sub-object based on the text window.

[0073] This application embodiment filters the content of the target webpage based on the page type and the error type determined by the page type before performing error detection on the target webpage. This avoids wasting the model's computing power on irrelevant error type detection, thereby improving the efficiency and accuracy of error detection on the target webpage. In addition, it generates at least one text window as the target of error detection, thereby achieving fine-grained error detection and further improving the detection accuracy of error detection.

[0074] Optionally, the text window module 330 includes:

[0075] The keyword determination unit is used to identify at least one text keyword existing in the text sub-object using a preset keyword recognition model;

[0076] The text density determination unit is used to determine the text density of the text keyword based on the number of characters in the text keyword and the total number of characters in the text sub-object;

[0077] The text window determination unit is used to determine the text window of the text sub-object based on the text density range in which the text density is located.

[0078] Optionally, the text window confirmation unit can be specifically used for:

[0079] If the text density is within the first text density range, then the text sub-object is taken as the target text sub-object, and a first preset number of preceding text sub-objects and a first preset number of following text sub-objects are determined for splicing the preceding text to the target text sub-object.

[0080] If the text density is within the second text density range, then the text sub-object is taken as the target text sub-object, and a second preset number of preceding text sub-objects and a second preset number of following text sub-objects are determined for splicing the preceding text to the target text sub-object.

[0081] Based on the preceding text sub-object and the following text sub-object, text is concatenated on the target text sub-object to generate a text window of the target text sub-object; wherein, in the text window, the object identifiers of the preceding text sub-object and the following text sub-object are the same, while the object identifiers of the target text sub-object and the preceding text sub-object are different.

[0082] Optionally, the text window module 330 also includes:

[0083] The text slicing unit is used to perform text content recognition on the candidate web page text, identify the punctuation marks in the candidate web page text, and use the punctuation marks as delimiters to slice the text in the candidate web page text, generating at least two text sub-objects.

[0084] Optionally, the device may also include:

[0085] The noise filtering module is used to filter web page content in the target web page that matches the first web page tag set based on the document object model of the target web page and the first web page tag set; wherein, the first web page tag set is used to characterize useless web page noise information in the target web page.

[0086] Optionally, the target webpage error type is used to characterize webpage error types that occur more frequently than a preset frequency threshold in the webpage type to which the target page belongs; the training samples of the error prediction model come from a webpage sample database, which stores webpage samples of different webpage error types according to different webpage types.

[0087] The webpage misspelling detection device provided in this application embodiment can execute the webpage misspelling detection method provided in any embodiment of this application, and has the corresponding functional modules and beneficial effects for executing each webpage misspelling detection method.

[0088] According to embodiments of this application, this application also provides an electronic device, a readable storage medium, and a computer program product.

[0089] Example 4

[0090] Figure 4 is a schematic diagram of the structure of an electronic device 410 implementing the webpage misspelling detection method of this application. The electronic device 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 can also represent various forms of mobile devices, such as personal digital processors, cellular phones, smartphones, 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 application described and / or claimed herein.

[0091] As shown in Figure 4, the electronic device 410 includes at least one processor 411 and a memory, such as a read-only memory 412 or a random access memory 413, communicatively connected to the at least one processor 411. The memory stores computer programs executable by the at least one processor. The processor 411 can perform various appropriate actions and processes based on the computer program stored in the read-only memory 412 or loaded from storage unit 418 into the random access memory 413. The random access memory 413 can also store various programs and data required for the operation of the electronic device 410. The processor 411, read-only memory 412, and random access memory 413 are interconnected via a bus 414. An input / output interface 415 is also connected to the bus 414.

[0092] Multiple components in electronic device 410 are connected to input / output interface 415, including: input unit 416, such as keyboard, mouse, etc.; output unit 417, such as various types of monitors, speakers, etc.; storage unit 418, such as disk, optical disk, etc.; and communication unit 419, such as network card, modem, wireless transceiver, etc. Communication unit 419 allows electronic device 410 to exchange information / data with other devices through computer networks such as the Internet and / or various telecommunications networks.

[0093] Processor 411 can be a variety of general-purpose and / or special-purpose processing components with processing and computing capabilities. Some examples of processor 411 include, but are not limited to, central processing units, graphics processing units, various special-purpose artificial intelligence computing chips, various processors running machine learning model algorithms, digital signal processors, and any suitable processor, controller, microcontroller, etc. Processor 411 performs the various methods and processes described above, such as webpage misspelling detection methods.

[0094] In some embodiments, the webpage misspelling detection method may be implemented as a computer program tangibly contained in a computer-readable storage medium, such as storage unit 418. In some embodiments, part or all of the computer program may be loaded and / or installed on electronic device 410 via read-only memory 412 and / or communication unit 419. When the computer program is loaded into random access memory 413 and executed by processor 411, one or more steps of the webpage misspelling detection method described above may be performed. Alternatively, in other embodiments, processor 411 may be configured as the webpage misspelling detection method by any other suitable means (e.g., by means of firmware).

[0095] Various embodiments of the systems and techniques described above herein can be implemented in digital electronic circuit systems, integrated circuit systems, field-programmable gate arrays, application-specific integrated circuits (ASICs), application-specific standard products (ASICs), systems-on-a-chip (SoCs), payload programmable logic devices, computer hardware, firmware, software, and / or combinations thereof. These various embodiments may include implementations in one or more computer programs that can be executed and / or interpreted on a programmable system including at least one programmable processor, which may be a dedicated or general-purpose programmable processor, capable of receiving data and instructions from a storage system, at least one input device, and at least one output device, and transmitting data and instructions to the storage system, the at least one input device, and the at least one output device.

[0096] Computer programs used to implement the methods of this application may be written in any combination of one or more programming languages. These computer programs may be provided to the processor of a general-purpose computer, a special-purpose computer, or other programmable webpage misspelling detection device, such that when executed by the processor, the computer programs cause the functions / operations specified in the flowcharts and / or block diagrams to be implemented. The computer programs may be executed entirely on a machine, partially on a machine, or as a standalone software package, partially on a machine and partially on a remote machine, or entirely on a remote machine or server.

[0097] In the context of this application, a computer-readable storage medium can be a tangible medium that may contain or store a computer program for use by or in conjunction with an instruction execution system, apparatus, or device. A computer-readable storage medium can be, but is not limited to, electronic, magnetic, optical, electromagnetic, infrared, or semiconductor systems, apparatus, or devices, or any suitable combination of the foregoing. Alternatively, a computer-readable storage medium can be a machine-readable signal medium. More specific examples of machine-readable storage media include electrical connections based on one or more wires, portable computer disks, hard disks, random access memory, read-only memory, erasable programmable read-only memory, optical fibers, portable compact disk read-only memory, optical storage devices, magnetic storage devices, or any suitable combination of the foregoing.

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

[0099] The systems and technologies described herein can be implemented in computing systems that include backend components (e.g., as data servers), or computing systems that include middleware components (e.g., application servers), or computing systems that include frontend components (e.g., user computers with graphical user interfaces or web browsers through which users can interact with implementations of the systems and technologies described herein), or any combination of such backend, middleware, or frontend components. The components of the system can be interconnected via digital data communication of any form or medium (e.g., communication networks). Examples of communication networks include local area networks (LANs), wide area networks (WANs), blockchain networks, and the Internet.

[0100] A computing system can include clients and servers. Clients and servers are generally geographically separated and typically interact via communication networks. The client-server relationship is created by computer programs running on the respective computers and having a client-server relationship with each other. The server can be a cloud server, also known as a cloud computing server or cloud host, which is a host product within the cloud computing service system to address the shortcomings of traditional physical hosts and virtual private servers, such as high management difficulty and weak business scalability.

[0101] It should be understood that the various forms of processes shown above can be used to rearrange, add, or delete steps. For example, the steps described in this application can be executed in parallel, sequentially, or in different orders, as long as the desired result of the technical solution of this application can be achieved, and this is not limited herein.

[0102] The specific embodiments described above do not constitute a limitation on the scope of protection of this application. Those skilled in the art should understand that various modifications, combinations, sub-combinations, and substitutions can be made according to design requirements and other factors. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of this application should be included within the scope of protection of this application.

Claims

1. A method for detecting misspelled words on web pages, characterized in that, include: Based on the access address or page attribute information of the target page, determine the page type of the target page, and based on the page type and the pre-trained error prediction model, determine the target webpage error type of the target page. Based on the error type of the target webpage, the webpage content of the target webpage is filtered to generate candidate webpage text; wherein, the candidate webpage text refers to text content that is associated with the error type of the target webpage; the candidate webpage text is sliced ​​to generate at least two text sub-objects, and the text window of the text sub-object is determined according to the text density of the text keywords in the text sub-object; wherein, the text window is used to represent the context relationship of the text sub-object; the text sub-object is used to detect misspellings according to the text window; wherein, determining the text window of the text sub-object according to the text density of the text keywords in the text sub-object includes: using a preset keyword recognition model to identify at least one text keyword present in the text sub-object; determining the text density of the text keyword according to the number of characters in the text keyword and the total number of characters in the text sub-object; If the text density is within a first text density range, then the text sub-object is taken as the target text sub-object, and a first preset number of preceding text sub-objects and a first preset number of following text sub-objects are determined for concatenation of the preceding and following text sub-objects. If the text density is within a second text density range, then the text sub-object is taken as the target text sub-object, and a second preset number of preceding text sub-objects and a second preset number of following text sub-objects are determined for concatenation of the preceding and following text sub-objects. Based on the preceding and following text sub-objects, text concatenation is performed on the target text sub-object to generate a text window for the target text sub-object. In the text window, the object identifiers of the preceding and following text sub-objects are the same, while the object identifiers of the target text sub-object and the preceding text sub-object are different.

2. The method according to claim 1, characterized in that, The step of slicing the candidate webpage text to generate at least two text sub-objects includes: performing text content recognition on the candidate webpage text, identifying punctuation marks in the candidate webpage text, using the punctuation marks as delimiters, slicing the candidate webpage text, and generating at least two text sub-objects.

3. The method according to claim 1, characterized in that, Before filtering the webpage content of the target webpage based on the error type of the target webpage, the method further includes: filtering the webpage content in the target webpage that matches the first webpage tag set according to the document object model of the target webpage and the first webpage tag set; wherein, the first webpage tag set is used to characterize useless webpage noise information in the target webpage.

4. The method according to claim 1, characterized in that, The target webpage error type is used to characterize webpage error types that occur more frequently than a preset frequency threshold in the webpage type to which the target page belongs; The training samples for the error prediction model come from a webpage sample database, which stores webpage samples of different error types according to different webpage types.

5. A webpage misspelling detection device, characterized in that, include: The prediction module is used to determine the page type of the target page based on the access address or page attribute information of the target page, and to determine the target webpage error type of the target page based on the page type and the pre-trained error prediction model. A content filtering module is used to filter the webpage content of the target webpage based on the error type of the target webpage and generate candidate webpage text; wherein, the candidate webpage text refers to text content that is associated with the error type of the target webpage; a text window module is used to slice the candidate webpage text to generate at least two text sub-objects, and determine the text window of the text sub-object based on the text density of the text keywords in the text sub-object; wherein, the text window is used to represent the context relationship of the text sub-object; a misspelling detection module is used to perform misspelling detection on the text sub-object based on the text window; wherein, the text window module includes: a keyword determination unit, used to identify at least one text keyword in the text sub-object using a preset keyword recognition model; a text density determination unit, used to determine the text density of the text keyword based on the number of characters in the text keyword and the total number of characters in the text sub-object; and a text window determination unit, used to determine the text density based on the text density. The text density range is used to determine the text window of the text sub-object; wherein, the text window determining unit is specifically used for: if the text density is in a first text density range, then taking the text sub-object as the target text sub-object, and determining a first preset number of preceding text sub-objects for concatenation with the preceding text of the target text sub-object, and a first preset number of following text sub-objects for concatenation with the following text; if the text density is in a second text density range, then taking the text sub-object as the target text sub-object, and determining a second preset number of preceding text sub-objects for concatenation with the preceding text of the target text sub-object, and a second preset number of following text sub-objects for concatenation with the following text; and concatenating the text of the target text sub-object according to the preceding text sub-objects and the following text sub-objects to generate the text window of the target text sub-object; wherein, in the text window, the object identifiers of the preceding text sub-objects and the following text sub-objects are the same, and the object identifiers of the target text sub-objects and the preceding text sub-objects are different.

6. An electronic device, characterized in that, include: One or more processors; Memory, used to store one or more programs; When the one or more programs are executed by the one or more processors, the one or more processors implement the webpage misspelling detection method as described in any one of claims 1-4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the webpage misspelling detection method as described in any one of claims 1-4.

8. A computer program product comprising a computer program that, when executed by a processor, implements the webpage misspelling detection method according to any one of claims 1-4.

Citation Information

Patent Citations

  • Handwritten form keyword detection method

    CN103679218A

  • Flexibly identifying and playing media content from any web page

    CN118511178A