Publishing content restriction method and apparatus

By constructing a multi-layered content model and implementing rule inheritance and overriding, the problem of insufficient flexibility and scalability in existing content constraint methods is solved, and efficient multi-type and multi-dimensional content constraint management is achieved.

CN122196292APending Publication Date: 2026-06-12特赞(上海)信息科技有限公司

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
特赞(上海)信息科技有限公司
Filing Date
2026-02-27
Publication Date
2026-06-12

AI Technical Summary

Technical Problem

Existing content constraint methods are insufficient in terms of flexibility, scalability, and unified management, making it difficult to adapt to the diverse and multi-dimensional content constraint needs.

Method used

Construct a hierarchical content model, including library type layer, content type layer, content location layer, and rule layer. Merge system default, library level, and content type rules according to priority through rule inheritance and overriding mechanism. Support multiple rule types such as quantity, format, size, dimensions, ratio, word count, and duration, and perform mandatory field judgment and rule validation in sequence.

Benefits of technology

It improves the efficiency of managing multi-type and multi-dimensional content constraints, enables flexible configuration of content constraint rules and efficient verification processes, and supports multi-condition collaborative verification in complex business scenarios.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122196292A_ABST
    Figure CN122196292A_ABST
Patent Text Reader

Abstract

The embodiment of the application provides a kind of publishing content constraint method and device, method includes: by constructing the multilayer content model with library type layer, content type layer, content point position layer and rule layer, support quantity, format, size, size, proportion, word number, duration and so on multiple rule types;Through rule inheritance and covering mechanism, system default, library level and content type rule are merged according to priority, and integrated content model suitable for current scene is formed;After receiving actual content data, each content point position is traversed, and in turn compulsory judgment and rule verification are executed, and verification result is output, and the application can improve the efficiency of multi-type, multi-dimensional content constraint management.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of data processing, specifically to a method and apparatus for constraining published content. Background Technology

[0002] With the diversification of the internet content ecosystem, various social media platforms, advertising platforms, and e-commerce systems are imposing increasingly refined and significant constraints on the form and specifications of published content. For example, images on WeChat Moments must meet multiple restrictions, including quantity, size, format, and aspect ratio; short video platforms also have strict regulations on duration, resolution, and aspect ratio.

[0003] Traditional content constraint solutions often rely on hard-coded validation logic, database field constraints, or general data validation frameworks (such as JSON Schema). These solutions have significant shortcomings in terms of flexibility, scalability, and unified management. Hard-coding requires modifying the source code and redeploying for rule changes, resulting in high maintenance costs and difficulty in adapting to rapidly iterating business needs. Database constraints cannot express complex business rules (such as aspect ratio, duration range, etc.), while general validation frameworks have limitations in semantic expression and cannot directly support business-specific multidimensional constraints.

[0004] Therefore, there is an urgent need for a method to constrain published content in order to improve the efficiency of managing constraints on multiple types and dimensions of content. Summary of the Invention

[0005] To address the problems in the prior art, this application provides a method and apparatus for content constraint management, which can improve the efficiency of managing constraints on multiple types and dimensions of content.

[0006] To solve at least one of the above problems, this application provides the following technical solution: Firstly, this application provides a method for restricting published content, including: A hierarchical content model is constructed, which includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations to define the rule types and rule parameters for multidimensional verification of content location data. Based on the current application scenario, a verification request for a specific library type and a specific content type is received. Based on the content model, the corresponding multi-level rule configuration is loaded according to the verification request. The rule inheritance and overriding algorithm is executed according to the multi-level rule configuration. The system default rules, library level rules and content type rules are merged according to a preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. The system receives input containing actual content data, traverses the content point layer of the integrated content model, determines the corresponding content point configuration, performs a mandatory determination on the actual content data based on the content point configuration, and if the determination passes, executes the verification function sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, records the corresponding determination results, and outputs the final determination result as data after completing all content point verification, thus completing the content data constraint for publication.

[0007] Furthermore, the construction of a hierarchical content model includes: Construct a library type layer to define library-level rule configurations, where the library level represents the specific application scenario level; Construct a content type layer to define the rule configuration for content type levels, where the content type level represents the content category under a specific library type; Construct a content point layer to define the constraint rules for specific fields. The content point level represents the specific content data under a specific content category. Build a rules layer to define multi-dimensional rule configurations.

[0008] Furthermore, the definition of multi-dimensional rule configuration includes: Define quantity verification rules, including limiting the number of resources and supporting comparison types of equal to, less than, less than or equal to, greater than, and greater than or equal to ranges; Define format validation rules, including restrictions on file formats, and support for inclusion and exclusion comparison types; Define size validation rules, including limiting file size and supporting comparison types such as less than, less than or equal to, and range; Define size verification rules, including limiting pixel size and supporting comparison types of equal to or greater than or equal to a range; Define aspect ratio validation rules, including limiting aspect ratio and supporting comparison types such as containment and equality; Define word count validation rules, including limiting the number of characters in the text and supporting comparison types such as less than or equal to and range; Define duration verification rules, including limiting video / audio duration, and supporting comparison types such as less than or equal to and range.

[0009] Furthermore, the step of merging system default rules, library-level rules, and content type rules according to preset priorities to determine the corresponding integrated content model suitable for the current application scenario includes: Define priority rules, including a multi-level priority order from low to high: system default rules, library level rules, and content type rules. Higher-level rule type definitions will override lower-level rule type definitions. Based on the priority rules, using the system default rules in the current application scenario rule configuration as the baseline, the corresponding content of the library-level rules is merged into the baseline through deep traversal and field replacement operations. Then, the corresponding content of the content type rules is merged into the baseline to determine the corresponding integrated content model suitable for the current application scenario.

[0010] Furthermore, the determination of the mandatory content data based on the content location configuration includes: Based on the content location configuration, the corresponding location value is extracted from the actual content data object, and the mandatory rule of the location is determined. If the location is configured as required and the extracted value is empty, then record the required field error in the judgment result; If the location is configured as required and the extracted value is not empty, the judgment passes.

[0011] Furthermore, for each content point of the actual content data, according to the rule configuration corresponding to that point, the verification function is executed sequentially to perform logical judgments, and the corresponding judgment results are recorded, including: For each content point of the actual content data, the verification function is executed sequentially according to the rule configuration corresponding to that point to perform logical judgments. If any rule verification fails, the identifier of that point and the corresponding rule violation details are recorded in the judgment result, and the verification of other rules for the current point continues or the process jumps to the next point. If the verification at this point is successful, proceed to the next point.

[0012] Furthermore, the details of the rule violation include: The content bit encoding that triggered the error; The business description information of the content location that triggered the error; The specific rule type violated by the content location that triggered the error, and its judgment logic; Compare the expected parameter values ​​of the rules for the content points that trigger errors with the actual detected parameter values.

[0013] Secondly, this application provides a content restriction device, comprising: The content model building module is used to build a content model with a hierarchical structure. The content model includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations, which are used to define the rule types and rule parameters for multi-dimensional verification of content location data. The rule configuration loading module is used to receive verification requests for specific library types and specific content types based on the current application scenario, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. The system default rules, library level rules and content type rules are merged according to a preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. The rule verification and constraint module is used to receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, the verification function is executed sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and the corresponding judgment result is recorded. After all content point verification is completed, the final judgment result is output as data, thus completing the content data constraint for publication.

[0014] Thirdly, this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the published content constraint method.

[0015] Fourthly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the published content constraint method.

[0016] Fifthly, this application provides a computer program product, including a computer program / instructions that, when executed by a processor, implement the steps of the published content constraint method.

[0017] As can be seen from the above technical solution, this application provides a method and apparatus for constraining published content. By constructing a multi-layered content model with a library type layer, a content type layer, a content location layer, and a rule layer, it supports various rule types such as quantity, format, size, dimensions, proportion, word count, and duration. Through a rule inheritance and overriding mechanism, it merges system default, library-level, and content type rules according to priority to form an integrated content model suitable for the current scenario. After receiving actual content data, it traverses each content location, sequentially performs mandatory judgment and rule verification, and outputs the verification results, thereby improving the efficiency of managing multi-type and multi-dimensional content constraints. Attached Figure Description

[0018] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0019] Figure 1 This is one of the flowcharts illustrating the content constraint method in the embodiments of this application; Figure 2 This is a structural diagram of the content constraint device in the embodiments of this application; Figure 3 This is a schematic diagram of the structure of the electronic device in the embodiments of this application.

[0020] Figure label: Electronic device 9600, central processing unit 9100, memory 9140, communication module 9110, input unit 9120, audio processor 9130, display 9160, power supply 9170, buffer memory 9141, application / function storage unit 9142, data storage unit 9143, driver storage unit 9144, antenna 9111, speaker 9131, microphone 9132. Detailed Implementation

[0021] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0022] The acquisition, storage, use, and processing of data in this application comply with relevant laws and regulations.

[0023] Considering the increasingly refined and varied constraints imposed by internet platforms on published content, existing content constraint methods cannot meet the demands for flexibility and unified management. This application provides a method and apparatus for managing published content constraints. By constructing a multi-layered content model with a library type layer, content type layer, content location layer, and rule layer, it supports various rule types such as quantity, format, size, dimensions, proportion, word count, and duration. Through rule inheritance and overriding mechanisms, it merges system default, library-level, and content type rules according to priority, forming an integrated content model suitable for the current scenario. After receiving actual content data, it iterates through each content location, sequentially performing mandatory checks and rule verifications, and outputting the verification results. This improves the efficiency of managing multi-type and multi-dimensional content constraints.

[0024] In content publishing and management systems, different publishing channels have different formatting requirements for content: Examples of social media platform constraints: Photos for WeChat Moments: Maximum 9 photos, each ≤3MB, JPG / PNG supported, aspect ratio 1:1 or 16:9 TikTok short videos: 15-60 seconds in length, ≥720P resolution, 9:16 aspect ratio, MP4 format Xiaohongshu Notes: Title ≤ 50 characters, Body text ≤ 2000 characters, 1-9 images, Cover image required. Example of constraints on advertising platforms: Horizontal video from ByteDance's advertising platform: 5-60 seconds long, 16:9 aspect ratio, MP4 format, ≤500MB in size. Tencent Ads Vertical Video: 5-30 seconds long, 9:16 aspect ratio, MP4 format, ≤100MB Deficiencies of existing technical solutions: Option 1: Hard-coded verification logic: difficult to maintain, poor scalability, and scattered rules.

[0025] Option 2: Database form field constraints: poor flexibility, limited types, and difficult to reuse on the front end.

[0026] Option 3: JSON Schema Validation: Limited expressive power and difficult to extend.

[0027] This solution aims to overcome the shortcomings of existing technologies and specifically addresses the following issues: How to describe multi-dimensional content constraints using a configurable rule model; How to implement hierarchical inheritance and overriding mechanisms for rules; How to efficiently perform rule validation and provide user-friendly error messages.

[0028] To improve the efficiency of managing constraints on multi-type and multi-dimensional content, this application provides an embodiment of a content constraint method, see [link to embodiment]. Figure 1 The content constraint method specifically includes the following: Step S101: Construct a content model with a hierarchical structure. The content model includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations, which are used to define the rule types and rule parameters for multi-dimensional verification of content location data. Optionally, in this embodiment, this step systematically defines content constraint rules by designing a hierarchical, structured configuration model.

[0029] Specifically, the content model is a content model that includes four distinct levels: 1. Library Type Level This layer defines the business or product category to which the content belongs, such as "Social Media Library," "Advertising Library," or "Product Library." Each library type can set its own global default constraint rules, providing a basis for the inheritance of rules from lower levels.

[0030] 2. Content Type Level Below the library type, it is further subdivided into specific content formats, such as "WeChat Moments images," "TikTok short videos," and "product main images." This level allows for setting specific sets of constraints for different content formats, thereby supporting differentiated management of different content formats within the same library.

[0031] 3. Content Position Level Content positions refer to the specific fields or resource items that make up a piece of content, such as "title," "description," "image list," and "video file." Each position has an independent position code and description, and is associated with a specific resource category (such as text, image, or video). This level is the smallest unit for rule binding, ensuring that validation is accurate to every component of the content.

[0032] 4. Rule Level The rules layer is the core of the content model, predefining multiple configurable validation rule types for each content location. Each rule type specifies its validation dimensions (such as quantity, format, size, dimensions, aspect ratio, word count, duration, etc.) and specifies the constraints through rule parameters (such as comparison type, threshold, and value range). For example, for the "image list" location, "quantity rule" (≤9), "format rule" (JPG / PNG only), and "size rule" (≤3MB) can be configured simultaneously.

[0033] Understandably, this design allows the rules to be both universal and support granular control. Different locations can reuse the same type of rule template, or customize exclusive constraints as needed. Rules can be logically combined (such as "AND" and "OR") to meet the multi-condition collaborative verification needs in complex business scenarios. At the same time, all rules are executed through a unified engine to ensure verification consistency and traceability.

[0034] Step S102: Based on the current application scenario, receive verification requests for specific library types and specific content types, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. Merge the system default rules, library level rules and content type rules according to the preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. Optionally, in this embodiment, this step describes the process of loading the content model and merging the content constraints of the specific application scenario, starting from receiving the verification request for the specific scenario.

[0035] The system first receives a verification request from another module on the front-end or back-end. The key parameters of this request must include at least `libraryType` (library type) and `contentType` (content type). For example, the request might specify `libraryType` as "social_media" (social media library) and `contentType` as "moment_images" (moment images). This clarifies the business scope and specific content format of the target rule for this verification.

[0036] Based on the parsed library type and content type, the system retrieves and loads all rule configurations related to the scenario from the rule repository (such as databases and configuration files) in a hierarchical and targeted manner, specifically including: System default rule configuration (Level 1): This is the most basic rule layer, defining the broadest default constraints that apply globally to the platform. For example, the system might allow images up to 10MB to be uploaded by default.

[0037] Library-level rule configuration (Level 2): ​​Loads rules that match the libraryType in the request. This level of rules is customized to constrain specific business libraries (such as "social media library" or "ad creative library"), and will refine and override the system's default rules (such as adjusting the maximum size of social media images to 5MB).

[0038] Content type rule configuration (Level 3): Loads rules that match both libraryType and contentType in the request. This is the most specific layer, defining unique constraints for specific content types within a library (such as "Moments Images" under the "Social Media Library").

[0039] Next, after loading the above rules, the loaded rules are inherited and overridden.

[0040] Specifically, the rule hierarchy structure: Plain Text Level 1: System Default Rule (system_default) ↓ Covered Level 2: Library-level rules (library_level) ↓ Covered Level 3: Content Type Rules (content_type_level) ↓ Covered Level 4: Instance-level rules Inheritance rules: Child rules inherit from parent rules; Child rules can override parent rules; Undefined rules use the parent's default value; In this embodiment, the algorithm starts with the highest priority "content type rule" and traverses each "content point" defined thereunder and the specific rules thereunder.

[0041] For points or rules that are explicitly defined in the content type rules, their configuration values ​​(such as [3145728] in imageSizeRule, which is 3MB) will directly override the configuration values ​​of the same points or rules in library-level rules or even system default rules.

[0042] For any undefined points or specific rules in the content type rules, the system will automatically inherit the corresponding configuration from the next priority level (library-level rules). If the library-level rules also do not define the rule, then the system will continue to inherit upwards from the default rules. For example, if a content type rule only defines the image size but not the supported formats, then the final format rule will come from the library-level rules.

[0043] This process is repeated recursively until all levels of rules have been processed. Ultimately, for each content point, a unique and conflict-free set of rules is formed, which integrates the most relevant and specific constraints from different levels.

[0044] The rule loading and merging phase is used for system page initialization preparation. At this time, the merged rules are quickly stored so that they can be called for rule verification after receiving the actual content.

[0045] This step ensures that validation rules can be "tailored to specific situations." Different libraries and different content types, even if they share some basic rules, can obtain a final rule set tailored to their specific needs through this step. This allows a unified rule architecture to support highly differentiated business requirements.

[0046] General rules (such as system security restrictions and company brand guidelines) only need to be defined once at the high level (system default or library level) and can be automatically applied to all subclasses, avoiding duplicate configurations and potential inconsistencies.

[0047] Special requirements for specific scenarios (such as images on an event page having special dimensions) can be easily configured at the corresponding content type or even instance level, and accurately cover the upper-level rules without modifying the general configuration, greatly improving operational efficiency and flexibility.

[0048] Step S103: Receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, execute the verification function sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and record the corresponding judgment result. After completing all content point verification, output the final judgment result as data to complete the content data constraint for publication.

[0049] Optionally, in this embodiment, the responsible party performs specific, item-by-item constraint checks on the actual input content data based on the constructed and integrated content model to ensure that the content data conforms to business rules. First, the system receives the actual content data from external input, including various resources such as text, images, and videos that the user wishes to publish, along with their metadata. Simultaneously, in the previous steps, based on the library type and specific content type, a final, effective "integrated content model" is generated using rule inheritance and overriding mechanisms, tailored to the current scenario. This model clearly defines which content points (fields such as "title," "image set," and "video") need to be validated, whether each point is mandatory, and the specific set of rules that each point must satisfy. This step involves validation within this model framework.

[0050] The validation engine begins iterating through all the "content point layer" configurations defined in the content model. For each point: First, the system checks the "required" field designation of each location. If a location is marked as required, it checks if the corresponding value in the input data is empty (e.g., no title or no uploaded image). If empty, the validation for that location fails immediately, and an error message such as "This field is required" is recorded. The system can usually skip further detailed rule validation for that location (because the basic requirements are no longer met).

[0051] If a field is not mandatory, and the value for that field in the input data is empty or not provided, the system determines that the field "does not require substantive content verification" and skips all subsequent rule checks for that field. This mechanism avoids unnecessary verification overhead and improves efficiency.

[0052] For each content point that passes the mandatory field check (i.e., required fields have values, or non-required fields have values ​​that require further verification), the verification process moves to the core stage: From the configuration of that location, obtain the set of "rule configurations" associated with it; The system calls the verification functions corresponding to each rule type in the order predefined by the rules (or in the order determined by the dependencies). Each verification function is an independent unit that encapsulates specific judgment logic. Each execution of a verification function generates an immediate logical judgment result. If the current rule verification fails, the system generates an error message and records it in association with that location. In some implementations, once a rule verification fails, the execution of subsequent rules for that location may be terminated (because it no longer meets the requirements); in other implementations, all rules will continue to be executed to collect all violation information and provide feedback to the user all at once.

[0053] Once all content locations have undergone the mandatory field checks and rule logic verifications described above, the system summarizes the results of all record checks: If all rules at all locations pass verification, a final result of "Verification Successful" is generated.

[0054] If any rule at any point fails to be validated, a final result of "Validation Failed" is generated, along with a detailed, structured set of error messages that clearly indicates which field, which rule was violated, and the specific violation.

[0055] This example demonstrates how this embodiment constructs a dynamic content constraint engine with a configurable rule model, achieving multi-dimensional content constraint management through configurability, multi-dimensional support, hierarchical inheritance, and real-time verification.

[0056] As can be seen from the above description, the content constraint method provided in this application can construct a multi-layered content model with a library type layer, a content type layer, a content location layer, and a rule layer, supporting various rule types such as quantity, format, size, dimensions, proportion, word count, and duration; through a rule inheritance and overriding mechanism, it merges system default, library level, and content type rules according to priority to form an integrated content model suitable for the current scenario; after receiving actual content data, it traverses each content location, sequentially performs mandatory judgment and rule verification, and outputs the verification results, thereby improving the efficiency of managing multi-type and multi-dimensional content constraints.

[0057] In one embodiment of the content constraint method of this application, it may further include the following: Step S201: Construct a library type layer to define library-level rule configurations, where the library level represents the specific application scenario level; Step S202: Construct a content type layer to define the rule configuration for content type levels, where the content type level represents the content category under a specific library type; Step S203: Construct a content point layer to define the constraint rules for specific fields, where the content point level represents the specific content data under a specific content category; Step S204: Construct a rule layer to define multi-dimensional rule configurations.

[0058] Optionally, in this embodiment, the hierarchical rule model achieves flexible configuration and efficient verification of content constraints by combining JSON format configuration with dynamic execution by the rule engine.

[0059] Specifically, for example, the Content Model structure design: Plain Text Library Type └─ Content Type └─ Position (Content Point) └─ Rules (Set of Constraints) ├─ assetAmountLimitRule (Quantity Rule) ├─ extensionTypeRule (Formatting Rule) ├─ imageSizeRule (size rule) ├─ imageSizePixelRule (Pixel Size Rule) ├─ imageRatioRule (Aspect Ratio Rule) ├─ wordRule (Word Count Rules) ├─ videoDurationRule (Video Duration Rule) └─ customRule The library type layer is the foundational layer of the model. Its core function is to categorize content at the top level based on different business domains or application scenarios. It implements the isolation of business scenarios and the definition of global rules, providing an inheritable basic configuration for lower-level rules.

[0060] Below the library types, the content type layer further refines content categorization. For example, under the "Social Media Content Library," it can be subdivided into specific types such as "WeChat Moments Images," "TikTok Short Videos," and "Xiaohongshu Notes." Each content type can inherit and override the rules of its parent library type, and define its own more specific constraints. For example, "WeChat Moments Images" can inherit the library's general image format rules, but further override the maximum number of images to nine. This layer enables differentiated configuration of rules for specific content categories.

[0061] The content point layer delves into the specific components of content, serving as the operational granularity layer of the model. It breaks down a complete content item (such as a note or an advertisement) into multiple independently manageable "points" or "fields," defining the existence (required / optional) and specific constraints for each point. For example, the content type "Xiaohongshu Note" can include multiple points such as "title," "body text," "image list," and "cover image." This layer's construction translates abstract content types into concrete, verifiable data units, a prerequisite for achieving fine-grained validation.

[0062] The rule layer, as the core constraint definition layer, is attached to the content points. Its function is to configure one or more specific, quantifiable business rules for each content point, thereby forming multi-dimensional verification capabilities. It is a concrete manifestation of the model's constraint capabilities. For example, for the "image list" point, "quantity rules" (≤9 images), "format rules" (JPG / PNG only), "size rules" (each image ≤3MB), and "aspect ratio rules" (1:1 and 16:9 only) can be configured simultaneously. The combination of the rule layer and the point layer allows the verification of a single data field to be performed from multiple business dimensions, thus comprehensively ensuring content compliance.

[0063] In addition, by using a unified content table with library type and content type as logical isolation labels, all content points are stored in one table. Through this design, all libraries share common rules, and personalized rules are configured for individual libraries, thereby maximizing the reuse of system capabilities and standardizing management.

[0064] Once the design is complete, the Content Model configuration is stored in a persistent storage module using JSON format, which supports flexible rule structures.

[0065] Through step S204, this embodiment realizes the structured and modular nature of rule management, enabling flexible definition of comprehensive constraints from macro-level scenarios to micro-level fields without modifying the program code.

[0066] In one embodiment of the content constraint method of this application, it may further include the following: Step S301: Define quantity verification rules, including limiting the number of resources and supporting comparison types of equal to, less than, less than or equal to, greater than, and greater than or equal to ranges; Step S302: Define format validation rules, including restrictions on file formats and support for inclusion and exclusion comparison types; Step S303: Define size verification rules, including limiting file size and supporting comparison types such as less than, less than or equal to, and range; Step S304: Define size verification rules, including limiting pixel size and supporting comparison types of equal to or greater than or equal to a range; Step S305: Define the aspect ratio verification rules, including limiting the aspect ratio and supporting comparison types such as containment and equality; Step S306: Define word count validation rules, including limiting the number of characters in the text and supporting comparison types such as less than or equal to and range; Step S307: Define duration verification rules, including limiting video / audio duration and supporting comparison types such as less than or equal to and range.

[0067] Optionally, in this embodiment, this step is a content verification step, and each step establishes standardized constraint descriptions and verification capabilities for a specific attribute or dimension of the content data.

[0068] Specifically, quantity verification rules are defined for countable resources such as image collections and attachment lists. By supporting multiple comparison types such as "equal to," "less than," "greater than," and "range," these rules can flexibly express various business needs, ranging from strict limits (e.g., "equal to 1 cover image") to range restrictions (e.g., "1-9 detail images"). This ensures that the content meets the specific requirements of the channel or scenario in terms of resource quantity, such as preventing the number of uploaded images from exceeding the limit.

[0069] Specifically, define format validation rules, using either "include" (whitelist) or "exclude" (blacklist) comparison logic to limit allowed or prohibited file extensions (such as .jpg, .png, .mp4). This directly relates to content compatibility and security, ensuring that uploaded files can be correctly processed by downstream systems and filtering out potentially unsupported or risky file formats.

[0070] Specifically, size verification rules are defined to limit the storage space occupied by a file (usually in bytes), primarily using "less than (or equal to)" or "range" comparisons. This is crucial for controlling storage costs, ensuring transmission efficiency, and meeting the size limits of uploaded files on specific platforms, such as limiting a single image to no more than 5MB.

[0071] Specifically, size verification rules are defined to validate the pixel dimensions (width × height) of image or video frames, supporting "equal to" the exact resolution, "greater than or equal to" the minimum requirement, or setting a resolution range. This ensures that visual materials meet technical specifications such as clarity, display layout, or print quality; for example, requiring banner ad images to be 1920 × 1080 pixels.

[0072] Specifically, define aspect ratio validation rules to constrain the ratio between width and height (e.g., 16:9, 1:1, 9:16). By "equal to" a specific ratio or "contains" within a set of allowed ratios, this rule can force content to adapt to different display containers (e.g., landscape videos, square avatars, portrait posters), ensuring visual effects and user experience.

[0073] Specifically, character count validation rules are defined for text fields such as titles and body text, limiting the number of characters (or words) by using a "less than or equal to" upper limit or a "range". This is a fundamental constraint for meeting the platform's character count limits, ensuring content conciseness, or meeting SEO optimization requirements.

[0074] Specifically, define duration verification rules to impose restrictions on the playback duration of media files (usually in seconds) by using a "less than or equal to" maximum duration or setting a "range". This is crucial for complying with platform video duration guidelines (such as 15-60 seconds for short videos), controlling ad duration, or managing content pacing.

[0075] Through step S307, this embodiment defines rules for seven key dimensions. These rules can be intuitively combined through the configuration interface to tailor complex verification strategies for different content scenarios.

[0076] In one embodiment of the content constraint method of this application, it may further include the following: Step S401: Define priority rules, including multi-level priority rules in ascending order of system default rules, library level rules, and content type rules. Higher-level rule type definitions will override lower-level rule type definitions. Step S402: Based on the priority rules, using the system default rules in the current application scenario rule configuration as the baseline, the corresponding content of the library-level rules is merged into the baseline through deep traversal and field replacement operations, and then the corresponding content of the content type rules is merged into the baseline to determine the corresponding integrated content model suitable for the current application scenario.

[0077] Optionally, in this embodiment, priority rules are defined.

[0078] System default rule (lowest priority): As the "constitution" and security baseline of the entire rule system, it provides the most general and lenient constraints.

[0079] Library-level rules (medium priority): "Special regulations" for specific business areas (such as social media libraries, e-commerce product libraries), which have higher effect than general rules in specific areas.

[0080] Content type rules (highest priority): The "Implementation Rules" for the most specific content formats (such as pictures in WeChat Moments, product main image videos) are the most specific and have the highest legal effect.

[0081] The priority merging algorithm is a deep merging operation based on "baseline iterative coverage": Initialize the baseline: The algorithm uses the "system default rule" configuration loaded in the current scene as the initial merging baseline. Then, it performs a depth-first traversal of this configuration, checking each point and rule field. When a library-level rule explicitly defines a point or a specific rule (such as imageSizeRule), the algorithm performs a "field replacement operation": it directly replaces the original definition for the same path in the baseline model with this definition from the library-level rule. Fields not defined in the library-level rule remain unchanged in the baseline.

[0082] On the new baseline formed by the initial merge, repeat the above process. Perform a deep traversal of the "Content Type Rules" configuration, replacing or adding to the current baseline model with more specific and stringent field definitions from it.

[0083] After two rounds (or N rounds depending on the number of levels) of depth-first traversal and field replacement, the initial baseline model has evolved into the "integrated content model." This final model incorporates valid definitions of all levels and reflects the highest priority decision in any conflict.

[0084] The rule inheritance and overriding mechanism is illustrated with an example: Plain Text System default: - Maximum image size: 10MB - Image support: jpg / png / gif / bmp Product library rules (overriding system default): - Maximum image size 5MB - Images support JPG / PNG (GIF is not supported). Mobile phone type rules (covering product library rules): - Maximum image size 2MB - (Format inherited from product library: jpg / png) iPhone 15 instance rules (covering various phone types): - Maximum image size 1MB - (Format inherited from phone type: jpg / png) Through step S402, this embodiment successfully eliminates the ambiguity and conflict that may be caused by multi-source rules by using clear priority and replacement algorithms.

[0085] In one embodiment of the content constraint method of this application, it may further include the following: Step S501: Based on the content location configuration, extract the corresponding location value from the actual content data object, and determine the mandatory rule of the location. Step S502: If the point is configured as required and the extracted value is empty, record the required field error in the judgment result; Step S503: If the point is configured as required and the extracted value is not empty, then the judgment is successful.

[0086] Optionally, in this embodiment, this step is the judgment process of the rule engine. For example, the core algorithm flow is as follows: Plain Text Step 1: Receive content data and Content Model Input: contentInfo (content data), model (rule model) Step 2: Initialize the verification result object validationResult = new ValidationResult() Step 3: Iterate through all subModels (points) of the model. for each subModel in model.subModelList: Step 3.1: Obtain point values positionCode = subModel.positionCode value = contentInfo.get(positionCode) Step 3.2: Check for required fields if subModel.isNeed == 1 and isEmpty(value): validationResult.addError(positionCode, "Required field cannot be empty") continue Step 3.3: If the value is empty and not required, skip the validation. if isEmpty(value): continue Optionally, in this embodiment, based on the configuration of specific content positions in the integrated content model, the positioning and value retrieval operations are first performed. From the structured or semi-structured "actual content data object," the corresponding data actually submitted by the user is found and extracted according to the unique identifier of the position (such as positionCode). This data is the "position value," which may be a string (such as title text), an array (such as a list of images), a number, or a complex object. At the same time, the system reads the "required" attribute in the position configuration. This step completes the mapping from abstract rules to specific data and establishes the basis for the next step of judgment.

[0087] If a location is explicitly marked as "required" in the configuration, but the system extracts a location value from the previous step that is "empty" (which may be null, an empty string "", an empty array [], or the field may be completely missing), then it is determined that the basic data is missing and does not meet the minimum requirements for release. Next, a structured "Judgment Result" object is created, and a detailed error message is recorded in it.

[0088] Conversely to step S502, if a point is configured as mandatory and the extracted point value is determined to be "non-empty" (i.e., valid data exists), then the basic integrity requirement for that point is deemed to be met. The system will mark the mandatory verification of this point as "passed".

[0089] Through step S503, this embodiment successfully performs a rapid mandatory field check. In interactive scenarios, this enables instant feedback, allowing users to immediately fill in missing items without waiting for all the complex verifications.

[0090] In one embodiment of the content constraint method of this application, it may further include the following: Step S601: For each content point of the actual content data, according to the rules corresponding to that point, execute the verification function sequentially to perform logical judgment; Step S602: If any rule verification fails, record the identifier of the point and the corresponding rule violation details in the judgment result, and continue to execute the verification of other rules of the current point or jump to the next point; Step S603: If the verification of this point is successful, proceed to the next point.

[0091] Optionally, for example, the sequential verification in this embodiment follows step 3.3 of the example above: Step 3.4: Obtain the rule set modelItem = subModel.modelItem Step 3.5: Verify the quantity rules if modelItem.assetAmountLimitRule != null: validateAmountRule(value, modelItem.assetAmountLimitRule,validationResult) Step 3.6: Verify format rules if modelItem.extensionTypeRule != null: validateExtensionRule(value, modelItem.extensionTypeRule,validationResult) Step 3.7: Verify the size rules if modelItem.imageSizeRule != null: validateSizeRule(value, modelItem.imageSizeRule, validationResult) Step 3.8: Verify dimensional rules if modelItem.imageSizePixelRule != null: validatePixelRule(value, modelItem.imageSizePixelRule,validationResult) Step 3.9: Verify aspect ratio rules if modelItem.imageRatioRule != null: validateRatioRule(value, modelItem.imageRatioRule, validationResult) Step 3.10: Verify the word count rule if modelItem.wordRule != null: validateWordRule(value, modelItem.wordRule, validationResult) Step 3.11: Verify duration rules if modelItem.videoDurationRule != null: validateDurationRule(value, modelItem.videoDurationRule,validationResult) Step 4: Return the verification result return validationResult In this step, after completing the mandatory field check, detailed rule matching and logical judgment are performed on each "content point" containing actual data.

[0092] First, all defined constraint entries are read from the "Rule Configuration" of that location. Each rule entry contains explicit condition parameters, such as "Number of images ≤ 9", "File format ∈ {JPG, PNG}", "Number of characters between 1 and 50", etc.

[0093] For each rule, the system calls a corresponding predefined "validation function". For example, the "quantity validation function" is responsible for counting the number of resource items and performing numerical comparisons; the "format validation function" is responsible for extracting file extensions and comparing them with the allowed list.

[0094] Rules are executed sequentially according to configured priority or a preset order (usually reflecting the urgency of business logic). This sequential execution ensures the structure and controllability of the verification process. For example, checking whether the quantity exceeds the limit first, and then checking whether the format is allowed, can avoid performing unnecessary subsequent checks on obviously non-compliant data.

[0095] When a rule fails to be validated during execution: A detailed error log is generated, containing two key pieces of information: first, the "content point identifier" that triggered the error (e.g., the field name "images"), and second, the specific "rule violation details" (e.g., "Number of images exceeded the limit; maximum allowed is 9, but 12 were actually submitted"). This logging method ensures that the problem can be accurately located and the cause is clear and explicit.

[0096] For subsequent processing, the system can choose one of two paths based on a preset strategy: Continue verification: Continue to verify the remaining rules for this location to collect all possible violations in this field, and finally provide the user with a complete list of modifications.

[0097] Short-circuit redirection: Immediately stop subsequent verification of this point and directly jump to the verification process of the next point. This strategy is suitable for scenarios that prioritize maximum verification efficiency or where the failure of a critical rule is sufficient to determine that the point is unqualified.

[0098] If all rules under a certain content location pass verification, the system determines that the location has been "verified successfully". Subsequently, the verification engine will automatically jump to the next content location and continue to execute the same verification process until all locations have been processed.

[0099] Through step S603, this embodiment can flexibly balance verification integrity and system performance by selecting a strategy (continue or jump) to adapt to different business needs.

[0100] In one embodiment of the content constraint method of this application, it may further include the following: Step S701: Trigger the encoding of the erroneous content point; Step S702: Trigger the error by providing the business description information for the content location; Step S703: The specific rule type violated by the content point that triggered the error and its judgment logic; Step S704: Compare the expected parameter value of the rule for the content point that triggered the error with the actual detected parameter value.

[0101] Optionally, in this embodiment, this step is a user-friendly error message generated by the rule verification engine.

[0102] First, pinpoint the exact "content point" (i.e., the specific input field, such as moment_images) that violated the rule. This is the primary index for error messages, ensuring that the problem can be located at a specific point in the form or data structure.

[0103] Providing only codes (such as moment_images) may not be intuitive enough for users or non-technical personnel. This step converts the codes into their corresponding "business description information" (such as "Moments images"). This is equivalent to adding an easy-to-understand "label" to the error field, making the error report immediately associated with the user interface or business scenario.

[0104] After identifying "where the error occurred" and "which field was incorrect," the next step is to diagnose "which rule was violated." It clearly states which type of rule was violated. Next, the abstract rules are transformed into concrete, quantifiable comparisons of expected and actual values. This provides the most direct targets and basis for correction.

[0105] Through step S704, this embodiment successfully transforms a technical verification failure into a business diagnostic report that serves the end user.

[0106] To improve the efficiency of managing constraints on multi-type and multi-dimensional content, this application provides an embodiment of a content constraint device for implementing all or part of the aforementioned content constraint method. See [link to embodiment]. Figure 2 The content constraint device specifically includes the following components: The content model construction module 10 is used to construct a content model with a hierarchical structure. The content model includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations, which are used to define the rule types and rule parameters for multi-dimensional verification of content location data. The rule configuration loading module 20 is used to receive verification requests for specific library types and specific content types based on the current application scenario, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. The system default rules, library level rules and content type rules are merged according to a preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. The rule verification and constraint module 30 is used to receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, the verification function is executed sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and the corresponding judgment result is recorded. After all content point verification is completed, the final judgment result is output as data to complete the content data constraint for publication.

[0107] As can be seen from the above description, the content constraint device provided in this application embodiment can construct a multi-layered content model with a library type layer, a content type layer, a content location layer, and a rule layer, supporting various rule types such as quantity, format, size, dimensions, proportion, word count, and duration; through a rule inheritance and overriding mechanism, it merges system default, library level, and content type rules according to priority to form an integrated content model suitable for the current scenario; after receiving actual content data, it traverses each content location, sequentially performs mandatory judgment and rule verification, and outputs the verification results, thereby improving the efficiency of managing multi-type and multi-dimensional content constraints.

[0108] To further illustrate this solution, this application also provides a specific application example of using the above-mentioned content constraint device to implement the content constraint method, which specifically includes the following: This embodiment also includes: a front-end and back-end rule sharing mechanism. Design concept: The Content Model is stored in JSON format; The front-end obtains the Content Model via API; The front end uses the same validation logic; This provides dual protection through both "pre-submission verification" and "post-submission verification". Front-end and back-end verification process: Plain Text User Operations ↓ Fill out the form ↓ Pre-submission validation (frontend) ├─ Failure → Displaying an error and preventing submission Success → Send request to backend ↓ Post-submission verification (backend) Failure → Error message returned Success → Save Data Specifically, in this embodiment, one example includes configuring the Content Model for Moments images: Scenario Description: Social media operators need to post pictures on WeChat Moments. Requirements: Maximum of 9 pictures, each no larger than 3MB, only JPG / PNG images are supported, aspect ratio 1:1 or 16:9.

[0109] Step 1: Create Content Model Configuration The administrator logs into the backend, goes to the Content Model configuration page, and selects: Library type: Social media content library (social_media) Content type: Moment images (Moment_images) Step 2: Configure content locations Add point 1 - Content title: Point code: title Location Name: Content Title Category type: text Required: Yes Add a rule: Quantity rule: equal to 1 Formatting rules: Plain text Word count rule: 1-50 words Add location 2 - Moments image: Point encoding: moment_images Location Name: WeChat Moments Images Category type: image Required: Yes Add a rule: Quantity rule: less than or equal to 9 Formatting rules: Only JPG and PNG formats are supported. Size rule: Less than or equal to 3MB (3145728 bytes) Aspect ratio rules: including 1:1 and 16:9 Step 3: Save configuration The system saves the configuration as JSON: Stored in the database table: content_model Step 4: Automatically apply rules on the front end When users create images for their Moments: The front end obtains the Content Model via API. Dynamically rendered form (title input box + image uploader) Real-time verification when uploading images: Quantity: Maximum of 9 cards can be selected. Format: Only display JPG / PNG files Size: Images larger than 3MB will display a warning. Aspect Ratio: Check after uploading; images that do not meet the requirements will be highlighted in red. Step 5: Backend Verification When the user submits: Verification example: The user uploaded 10 images, including one GIF and one that is 3.5MB in size. Front-end verification result:

[0110] Front-end display: A red error message appears next to the image uploader. Disable the submit button After the user made corrections (removing redundant images, replacing GIFs with PNGs, and compressing the images), the submission was successful, the verification was passed, and the content was created successfully.

[0111] Specifically, in this embodiment, one example includes rule inheritance - product library image rules: Scene description: System default: Maximum image size is 10MB, supports all common formats. Product library requirements: Images must be no larger than 5MB; only JPG / PNG images are supported. Phone type requirement: Maximum image size 2MB Step 1: Define system default rules

[0112] Step 2: Define product library rules (overriding system defaults)

[0113] Step 3: Define phone type rules (overlapping product library)

[0114] Step 4: System Merge Rules When a user creates a product of type "Mobile Phone", the system automatically merges the rules:

[0115] Final effective rules: Maximum image size: 2MB (covering different phone types) Supported formats: JPG / PNG (product library coverage, inherited from phone type) Advantages: For phone types, only the "size" rule needs to be configured; the "format" rule will be automatically inherited. If you need to modify the formatting rules for all products, you only need to modify the product library-level configuration. It enables the reuse and centralized management of rules.

[0116] Specifically, in this embodiment, one example includes custom rule extension: Scenario description: A company needs to verify that the "frame rate" of a video must be ≥30fps, but there is no frame rate rule in the system's default rules.

[0117] Step 1: Define a new rule type

[0118] Step 2: Register rules to the validator

[0119] Step 3: Use in Content Model

[0120] Step 4: Verify Execution The validator automatically identifies and executes custom rules:

[0121] Scalability: Enterprises can customize any rules according to their business needs; Integrate into the verification engine through a registration mechanism; No need to modify the core code.

[0122] From a hardware perspective, in order to improve the efficiency of managing constraints on multi-type and multi-dimensional content, this application provides an embodiment of an electronic device for implementing all or part of the content constraint method for publishing content, wherein the electronic device specifically includes the following: The system comprises a processor, memory, a communications interface, and a bus; wherein the processor, memory, and communications interface communicate with each other via the bus; the communications interface is used to transmit information between the content constraint method and core business systems, user terminals, and related databases and other related devices; the logic controller can be a desktop computer, tablet computer, or mobile terminal, etc., and this embodiment is not limited to these. In this embodiment, the logic controller can be implemented with reference to the embodiments of the content constraint method in the previous embodiments, and the content of the embodiments of the content constraint method is incorporated herein, and repeated details will not be described again.

[0123] It is understood that the user terminal may include smartphones, tablet computers, network set-top boxes, portable computers, desktop computers, personal digital assistants (PDAs), in-vehicle devices, smart wearable devices, etc. Among these, the smart wearable devices may include smart glasses, smartwatches, smart bracelets, etc.

[0124] In practical applications, the content constraint method can be executed on the electronic device side as described above, or all operations can be completed on the client device. The choice can be made based on the processing power of the client device and the limitations of the user's usage scenario. This application does not impose any limitations on this. If all operations are completed on the client device, the client device may further include a processor.

[0125] The aforementioned client device may have a communication module (i.e., a communication unit) that can communicate with a remote server to achieve data transmission with the server. The server may include a server on the task scheduling center side; in other implementation scenarios, it may also include a server on an intermediate platform, such as a server on a third-party server platform that has a communication link with the task scheduling center server. The server may include a single computer device, a server cluster consisting of multiple servers, or a distributed server structure.

[0126] Figure 3 This is a schematic block diagram illustrating the system configuration of the electronic device 9600 according to an embodiment of this application. Figure 3 As shown, the electronic device 9600 may include a central processing unit 9100 and a memory 9140; the memory 9140 is coupled to the central processing unit 9100. It is worth noting that... Figure 3 This is an example; other types of structures can also be used to supplement or replace this structure to achieve telecommunications functions or other functions.

[0127] In one embodiment, the content constraint method functionality can be integrated into the central processing unit 9100. The central processing unit 9100 can be configured to perform the following controls: Step S101: Construct a content model with a hierarchical structure. The content model includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations, which are used to define the rule types and rule parameters for multi-dimensional verification of content location data. Step S102: Based on the current application scenario, receive verification requests for specific library types and specific content types, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. Merge the system default rules, library level rules and content type rules according to the preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. Step S103: Receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, execute the verification function sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and record the corresponding judgment result. After completing all content point verification, output the final judgment result as data to complete the content data constraint for publication.

[0128] As can be seen from the above description, the electronic device provided in this application embodiment constructs a multi-layered content model with a library type layer, a content type layer, a content location layer, and a rule layer, supporting various rule types such as quantity, format, size, dimensions, proportion, word count, and duration; through a rule inheritance and overriding mechanism, it merges system default, library level, and content type rules according to priority to form an integrated content model suitable for the current scenario; after receiving actual content data, it traverses each content location, sequentially performs mandatory judgment and rule verification, and outputs the verification results, thereby improving the efficiency of managing multi-type and multi-dimensional content constraints.

[0129] In another implementation, the content constraint method can be configured separately from the central processing unit 9100. For example, the content constraint method can be configured as a chip connected to the central processing unit 9100, and the content constraint method function can be implemented through the control of the central processing unit.

[0130] like Figure 3 As shown, the electronic device 9600 may further include: a communication module 9110, an input unit 9120, an audio processor 9130, a display 9160, and a power supply 9170. It is worth noting that the electronic device 9600 does not necessarily need to include these components. Figure 3 All components shown; in addition, the electronic device 9600 may also include Figure 3 For components not shown, please refer to existing technologies.

[0131] like Figure 3 As shown, the central processing unit 9100, sometimes also referred to as a controller or operating control, may include a microprocessor or other processor device and / or logic device, which receives inputs and controls the operation of various components of the electronic device 9600.

[0132] The memory 9140 may be, for example, one or more of a cache, flash memory, hard drive, removable media, volatile memory, non-volatile memory, or other suitable devices. It may store the aforementioned failure-related information, and also store a program for executing that information. The central processing unit 9100 may execute the program stored in the memory 9140 to perform information storage or processing, etc.

[0133] Input unit 9120 provides input to central processing unit 9100. Input unit 9120 may be, for example, a keypad or touch input device. Power supply 9170 provides power to electronic device 9600. Display 9160 displays images and text. Display may be, for example, an LCD display, but is not limited thereto.

[0134] The memory 9140 can be a solid-state memory, such as a read-only memory (ROM), random access memory (RAM), a SIM card, etc. It can also be a memory that retains information even when power is off, can be selectively erased, and contains more data; examples of this type of memory are sometimes referred to as EPROMs. The memory 9140 can also be some other type of device. The memory 9140 includes a buffer memory 9141 (sometimes referred to as a buffer). The memory 9140 may include an application / function storage unit 9142 for storing application programs and function programs or processes for executing the operation of the electronic device 9600 via the central processing unit 9100.

[0135] The memory 9140 may also include a data storage unit 9143 for storing data, such as contacts, digital data, pictures, sounds, and / or any other data used by the electronic device. The driver storage unit 9144 of the memory 9140 may include various drivers for the electronic device for communication functions and / or for performing other functions of the electronic device (such as messaging applications, address book applications, etc.).

[0136] The communication module 9110 is a transmitter / receiver that sends and receives signals via the antenna 9111. The communication module 9110 is coupled to the central processing unit 9100 to provide input signals and receive output signals, which is the same as in a conventional mobile communication terminal.

[0137] Based on different communication technologies, multiple communication modules 9110 can be configured in the same electronic device, such as cellular network modules, Bluetooth modules, and / or wireless LAN modules. The communication module 9110 is also coupled to a speaker 9131 and a microphone 9132 via an audio processor 9130 to provide audio output via the speaker 9131 and receive audio input from the microphone 9132, thereby realizing typical telecommunications functions. The audio processor 9130 may include any suitable buffer, decoder, amplifier, etc. Furthermore, the audio processor 9130 is also coupled to a central processing unit 9100, enabling on-device recording via the microphone 9132 and on-device playback of stored sound via the speaker 9131.

[0138] Embodiments of this application also provide a computer-readable storage medium capable of implementing all steps of the content publishing constraint method with a server or client as the execution subject in the above embodiments. The computer-readable storage medium stores a computer program that, when executed by a processor, implements all steps of the content publishing constraint method with a server or client as the execution subject in the above embodiments. For example, when the processor executes the computer program, it implements the following steps: Step S101: Construct a content model with a hierarchical structure. The content model includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations, which are used to define the rule types and rule parameters for multi-dimensional verification of content location data. Step S102: Based on the current application scenario, receive verification requests for specific library types and specific content types, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. Merge the system default rules, library level rules and content type rules according to the preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. Step S103: Receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, execute the verification function sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and record the corresponding judgment result. After completing all content point verification, output the final judgment result as data to complete the content data constraint for publication.

[0139] As described above, the computer-readable storage medium provided in this application embodiment constructs a multi-layered content model with a library type layer, a content type layer, a content location layer, and a rule layer, supporting various rule types such as quantity, format, size, dimension, ratio, word count, and duration. Through a rule inheritance and overriding mechanism, it merges system default, library-level, and content type rules according to priority to form an integrated content model suitable for the current scenario. After receiving actual content data, it traverses each content location, sequentially performs mandatory judgment and rule verification, and outputs the verification results, thereby improving the efficiency of managing multi-type and multi-dimensional content constraints.

[0140] Embodiments of this application also provide a computer program product capable of implementing all steps of the content publishing constraint method described above, where the execution subject is a server or a client. When executed by a processor, this computer program / instruction implements the steps of the content publishing constraint method. For example, the computer program / instruction implements the following steps: Step S101: Construct a content model with a hierarchical structure. The content model includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations, which are used to define the rule types and rule parameters for multi-dimensional verification of content location data. Step S102: Based on the current application scenario, receive verification requests for specific library types and specific content types, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. Merge the system default rules, library level rules and content type rules according to the preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. Step S103: Receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, execute the verification function sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and record the corresponding judgment result. After completing all content point verification, output the final judgment result as data to complete the content data constraint for publication.

[0141] As described above, the computer program product provided in this application embodiment constructs a multi-layered content model with a library type layer, a content type layer, a content location layer, and a rule layer, supporting various rule types such as quantity, format, size, dimensions, proportion, word count, and duration. Through a rule inheritance and overriding mechanism, it merges system default, library-level, and content type rules according to priority to form an integrated content model suitable for the current scenario. After receiving actual content data, it traverses each content location, sequentially performs mandatory judgment and rule verification, and outputs the verification results, thereby improving the efficiency of managing multi-type and multi-dimensional content constraints.

[0142] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, apparatus, or computer program products. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention 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.

[0143] This invention is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (devices), and computer program products according to embodiments of the invention. 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 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.

[0144] 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.

[0145] 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.

[0146] Specific embodiments have been used to illustrate the principles and implementation methods of this invention. The descriptions of the embodiments above are only for the purpose of helping to understand the method and core ideas of this invention. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this invention. Therefore, the content of this specification should not be construed as a limitation of this invention.

Claims

1. A method for constraining published content, characterized in that, The method includes: A hierarchical content model is constructed, which includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations to define the rule types and rule parameters for multidimensional verification of content location data. Based on the current application scenario, a verification request for a specific library type and a specific content type is received. Based on the content model, the corresponding multi-level rule configuration is loaded according to the verification request. The rule inheritance and overriding algorithm is executed according to the multi-level rule configuration. The system default rules, library level rules and content type rules are merged according to a preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. The system receives input containing actual content data, traverses the content point layer of the integrated content model, determines the corresponding content point configuration, performs a mandatory determination on the actual content data based on the content point configuration, and if the determination passes, executes the verification function sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, records the corresponding judgment results, and outputs the final judgment result as data after completing all content point verification, thus completing the content data constraint for publication.

2. The content constraint method according to claim 1, characterized in that, The construction of a hierarchical content model includes: Construct a library type layer to define library-level rule configurations, where the library level represents the specific application scenario level; Construct a content type layer to define the rule configuration for content type levels, where the content type level represents the content category under a specific library type; Construct a content point layer to define the constraint rules for specific fields. The content point level represents the specific content data under a specific content category. Build a rules layer to define multi-dimensional rule configurations.

3. The content constraint method according to claim 2, characterized in that, The defined multi-dimensional rule configuration includes: Define quantity verification rules, including limiting the number of resources and supporting comparison types of equal to, less than, less than or equal to, greater than, and greater than or equal to ranges; Define format validation rules, including restrictions on file formats, and support for inclusion and exclusion comparison types; Define size validation rules, including limiting file size and supporting comparison types such as less than, less than or equal to, and range; Define size verification rules, including limiting pixel size and supporting comparison types of equal to or greater than or equal to a range; Define aspect ratio validation rules, including limiting aspect ratio and supporting comparison types such as containment and equality; Define word count validation rules, including limiting the number of characters in the text and supporting comparison types such as less than or equal to and range; Define duration verification rules, including limiting video / audio duration, and supporting comparison types such as less than or equal to and range.

4. The content constraint method according to claim 1, characterized in that, The step of merging system default rules, library-level rules, and content type rules according to preset priorities to determine the corresponding integrated content model suitable for the current application scenario includes: Define priority rules, including a multi-level priority order from low to high: system default rules, library level rules, and content type rules. Higher-level rule type definitions will override lower-level rule type definitions. Based on the priority rules, using the system default rules in the current application scenario rule configuration as the baseline, the corresponding content of the library-level rules is merged into the baseline through deep traversal and field replacement operations. Then, the corresponding content of the content type rules is merged into the baseline to determine the corresponding integrated content model suitable for the current application scenario.

5. The content constraint method according to claim 1, characterized in that, The determination of whether the actual content data is required based on the content location configuration includes: Based on the content location configuration, the corresponding location value is extracted from the actual content data object, and the mandatory rule of the location is determined. If the location is configured as required and the extracted value is empty, then record the required field error in the judgment result; If the location is configured as required and the extracted value is not empty, the judgment passes.

6. The content constraint method according to claim 1, characterized in that, The process involves configuring the rules corresponding to each content point in the actual content data, sequentially executing verification functions for logical judgments, and recording the corresponding judgment results, including: For each content point of the actual content data, the verification function is executed sequentially according to the rule configuration corresponding to that point to perform logical judgments. If any rule verification fails, the identifier of that point and the corresponding rule violation details are recorded in the judgment result, and the verification of other rules for the current point continues or the process jumps to the next point. If the verification at this point is successful, proceed to the next point.

7. The content constraint method according to claim 1, characterized in that, Details of the rule violation include: The content bit encoding that triggered the error; The business description information of the content location that triggered the error; The specific rule type violated by the content location that triggered the error, and its judgment logic; Compare the expected parameter values ​​of the rules for the content points that trigger errors with the actual detected parameter values.

8. A content constraint device, characterized in that, The device includes: The content model building module is used to build a hierarchical content model, which includes a library type layer, a content type layer, a content location layer, and a rule layer. The rule layer includes various types of rule configurations to define the rule types and parameters for multi-dimensional verification of content location data. The rule configuration loading module is used to receive verification requests for specific library types and specific content types based on the current application scenario, load the corresponding multi-level rule configuration according to the verification request based on the content model, and execute the rule inheritance and overriding algorithm according to the multi-level rule configuration. The system default rules, library level rules and content type rules are merged according to a preset priority to determine the corresponding integrated content model suitable for the current application scenario. The multi-level rule configuration is the rule configuration corresponding to each level of the content model. The rule verification and constraint module is used to receive input containing actual content data, traverse the content point layer of the integrated content model, determine the corresponding content point configuration, and perform a mandatory judgment on the actual content data based on the content point configuration. If the judgment passes, the verification function is executed sequentially for each content point of the actual content data according to the rule configuration corresponding to that point, and the corresponding judgment result is recorded. After all content point verification is completed, the final judgment result is output as data, thus completing the content data constraint for publication.

9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps of the content constraint method according to any one of claims 1 to 7.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the steps of the content constraint method according to any one of claims 1 to 7.