A data detection method, device, system and apparatus
By segmenting articles into sentences and using a matching model built with deep learning algorithms to filter sentences, combined with a large language model for review, the problem of low review efficiency and difficulty in capturing subtle risks in existing technologies has been solved, achieving fast and reliable article review.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
- Filing Date
- 2026-03-04
- Publication Date
- 2026-06-30
Smart Images

Figure CN122309696A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of computer technology, and in particular to a data detection method, apparatus, system and device. Background Technology
[0002] With the rapid development of computer and internet technologies and the rise of e-reading, a large number of online authors publish their articles through publishing platforms. To ensure data security and maintain the online environment, it is necessary to review the articles to be published.
[0003] For example, pre-set rules can be used to review articles to be published from multiple dimensions. However, as the number of articles to be published increases, the review rules become more complex, and the timeliness requirements for the articles to be published become more stringent, the review efficiency of the pre-set rules is low. This results in the articles to be published needing to be revised multiple times, which affects timeliness. Therefore, a faster and more reliable review solution for articles to be published is needed. Summary of the Invention
[0004] The purpose of the embodiments in this specification is to provide a faster and more reliable review scheme for articles to be published.
[0005] To achieve the above technical solution, the embodiments in this specification are implemented as follows: This specification provides a data detection method, comprising: acquiring target text data to be detected and content review rules, and segmenting the target text data into sentences to obtain multiple sentences; using a pre-trained matching model to match the sentences with the content review rules, and based on the matching results, selecting target sentences and corresponding target content review rules whose matching degree meets preset matching requirements, wherein the pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm; using a preset large language model, determining the content review result corresponding to the target text data based on the target sentences and the corresponding target content review rules; and determining whether the target text data has content security risks based on the content review result corresponding to the target text data.
[0006] This specification provides a data detection device comprising: a data acquisition module for acquiring target text data to be detected and content review rules, and segmenting the target text data into multiple sentences; a data filtering module for matching the sentences with the content review rules using a pre-trained matching model, and filtering out target sentences and corresponding target content review rules that meet preset matching requirements based on the matching results, wherein the pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm; a result determination module for determining the content review result corresponding to the target text data based on the target sentences and the corresponding target content review rules using a preset large language model; and a risk detection module for determining whether the target text data has content security risks based on the content review result corresponding to the target text data.
[0007] This specification provides an embodiment of a data detection device, comprising: a processor; and a memory arranged to store computer-executable instructions, wherein when executed, the processor: acquires target text data to be detected and content moderation rules, and performs sentence segmentation on the target text data to obtain multiple sentences; uses a pre-trained matching model to match the sentences with the content moderation rules, and based on the matching results, selects target sentences and corresponding target content moderation rules whose matching degree meets preset matching requirements, wherein the pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm; uses a preset large language model to determine the content moderation result corresponding to the target text data based on the target sentences and the corresponding target content moderation rules; and determines whether the target text data has content security risks based on the content moderation result corresponding to the target text data.
[0008] This specification also provides a storage medium for storing computer-executable instructions. When executed by a processor, the executable instructions implement the following process: acquiring target text data to be detected and content moderation rules, and segmenting the target text data into multiple sentences; using a pre-trained matching model to match the sentences with the content moderation rules, and based on the matching results, selecting target sentences and corresponding target content moderation rules that meet preset matching requirements, wherein the pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm; using a preset large language model, determining the content moderation result corresponding to the target text data based on the target sentences and the corresponding target content moderation rules; and determining whether the target text data has content security risks based on the content moderation result corresponding to the target text data.
[0009] This specification also provides a computer program product, including a computer program that, when executed by a processor, implements the following process: acquiring target text data to be detected and content moderation rules, and segmenting the target text data into multiple sentences; using a pre-trained matching model to match the sentences with the content moderation rules, and based on the matching results, selecting target sentences and corresponding target content moderation rules that meet preset matching requirements, wherein the pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm; using a preset large language model, based on the target sentences and corresponding target content moderation rules, determining the content moderation result corresponding to the target text data; and based on the content moderation result corresponding to the target text data, determining whether the target text data has content security risks. Attached Figure Description
[0010] To more clearly illustrate the technical solutions in the embodiments or prior art of this specification, the drawings used in the description of the embodiments or prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. Figure 1 This is a schematic diagram of the implementation environment for one of the data detection methods described in this specification; Figure 2 This is a flowchart illustrating the processing procedure of a data detection method described in this specification. Figure 3 This is a flowchart illustrating a filtering process using a combination of grouping rules as described in this specification. Figure 4 This is a schematic diagram of the processing procedure of a data detection system described in this specification; Figure 5 This is a flowchart illustrating a sentence segmentation process described in this specification. Figure 6 This is a flowchart illustrating the process for determining the results of an internal audit, as described in this specification. Figure 7 This is a flowchart illustrating the process of publishing target text data as described in this specification. Figure 8 This is a flowchart illustrating the filtering process for yet another combination of grouping rules in this specification. Figure 9 This is a flowchart illustrating the training process of a matching model as described in this specification. Figure 10 This is a schematic diagram of a data detection device described in this specification; Figure 11 This is a schematic diagram of a data detection device described in this specification. Detailed Implementation
[0011] This specification provides a data detection method, apparatus, system, and device through its embodiments.
[0012] To enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this specification, and not all embodiments. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the scope of protection of this specification.
[0013] This specification provides a faster and more reliable review scheme for articles to be published. The automated pre-review of text review faces the following challenges: (1) Large text volume: Articles are generally long, averaging 800 words, with a maximum of over 8,000 words per article; (2) Complex rule system: Up to 122 rules need to be implemented simultaneously to control financial compliance, promotion and traffic generation, etc.; (3) Strict response time: To ensure user experience, the pre-review results need to be returned within 3 seconds; (4) Changing review scale: The review scale often changes in real time due to current events. Therefore, designing an efficient, accurate, and long-text pre-review link that can handle complex long texts has become the key to solving the above needs and challenges. In practical application scenarios, review can be carried out through rules and feature engineering. For example, a predefined list of sensitive words, phrase patterns, URLs, contact information, etc. can be used to match the articles to be published in order to determine the review results based on the matching results. However, the above methods have problems such as poor generalization performance, low recall rate, easy to be bypassed by variants, inability to deal well with hidden risks, and difficulty in dynamically controlling the review scale. Alternatively, a pre-trained detection model combined with preset rules can be used for content review. However, when there are many preset rules and the system is complex, using a pre-trained detection model for rule matching also suffers from low review efficiency, making it difficult to return judgment results in real time and affecting user experience. To address this, this specification provides a faster and more reliable review scheme for articles to be published. In this scheme, the target text data to be detected and the content review rules are obtained, and the target text data is segmented into multiple sentences. A pre-trained matching model is used to match the sentences with the content review rules. Based on the matching results, target sentences that meet the preset matching requirements and their corresponding target content review rules are selected. The pre-trained matching model can be obtained by comparative learning training on a model built with a deep learning algorithm. Using a preset large language model, based on the target sentences and the corresponding target content review rules, the content review result corresponding to the target text data is determined. Based on the content review result corresponding to the target text data, it is determined whether the target text data has content security risks. In this way, firstly, sentence segmentation reduces the number of data processing units. Then, a pre-trained matching model is used to match the sentences with the content review rules to filter out target sentences and their corresponding target content review rules. This compresses the matching range and reduces the amount of data entering the large language model. Finally, the large language model can be used to better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk review. Specific processing details can be found in the following embodiments.
[0014] The data detection methods described in one or more embodiments of this specification are applicable to the data detection implementation environment, such as... Figure 1 As shown, the implementation environment includes at least: Client 100 and server 200. Furthermore, server 200 can be configured with various network models and algorithms, among which: Client 100 can run on terminal devices, which can be mobile phones, personal computers, tablets, e-book readers, wearable devices, devices that interact with information based on AR (Augmented Reality) and VR (Virtual Reality), and laptop computers, etc. Client 100 can be installed on terminal devices, and Client 100 can be an application, a browser, or a subroutine embedded in an application, etc.
[0015] Server 200 can run on a server, which can be one or more servers, a server cluster consisting of several servers, or a cloud server on a cloud computing platform. Server 200 can be installed on the server. Server 200 can be an application or a subroutine embedded in an application. Various network models and algorithms can be integrated into server 200, or server 200 can call one or more of various network models and algorithms to perform corresponding operations.
[0016] In addition, it may include a database 300, which may be set in the server on which the server 200 runs or outside the server on which the server 200 runs. The database 300 may store content moderation rules, model parameters of the matching model, etc.
[0017] In this implementation environment, users can upload target text data to be detected through client 100. Server 200 can obtain the target text data and content moderation rules, and process the target text data into sentences to obtain multiple sentences. Using a pre-trained matching model, the sentences are matched with the content moderation rules. Based on the matching results, target sentences that meet the preset matching requirements and their corresponding target content moderation rules are selected. The pre-trained matching model can be obtained by comparative learning training on a model built by a deep learning algorithm. Using a preset large language model, based on the target sentences and their corresponding target content moderation rules, the content moderation result corresponding to the target text data is determined. Based on the content moderation result corresponding to the target text data, it is determined whether the target text data has content security risks. Server 200 can return the detection result of whether the target text content has content security risks to client 100.
[0018] like Figure 2As shown in the embodiments of this specification, a data detection method is provided. The execution subject of this method can be a server, which can be a single independent server or a server cluster composed of multiple servers. The server can be a backend server for businesses such as financial services or content publishing, or a backend server for an application. Specifically, the method may include the following steps: In step S202, the target text data to be detected and the content review rules are obtained, and the target text data is processed into sentences to obtain multiple sentences.
[0019] The target text data can be any text data to be published, and the content review rules can include risk keyword review rules, compliance review rules, traffic diversion prevention and control review rules, etc.
[0020] In practice, taking articles related to the financial business field uploaded by users on the financial business service platform as an example, users can upload text data to be published on the financial business service platform. The client can identify the text data to be published as the target text data and send it to the server.
[0021] Furthermore, due to the high timeliness requirements for article publication in financial and political business, the server can conduct real-time review of the text data being edited by the user to improve review efficiency. For example, if a user triggers an article editing request on the financial business server platform, the client can send the text data being edited by the user to the server in real time. That is, the server can identify the text data being edited by the user as the target text data. In this way, the server can conduct real-time review during the text editing process, promptly alert the user to any content security risks in the text data being edited, and avoid problems such as a long review process leading to many revisions that affect the timeliness of publication.
[0022] After determining the target text data, the server can determine the corresponding content review rules based on relevant information such as the business, field, title, and keywords contained in the target text data.
[0023] The server can use a pre-trained sentence segmentation model to segment the target text data into multiple sentences. This sentence segmentation model can be a model built based on a preset deep learning algorithm. Alternatively, the server can segment the target text data into multiple sentences based on punctuation marks, or it can segment the target text data into multiple sentences based on a preset length threshold. In addition, there are various other sentence segmentation methods available, which can be selected according to different application scenarios. This specification does not specifically limit these methods in the embodiments.
[0024] In step S204, a pre-trained matching model is used to match sentences with content review rules. Based on the matching results, target sentences that meet the preset matching requirements and corresponding target content review rules are selected.
[0025] The pre-trained matching model can be obtained by comparative learning training on a model built by a deep learning algorithm.
[0026] In practice, for example, the server can build a matching model based on the Transformer algorithm and obtain historical sentence segments. By using historical sentence segments and content moderation rules, the matching model can be trained through comparative learning to obtain a trained matching model.
[0027] The server can input sentences and content moderation rules into the matching model to obtain the matching degree between each sentence and each content moderation rule. Then, the server can sort the sentence rule combinations based on the matching degree and filter out the target sentences and corresponding target content moderation rules based on the sorted sentence rule combinations.
[0028] For example, suppose the target text data includes sentence 1, sentence 2, and sentence 3, and the content moderation rules include rule 1 and rule 2. The matching degree between sentence 1 and these two content moderation rules is 0.1 and 0.2, respectively; the matching degree between sentence 2 and these two content moderation rules is 0.3 and 0.5, respectively; and the matching degree between sentence 3 and these two content moderation rules is 0.25 and 0.35, respectively. Then, the sorted sentence rule combinations obtained by sorting the sentence rule combinations according to these matching degrees can be shown in Table 1 below.
[0029] Table 1
[0030] Based on the sorting in Table 1 above, the sentence and content review rules contained in sentence rule combination 1, sentence rule combination 2 and sentence rule combination 3 can be identified as target sentences and corresponding target content review rules. That is, target sentence 1 can be sentence 2, and the target content review rules corresponding to target sentence 1 can include rule 1 and rule 2. Target sentence 2 can be sentence 3, and the target content review rules corresponding to target sentence 2 can include rule 2.
[0031] In step S206, a preset large language model is used to determine the content review result corresponding to the target text data based on the target sentence and the corresponding target content review rules.
[0032] In implementation, the server can input the target sentence and the corresponding target content review rules into a preset large language model. By utilizing the text analysis capabilities of the preset large language model, it can determine whether the target text data contains content that matches the target content review rules. Based on the judgment result, the server can determine the content review result corresponding to the target text data. That is, the content review result can include the judgment result of whether the target sentence matches the corresponding target content review rule, as well as the thought chain and confidence level corresponding to the judgment result.
[0033] Among them, the thinking chain refers to the large language model's decomposition of a single complex problem into multiple sequentially executed sub-problems or reasoning steps, and explicitly generating and displaying these intermediate steps and their results (such as calculation, fact extraction, and logical judgment), making its reasoning process transparent.
[0034] In step S208, based on the content review results corresponding to the target text data, it is determined whether the target text data has any content security risks.
[0035] In practice, the server can send the content review results corresponding to the target text data to a preset reviewer, and determine whether the target text data has content security risks based on the feedback from the preset reviewer.
[0036] Alternatively, the server can obtain the security risk review requirements corresponding to the domain to which the target text data belongs, and determine whether the target text data has content security risks based on the security risk review requirements and the content review results.
[0037] For example, suppose target sentence 1 is sentence 2, and the target content review rules for target sentence 1 are rule 1 and rule 2. Target sentence 2 is sentence 3, and the target content review rule for target sentence 2 is rule 2. The content review result is that target sentence 1 hits rule 1 (with a confidence level of 0.8), and target sentence 2 hits rule 2 (with a confidence level of 0.7). Then, the server can determine whether the target text data has content security risks based on the hit requirements and corresponding confidence level requirements for each rule in the security risk review requirements, combined with the above content review results.
[0038] This specification provides a data detection method. It involves acquiring target text data and content moderation rules, segmenting the target text data into multiple sentences, and using a pre-trained matching model to match these sentences with the content moderation rules. Based on the matching results, target sentences and corresponding target content moderation rules that meet preset matching requirements are selected. The pre-trained matching model can be obtained by comparative learning training on a model built using a deep learning algorithm. A preset large language model is used to determine the content moderation result corresponding to the target text data based on the target sentences and corresponding target content moderation rules. Based on the content moderation result, it is determined whether the target text data poses a content security risk. This method first reduces the number of data processing units through sentence segmentation. Then, by using the pre-trained matching model to match the sentences with the content moderation rules to select target sentences and corresponding target content moderation rules, the matching range can be compressed, reducing the amount of data processed by the large language model. Finally, the large language model can better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk assessment.
[0039] In practical applications, step S204 above utilizes a pre-trained matching model to match sentences with content review rules. Based on the matching results, target sentences that meet the preset matching requirements and their corresponding target content review rules are selected. The specific processing methods can vary; the following provides one optional method, such as... Figure 3 As shown, the specific process may include the following steps S2042 to S2044.
[0040] In step S2042, based on the semantic similarity between the sentence and each content review rule, multiple first content review rules corresponding to each sentence are selected.
[0041] In implementation, the server can utilize a pre-trained keyword extraction model to extract keywords contained in each sentence and each content moderation rule. Based on the semantic similarity between the keywords in each sentence and the keywords in each content moderation rule, the server determines the semantic similarity between each sentence and each content moderation rule. The keyword extraction model can be a model built based on machine learning algorithms.
[0042] In practical applications, the specific processing methods for filtering out multiple first content review rules corresponding to each sentence based on the semantic similarity between the sentence and each content review rule in step S2042 can be varied. The following provides an optional processing method, which may specifically include the processing of steps A1 to A3.
[0043] In step A1, the pre-trained extraction model is used to extract semantic features from the sentences and the content review rules respectively, so as to obtain the first semantic feature vector corresponding to the sentences and the second semantic feature vector corresponding to the content review rules.
[0044] The extracted model can be a model built based on deep learning algorithms.
[0045] In implementation, such as Figure 4 As shown, assuming the target text data contains n sentences and corresponds to m content moderation rules, where n and m are positive integers greater than zero, the server can use a pre-trained extraction model to perform semantic feature extraction processing on each sentence and each content moderation rule, obtaining a first semantic feature vector for each sentence and a second semantic feature vector for each content moderation rule. Thus, through the semantic feature encoding module, the extraction model can construct a text-rule joint semantic space, encoding the segmented text units and rule entries into 1024-dimensional dense vectors (i.e., the first semantic feature vector and the second semantic feature vector) to construct a multi-granularity semantic representation matrix.
[0046] In step A2, the content review rules are sorted based on the similarity between the first semantic feature vector and each second semantic vector.
[0047] In practice, the server can sort the content review rules corresponding to each sentence based on the similarity between the first semantic feature vector and each second semantic vector.
[0048] In step A3, based on the sorted content review rules, multiple first content review rules corresponding to each clause are selected.
[0049] In implementation, the server can filter out multiple first content review rules corresponding to each clause based on a preset number of filters and the sorted content review rules. For example, if the preset number of filters is 5, the server can filter out five first content review rules corresponding to each clause based on the sorted content review rules.
[0050] For example, such as Figure 4 As shown, assuming the preset number of filters is 2, the first content review rule corresponding to sentence 1 can include rule 14 and rule 48, and the first content review rule corresponding to sentence 2 can include rule 54 and rule 112. In this way, the number of input rules can be stably compressed to the top 5 candidate set based on vector similarity calculation and sorting according to similarity.
[0051] In step S2044, a pre-trained matching model is used to match the sentences with multiple corresponding first content review rules, and based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected.
[0052] In practice, the above screening process can effectively reduce the number of content rules entering the matching model. By using a pre-trained matching model to match sentences with multiple corresponding first content review rules, a smaller number of target sentences and corresponding target content review rules can be filtered out through white-out filtering.
[0053] Among them, white filtering is a filtering mechanism used to optimize the amount of input data. It aims to reduce the number of content-rule pairs that enter subsequent processing of larger-sized models, thereby improving the system's real-time performance and efficiency.
[0054] In practical applications, the specific processing methods for segmenting the target text data into multiple sentences in step S202 above can vary. The following provides one optional processing method, such as... Figure 5 As shown, the specific process may include the following steps S2022 to S2026.
[0055] In step S2022, based on the symbol nesting relationship in the target text data, the target text data is segmented into sentences to obtain multiple first sentences.
[0056] Among them, symbol nesting relationship refers to the hierarchical relationship in which symbols (such as parentheses, tags or selectors) are contained or nested together in a hierarchical manner to form a structure with parent-child or scope hierarchy. Symbol nesting relationship can be used to organize code logic, define scope or build element hierarchy.
[0057] In implementation, for the target text data, the server can build a sentence segmentation algorithm to perform content segmentation to achieve fine-grained output. First, the server can establish a punctuation discrimination module and use a symbol nesting detection algorithm to dynamically maintain a stack structure of paired punctuation marks. That is, based on the symbol nesting relationship in the target text data, the server can perform sentence segmentation on the target text data to obtain multiple first sentences.
[0058] In step S2024, based on the preset character segmentation range and the number of characters contained in each first clause, the first clause is adjusted to obtain multiple second clauses.
[0059] In implementation, after obtaining multiple first sentences, the server can build a dynamic threshold merging engine and introduce a length adaptive adjustment algorithm. Based on the integrity of the text semantic unit (i.e. the first sentence), a forward and backward joint decision-making mechanism is adopted to handle the short sentence residue problem based on the preset character segmentation range. The preset character segmentation range can be 50-120 characters.
[0060] For example, if clause 3 contains fewer than 50 characters and clause 2 contains fewer characters than clause 4, then clause 3 and clause 2 can be merged.
[0061] In step S2026, the second clause is adjusted based on one or more of the following rules to obtain multiple clauses: line break splitting rule, consecutive punctuation merging rule, and decimal point merging rule.
[0062] Among them, the line break splitting rule should be that the line break can be split into two clauses, the consecutive punctuation merging rule should be that multiple consecutive punctuation marks can be merged into one clause, and the decimal point merging rule should be that the clauses before and after the decimal point can be merged into one clause.
[0063] In practice, after obtaining multiple second clauses, the server can optimize the clause segmentation component and integrate specialized processing modules such as forced line break segmentation, continuous punctuation merging, and decimal point scene recognition. In this way, it can adaptively parse the long-distance dependent sentence structure in the input long text, effectively optimize the segmentation boundary and improve the semantic coherence after clause segmentation by dynamically maintaining the receptive field of text features.
[0064] In practical applications, the specific processing method for determining the content review result corresponding to the target text data in step S206 above, based on the preset large language model, target sentence segmentation, and corresponding target content review rules, can vary. The following provides one optional processing method, such as... Figure 6 As shown, the specific process may include the following steps S2062 to S2064.
[0065] In step S2062, a prompt message is constructed based on the target sentence and the corresponding target content review rules.
[0066] In implementation, the server can construct prompt information based on the security risk review requirements corresponding to the target text data, the target sentence and the corresponding target content review rules. For example, the prompt information can be "Does target sentence 1 match the corresponding target content review rules?" or "Does target sentence 1 match the corresponding target content review rules, and provide the corresponding thought chain?"
[0067] In step S2064, a preset large language model is used to determine whether the target sentence matches the target content review rules based on the prompt information, so as to determine the content review result corresponding to the target text data according to the judgment result.
[0068] In implementation, such as Figure 4 As shown, after content-rule filtering, the remaining high-risk suspected "sentence rule combinations" are all sent to the large language model's discrimination output module. This module is the decision-making core of the entire risk control discrimination system, and its core is a pre-set large language instruction compliance model that has been fine-tuned. The training data for the large language model can come from thought chain labeled samples generated using a generative model. By fine-tuning on high-quality thought chain data, the pre-set large language model can achieve accurate discrimination of obscure and ambiguous risky content.
[0069] During the reasoning phase, each "sentence segmentation rule combination (i.e., the target sentence and the corresponding target content review rule)" is encapsulated by the system into a structured prompt word instruction (i.e. prompt information). After receiving the prompt word, the pre-set large language model can perform deep semantic understanding and output the content review result containing (1) risk judgment results and thought chain; (2) content review result with confidence level.
[0070] Furthermore, system administrators can flexibly adjust the confidence thresholds used by the judgment system according to the control requirements of different periods and scenarios. Based on this system, efficient and accurate automated risk assessment can be achieved, and the control intensity of the model can be flexibly controlled according to the control scale.
[0071] In practical applications, the target text data can also be revised. There are various methods for revision processing; one optional method is provided below. Figure 7 As shown, the specific process may include the following steps S702 to S704.
[0072] In step S702, if it is determined that the target text data has a content security risk based on the content review results corresponding to the target text data, revision suggestion data for the target text data is generated based on the content review results.
[0073] In practice, if the content review results corresponding to the target text data indicate that the target text data poses a content security risk, the server can use a pre-set large language model to generate revision suggestion data for the target text data based on the content review results. The revision suggestion data may include annotation boxes with revision suggestions, text data with revision traces, etc.
[0074] In step S704, the target text data is revised based on the revision suggestion data, and the revised target text data is published.
[0075] In practice, the server can revise the target text data based on the revision suggestion data. Then, the server can send the revised target text data to the preset reviewer for manual review. If the manual review is passed, the revised target text data can be published.
[0076] In addition, the target text data can be the text data that the user is editing. The server can return revision suggestion data to the client so that the user can receive revision suggestion data in real time during the editing process and make revisions in a timely manner based on the revision suggestion data, thereby reducing the subsequent review process and ensuring the timeliness of article publication.
[0077] In practical applications, step S204 above utilizes a pre-trained matching model to match sentences with content review rules. Based on the matching results, target sentences that meet the preset matching requirements and their corresponding target content review rules are selected. The specific processing methods can vary; the following provides one optional method, such as... Figure 8 As shown, the specific process may include the following steps S2046 to S2048.
[0078] In step S2046, a pre-trained matching model is used to match sentences with content review rules to obtain the matching degree between each sentence and each content review rule.
[0079] In step S2048, the preset matching threshold corresponding to each content review rule is obtained, and the sentences with a matching degree greater than the preset matching threshold and the corresponding content review rules are determined as target sentences and corresponding target content review rules that meet the preset matching requirements.
[0080] The preset matching threshold can be determined based on the content security review requirements corresponding to the target text data.
[0081] In implementation, the server can set different preset matching thresholds for each content review rule. Based on the preset matching thresholds corresponding to each content review rule, the combination of sentence rules can be filtered to select the combination of sentence rules that meets the preset matching requirements, namely the target sentence and the corresponding target content review rule.
[0082] Thus, by constructing such Figure 4The large-scale model-driven multi-level filtering and review system for long text content segmentation demonstrates several key features. In the sentence segmentation stage, a nested punctuation detection stack and preset character segmentation ranges address the semantic fragmentation problem in long texts. The rule retrieval layer utilizes an extraction model to construct a joint semantic space, compressing m content review rules into multiple primary content review rules. The whitelisting process further filters high-risk content-rule pairs based on a matching model, and a preset recall threshold control mechanism reduces downstream load. The core discrimination system employs a pre-tuned large language model with a mind chain, parsing hidden risks through structured dynamic prompts and supporting flexible adjustment of confidence thresholds to adapt to control levels. Through the coordinated operation of these hierarchical modules, the system effectively addresses the challenges of long text review, including long text length, numerous rules, short response times, and the need for dynamic control of prevention and control measures.
[0083] In practical applications, the matching model can also be trained. The specific processing methods for the training process can vary. The following provides one optional method, such as... Figure 9 As shown, the specific process may include the following steps S902 to S904.
[0084] In step S902, a pre-trained generative model is used to generate positive and negative sample data corresponding to the content review rules.
[0085] Among them, the matching degree between positive sample data and content review rules is greater than that between negative sample data and content review rules.
[0086] In step S904, the matching model is trained by comparative learning using positive and negative sample data to obtain the trained matching model.
[0087] In implementation, after the server segments the target text data into sentences, it can further construct a white-out elimination model (i.e., a matching model) for content-rule pairs. This aims to optimize the amount of data entering the final large language model, ensuring the system's real-time performance and efficiency. Specifically, the server can first use a pre-trained generative model to obtain the matching logic chain and tags of content-rule pairs. Based on this data, it constructs a contrastive learning training set containing positive and negative sample data, and then uses the constructed contrastive learning training set to complete the training of the matching model.
[0088] At the end of the training phase, different recall thresholds (e.g., 95%) can be set for different content moderation rules to balance recall and filtering precision. During the inference phase, for text content-rule pairs, the matching model can output a matching confidence score based on specific prompts. By comparing this confidence score with the recall threshold pre-set during training, a secondary, precise filtering of the number of input content-rule pairs is achieved. This process enables pre-filtering of 82.3% of low-risk content-rule pairs, reducing the amount of data input to subsequent large models and ensuring the system's real-time responsiveness.
[0089] Thus, to address the issues of insufficient semantic understanding and difficulty in dynamically adjusting review standards in rule-based schemes, a large language model is introduced, along with a dynamic adjustment mechanism based on confidence thresholds. The large language model can better capture implicit semantics in content, and by adjusting the risk judgment thresholds output by the large model in real time, it can flexibly adapt to policy changes.
[0090] To address the response time issue caused by full rules in the large language model-based scheme, a three-level cascaded filtering pipeline is constructed: (1) sentence segmentation to reduce the number of processing units; (2) rule retrieval to compress the matching range; and (3) white mark removal to pre-filter low-risk sentences. This reduces the number of content-rule pairs entering the large language model while maintaining the accuracy and recall performance.
[0091] In terms of model performance, from the article perspective, the overall recall rate for articles with content security risks can reach 94%, and the accuracy can reach 82%. Meanwhile, the whitelisting process can achieve 82.3% pre-filtering of low-risk content and rules. Furthermore, the pre-configured large language model deployed using the VLLM framework can truncate the output after the judgment result is output (i.e., the output can be truncated after determining whether it matches the target content review rules), reducing the overall average processing time of the process to 1.2 seconds. The dynamic length control sentence segmentation algorithm controls the single-segment input length of long-tailed texts, reducing the overall timeout rate to less than 0.01%.
[0092] In terms of user experience, after the above processing, the pass rate of manual review of target text data can reach 99%, and the pass rate of content recommendation can be increased to 97%, thus improving the user experience.
[0093] This specification provides a data detection method. It involves acquiring target text data and content moderation rules, segmenting the target text data into multiple sentences, and using a pre-trained matching model to match these sentences with the content moderation rules. Based on the matching results, target sentences and corresponding target content moderation rules that meet preset matching requirements are selected. The pre-trained matching model can be obtained by comparative learning training on a model built using a deep learning algorithm. A preset large language model is used to determine the content moderation result corresponding to the target text data based on the target sentences and corresponding target content moderation rules. Based on the content moderation result, it is determined whether the target text data poses a content security risk. This method first reduces the number of data processing units through sentence segmentation. Then, by using the pre-trained matching model to match the sentences with the content moderation rules to select target sentences and corresponding target content moderation rules, the matching range can be compressed, reducing the amount of data processed by the large language model. Finally, the large language model can better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk assessment.
[0094] The above describes the data detection method provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data detection device, such as... Figure 10 As shown.
[0095] The data detection device includes: a data acquisition module 1001, a data filtering module 1002, a result determination module 1003, and a risk detection module 1004, wherein: The data acquisition module 1001 is used to acquire the target text data to be detected and the content review rules, and to perform sentence segmentation on the target text data to obtain multiple sentences; The data filtering module 1002 is used to use a pre-trained matching model to match the sentence with the content review rules, and to filter out the target sentences and corresponding target content review rules that meet the preset matching requirements based on the matching results. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. The result determination module 1003 is used to determine the content review result corresponding to the target text data based on the target sentence and the corresponding target content review rules using a preset large language model. The risk detection module 1004 is used to determine whether the target text data has any content security risks based on the content review results corresponding to the target text data.
[0096] In this embodiment of the specification, the data filtering module 1002 is used for: Based on the semantic similarity between the sentence and each of the content review rules, multiple first content review rules corresponding to each sentence are selected. Using a pre-trained matching model, the sentence is matched with multiple corresponding first content review rules. Based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected.
[0097] In this embodiment of the specification, the data filtering module 1002 is used for: Using a pre-trained extraction model, semantic feature extraction is performed on the sentence segment and the content review rule respectively to obtain the first semantic feature vector corresponding to the sentence segment and the second semantic feature vector corresponding to the content review rule; The content review rules are sorted based on the similarity between the first semantic feature vector and each of the second semantic vectors. Based on the sorted content review rules, multiple first content review rules corresponding to each of the clauses are selected.
[0098] In this embodiment of the specification, the data acquisition module 1001 is used for: Based on the nesting relationship of symbols in the target text data, the target text data is segmented into sentences to obtain multiple first sentences; Based on the preset character segmentation range and the number of characters contained in each first clause, the first clause is adjusted to obtain multiple second clauses; The second clause is adjusted based on one or more of the following rules to obtain the multiple clauses: line break splitting rule, consecutive punctuation merging rule, and decimal point merging rule.
[0099] In this embodiment of the specification, the result determination module 1003 is used for: Based on the target sentence and the corresponding target content review rules, a prompt message is constructed; Using the preset large language model and based on the prompt information, it is determined whether the target sentence matches the target content review rule, so as to determine the content review result corresponding to the target text data based on the judgment result.
[0100] In the embodiments described in this specification, the device further includes: The determination module is used to generate revision suggestion data for the target text data based on the content review result corresponding to the target text data, if it is determined that the target text data has a content security risk. The revision module is used to revise the target text data based on the revision suggestion data and publish the revised target text data.
[0101] In this embodiment of the specification, the data filtering module 1002 is used for: Using the pre-trained matching model, the sentences are matched with the content review rules to obtain the matching degree between each sentence and each content review rule; Obtain the preset matching threshold corresponding to each content review rule, and determine the sentences with a matching degree greater than the preset matching threshold and their corresponding content review rules as the target sentences and their corresponding target content review rules that meet the preset matching requirements.
[0102] In the embodiments described in this specification, the device further includes: The generation module is used to generate positive sample data and negative sample data corresponding to the content review rules using a pre-trained generation model, wherein the matching degree between the positive sample data and the content review rules is greater than the matching degree between the negative sample data and the content review rules. The training module is used to perform comparative learning training on the matching model using the positive sample data and the negative sample data to obtain the trained matching model.
[0103] This specification provides a data detection device that acquires target text data and content review rules, segments the target text data into multiple sentences, uses a pre-trained matching model to match the sentences with the content review rules, and filters out target sentences and corresponding target content review rules that meet preset matching requirements based on the matching results. The pre-trained matching model can be obtained by comparative learning training on a model built using a deep learning algorithm. Using a preset large language model, based on the target sentences and corresponding target content review rules, the device determines the content review result corresponding to the target text data, and based on the content review result, determines whether the target text data poses a content security risk. This approach first reduces the number of data processing units through sentence segmentation; then, by using the pre-trained matching model to match the sentences with the content review rules to filter out target sentences and corresponding target content review rules, the matching range can be compressed, reducing the amount of data processed by the large language model; finally, the large language model can better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk review.
[0104] The above are the data detection devices provided in the embodiments of this specification. Based on the same idea, the embodiments of this specification also provide a data detection device, such as... Figure 11As shown.
[0105] The data detection equipment can provide terminal equipment or servers, etc., for the above embodiments.
[0106] like Figure 11 As shown, device 1100 mainly consists of a communication interface 1102, a user interface 1104, a processor 1106, and a data storage 1108. These components are interconnected and communicate with each other via a system bus, network, or other connection mechanism 1110. The communication interface 1102 enables device 1100 to communicate with other devices, access networks, and transmission networks via analog or digital modulation. For example, the communication interface 1102 may include a chipset and antenna for wireless communication with a radio access network or access point. Furthermore, the communication interface 1102 can be a wired interface such as Ethernet, Token Ring, or a USB port, or a wireless interface such as Wi-Fi, Bluetooth, Global Positioning System (GPS), or a wide-area wireless interface (e.g., WiMAX or LTE). Of course, the communication interface 1102 can also support other forms of physical layer interfaces and standard or proprietary communication protocols. The communication interface 1102 may also include multiple physical communication interfaces, such as Wi-Fi, Bluetooth, and wide-area wireless interfaces.
[0107] User interface 1104 includes receiving user input and providing output to the user. Therefore, user interface 1104 may include input components such as a keypad, keyboard, touch-sensitive or presence-sensitive panel, computer mouse, trackball, joystick, microphone, still camera, and video camera, and output components such as a display screen (which may be combined with a touch-sensitive panel), CRT, LCD, LED, display using DLP technology, printer, and other similar devices known or developed in the future. User interface 1104 may also generate auditory output via speakers, speaker jacks, audio output ports, audio output devices, headphones, and other similar devices known or developed in the future. In some embodiments, user interface 1104 may include software, circuitry, or other forms of logic capable of transmitting and receiving data from external user input / output devices. Additionally or alternatively, device 1100 may support remote access from other devices via communication interface 1102 or another physical interface (not shown). User interface 1104 may be configured to receive user input, the position and movement of which may be indicated by indicators or cursors described herein. User interface 1104 can also be configured as a display device for rendering or displaying text fragments.
[0108] Processor 1106 may include one or more general-purpose processors and / or special-purpose processors.
[0109] Data storage 1108 may include one or more volatile storage components and may be integrated wholly or partially with processor 1106. Data storage 1108 may include removable and non-removable components.
[0110] Processor 1106 is capable of executing program instructions 1118 (e.g., compiled or uncompiled program logic and / or machine code) stored in data storage 1108 to perform the various functions described herein. Data storage 1108 may contain a non-transitory computer-readable medium on which program instructions are stored, which, when executed by device 1100, enable device 1100 to perform any methods, processes, or functions disclosed in this specification and / or the accompanying drawings. Execution of program instructions 1118 by processor 1106 may result in processor 1106 using data 1112.
[0111] For example, program instructions 1118 may include an operating system 1122 (e.g., an operating system kernel, device drivers, and / or other modules) installed on device 1100 and one or more applications 1120 (e.g., a browser, social application, or game application). Similarly, data 1112 may include operating system data 1116 and application data 1114. Operating system data 1116 is primarily accessible to the operating system 1122, while application data 1114 is primarily accessible to one or more applications 1120. Application data 1114 may reside in a file system visible or hidden from the user of device 1100.
[0112] Application 1120 can communicate with operating system 1112 through one or more application programming interfaces (APIs). These APIs help application 1120 read and / or write application data 1114, transmit or receive information via communication interface 1102, receive or display information on user interface 1104, etc.
[0113] In some terminology, application 1120 may be simply referred to as "app". Furthermore, application 1120 can be downloaded to device 1100 through one or more online app stores or app markets. However, applications can also be installed on device 1100 in other ways, such as through a web browser or a physical interface on device 1100 (e.g., a USB port).
[0114] Specifically, in this embodiment, the data detection device includes a memory and one or more programs, wherein one or more programs are stored in the memory, and one or more programs may include one or more modules, and each module may include a series of computer-executable instructions for the data detection device, and is configured to be executed by one or more processors. The one or more programs include computer-executable instructions for performing the following: The target text data to be detected and the content review rules are obtained, and the target text data is segmented into sentences to obtain multiple sentences; Using a pre-trained matching model, the sentence is matched with the content review rules, and based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. Using a pre-defined large language model, based on the target sentence and the corresponding target content review rules, the content review result corresponding to the target text data is determined; Based on the content review results corresponding to the target text data, determine whether the target text data poses a content security risk.
[0115] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the data detection device embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.
[0116] This specification provides a data detection device that acquires target text data and content review rules, segments the target text data into multiple sentences, and uses a pre-trained matching model to match the sentences with the content review rules. Based on the matching results, it selects target sentences and corresponding target content review rules that meet preset matching requirements. The pre-trained matching model can be obtained by comparative learning training on a model built using a deep learning algorithm. Using a preset large language model, based on the target sentences and corresponding target content review rules, it determines the content review result corresponding to the target text data, and based on the content review result, determines whether the target text data poses a content security risk. This approach first reduces the number of data processing units through sentence segmentation; then, by using the pre-trained matching model to match the sentences with the content review rules to select target sentences and corresponding target content review rules, it compresses the matching range and reduces the amount of data processed by the large language model; finally, it allows the large language model to better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk review.
[0117] Furthermore, based on the above Figures 1 to 9 This specification also provides a storage medium for storing computer-executable instruction information in one or more embodiments. In one specific embodiment, the storage medium may be a USB flash drive, optical disc, hard disk, etc. When the computer-executable instruction information stored in the storage medium is executed by a processor, it can realize the following process: The target text data to be detected and the content review rules are obtained, and the target text data is segmented into sentences to obtain multiple sentences; Using a pre-trained matching model, the sentence is matched with the content review rules, and based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. Using a pre-defined large language model, based on the target sentence and the corresponding target content review rules, the content review result corresponding to the target text data is determined; Based on the content review results corresponding to the target text data, determine whether the target text data poses a content security risk.
[0118] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the above-described storage medium embodiment is basically similar to the method embodiment, so the description is relatively simple; relevant parts can be referred to the description of the method embodiment.
[0119] This specification provides a storage medium that acquires target text data to be detected and content moderation rules, and segments the target text data into multiple sentences. A pre-trained matching model is used to match the sentences with the content moderation rules. Based on the matching results, target sentences and corresponding target content moderation rules that meet preset matching requirements are selected. The pre-trained matching model can be obtained by comparative learning training on a model built using a deep learning algorithm. A preset large language model is used to determine the content moderation result corresponding to the target text data based on the target sentences and corresponding target content moderation rules. Based on the content moderation result corresponding to the target text data, it is determined whether the target text data poses a content security risk. In this way, sentence segmentation reduces the number of data processing units. Then, the pre-trained matching model matches the sentences with the content moderation rules to select target sentences and corresponding target content moderation rules, compressing the matching range and reducing the amount of data processed by the large language model. Finally, the large language model can better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk review.
[0120] Furthermore, based on the above Figures 1 to 9 This specification also provides one or more embodiments of a computer program product, including a computer program, which, when executed by a processor, can perform the following processes: The target text data to be detected and the content review rules are obtained, and the target text data is segmented into sentences to obtain multiple sentences; Using a pre-trained matching model, the sentence is matched with the content review rules, and based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. Using a pre-defined large language model, based on the target sentence and the corresponding target content review rules, the content review result corresponding to the target text data is determined; Based on the content review results corresponding to the target text data, determine whether the target text data poses a content security risk.
[0121] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the above-described embodiment of a computer program product is relatively simple in description because it is fundamentally similar to the method embodiment; relevant parts can be referred to the description of the method embodiment.
[0122] This specification provides a computer program product that acquires target text data to be detected and content moderation rules, segments the target text data into multiple sentences, uses a pre-trained matching model to match the sentences with the content moderation rules, and filters out target sentences and corresponding target content moderation rules that meet preset matching requirements based on the matching results. The pre-trained matching model can be obtained by comparative learning training on a model built using a deep learning algorithm. Using a preset large language model, based on the target sentences and corresponding target content moderation rules, the content moderation result corresponding to the target text data is determined. Based on the content moderation result corresponding to the target text data, it is determined whether the target text data contains content security risks. In this way, firstly, sentence segmentation reduces the number of data processing units; secondly, using the pre-trained matching model to match the sentences with the content moderation rules to filter out target sentences and corresponding target content moderation rules can compress the matching range and reduce the amount of data processed by the large language model; finally, the large language model can better capture implicit semantics in the content, improving the efficiency and accuracy of content security risk review.
[0123] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.
[0124] In the 1990s, improvements to a technology could be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many methodological improvements today can be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that a methodological improvement cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must also be written in a specific programming language, called a Hardware Description Language (HDL). There are many HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, and RHDL (Ruby Hardware Description Language). Currently, the most commonly used are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0125] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0126] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0127] For ease of description, the above apparatus is described by dividing it into various functional units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in one or more software and / or hardware.
[0128] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0129] The embodiments described herein are illustrated with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable device to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable device, generate instructions for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0130] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0131] These computer program instructions may also be loaded onto a computer or other programmable device to cause a series of operational steps to be performed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable device for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0132] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0133] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0134] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information by any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0135] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such process, method, article, or apparatus. Without further limitations, the presence of additional identical elements in the process, method, article, or apparatus that includes said elements is not excluded.
[0136] It should also be noted that the terms "one," "an," and "the" do not specifically refer to the singular; they can also include the plural. Ordinal numbers such as "first," "second," etc., do not necessarily indicate order; often they are used to distinguish between objects. For example, "first server" and "second server" usually refer to two servers. To differentiate between these two servers, they are described as "first server" and "second server." Of course, sometimes these two servers may be the same server.
[0137] In this specification, unless explicitly stated otherwise, "receiving and sending data" does not necessarily mean direct receiving and sending; it can also mean indirect receiving and sending. For example, A receiving data sent by B can be understood as A directly receiving data sent by B, or it can be understood as A indirectly receiving data sent by B through other entities such as C. Similarly, B sending data to A can be understood as B sending data directly to A, or it can be understood as B indirectly sending data to A through other entities such as C. Here, C can be a single subject, or two or more subjects.
[0138] This specification uses specific terms to describe embodiments thereof. Terms such as "an embodiment," "one embodiment," and / or "some embodiments" refer to a particular feature, structure, or characteristic associated with at least one embodiment of this specification. Therefore, it should be emphasized and noted that references to "an embodiment," "one embodiment," or "an alternative embodiment" in different locations within this specification do not necessarily refer to the same embodiment. Furthermore, those skilled in the art can combine and integrate the different embodiments or examples described herein, as well as the features of those different embodiments or examples, without contradiction.
[0139] Although one or more embodiments of this specification provide method steps as described in the embodiments or flowcharts, it is understood that the order of steps listed in the embodiments or flowcharts is only one of many possible execution orders and does not represent the only execution order. Therefore, when the claims involve method steps, any changes or adjustments to the order of such steps, or the parallelism between steps, are also within the scope of protection of the claims.
[0140] It should be noted that the user data obtained in this manual is authorized by the user and does not involve user privacy.
[0141] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0142] One or more embodiments of this specification can be described in the general context of computer-executable instructions, such as program modules, that are executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. One or more embodiments of this specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0143] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0144] The above description is merely an embodiment of this specification and is not intended to limit this document. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A data detection method, comprising: The target text data to be detected and the content review rules are obtained, and the target text data is segmented into sentences to obtain multiple sentences; Using a pre-trained matching model, the sentence is matched with the content review rules, and based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. Using a pre-defined large language model, based on the target sentence and the corresponding target content review rules, the content review result corresponding to the target text data is determined; Based on the content review results corresponding to the target text data, determine whether the target text data poses a content security risk.
2. The method according to claim 1, wherein the step of using a pre-trained matching model to match the sentence with the content review rules, and selecting target sentences and corresponding target content review rules that meet the preset matching requirements based on the matching results, includes: Based on the semantic similarity between the sentence and each of the content review rules, multiple first content review rules corresponding to each sentence are selected. Using a pre-trained matching model, the sentence is matched with multiple corresponding first content review rules. Based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected.
3. The method according to claim 2, wherein filtering out multiple first content review rules corresponding to each sentence based on the semantic similarity between the sentence and each content review rule includes: Using a pre-trained extraction model, semantic feature extraction is performed on the sentence segment and the content review rule respectively to obtain the first semantic feature vector corresponding to the sentence segment and the second semantic feature vector corresponding to the content review rule; The content review rules are sorted based on the similarity between the first semantic feature vector and each of the second semantic vectors. Based on the sorted content review rules, multiple first content review rules corresponding to each of the clauses are selected.
4. The method according to claim 1, wherein the step of segmenting the target text data into multiple sentences includes: Based on the nesting relationship of symbols in the target text data, the target text data is segmented into sentences to obtain multiple first sentences; Based on the preset character segmentation range and the number of characters contained in each first clause, the first clause is adjusted to obtain multiple second clauses; The second clause is adjusted based on one or more of the following rules to obtain the multiple clauses: line break splitting rule, consecutive punctuation merging rule, and decimal point merging rule.
5. The method according to claim 1, wherein determining the content review result corresponding to the target text data based on the target sentence segmentation and the corresponding target content review rules using a preset large language model includes: Based on the target sentence and the corresponding target content review rules, a prompt message is constructed; Using the preset large language model and based on the prompt information, it is determined whether the target sentence matches the target content review rule, so as to determine the content review result corresponding to the target text data based on the judgment result.
6. The method according to claim 1, further comprising: If, based on the content review results corresponding to the target text data, it is determined that the target text data poses a content security risk, revision suggestion data for the target text data is generated based on the content review results. Based on the proposed revisions, the target text data is revised, and the revised target text data is published.
7. The method according to claim 1, wherein the step of using a pre-trained matching model to match the sentence with the content review rules, and selecting target sentences and corresponding target content review rules that meet the preset matching requirements based on the matching results, includes: Using the pre-trained matching model, the sentences are matched with the content review rules to obtain the matching degree between each sentence and each content review rule; Obtain the preset matching threshold corresponding to each content review rule, and determine the sentences with a matching degree greater than the preset matching threshold and their corresponding content review rules as the target sentences and their corresponding target content review rules that meet the preset matching requirements.
8. The method according to claim 1, further comprising, before performing the matching process between the sentence segment and the content review rules using a pre-trained matching model: Using a pre-trained generative model, positive and negative sample data corresponding to the content review rules are generated, wherein... The matching degree between the positive sample data and the content review rules is greater than the matching degree between the negative sample data and the content review rules; The matching model is trained by comparative learning using the positive sample data and the negative sample data to obtain the trained matching model.
9. A data detection device, comprising: The data acquisition module is used to acquire the target text data to be detected and the content review rules, and to perform sentence segmentation on the target text data to obtain multiple sentences; The data filtering module is used to match the sentences with the content review rules using a pre-trained matching model, and to filter out target sentences and corresponding target content review rules that meet the preset matching requirements based on the matching results. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. The result determination module is used to determine the content review result corresponding to the target text data based on the target sentence and the corresponding target content review rules using a preset large language model. The risk detection module is used to determine whether the target text data has any content security risks based on the content review results corresponding to the target text data.
10. A data detection device, the data detection device comprising: processor; as well as A memory configured to store computer-executable instructions, which, when executed, cause the processor to: The target text data to be detected and the content review rules are obtained, and the target text data is segmented into sentences to obtain multiple sentences; Using a pre-trained matching model, the sentence is matched with the content review rules, and based on the matching results, target sentences and corresponding target content review rules that meet the preset matching requirements are selected. The pre-trained matching model is obtained by comparative learning training on a model constructed by a deep learning algorithm. Using a pre-defined large language model, based on the target sentence and the corresponding target content review rules, the content review result corresponding to the target text data is determined; Based on the content review results corresponding to the target text data, determine whether the target text data poses a content security risk.