Book link jump content management method
By introducing links or QR codes to intermediate websites in books, using automated monitoring and the BERT model to detect the final website content, and dynamically adjusting access permissions, the problems of changing book content and negative information are solved, achieving flexible control and efficient publishing.
Patent Information
- Application Number
- CN202510690766.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-05-27
- Publication Date
- 2025-09-05
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Existing technologies cannot effectively control changes in the content and harmful information of websites pointed to by URL links and QR codes printed in books, which results in readers obtaining harmful information and affects the reputation of publishers.
By printing links or QR codes pointing to intermediate websites in books, and using an automated monitoring system to regularly crawl the web content of the final website, the BERT model is used to calculate semantic similarity and detect harmful information, and access permissions are dynamically adjusted to prevent the redirection of harmful information.
It achieves flexible control over book content, avoids reprinting costs, improves publishing efficiency, provides reliable and timely information resources, and filters out negative information.
Smart Images

Figure CN120596751A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of book management, and in particular to a method for managing book link jump content. Background Art
[0002] In the digital age, books often include website links and QR codes to guide readers to more online resources. However, once a book is printed and published, these links and QR codes cannot be changed. Over time, the content of the websites to which they point may change, or even contain inappropriate information or become invalid.
[0003] Currently, it's common practice to ensure the accuracy of links when books are printed. However, once the content of the websites pointed to by links and QR codes changes, effective control and adjustment becomes impossible. Some publishers, upon discovering the content of the websites to which links and QR codes point, will issue announcements or provide explanations on the websites they point to, but this approach is limited in effectiveness. This not only negatively impacts readers but also damages the publisher's reputation. Summary of the Invention
[0004] In order to overcome the defects of the prior art, the present invention provides a method for managing the jump content of book links to solve the above problems.
[0005] The technical solution adopted by the present invention to solve the technical problem is: a method for managing the jump content of book links, comprising the following steps:
[0006] S1: Generate a link or QR code pointing to the intermediary website, and print the link or QR code pointing to the intermediary website on the book to be published;
[0007] S2: Set a link or QR code pointing to the final website on the intermediate website;
[0008] S3: The automated monitoring system regularly crawls the final website's webpage content. Using the pre-trained BERT model, the semantic similarity between the core information of the website pages stored in the database and the final website's webpage content is calculated to determine whether the final website's webpage content has been modified or contains harmful information.
[0009] S4: If the webpage content of the final website is changed or contains bad information, the intermediate website is prohibited from jumping to the final website by dynamically adjusting the access rights, and a real-time alert is sent to the publisher.
[0010] Preferably, in step S3, determining whether the webpage content has been modified includes the following sub-steps:
[0011] Regularly crawl the web content of the final website to extract the core information of the web content;
[0012] Analyze the semantics of core information through natural language processing technology;
[0013] The semantic similarity calculation is performed by comparing the core information of the website page pre-stored in the database with the core information of the current page content after semantic analysis to obtain a similarity score;
[0014] The similarity score is compared with a preset similarity threshold to determine whether the web page content has been changed.
[0015] Optionally, in step S3, a pre-trained BERT model is used to calculate semantic similarity between the core information of the website page pre-stored in the database and the core information of the current page content after semantic analysis.
[0016] It is worth noting that, in step S3, the steps of calculating the semantic similarity include:
[0017] The core information of the website page stored in the database after text preprocessing and the core information of the current page content after semantic analysis are input into the pre-trained BERT model to obtain the corresponding text feature vectors;
[0018] Use the cosine similarity formula to calculate the similarity score between the text feature vector corresponding to the core information of the website page pre-stored in the database and the text feature vector corresponding to the core information of the current page content after semantic analysis;
[0019] When the similarity score is less than a preset similarity threshold, it is determined that the webpage content has been changed; when the similarity score is greater than or equal to the preset similarity threshold, it is determined that the webpage content has not been changed.
[0020] Preferably, in the semantic similarity calculation process of step S3, the hidden layer state corresponding to the CLS tag in the pre-trained BERT model is extracted as the text feature vector.
[0021] Specifically, the text preprocessing steps in step S3 include:
[0022] The core information of the website page pre-stored in the database or the core information of the current page content after semantic analysis is used as the processing text, and after word segmentation, the punctuation marks and special characters in the processing text are removed;
[0023] The processed text is then converted into a fixed-length sequence;
[0024] Then, the text is separated by adding CLS tags and SEP tags to the processed text;
[0025] Finally, the processed text after text preprocessing is output.
[0026] It is worth noting that, in step S3, the determination of whether the webpage content contains harmful information includes:
[0027] Regularly crawl the web content of the final website and extract the core information of the web content;
[0028] Analyze the semantics of core information through natural language processing technology;
[0029] The Aho-Corasick algorithm is used to match the core information of the current page content after semantic analysis with the bad information string pre-stored in the database. If the core information of the current page content after semantic analysis contains a matching bad information string in the database, it is determined that the web page content contains bad information.
[0030] Preferably, in step S3, determining whether the webpage content contains harmful information includes:
[0031] Regularly crawl the web content of the final website and extract image data of the web content;
[0032] The image data is input into the pre-trained Open NSFW model, and a judgment score is output. When the judgment score is greater than a preset threshold, it is determined that the webpage content contains objectionable information.
[0033] Specifically, in step S3, the determination of whether the web page content contains bad information includes: obtaining the current URL of the final website and matching it with the URL corresponding to the link blacklist pre-stored in the database. When the current URL of the final website has a matching URL corresponding to the link blacklist in the database, it is determined that the web page content contains bad information.
[0034] It is worth noting that in step S3, the determination of whether there is bad information in the web page content includes: regularly crawling the web page text data in the web page content of the final website, inputting the web page text data into the LLaMa model, and performing content security detection on the web page text data by inputting prompt words into the LLaMa model. When the LLaMa model outputs that the content of the current web page text data is unsafe, it is determined that there is bad information in the web page content.
[0035] The beneficial effect of the present invention is that in the management method of the book link jump content, by printing a link or QR code pointing to an intermediate website on the book, flexible control of the book content is achieved. After the reader scans the link or QR code on the book, he will first visit the intermediate website, and then jump from the intermediate website to the final website. If the content of the final website changes or bad information appears, the present invention can prevent it from jumping to the final website by dynamically adjusting the access rights of the intermediate website, thereby effectively controlling the information obtained by readers. This multi-level jump mechanism allows the book content to be updated at any time as needed, avoiding the cost of frequent reprinting due to content changes, and can also edit and print books in advance without waiting for online resources to be fully prepared, thereby improving publishing efficiency. At the same time, it can also effectively filter bad information and provide readers with reliable and timely information resources. BRIEF DESCRIPTION OF THE DRAWINGS
[0036] Figure 1 The figure is a flow chart of a method for managing book link jump content in one embodiment of the present invention. DETAILED DESCRIPTION
[0037] The following is a further description of specific embodiments of the present invention in conjunction with the accompanying drawings. It should be noted that the description of these embodiments is intended to facilitate understanding of the present invention and does not constitute a limitation of the present invention. In addition, the technical features involved in the various embodiments of the present invention described below may be combined with each other as long as they do not conflict with each other.
[0038] like Figure 1 As shown, a method for managing book link jump content includes the following steps:
[0039] S1: Generate a link or QR code pointing to the intermediary website, and print the link or QR code pointing to the intermediary website on the book to be published;
[0040] S2: Set a link or QR code pointing to the final website on the intermediate website;
[0041] S3: Regularly crawling the webpage content of the final website through an automated monitoring system, using the BERT (Bidirectional Encoder Representations from Transformers) model to calculate semantic similarity between the core information of the website pages pre-stored in the database and the webpage content of the final website, to determine whether the webpage content of the final website has been modified or contains harmful information; the automated monitoring system is preferably a web crawler;
[0042] S4: If the webpage content of the final website is changed or contains bad information, the intermediate website is prohibited from jumping to the final website by dynamically adjusting the access rights, and a real-time alert is sent to the publisher.
[0043] In the management method of the book link jump content, flexible control of the book content is achieved by printing a link or QR code pointing to an intermediate website on the book. After the reader scans the link or QR code on the book, he will first visit the intermediate website, and then jump from the intermediate website to the final website. If the content of the final website changes or bad information appears, the present invention can prevent it from jumping to the final website by dynamically adjusting the access rights of the intermediate website, thereby effectively controlling the information obtained by readers. This multi-level jump mechanism allows the book content to be updated at any time as needed, avoiding the cost of frequent reprinting due to content changes, and can also edit and print books in advance without waiting for online resources to be fully prepared, thereby improving publishing efficiency. At the same time, it can also effectively filter bad information and provide readers with reliable and timely information resources.
[0044] In this embodiment, after the publisher creates the corresponding project in the client, it can specify the Internet domain name of the corresponding final website; the client generates a link or QR code pointing to the final website based on the project created by the publisher, where the link format is: [domain name] / [access type] / [Internet domain name], and the QR code is encoded according to the link; then the publisher configures the mapping rules in the client to set the target URL corresponding to the final website, configure access rights, and set the validity period; the client generates a project table in the database, and the content of the project table includes the Internet domain name, access type, target URL, access rights, creation time, and website status. The access type is used to identify the category or method of the access path. The access type can reflect different access scenarios or entry sources, so that the client can perform effective mapping and permission control. The content in the access type is divided into fixed keyword form and mini-program index form. The fixed keyword form is a short string such as scan, which is usually used for general or preset access scenarios, such as code scanning access, quick access, etc. Mini Program indexes are randomly or semi-randomly generated strings such as 8aaq7k, eijeba, and 96w90c. These are used to associate specific Mini Programs, campaigns, and channels, ensuring uniqueness and traceability. The access type, as part of the link format, not only determines the logical distribution path for access but also facilitates the client's subsequent differentiation, statistics, and control of access from different sources.
[0045] The website status is categorized as Access Allowed, Access Denied, Expired, and Offline. The initial status is Access Allowed. The expiration of the website is determined based on the set validity period. When the current date exceeds the maximum validity period, the client sets the access permission to Denied, and the website status returns Expired. When the current date is less than the minimum validity period, the client sets the access permission to Denied, and the website status returns Offline. When the current date is within the validity period and the website status is Access Allowed, the client sets the access permission to Allow, redirects the intermediate website to the target URL, and the website status returns Access Allowed. When the current date is within the validity period and the final website's webpage content has been modified or contains harmful content, the client sets the access permission to Denied, and the website status returns Offline. Furthermore, if the final website's webpage content has been modified or contains harmful content, the client will alert the publisher via email, internal client messages, and text messages.
[0046] It is worth noting that, in step S3, the determination of whether the webpage content has been modified includes the following sub-steps:
[0047] Regularly crawl the web content of the final website through web crawlers and extract the core information of the web content (titles, main paragraphs, keywords, etc.);
[0048] Analyze the semantics of core information through natural language processing technology;
[0049] The similarity score is obtained by calculating the semantic similarity between the core information of the website page pre-stored in the database and the core information of the current page content after semantic analysis. Specifically, the client will pre-acquire the web page content of the final website and form a website page content table. The content of the website page content table includes the Internet domain name, the website's access time and the core information of the web page content (title, main paragraphs, keywords, etc.).
[0050] The similarity score is compared with a preset similarity threshold to determine whether the web page content has been changed.
[0051] Regularly crawling web pages with web crawlers is a fundamental technology for dynamic content monitoring. Open-source crawler frameworks can be used to schedule scheduled tasks, such as automatically accessing a target URL every Monday morning to retrieve HTML content. After crawling, the HTML structure must be parsed to extract titles, main paragraphs, and keywords. Specifically, XPath can be used to locate title tags, such as h1, to obtain the text content; for main paragraphs, the p tag can be used to extract the character-rich portion; and the TF-IDF algorithm can be used to analyze high-frequency keywords, such as "economy" and "policy."
[0052] Preferably, in step S3, a pre-trained BERT model is used to calculate semantic similarity between the core information of the website page pre-stored in the database and the core information of the current page content after semantic analysis.
[0053] Optionally, in step S3, the step of calculating semantic similarity includes:
[0054] The core information of the website page stored in the database after text preprocessing and the core information of the current page content after semantic analysis are input into the pre-trained BERT model to obtain the corresponding text feature vectors;
[0055] Use the cosine similarity formula to calculate the similarity score between the text feature vector corresponding to the core information of the website page pre-stored in the database and the text feature vector corresponding to the core information of the current page content after semantic analysis;
[0056] When the similarity score is less than a preset similarity threshold, it is determined that the webpage content has been changed; when the similarity score is greater than or equal to the preset similarity threshold, it is determined that the webpage content has not been changed.
[0057] Specifically, the BERT model converts preprocessed text into text feature vectors, capturing deep semantic features. Using a pretrained attention mechanism, the BERT model understands the contextual relationships between words. For example, the database title "Slow Economic Recovery" might generate a high-dimensional vector, while the current title "Slowing Economic Recovery" might generate another vector. It's important to note that BERT can recognize the synonymy between "recovery" and "recovery," resulting in highly semantically similar vectors. This vectorization process lays the foundation for subsequent similarity calculations, ensuring that the results are more consistent with semantic logic.
[0058] In this embodiment, the cosine similarity formula is: Where similarity is the similarity score, and The two text feature vectors are respectively subjected to cosine similarity calculation, and the similarity score obtained after the cosine similarity calculation is between [0, 1]. Specifically, the preset similarity threshold is 0.8.
[0059] Preferably, during the semantic similarity calculation process of step S3, the hidden layer state corresponding to the CLS tag in the pre-trained BERT model is extracted as a text feature vector. The CLS tag is a special symbol of the BERT model input sequence, which is usually used to aggregate the semantic information of the entire sequence. Its hidden layer state is a high-dimensional vector that contains the deep semantic features of the text. For example, after the title "Slow Economic Recovery" is processed by BERT, the hidden layer state vector of the CLS tag may contain the contextual relationship of keywords such as "recovery" and "slow". The advantage of this method is that the CLS tag can integrate the semantics of the entire sentence and avoid relying solely on the surface information of a single word. Specifically, the process of extracting the hidden layer state of the CLS tag usually starts from the last layer output of the BERT model. The BERT model converts the input text into a series of vector representations through a multi-layer Transformer structure, in which the vector of the CLS tag is designed as a semantic representation at the sequence level. In one embodiment, after extracting the CLS hidden layer state, the system usually directly uses it as a text feature vector for semantic similarity calculation.
[0060] Optionally, the text preprocessing step in step S3 includes:
[0061] The core information of the website page pre-stored in the database or the core information of the current page content after semantic analysis is used as the processing text, and after word segmentation, the punctuation marks and special characters in the processing text are removed;
[0062] Then convert the processed text into a fixed-length sequence (the maximum length is set to 512 tokens);
[0063] Then, the text is separated by adding CLS tags and SEP tags to the processed text;
[0064] Finally, the processed text after text preprocessing is output.
[0065] In one possible implementation, the core information of the website page pre-stored in the database usually refers to the key content extracted from the web page, such as the title, abstract, or the essence of the text extracted after semantic analysis. Specifically, the processing text is converted into a fixed-length sequence in order to adapt to the model input requirements. For example, the BERT model usually requires the input sequence length to be 512 tags. If the text is too long, it can be truncated to 512 tags; if it is too short, special tags such as PAD are filled. For example, a 50-tag product description will be padded to 512 tags to ensure a uniform format. Preferably, care should be taken to maintain semantic integrity when filling to avoid truncating key information. In one embodiment, adding CLS and SEP tags to the processed text is a typical step in BERT model preprocessing. The CLS tag is placed at the beginning of the sequence to aggregate the semantic information of the entire sequence; the SEP tag is used to separate different text segments.
[0066] Specifically, in step S3, determining whether the webpage content contains harmful information includes:
[0067] Regularly crawl the web content of the final website through web crawlers and extract the core information of the web content;
[0068] Analyze the semantics of core information through natural language processing technology;
[0069] The Aho-Corasick algorithm is used to match the core information of the current page content after semantic analysis with the bad information string pre-stored in the database. If the core information of the current page content after semantic analysis contains a matching bad information string in the database, it is determined that the web page content contains bad information.
[0070] The Aho-Corasick algorithm is used to match semantically analyzed content with strings of negative information in a database. The Aho-Corasick algorithm is an efficient multi-pattern matching algorithm that excels at quickly finding multiple keywords. For example, the database contains negative information strings such as "illegal," "rumor," and "malicious attack." In one possible implementation, the algorithm constructs these strings into a prefix tree and then scans the core information of the semantically analyzed webpage content.
[0071] It is worth noting that, in step S3, the determination of whether the webpage content contains harmful information includes:
[0072] Regularly crawl the web page content of the final website through a web crawler and extract image data of the web page content;
[0073] The image data is input into the pre-trained Open NSFW (Not Safe For Work) model and the judgment score is output. When the judgment score is greater than the preset threshold, it is determined that the webpage content contains inappropriate information.
[0074] In this embodiment, the judgment score is within the interval [0, 1], and the preset threshold is 0.8.
[0075] The OpenNSFW model is an image classification model based on deep learning, specifically designed to identify images that may contain inappropriate content. In one embodiment, after receiving the image input, the model outputs a judgment score between 0 and 1, where a higher score indicates a greater likelihood that the image contains inappropriate content. It should be noted that the model uses a convolutional neural network to extract image features, such as color distribution, texture, or object contours, to determine whether its semantics involve inappropriate content. It is understandable that the pre-trained model has been optimized on a large amount of annotated data and can effectively distinguish between normal images and inappropriate images.
[0076] Specifically, in step S3, the determination of whether the web page content contains bad information includes: obtaining the current URL of the final website and matching it with the URL corresponding to the link blacklist pre-stored in the database. When the current URL of the final website has a matching URL corresponding to the link blacklist in the database, it is determined that the web page content contains bad information.
[0077] Link blacklists typically store known bad website URLs, such as domain names or specific page paths involving illegal content. In one embodiment, the database can use a key-value storage structure, with the key being the blacklist URL and the value being related metadata, such as the bad type or recording time.
[0078] Optionally, in step S3, the determination of whether the web page content contains harmful information includes: regularly crawling the web page text data in the web page content of the final website through a web crawler, inputting the web page text data into the LLaMa model, and performing content security detection on the web page text data by inputting prompt words into the LLaMa model; when the LLaMa model outputs that the content of the current web page text data is unsafe, it is determined that the web page content contains harmful information.
[0079] Specifically, the prompt is: You are a web content review assistant. Please check the content security of the webpage text. The output must be in JSON format and contain the following fields:
[0080]
[0081] Please analyze the following text:
[0082] Current text: {current_text}
[0083] Where current_text is the web page text data.
[0084] The embodiments of the present invention are described in detail above with reference to the accompanying drawings, but the present invention is not limited to the described embodiments. It is apparent to those skilled in the art that various changes, modifications, substitutions, and variations to these embodiments may be made without departing from the principles and spirit of the present invention, and these changes and modifications still fall within the scope of protection of the present invention.
Claims
1. A method for managing book link jump content, characterized in that: The following steps are involved: S1: Generate a link or QR code pointing to the intermediary website, and print the link or QR code pointing to the intermediary website on the book to be published; S2: Set a link or QR code pointing to the final website on the intermediate website; S3: The automated monitoring system regularly crawls the final website's webpage content. Using the pre-trained BERT model, the semantic similarity between the core information of the website pages stored in the database and the final website's webpage content is calculated to determine whether the final website's webpage content has been modified or contains harmful information. S4: If the webpage content of the final website is changed or contains bad information, the intermediate website is prohibited from jumping to the final website by dynamically adjusting the access rights, and a real-time alert is sent to the publisher.
2. A method for managing book link jump content according to claim 1, characterized in that: In step S3, determining whether the webpage content has been modified includes the following sub-steps: Regularly crawl the web content of the final website to extract the core information of the web content; Analyze the semantics of core information through natural language processing technology; The semantic similarity calculation is performed by comparing the core information of the website page pre-stored in the database with the core information of the current page content after semantic analysis to obtain a similarity score; The similarity score is compared with a preset similarity threshold to determine whether the web page content has been changed.
3. A method for managing book link jump content according to claim 2, characterized in that: In step S3, a pre-trained BERT model is used to calculate the semantic similarity between the core information of the website page pre-stored in the database and the core information of the current page content after semantic analysis.
4. A method for managing book link jump content according to claim 3, characterized in that: In step S3, the step of calculating the semantic similarity includes: The core information of the website page stored in the database after text preprocessing and the core information of the current page content after semantic analysis are input into the pre-trained BERT model to obtain the corresponding text feature vectors; Use the cosine similarity formula to calculate the similarity score between the text feature vector corresponding to the core information of the website page pre-stored in the database and the text feature vector corresponding to the core information of the current page content after semantic analysis; When the similarity score is less than a preset similarity threshold, it is determined that the webpage content has been changed; when the similarity score is greater than or equal to the preset similarity threshold, it is determined that the webpage content has not been changed.
5. A method for managing book link jump content according to claim 4, characterized in that: During the semantic similarity calculation process in step S3, the hidden layer state corresponding to the CLS tag in the pre-trained BERT model is extracted as the text feature vector.
6. A method for managing book link jump content according to claim 5, characterized in that: The text preprocessing steps in step S3 include: The core information of the website page pre-stored in the database or the core information of the current page content after semantic analysis is used as the processing text, and after word segmentation, the punctuation marks and special characters in the processing text are removed; The processed text is then converted into a fixed-length sequence; Then, the text is separated by adding CLS tags and SEP tags to the processed text; Finally, the processed text after text preprocessing is output.
7. A method for managing book link jump content according to claim 1, characterized in that: In step S3, determining whether the webpage content contains harmful information includes: Regularly crawl the web content of the final website and extract the core information of the web content; Analyze the semantics of core information through natural language processing technology; The Aho-Corasick algorithm is used to match the core information of the current page content after semantic analysis with the bad information string pre-stored in the database. If the core information of the current page content after semantic analysis contains a matching bad information string in the database, it is determined that the web page content contains bad information.
8. A method for managing book link jump content according to claim 1, characterized in that: In step S3, determining whether the webpage content contains harmful information includes: Regularly crawl the web content of the final website and extract image data of the web content; The image data is input into the pre-trained Open NSFW model, and a judgment score is output. When the judgment score is greater than a preset threshold, it is determined that the webpage content contains objectionable information.
9. A method for managing book link jump content according to claim 1, characterized in that: In step S3, the determination of whether the web page content contains bad information includes: obtaining the current URL of the final website and matching it with the URL corresponding to the link blacklist pre-stored in the database. When the current URL of the final website has a matching URL corresponding to the link blacklist in the database, it is determined that the web page content contains bad information.
10. A method for managing book link jump content according to claim 1, characterized in that: In step S3, the determination of whether the web page content contains harmful information includes: regularly capturing web page text data in the web page content of the final website, inputting the web page text data into the LLaMa model, and performing content security detection on the web page text data by inputting prompt words into the LLaMa model; when the LLaMa model outputs that the content of the current web page text data is unsafe, it is determined that the web page content contains harmful information.
Citation Information
Patent Citations
Webpage defacement detection method and apparatus
CN106685936A
Website security monitoring method and device
CN107547555A
Information processing method and device and readable storage medium
CN107832627A