A content management method and device, electronic equipment and storage medium
By configuring policies on the management server and using the SDK for real-time management, the problem of unreasonable content management methods has been solved, and flexible, efficient and compliant content dissemination has been achieved.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- HANGZHOU NETEASE CLOUD MUSIC TECH CO LTD
- Filing Date
- 2022-09-30
- Publication Date
- 2026-06-09
AI Technical Summary
Existing technologies have unreasonable content control methods that cannot adapt to changes in compliance policies over time and upgrades in detection systems, resulting in detected content being unable to be controlled using the latest compliance policies and rules.
By configuring control policies on the management server and using the SDK to perform real-time control during content dissemination, different processing methods such as general, dynamic incremental and resource-based strategies are adopted. Combined with trie and rule expressions for precise matching, it is ensured that the content complies with the latest compliance policies during dissemination.
It achieves flexibility and efficiency in content control, enabling control anytime and anywhere based on the latest compliance policies, avoiding compliance issues of detected content, and improving the rationality and security of content dissemination.
Smart Images

Figure CN115587356B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of Internet technology, and in particular to a content control method, device, electronic device, and storage medium. Background Technology
[0002] Currently, content communities have evolved into user-generated content (UGC) formats. In the UGC format, users can freely produce and disseminate content within the community. Without effective content control measures, there will be significant compliance risks.
[0003] In related technologies, the control of community content mainly relies on anti-spam detection during content generation to identify user-generated content requiring control. Since anti-spam detection rules are limited to the configuration at the time of content generation, the control status of the corresponding content will not change once detection is complete. However, in reality, compliance policies may change over time, and detection systems may be upgraded, which can lead to the inability to use the latest compliance policies and rules to control content that has already been detected.
[0004] It is evident that existing technologies suffer from unreasonable content control methods. Summary of the Invention
[0005] This application provides a content control method, apparatus, electronic device, and storage medium to address the problem of unreasonable content control methods in the prior art.
[0006] In a first aspect, embodiments of this application provide a content management method applied to a management server, comprising:
[0007] Obtain each configured control policy, wherein the control policy includes at least control rules, policy type, control method, and control scenario;
[0008] The control rules are analyzed to obtain strategy data;
[0009] Based on the preprocessing method corresponding to the strategy type, the strategy data is preprocessed for distribution.
[0010] Based on the strategy type, determine the method for acquiring the strategy data;
[0011] The target parameters of the control strategy are sent to the software development kit (SDK) on the business side corresponding to the control scenario. The SDK then performs control processing on the target content sent from the business side based on the target parameters. The target parameters include at least the control method and the method of obtaining the strategy data.
[0012] In some embodiments, the policy data is preprocessed for distribution based on the preprocessing method corresponding to the policy type, including:
[0013] If the policy type is a general policy, then the policy data is cached, wherein the number of control scenarios for the general policy is greater than a set value;
[0014] If the strategy type is a dynamic incremental strategy, the correspondence between the identifier of the control strategy and the strategy data and the update time of the strategy data is stored in the distribution queue. The dynamic incremental strategy is applicable to customized business, and the size of the corresponding strategy data does not exceed a preset value.
[0015] If the policy type is a resource-based policy, the policy data is sent to the cloud for storage. Resource-based policies are applicable to customized businesses, and the size of the corresponding policy data exceeds the preset value.
[0016] In some embodiments, after storing the correspondence between the identifier of the control policy and the policy data and the update time of the policy data in the distribution queue, the method further includes:
[0017] Regularly perform control analysis on the aforementioned control rules to obtain the latest strategy data;
[0018] If it is determined that the latest policy data is different from the policy data in the distribution queue, then the policy data in the distribution queue is updated based on the latest policy data, and the update time in the distribution queue is also updated.
[0019] In some embodiments, determining the method for acquiring the policy data based on the policy type includes:
[0020] If the policy type is a general policy, then the application programming interface (API) call will be determined as the method for obtaining the policy data;
[0021] If the strategy type is a dynamic incremental strategy, the method for obtaining the strategy data will be determined periodically.
[0022] If the strategy type is a resource-based strategy, then cloud acquisition will be determined as the method for acquiring the strategy data.
[0023] In some embodiments, after obtaining each configured management policy, the method further includes:
[0024] The effectiveness of the control strategy is verified.
[0025] After determining that the control effect of the control strategy meets the preset requirements, the target parameters of the control strategy are sent to the SDK on the business side corresponding to the control scenario.
[0026] In some embodiments, the target parameter may further include the control rules.
[0027] Secondly, embodiments of this application provide a content control method applied to an SDK installed on the business side, comprising:
[0028] The system receives target parameters for various control strategies sent by the control server. Each control strategy's target parameters include at least a control method and a strategy data acquisition method. The target parameters are sent by the control server after preprocessing the strategy data of the control strategy based on the preprocessing method corresponding to the strategy type of the control strategy. The strategy data is obtained by the control server through control analysis of the control rules of the control strategy. The business processed by the business side matches the control scenario of the control strategy.
[0029] Based on the method of acquiring the strategy data, the strategy data of the control strategy is acquired;
[0030] Based on the control methods and policy data of each control strategy, the target content sent from the business side is controlled and processed.
[0031] In some embodiments, the strategy data of the control strategy is obtained based on the method of obtaining the strategy data, including:
[0032] If the acquisition method is an application programming interface (API) call, then the policy data of the management policy is obtained from the management server through the API call;
[0033] If the acquisition method is periodic acquisition, then the policy data of the management policy is periodically acquired based on the distribution queue corresponding to the business side in the management server;
[0034] If the acquisition method is cloud acquisition, then the policy data of the control strategy is acquired from the cloud.
[0035] In some embodiments, policy data of the management policy is periodically obtained based on the distribution queue corresponding to the service side in the management server, including:
[0036] Periodically retrieve the update time of the policy data in the distribution queue;
[0037] If the update time is different from the time when policy data was last obtained from the distribution queue, then the latest policy data is obtained from the distribution queue.
[0038] In some embodiments, the method further includes:
[0039] In response to the control method selection operation, determine the set of control methods enabled on the service side;
[0040] Based on the control methods and policy data of each control strategy, the target content sent from the service side is subject to control processing, including:
[0041] Select the target control strategy whose control method is located in the set of control methods from among the control strategies;
[0042] Based on the control methods and strategy data of each target control strategy, the target content is controlled and processed.
[0043] In some embodiments, the target parameters of each control strategy further include the control rules of the control strategy. Based on the control methods and strategy data of each control strategy, control processing is performed on the target content sent from the service side, including:
[0044] The target content is compared with a saved trie to determine at least two policy data that match the target content in the trie, wherein the trie is pre-built based on policy data of multiple control policies;
[0045] Obtain the control rules corresponding to the at least two policy data sets, determine the same control rules corresponding to the at least two policy data sets, and determine the policy data corresponding to the same control rules as the first policy dataset;
[0046] The at least two policy data sets are combined to obtain a second policy dataset;
[0047] If it is determined that the second strategy dataset is the same as the first strategy dataset, then the target content is controlled and processed based on the control method corresponding to the same control rule.
[0048] In some embodiments, the target parameters of each control strategy further include the control rules of the control strategy. Based on the control methods and strategy data of each control strategy, control processing is performed on the target content sent from the service side, including:
[0049] Using the rule expression corresponding to any control strategy, the target content and the strategy data are matched. If it is determined that the target content matches the strategy data, the target content is controlled according to the control method of the control strategy. The rule expression is predetermined based on the control rules of the control strategy; or
[0050] If it is determined that the target content is located in the policy data of any control strategy, then the target content is controlled and processed according to the control method of the control strategy; or
[0051] The target content is compared with the saved trie. If the target content matches the policy data in the trie, the target content is controlled based on the control method corresponding to the policy data. The trie is pre-built based on policy data of multiple control policies.
[0052] Thirdly, embodiments of this application provide a content management device applied to a management server, comprising:
[0053] The acquisition module is used to acquire each configured control policy, wherein the control policy includes at least control rules, policy type, control method and control scenario;
[0054] The analysis module is used to perform control analysis on the control rules to obtain strategy data;
[0055] The preprocessing module is used to preprocess the policy data based on the preprocessing method corresponding to the policy type.
[0056] The determination module is used to determine the method of obtaining the strategy data based on the strategy type;
[0057] The sending module is used to send the target parameters of the control strategy to the software development kit (SDK) on the business side corresponding to the control scenario. The SDK then performs control processing on the target content sent from the business side based on the target parameters. The target parameters include at least the control method and the method of obtaining the strategy data.
[0058] In some embodiments, the preprocessing module is specifically used for:
[0059] If the policy type is a general policy, then the policy data is cached, wherein the number of control scenarios for the general policy is greater than a set value;
[0060] If the strategy type is a dynamic incremental strategy, the correspondence between the identifier of the control strategy and the strategy data and the update time of the strategy data is stored in the distribution queue. The dynamic incremental strategy is applicable to customized business, and the size of the corresponding strategy data does not exceed a preset value.
[0061] If the policy type is a resource-based policy, the policy data is sent to the cloud for storage. Resource-based policies are applicable to customized businesses, and the size of the corresponding policy data exceeds the preset value.
[0062] In some embodiments, an update module is also included, for:
[0063] After storing the correspondence between the identifier of the control policy and the policy data and the update time of the policy data in the distribution queue, the control rules are periodically analyzed to obtain the latest policy data.
[0064] If it is determined that the latest policy data is different from the policy data in the distribution queue, then the policy data in the distribution queue is updated based on the latest policy data, and the update time in the distribution queue is also updated.
[0065] In some embodiments, the determining module is specifically used for:
[0066] If the policy type is a general policy, then the application programming interface (API) call will be determined as the method for obtaining the policy data;
[0067] If the strategy type is a dynamic incremental strategy, the method for obtaining the strategy data will be determined periodically.
[0068] If the strategy type is a resource-based strategy, then cloud acquisition will be determined as the method for acquiring the strategy data.
[0069] In some embodiments, it also includes:
[0070] The verification module is used to verify the control effect of each configured control strategy after obtaining it.
[0071] The sending module is used to send the target parameters of the control strategy to the SDK on the business side corresponding to the control scenario after determining that the control effect of the control strategy has reached the preset requirements.
[0072] In some embodiments, the target parameter may further include the control rules.
[0073] Fourthly, embodiments of this application provide a content management device applied to an SDK installed on the business side, comprising:
[0074] The receiving module is used to receive target parameters of various control strategies sent by the control server. Each control strategy target parameter includes at least a control method and a method for obtaining strategy data. The target parameters are sent by the control server after preprocessing the strategy data of the control strategy based on the preprocessing method corresponding to the strategy type of the control strategy. The strategy data is obtained by the control server through control analysis of the control rules of the control strategy. The business processed by the business side matches the control scenario of the control strategy.
[0075] The acquisition module is used to acquire the policy data of the control policy based on the acquisition method of the policy data;
[0076] The control module is used to control and process the target content sent from the business side based on the control methods and policy data of each control strategy.
[0077] In some embodiments, the acquisition module is specifically used for:
[0078] If the acquisition method is an application programming interface (API) call, then the policy data of the management policy is obtained from the management server through the API call;
[0079] If the acquisition method is periodic acquisition, then the policy data of the management policy is periodically acquired based on the distribution queue corresponding to the business side in the management server;
[0080] If the acquisition method is cloud acquisition, then the policy data of the control strategy is acquired from the cloud.
[0081] In some embodiments, the acquisition module is specifically used for:
[0082] Periodically retrieve the update time of the policy data in the distribution queue;
[0083] If the update time is different from the time when policy data was last obtained from the distribution queue, then the latest policy data is obtained from the distribution queue.
[0084] In some embodiments, it also includes:
[0085] The selection module is used to determine the set of control methods enabled on the business side in response to the control method selection operation;
[0086] The control module is specifically used to select a target control strategy whose control method is located in the set of control methods from various control strategies; and to perform control processing on the target content based on the control method and strategy data of each target control strategy.
[0087] In some embodiments, the target parameters of each control strategy further include the control rules of the control strategy, and the control module is specifically used for:
[0088] The target content is compared with a saved trie to determine at least two policy data that match the target content in the trie, wherein the trie is pre-built based on policy data of multiple control policies;
[0089] Obtain the control rules corresponding to the at least two policy data sets, determine the same control rules corresponding to the at least two policy data sets, and determine the policy data corresponding to the same control rules as the first policy dataset;
[0090] The at least two policy data sets are combined to obtain a second policy dataset;
[0091] If it is determined that the second strategy dataset is the same as the first strategy dataset, then the target content is controlled and processed based on the control method corresponding to the same control rule.
[0092] In some embodiments, the target parameters of each control strategy further include the control rules of the control strategy, and the control module is specifically used for:
[0093] Using the rule expression corresponding to any control strategy, the target content and the strategy data are matched. If it is determined that the target content matches the strategy data, the target content is controlled according to the control method of the control strategy. The rule expression is predetermined based on the control rules of the control strategy; or
[0094] If it is determined that the target content is located in the policy data of any control strategy, then the target content is controlled and processed according to the control method of the control strategy; or
[0095] The target content is compared with the saved trie. If the target content matches the policy data in the trie, the target content is controlled based on the control method corresponding to the policy data. The trie is pre-built based on policy data of multiple control policies.
[0096] Fifthly, embodiments of this application provide an electronic device, including: at least one processor, and a memory communicatively connected to the at least one processor, wherein:
[0097] The memory stores a computer program that can be executed by at least one processor, which enables the at least one processor to perform the content control method described above.
[0098] Sixthly, embodiments of this application provide a storage medium in which the electronic device can execute the above-described content control method when a computer program in the storage medium is executed by a processor of an electronic device.
[0099] In this embodiment, the management server acquires each configured management policy. Each management policy includes at least management rules, policy type, management method, and management scenario. It performs management analysis on the management rules to obtain policy data. Based on the preprocessing method corresponding to the policy type, it performs preprocessing for the policy data. Based on the policy type, it determines the acquisition method of the policy data and sends the target parameters of the management policy to the SDK on the business side corresponding to the management scenario. The SDK then manages the target content sent from the business side based on the target parameters, where the target parameters include at least the management method and the acquisition method of the policy data. This approach delegates content management permissions to the SDK on the business side, which is closer to the content exit point. The SDK can manage content anytime and anywhere during content dissemination, avoiding the problem of previously detected content failing to be detected using the latest compliance policies and rules. This makes the content management method more reasonable. Attached Figure Description
[0100] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings:
[0101] Figure 1 This is a schematic diagram illustrating an application scenario of a content control method provided in an embodiment of this application;
[0102] Figure 2 This application provides an overall flowchart of content control as an embodiment of the present application;
[0103] Figure 3 This application provides an overall flowchart for policy configuration and deployment on a management server.
[0104] Figure 4 A schematic diagram illustrating a method for a business-side SDK to obtain control data, provided in an embodiment of this application;
[0105] Figure 5 A schematic diagram illustrating the near-end matching capability of a business-side SDK provided in an embodiment of this application;
[0106] Figure 6 A schematic diagram of a trie provided for an embodiment of this application;
[0107] Figure 7 A schematic diagram of yet another trie provided in an embodiment of this application;
[0108] Figure 8 A flowchart illustrating a content control method provided in this application embodiment;
[0109] Figure 9 A flowchart illustrating yet another content control method provided in this application embodiment;
[0110] Figure 10 This is a schematic diagram of the structure of a content control device provided in an embodiment of this application;
[0111] Figure 11 A schematic diagram of the structure of another content control device provided in the embodiments of this application;
[0112] Figure 12 This is a schematic diagram of the hardware structure of an electronic device for implementing a content control method, provided as an embodiment of this application. Detailed Implementation
[0113] To address the problem of unreasonable content control methods in existing technologies, embodiments of this application provide a content control method, apparatus, electronic device, and storage medium.
[0114] The preferred embodiments of this application are described below with reference to the accompanying drawings. It should be understood that the preferred embodiments described herein are for illustration and explanation only and are not intended to limit this application. Furthermore, the embodiments and features in the embodiments of this application can be combined with each other without conflict.
[0115] For ease of understanding, the technical terms used in this application are as follows:
[0116] User-generated content (UGC) refers to content on websites or other open media that is generated by the contributions of their users.
[0117] Reading scenarios refer to business scenarios where users request content from a website and read it.
[0118] A Software Development Kit (SDK) is a set of files that provide an application programming interface for a specific programming language.
[0119] Resource: Resource data, in the case of a music application, can refer to songs, users, etc.; in the case of a video application, it can refer to videos, users, etc. In other words, resource data is different in different applications.
[0120] A trie is an ordered tree used to store associative arrays. The node data in a trie is usually a string.
[0121] Control strategies include control rules, strategy types, control methods, and control scenarios. Control rules describe which data needs to be controlled. Control analysis of control rules yields strategy data. For example, if the control rule is to control inappropriate comments under song A, then the strategy data could be song A and inappropriate comments targeting song A. Strategy types include general strategies (the number of control scenarios exceeds a set value), dynamic incremental strategies (applicable to customized businesses, and the size of the corresponding strategy data does not exceed a preset value), and resource-based strategies (applicable to customized businesses, and the size of the corresponding strategy data exceeds a preset value). Control methods include blocking and deletion. Control scenarios include search scenarios, comment scenarios, recommendation scenarios, and user login scenarios.
[0122] On the business side, this can be represented as microservices, with different business units deployed on the same server or on different servers. Different business units typically correspond to different management scenarios, such as search, commenting, and user login scenarios.
[0123] In related technologies, once content is detected, its control status remains unchanged. However, compliance policies may change over time, and detection systems may be upgraded, leading to the inability to control detected content using the latest compliance policies and rules. Therefore, this application proposes a content security control solution for reading scenarios. Starting from the user's reading scenario, it addresses the control of diverse user-generated content in diverse communities through a near-end control model and precise blocking strategies.
[0124] Specifically, for user reading scenarios, the management policy is first configured in the management server, and then the data required for management, such as management methods and policy data, is provided to the specific business side through SDK embedding. The SDK in the business side then manages and processes the content.
[0125] Figure 1 This illustration shows an application scenario of a content control method provided in this application, including a control server and multiple SDKs on the business side. Generally, each SDK corresponds to a control scenario, such as search, comment, recommendation, and user login scenarios. Each SDK has multiple functions: resource ID and title blocking, content keyword matching, user freezing / mute, and comment blocking.
[0126] The content control process consists of the following three steps:
[0127] 1. The management server grants external access to configure management policies, allowing technical personnel to configure various policies. For each configured policy, the management server can first verify its effectiveness (i.e., feasibility). Verification methods include hiding or replacing resources, filtering sensitive words using a dictionary tree, and filtering multiple substrings of sensitive words. Specific verification processing can be implemented using the local SDK. After confirming that the management policy's effectiveness meets preset requirements, the management data and methods are then distributed to the embedded SDK on the business side that matches the management scenario of the policy.
[0128] 2. Technical personnel can configure functions based on the actual management and control scenarios of each business side, enable the management and control capabilities required by the SDK on the business side, and pull and load management and control data to prepare for subsequent content management and control.
[0129] 3. User near-end read scenario control strategy execution. When any business side sends content in the corresponding scenario outward, the local SDK is called to use the loaded control data to control and process the content, and compliant content is then disseminated and displayed.
[0130] See Figure 2 , Figure 2 The overall content control process is illustrated. First, control policies are configured on the control server. Then, the control server verifies the feasibility of the control policies. After successful verification, the control policy data is distributed to the corresponding business-side SDK. The business-side SDK loads the policy data. Subsequently, when a client requests content from the business side, the business-side SDK performs control processing on the content based on the loaded policy data and sends compliant content to the client.
[0131] The three steps described above will be explained in detail below.
[0132] 1. Diverse configuration and deployment of server security policies.
[0133] Figure 3 The flowchart illustrates the overall process of policy configuration and deployment on the management server in a read scenario, including:
[0134] 1.1 Configuration of control strategy.
[0135] In other words, it involves configuring content control strategies for reading scenarios. These strategies are quite diverse, including search resource blocking, search term association blocking, recommended resource blocking, and hiding resource comment entry points. The matching methods for these strategies are also varied, such as exact matching, inclusion matching, and substring matching.
[0136] 1.2 Feasibility verification.
[0137] Suppose a certain control strategy is to block search terms associated with each other, the strategy data is sensitive words A, B, C, and D, the matching method is inclusion matching, and the control method is invisible. Then, a portion of the search logs from the previous day can be randomly retrieved, the control strategy can be run through a big data platform, and the results can be output. If all search log data with inclusion matching for sensitive words A, B, and C are included in the hit results, then the control strategy is effective, i.e., the feasibility verification is passed; otherwise, the control strategy is ineffective, i.e., the feasibility verification is failed.
[0138] 1.3 Strategy Assembly.
[0139] Data assembly is performed on the verified and feasible control strategies. The assembly includes the control strategies, the strategy data of the management strategies, and the strategy attributes of the management strategies, such as the scope of control and the validity period of control. The strategy attributes can be specified or selected by technical personnel when configuring the control strategies.
[0140] In addition, considering that in some cases strategy data such as songs and comments may reach hundreds of thousands or even millions, the attribute names of strategy data can be identified by single letters such as m, n, o, p, etc. In this way, the size of the assembled content can be reduced as much as possible, and the data transmission pressure can be reduced.
[0141] 1.4 Preprocessing of strategy data distribution.
[0142] The preprocessing of policy data distribution includes the following three types:
[0143] The policy data for general control strategies are usually general data such as sensitive words or lists. This type of data is relatively large and can be used in multiple control scenarios. It is suitable to be centrally cached in the control server as basic policy data for the business side SDK to call and use.
[0144] Dynamic incremental control strategies typically involve customized control requirements or time-sensitive responses, and their data changes over time (e.g., songs by problematic artists). For each dynamic incremental control strategy, a mapping between the strategy's identifier ID, the strategy data, and its update time can be added to the distribution queue. The business-side SDK then retrieves the latest data from the distribution queue based on the last fetch time.
[0145] Resource management policies typically involve customized existing data or large batches of data added at once, resulting in a large data distribution volume. For example, managing hundreds of thousands of resource data entries at once could lead to significant backlog and congestion if a distribution queue is used. Therefore, in such cases, the policy data can be written to a temporary file on the management server's local machine, and then the temporary file can be uploaded to the cloud. After the upload is complete, the local temporary file can be deleted.
[0146] 2. Acquisition of strategy data in user near-end read scenarios.
[0147] Accordingly, see Figure 4 There are three ways for the business-side SDK to obtain management data:
[0148] The policy data for general management strategies is usually routine data, which is obtained through API calls and then used in policy rule calculations within the SDK.
[0149] The policy data for dynamic incremental control strategies is generally dynamic data, which can be periodically pulled from the distribution queue and loaded locally. Each pull records the pull time node, and when the next scheduled task is triggered, new data will be retrieved from the distribution queue based on the last pull time node. Furthermore, different types of policy data have different loading methods. For example, lists (playlists, user lists, etc.) are stored in a hash map (HashMap) or bitmap, while sensitive words often need to be stored in a constructed trie.
[0150] The policy data for resource management strategies is generally in large quantities and can be pulled from the cloud to the local machine and loaded.
[0151] 3. How the user's near-end read scenario control strategy works.
[0152] See Figure 5 , Figure 5 The SDK provides near-end matching capabilities for the business side, including: Map matching, trie matching, multi-substring matching, and regular expression matching.
[0153] The following sections will introduce these matching methods in detail.
[0154] The control data matched by Map matching is generally stored in the Map-GET method, which is the traditional Key-Value storage method. The key is the list value, such as "10016", and the value is the control policy information carried by the list value, which is generally a JSON string, such as "{type:hidden,expireTime:1650020400000}". This means that if the resource ID of the content to be sent by the business side is 10016, then this content needs to be hidden, and the expiration time stamp of this policy data is 1650020400000.
[0155] Compared to the simple storage and matching of a Map, a Trie is more complex. See also Figure 6A trie (or trie) is an ordered tree used to store associative arrays, where the keys are typically strings. Unlike binary trees, keys are not directly stored in the nodes; instead, they are determined by the node's position in the tree. All descendants of a node share a common prefix, and the string corresponding to that node is formed by the sequential characters from the root node to the current node. The root node corresponds to an empty string. Generally, not all nodes have corresponding values; only the keys of leaf nodes and some internal nodes have associated values.
[0156] The keys in a trie are usually strings, but can also be other structures. Tries can be easily modified to handle ordered sequences of other structures, such as a sequence of numbers or a shape.
[0157] Basic properties of a trie:
[0158] 1. The root node does not contain any characters, and each node except the root node contains only one character.
[0159] 2. From the root node to a certain node, the characters along the path can be concatenated to form the string corresponding to that node.
[0160] 3. All child nodes of each node contain different strings.
[0161] For example, in Figure 6 In the trie shown, (1) corresponds to the string ABC, (2) corresponds to the string ABCF, (3) corresponds to the string ABCDG, (4) corresponds to the string ABCDH, (5) corresponds to the string ABEI, (6) corresponds to the string ABEJ, (7) corresponds to the string B, (8) corresponds to the string BE, (9) corresponds to the string BEFH, (10) corresponds to the string BEFG, (11) corresponds to the string BEG, (12) corresponds to the string BCDF, and (13) corresponds to the string BCDH.
[0162] In this embodiment, based on the trie matching method, all sensitive words loaded at once are constructed into a trie with an empty root node. Sensitive words are split according to characters, and then nodes are filled in from top to bottom according to the trie. Same characters are placed in the same node, while different characters are branched out into leaf nodes. Subsequently, during matching, the matching text traverses the trie from top to bottom, determining whether a complete path from a root node to a leaf node can be traversed, thereby finding whether a certain content contains the corresponding sensitive word.
[0163] Multi-sub-word matching and filtering.
[0164] For more complex matching logic, such as multi-substring matching, assuming the sensitive words are 'a' and 'b', we need 'a%b' to match string 's'. The condition for a match to succeed is that 's' contains both 'a' and 'b' (i.e., the order of 'a' and 'b' is not considered, and '%' is the substring separator). Based on the trie principle, it's impossible to directly handle unordered multi-substring cases; further filtering and calculations are needed on the trie's matching results.
[0165] The embodiments of this application adopt a word splitting + recovery method. That is, when the sensitive word policy of a%b is configured, the policy is split into two sensitive words, a and b, and a dictionary tree is constructed. The key point is that the control rules for word splitting need to be carried on the dictionary tree nodes for recovery after matching.
[0166] See Figure 7 Assuming the content to be controlled is: afrbxy, then, in Figure 7 In the trie, nodes a[a%b, c%a] and b[a%b] can be matched. Then, recovery is performed, that is, the control rules on the matched nodes are extracted to obtain a%b and c%a, and the matched nodes are recovered and compared. It can be seen that only a%b satisfies the recovery and hit, while c%a lacks the match of c. In practical applications, the characters contained in the words represented by a or b may be more complex, and there are more combinations. This mechanism realizes the matching capability of multiple substrings with unordered inclusion.
[0167] It should be noted that, Figure 7 It is a simplified trie, omitting the intermediate nodes from the Root to each node.
[0168] In addition, some strategies are determined by rule expressions, such as "(os==android)&&appVersion>=8.7.41". Such expressions are strong rules that do not depend on policy data. They indicate that the operating system is Android and the version is greater than or equal to 8.7.41. If this condition is met, the corresponding control method will be executed.
[0169] This application proposes a content security management solution for content community reading scenarios. By distributing management policies to the business side via a near-end SDK, the business side does not need to concern itself with the detection logic during content filtering. After a single connection with the management server, subsequent complex policies, including those related to sensitive words, associations, and inclusion, are proactively distributed and encapsulated, reducing intrusion into business logic. This also makes diverse and precise management methods more flexible and efficient, allowing for immediate intervention and impact on the user end. It also solves the problem of expired content data detection results due to changes in compliance policies or system upgrades over time. Furthermore, the matching pattern based on management policies and a trie ensures that the business side maintains extremely high management performance and stability even with large volumes of content read.
[0170] The following describes the solution of the embodiments of this application with reference to the flowchart.
[0171] Figure 8 A flowchart of a content management method provided in an embodiment of this application is shown. The method is applied to a management server and includes the following steps.
[0172] In step 801, each configured control policy is obtained. The control policy includes at least control rules, policy type, control method, and control scenario.
[0173] In step 802, the control rules are analyzed to obtain strategy data.
[0174] Generally, the strategy data differs depending on the management strategy. For example, a strategy to control sensitive words typically uses sensitive words as its data, while a strategy to control resources typically uses resources as its data.
[0175] In step 803, the policy data is preprocessed based on the preprocessing method corresponding to the policy type.
[0176] In practice, if the policy type is a general policy, the policy data can be cached; if the policy type is a dynamic incremental policy, the correspondence between the management policy identifier and the policy data, and the update time of the policy data can be saved in the distribution queue; if the policy type is a resource policy, the policy data can be sent to the cloud for storage. Among these, the number of management scenarios for general policies is greater than the set value, dynamic incremental policies are suitable for customized businesses, and the size of the corresponding policy data does not exceed the preset value, and resource policies are suitable for customized businesses, and the size of the corresponding policy data exceeds the preset value.
[0177] In addition, when the strategy type is a dynamic incremental strategy, after storing the correspondence between the identifier of the control strategy and the strategy data and the update time of the strategy data in the distribution queue, the control rules can be periodically analyzed to obtain the latest strategy data. If it is determined that the latest strategy data is different from the strategy data in the distribution queue, the strategy data in the distribution queue can be updated based on the latest strategy data, and the update time in the distribution queue can also be updated.
[0178] In step 804, the method for obtaining policy data is determined based on the policy type.
[0179] For example, if the policy type is a general policy, API calls can be used to obtain policy data; if the policy type is a dynamic incremental policy, periodic retrieval can be used to obtain policy data; and if the policy type is a resource policy, cloud retrieval can be used to obtain policy data.
[0180] In step 805, the target parameters of the control strategy are sent to the SDK on the business side corresponding to the control scenario. The SDK then performs control processing on the target content sent from the business side based on the target parameters. The target parameters include at least the control method and the method of obtaining the strategy data.
[0181] In addition, to ensure the effectiveness of the issued control policies, after obtaining each configured control policy, the control effect of the control policy can be verified. After confirming that the control effect of the control policy meets the preset requirements, the target parameters of the control policy are sent to the SDK in the business side corresponding to the control scenario.
[0182] In some embodiments, the target parameters of the control strategy may further include control rules, strategy type, control scenario, control level, control period, and control scope. Specifically, control rules are used by the business-side SDK when performing multi-substring matching; strategy type is used by the business-side SDK when storing strategy data, meaning different strategy types use different storage methods for their corresponding strategy data; control scenario is used by the business side to configure the strategy based on the actual control scenario to enable the required control capabilities of the SDK; control level is used by the business-side SDK to control content according to the control level of at least two control rules when it determines that certain content triggers such rules; control period indicates the validity period of the business-side SDK's control; and control scope indicates which scenarios the business-side SDK controls.
[0183] Figure 9 A flowchart of another content control method provided in this application embodiment, the method being applied to an SDK installed on the business side, including the following steps.
[0184] In step 901, the target parameters of various control strategies sent by the control server are received. The target parameters of each control strategy include at least the control method and the method of obtaining the strategy data.
[0185] Among them, the target parameter is sent by the management server after preprocessing the policy data of the management policy based on the policy type of the management policy. The policy data is obtained by the management server through management analysis of the management rules of the management policy. The business processed by the business side matches the management scenario of the management policy.
[0186] In step 902, the policy data of the control policy is obtained based on the method of obtaining policy data.
[0187] For example, when the acquisition method is an application programming interface (API) call, the policy data of the management policy is obtained from the management server through the API call.
[0188] For example, when the acquisition method is periodic acquisition, the management policy data is periodically retrieved based on the distribution queue corresponding to the business side in the management server. Specifically, the update time of the policy data in the distribution queue is periodically retrieved. If the update time is different from the time when the policy data was last retrieved from the distribution queue, the latest policy data is retrieved from the distribution queue.
[0189] For example, when the acquisition method is cloud acquisition, the policy data of the control policy is obtained from the cloud.
[0190] In step 903, in response to the control mode selection operation, the set of control modes enabled on the business side is determined.
[0191] In other words, technical personnel can freely choose the SDK's control capabilities on the business side, which makes the SDK's control capabilities more compatible with the business side's business and the control more precise.
[0192] In step 904, the target control strategy whose control method is located in the control method set is selected from the control strategies.
[0193] In step 905, the target content is processed for control based on the control methods and strategy data of each target control strategy.
[0194] In some embodiments, when the control rules for a target control policy contain multiple strings, the target content can be controlled and processed according to the following steps.
[0195] The first step is to compare the target content with the saved trie to determine at least two policy data that match the target content in the trie. The trie is pre-built based on policy data of various control policies.
[0196] Assuming multiple control strategies are used to control sensitive words, meaning that the strategy data for each strategy is also sensitive words, different strategy data will correspond to the same control rules. However, since the strategy data of different control strategies may overlap, the same strategy data may also correspond to different control rules. Therefore, the constructed trie can store not only each strategy data but also the corresponding control rules.
[0197] The second step is to obtain the control rules corresponding to these at least two policy data sets, determine the same control rules corresponding to these at least two policy data sets, and determine the policy data corresponding to the same control rules as the first policy dataset.
[0198] Multi-substring matching refers to the case of matching multiple policy data. The same control rule corresponding to at least two policy data is the control rule that can control these two policy data at the same time. The policy data corresponding to the same control rule is determined as the first policy dataset.
[0199] The third step is to combine these at least two policy data sets to obtain the second policy dataset.
[0200] That is, these at least two policy data sets are used as the second policy dataset.
[0201] Fourth step: If it is determined that the second strategy dataset is the same as the first strategy dataset, then the target content is controlled and processed based on the control method corresponding to the same control rule.
[0202] When the second policy dataset is the same as the first policy dataset, it means that the same control rule only controls at least two policy datasets simultaneously. Therefore, the target content can be controlled based on the control method corresponding to the same control rule. However, when the second policy dataset is different from the first policy dataset, such as if the first policy dataset contains other policy datasets, it means that at least two policy datasets and other policy datasets must be matched simultaneously for it to match the same control rule. Therefore, the target content cannot be controlled based on the control method corresponding to the same control rule.
[0203] In some embodiments, rule expressions can be used to manage and control target content.
[0204] For example, using the rule expression corresponding to any control strategy, the target content and strategy data are matched. If it is determined that the target content matches the strategy data, the target content is controlled according to the control method of the control strategy. Here, the rule expression is predetermined based on the control rules of the control strategy.
[0205] In some embodiments, the MAP-GET method can be used to manage and control the target content. Specifically, if it is determined that the target content is located in the policy data of any management policy, then the target content is managed and controlled according to the management method of the management policy.
[0206] In some embodiments, when the control rules for a target control policy contain a single string, a trie can be used to directly control the target content. Specifically, the target content is compared with the stored trie. If it is determined that the target content matches the policy data in the trie, the target content is controlled based on the control method corresponding to the policy data. The trie is pre-built based on policy data of multiple control policies.
[0207] When the method provided in the embodiments of this application is implemented in software, hardware, or a combination of software and hardware, the electronic device may include multiple functional modules, and each functional module may include software, hardware, or a combination thereof.
[0208] Based on the same technical concept, this application also provides two content control devices. The principle of each content control device in solving the problem is similar to the corresponding content control method described above. Therefore, the implementation of each content control device can refer to the implementation of the corresponding content control method, and the repeated parts will not be described again.
[0209] Figure 10 This is a schematic diagram of the structure of a content control device provided in an embodiment of this application, including...
[0210] The acquisition module 1001 is used to acquire each configured control policy, wherein the control policy includes at least control rules, policy type, control method and control scenario;
[0211] Analysis module 1002 is used to perform control analysis on the control rules to obtain strategy data;
[0212] The preprocessing module 1003 is used to preprocess the policy data based on the preprocessing method corresponding to the policy type.
[0213] The determining module 1004 is used to determine the acquisition method of the strategy data based on the strategy type;
[0214] The sending module 1005 is used to send the target parameters of the control strategy to the software development kit (SDK) on the business side corresponding to the control scenario. The SDK then performs control processing on the target content sent from the business side based on the target parameters. The target parameters include at least the control method and the method of obtaining the strategy data.
[0215] In some embodiments, the preprocessing module 1003 is specifically used for:
[0216] If the policy type is a general policy, then the policy data is cached, wherein the number of control scenarios for the general policy is greater than a set value;
[0217] If the strategy type is a dynamic incremental strategy, the correspondence between the identifier of the control strategy and the strategy data and the update time of the strategy data is stored in the distribution queue. The dynamic incremental strategy is applicable to customized business, and the size of the corresponding strategy data does not exceed a preset value.
[0218] If the policy type is a resource-based policy, the policy data is sent to the cloud for storage. Resource-based policies are applicable to customized businesses, and the size of the corresponding policy data exceeds the preset value.
[0219] In some embodiments, an update module 1006 is further included, for:
[0220] After storing the correspondence between the identifier of the control policy and the policy data and the update time of the policy data in the distribution queue, the control rules are periodically analyzed to obtain the latest policy data.
[0221] If it is determined that the latest policy data is different from the policy data in the distribution queue, then the policy data in the distribution queue is updated based on the latest policy data, and the update time in the distribution queue is also updated.
[0222] In some embodiments, the determining module 1004 is specifically used for:
[0223] If the policy type is a general policy, then the application programming interface (API) call will be determined as the method for obtaining the policy data;
[0224] If the strategy type is a dynamic incremental strategy, the method for obtaining the strategy data will be determined periodically.
[0225] If the strategy type is a resource-based strategy, then cloud acquisition will be determined as the method for acquiring the strategy data.
[0226] In some embodiments, it also includes:
[0227] The verification module 1007 is used to verify the control effect of each configured control strategy after obtaining it.
[0228] The sending module 1005 is used to send the target parameters of the control strategy to the SDK on the business side corresponding to the control scenario after determining that the control effect of the control strategy has reached the preset requirements.
[0229] In some embodiments, the target parameter may further include the control rules.
[0230] Figure 11 A schematic diagram of another content control device provided in this application embodiment, including...
[0231] The receiving module 1101 is used to receive target parameters of various control strategies sent by the control server. The target parameters of each control strategy include at least the control method and the method of obtaining the strategy data. The target parameters are sent by the control server after preprocessing the strategy data of the control strategy based on the preprocessing method corresponding to the strategy type of the control strategy. The strategy data is obtained by the control server through control analysis of the control rules of the control strategy. The business processed by the business side matches the control scenario of the control strategy.
[0232] The acquisition module 1102 is used to acquire the strategy data of the control strategy based on the acquisition method of the strategy data;
[0233] The control module 1103 is used to control and process the target content sent from the service side based on the control methods and policy data of each control strategy.
[0234] In some embodiments, the acquisition module 1102 is specifically used for:
[0235] If the acquisition method is an application programming interface (API) call, then the policy data of the management policy is obtained from the management server through the API call;
[0236] If the acquisition method is periodic acquisition, then the policy data of the management policy is periodically acquired based on the distribution queue corresponding to the business side in the management server;
[0237] If the acquisition method is cloud acquisition, then the policy data of the control strategy is acquired from the cloud.
[0238] In some embodiments, the acquisition module 1102 is specifically used for:
[0239] Periodically retrieve the update time of the policy data in the distribution queue;
[0240] If the update time is different from the time when policy data was last obtained from the distribution queue, then the latest policy data is obtained from the distribution queue.
[0241] In some embodiments, it also includes:
[0242] The selection module 1104 is used to determine the set of control methods enabled on the service side in response to the control method selection operation;
[0243] The control module 1103 is specifically used to select a target control strategy whose control method is located in the set of control methods from various control strategies; and to perform control processing on the target content based on the control method and strategy data of each target control strategy.
[0244] In some embodiments, the target parameters of each control strategy further include the control rules of the control strategy, and the control module 1103 is specifically used for:
[0245] The target content is compared with a saved trie to determine at least two policy data that match the target content in the trie, wherein the trie is pre-built based on policy data of multiple control policies;
[0246] Obtain the control rules corresponding to the at least two policy data sets, determine the same control rules corresponding to the at least two policy data sets, and determine the policy data corresponding to the same control rules as the first policy dataset;
[0247] The at least two policy data sets are combined to obtain a second policy dataset;
[0248] If it is determined that the second strategy dataset is the same as the first strategy dataset, then the target content is controlled and processed based on the control method corresponding to the same control rule.
[0249] In some embodiments, the target parameters of each control strategy further include the control rules of the control strategy, and the control module 1103 is specifically used for:
[0250] Using the rule expression corresponding to any control strategy, the target content and the strategy data are matched. If it is determined that the target content matches the strategy data, the target content is controlled according to the control method of the control strategy. The rule expression is predetermined based on the control rules of the control strategy; or
[0251] If it is determined that the target content is located in the policy data of any control strategy, then the target content is controlled and processed according to the control method of the control strategy; or
[0252] The target content is compared with the saved trie. If the target content matches the policy data in the trie, the target content is controlled based on the control method corresponding to the policy data. The trie is pre-built based on policy data of multiple control policies.
[0253] The module division in this application embodiment is illustrative and only represents one logical functional division. In actual implementation, other division methods are possible. Furthermore, the functional modules in each embodiment of this application can be integrated into a single processor, exist as separate physical entities, or be integrated into a single module. Coupling between modules can be achieved through interfaces, typically electrical communication interfaces, but mechanical interfaces or other types of interfaces are also possible. Therefore, modules described as separate components may or may not be physically separate; they can be located in one place or distributed across different locations on the same or different devices. The integrated modules described above can be implemented in hardware or as software functional modules.
[0254] Having introduced the content control method and apparatus according to exemplary embodiments of this application, we will now introduce an electronic device according to another exemplary embodiment of this application.
[0255] The following reference Figure 12 To describe an electronic device 130 implemented according to this embodiment of the present application. Figure 12 The electronic device 130 shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.
[0256] like Figure 12 As shown, the electronic device 130 is presented in the form of a general-purpose electronic device. The components of the electronic device 130 may include, but are not limited to: at least one processor 131, at least one memory 132, and a bus 133 connecting different system components (including memory 132 and processor 131).
[0257] Bus 133 represents one or more of several bus structures, including a memory bus or memory controller, peripheral bus, processor, or local bus using any of the various bus structures.
[0258] The memory 132 may include a readable medium in the form of volatile memory, such as random access memory (RAM) 1321 and / or cache memory 1322, and may further include read-only memory (ROM) 1323.
[0259] The memory 132 may also include a program / utility 1325 having a set (at least one) of program modules 1324, including but not limited to: an operating system, one or more application programs, other program modules, and program data, each or some combination of these examples may include an implementation of a network environment.
[0260] Electronic device 130 can also communicate with one or more external devices 134 (e.g., keyboard, pointing device, etc.), and with one or more devices that enable a user to interact with electronic device 130, and / or with any device that enables electronic device 130 to communicate with one or more other electronic devices (e.g., router, modem, etc.). This communication can be performed via input / output (I / O) interface 135. Furthermore, electronic device 130 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) via network adapter 136. As shown, network adapter 136 communicates with other modules used in electronic device 130 via bus 133. It should be understood that, although not shown in the figures, other hardware and / or software modules can be used in conjunction with electronic device 130, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0261] In an exemplary embodiment, a storage medium is also provided, which enables the electronic device to execute the aforementioned content control method when a computer program stored in the storage medium is executed by a processor of the electronic device. Optionally, the storage medium may be a non-transitory computer-readable storage medium, such as a ROM, random access memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device.
[0262] In an exemplary embodiment, the electronic device of this application may include at least one processor and a memory communicatively connected to the at least one processor, wherein the memory stores a computer program executable by the at least one processor, and when the computer program is executed by the at least one processor, it enables the at least one processor to perform the steps of any content control method provided in the embodiments of this application.
[0263] In an exemplary embodiment, a computer program product is also provided, which, when executed by an electronic device, enables the electronic device to implement any of the exemplary methods provided in this application.
[0264] Furthermore, computer program products may employ any combination of one or more readable media. A readable medium may be a readable signal medium or a readable storage medium. A readable storage medium may be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of readable storage media (a non-exhaustive list) include: electrical connections having one or more wires, portable disks, hard disks, RAM, ROM, erasable programmable read-only memory (EPROM), flash memory, optical fiber, compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof.
[0265] The program product for content control in this application embodiment may be a CD-ROM and include program code, and may run on a computing device. However, the program product of this application is not limited to this. In this document, the readable storage medium may be any tangible medium that contains or stores a program, which may be used by or in conjunction with an instruction execution system, apparatus, or device.
[0266] A readable signal medium may include a data signal propagated in baseband or as part of a carrier wave, carrying readable program code. This propagated data signal may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. A readable signal medium may also be any readable medium other than a readable storage medium, capable of sending, propagating, or transmitting a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0267] The program code contained on the readable medium may be transmitted using any suitable medium, including but not limited to wireless, wired, optical fiber, radio frequency (RF), or any suitable combination thereof.
[0268] Program code for performing the operations of this application can be written in any combination of one or more programming languages, including object-oriented programming languages such as Java and C++, as well as conventional procedural programming languages such as C or similar languages. The program code can execute entirely on the user's computing device, partially on the user's computing device, as a standalone software package, partially on the user's computing device and partially on a remote computing device, or entirely on a remote computing device or server. In cases involving remote computing devices, the remote computing device can be connected to the user's computing device via any type of network, such as a Local Area Network (LAN) or a Wide Area Network (WAN), or it can be connected to an external computing device (e.g., via the Internet using an Internet service provider).
[0269] It should be noted that although several units or sub-units of the device have been mentioned in the detailed description above, this division is merely exemplary and not mandatory. In fact, according to embodiments of this application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided and embodied by multiple units.
[0270] Furthermore, although the operations of the method of this application are described in a specific order in the accompanying drawings, this does not require or imply that these operations must be performed in that specific order, or that all the operations shown must be performed to achieve the desired result. Additionally or alternatively, certain steps may be omitted, multiple steps may be combined into one step, and / or one step may be broken down into multiple steps.
[0271] Those skilled in the art will understand that embodiments of this application can be provided as methods, systems, or computer program products. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied 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.
[0272] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this application. 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 data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the flowchart... Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0273] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing 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.
[0274] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment 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.
[0275] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.
[0276] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.
Claims
1. A content control method, characterized in that, Used for managing servers, including: Obtain each configured control policy, wherein the control policy includes at least control rules, policy type, control method, and control scenario; The control rules are analyzed to obtain strategy data; Based on the preprocessing method corresponding to the policy type, the policy data is preprocessed for distribution, including: if the policy type is a general policy, the policy data is cached, wherein the number of control scenarios for the general policy is greater than a set value; if the policy type is a dynamic incremental policy, the correspondence between the identifier of the control policy and the policy data and the update time of the policy data is stored in the distribution queue, wherein the dynamic incremental policy is applicable to customized business, and the size of the corresponding policy data does not exceed a preset value; if the policy type is a resource policy, the policy data is sent to the cloud for storage, wherein the resource policy is applicable to customized business, and the size of the corresponding policy data exceeds the preset value. Based on the policy type, the method for obtaining the policy data is determined, including: if the policy type is a general policy, then the application programming interface (API) call is determined as the method for obtaining the policy data; if the policy type is a dynamic incremental policy, then periodic acquisition is determined as the method for obtaining the policy data; if the policy type is a resource policy, then cloud acquisition is determined as the method for obtaining the policy data. The target parameters of the control strategy are sent to the software development kit (SDK) on the business side corresponding to the control scenario. The SDK then performs control processing on the target content sent from the business side based on the target parameters. The target parameters include at least the control method and the method of obtaining the strategy data.
2. The method as described in claim 1, characterized in that, After storing the correspondence between the identifier of the control policy and the policy data, and the update time of the policy data in the distribution queue, the method further includes: Regularly perform control analysis on the aforementioned control rules to obtain the latest strategy data; If it is determined that the latest policy data is different from the policy data in the distribution queue, then the policy data in the distribution queue is updated based on the latest policy data, and the update time in the distribution queue is also updated.
3. The method as described in claim 1, characterized in that, After obtaining each configured control policy, the method further includes: The effectiveness of the control strategy is verified. After determining that the control effect of the control strategy meets the preset requirements, the target parameters of the control strategy are sent to the SDK on the business side corresponding to the control scenario.
4. The method as described in claim 1, characterized in that, The target parameters also include the control rules.
5. A content control method, characterized in that, The software development kit (SDK) used in the business side includes: The system receives target parameters for various control strategies sent by the control server. Each control strategy's target parameters include at least a control method and a strategy data acquisition method. The target parameters are sent by the control server after preprocessing the strategy data of the control strategy based on the preprocessing method corresponding to the strategy type of the control strategy. The strategy data is obtained by the control server through control analysis of the control rules of the control strategy. The business processed by the business side matches the control scenario of the control strategy. Based on the method of acquiring the policy data, the policy data of the control policy is acquired, including: if the acquisition method is an application programming interface (API) call, the policy data of the control policy is acquired from the control server through the API call; if the acquisition method is periodic acquisition, the policy data of the control policy is acquired periodically based on the distribution queue corresponding to the business side in the control server; if the acquisition method is cloud acquisition, the policy data of the control policy is acquired from the cloud; the target parameters of each control policy also include the control rules of the control policy. Based on the control methods and policy data of various control strategies, control processing is performed on target content sent from the business side, including: comparing the target content with a stored trie to determine at least two policy data matching the target content in the trie, wherein the trie is pre-constructed based on policy data of multiple control strategies; obtaining the control rules corresponding to the at least two policy data, determining the same control rule corresponding to the at least two policy data, and determining the policy data corresponding to the same control rule as a first policy dataset; combining the at least two policy data to obtain a second policy dataset; if it is determined that the second policy dataset is the same as the first policy dataset, then the target content is controlled based on the control method corresponding to the same control rule.
6. The method as described in claim 5, characterized in that, Periodically, based on the distribution queue corresponding to the business side in the management server, obtain the policy data of the management policy, including: Periodically retrieve the update time of the policy data in the distribution queue; If the update time is different from the time when policy data was last obtained from the distribution queue, then the latest policy data is obtained from the distribution queue.
7. The method as described in claim 5, characterized in that, The method further includes: In response to the control method selection operation, determine the set of control methods enabled on the service side; Based on the control methods and policy data of each control strategy, the target content sent from the service side is subject to control processing, including: Select the target control strategy whose control method is located in the set of control methods from among the control strategies; Based on the control methods and strategy data of each target control strategy, the target content is controlled and processed.
8. The method as described in claim 5 or 7, characterized in that, Each control strategy's target parameters also include the control rules of that control strategy. Based on the control methods and strategy data of each control strategy, control processing is performed on the target content sent from the service side, including: Using the rule expression corresponding to any control strategy, the target content and the strategy data are matched. If it is determined that the target content matches the strategy data, the target content is controlled according to the control method of the control strategy. The rule expression is predetermined based on the control rules of the control strategy; or If it is determined that the target content is located in the policy data of any control strategy, then the target content is controlled and processed according to the control method of the control strategy; or The target content is compared with the saved trie. If the target content matches the policy data in the trie, the target content is controlled based on the control method corresponding to the policy data. The trie is pre-built based on policy data of multiple control policies.
9. A content control device, characterized in that, Used for managing servers, including: The acquisition module is used to acquire each configured control policy, wherein the control policy includes at least control rules, policy type, control method and control scenario; The analysis module is used to perform control analysis on the control rules to obtain strategy data; The preprocessing module is used to preprocess the policy data based on the preprocessing method corresponding to the policy type, including: if the policy type is a general policy, then caching the policy data, wherein the number of control scenarios for the general policy is greater than a set value; if the policy type is a dynamic incremental policy, then storing the correspondence between the identifier of the control policy and the policy data and the update time of the policy data in the distribution queue, wherein the dynamic incremental policy is applicable to customized business, and the size of the corresponding policy data does not exceed a preset value; if the policy type is a resource policy, then sending the policy data to the cloud for storage, wherein the resource policy is applicable to customized business, and the size of the corresponding policy data exceeds the preset value; The determination module is used to determine the acquisition method of the policy data based on the policy type, including: if the policy type is a general policy, then determining the application programming interface (API) call as the acquisition method of the policy data; if the policy type is a dynamic incremental policy, then determining periodic acquisition as the acquisition method of the policy data; if the policy type is a resource policy, then determining cloud acquisition as the acquisition method of the policy data. The sending module is used to send the target parameters of the control strategy to the software development kit (SDK) on the business side corresponding to the control scenario. The SDK then performs control processing on the target content sent from the business side based on the target parameters. The target parameters include at least the control method and the method of obtaining the strategy data.
10. The apparatus as claimed in claim 9, characterized in that, It also includes an update module for: After storing the correspondence between the identifier of the control policy and the policy data and the update time of the policy data in the distribution queue, the control rules are periodically analyzed to obtain the latest policy data. If it is determined that the latest policy data is different from the policy data in the distribution queue, then the policy data in the distribution queue is updated based on the latest policy data, and the update time in the distribution queue is also updated.
11. The apparatus as claimed in claim 9, characterized in that, Also includes: The verification module is used to verify the control effect of each configured control strategy after obtaining it. The sending module is used to send the target parameters of the control strategy to the SDK on the business side corresponding to the control scenario after determining that the control effect of the control strategy has reached the preset requirements.
12. The apparatus as claimed in claim 9, characterized in that, The target parameters also include the control rules.
13. A content control device, characterized in that, The software development kit (SDK) used in the business side includes: The receiving module is used to receive target parameters of various control strategies sent by the control server. Each control strategy target parameter includes at least a control method and a method for obtaining strategy data. The target parameters are sent by the control server after preprocessing the strategy data of the control strategy based on the preprocessing method corresponding to the strategy type of the control strategy. The strategy data is obtained by the control server through control analysis of the control rules of the control strategy. The business processed by the business side matches the control scenario of the control strategy. The acquisition module is used to acquire the policy data of the control policy based on the acquisition method of the policy data; including: if the acquisition method is an application programming interface (API) call, then acquiring the policy data of the control policy from the control server through the API call; if the acquisition method is periodic acquisition, then periodically acquiring the policy data of the control policy based on the distribution queue corresponding to the business side in the control server; if the acquisition method is cloud acquisition, then acquiring the policy data of the control policy from the cloud; the target parameters of each control policy also include the control rules of the control policy; The control module is used to control and process target content sent from the service side based on the control methods and policy data of various control strategies. This includes: comparing the target content with a stored trie to determine at least two policy data points in the trie that match the target content; the trie being pre-constructed based on policy data from multiple control strategies; obtaining the control rules corresponding to the at least two policy data points; determining the same control rule corresponding to the at least two policy data points; defining the policy data corresponding to the same control rule as a first policy dataset; combining the at least two policy data points to obtain a second policy dataset; and if the second policy dataset is determined to be the same as the first policy dataset, then controlling and processing the target content based on the control method corresponding to the same control rule.
14. The apparatus as claimed in claim 13, characterized in that, The acquisition module is specifically used for: Periodically retrieve the update time of the policy data in the distribution queue; If the update time is different from the time when policy data was last obtained from the distribution queue, then the latest policy data is obtained from the distribution queue.
15. The apparatus as claimed in claim 13, characterized in that, Also includes: The selection module is used to determine the set of control methods enabled on the business side in response to the control method selection operation; The control module is specifically used to select a target control strategy whose control method is located in the set of control methods from various control strategies; and to perform control processing on the target content based on the control method and strategy data of each target control strategy.
16. The apparatus as claimed in claim 13 or 15, characterized in that, The target parameters for each control strategy also include the control rules of the control strategy. The control module is specifically used for: Using the rule expression corresponding to any control strategy, the target content and the strategy data are matched. If it is determined that the target content matches the strategy data, the target content is controlled according to the control method of the control strategy. The rule expression is predetermined based on the control rules of the control strategy; or If it is determined that the target content is located in the policy data of any control strategy, then the target content is controlled and processed according to the control method of the control strategy. or The target content is compared with the saved trie. If the target content matches the policy data in the trie, the target content is controlled based on the control method corresponding to the policy data. The trie is pre-built based on policy data of multiple control policies.
17. An electronic device, characterized in that, include: At least one processor, and a memory communicatively connected to said at least one processor, wherein: The memory stores a computer program that can be executed by the at least one processor to enable the at least one processor to perform the method as described in any one of claims 1-8.
18. A storage medium, characterized in that, When the computer program in the storage medium is executed by the processor of the electronic device, the electronic device is able to perform the method as described in any one of claims 1-8.