Intelligent detection method and system for visual design defects

By constructing an intelligent visual design defect detection system, geometric and visual style attributes in design documents are obtained. Combined with semantic role tags, a layout relationship network is constructed and defects are identified. This solves the problems of time-consuming, labor-intensive, and high false positive rate in existing visual design inspection technologies, and achieves efficient and accurate visual design defect detection.

CN122176740APending Publication Date: 2026-06-09WUXI INSTITUTE OF TECHNOLOGY

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
WUXI INSTITUTE OF TECHNOLOGY
Filing Date
2026-01-23
Publication Date
2026-06-09

AI Technical Summary

Technical Problem

Existing technologies rely on manual review and simple rule-based detection in visual design draft inspection, which are time-consuming, labor-intensive, have limited detection dimensions, high false positive rates, and insufficient intelligence. They are difficult to effectively detect based on deep understanding of design semantics and multi-dimensional design rules.

Method used

By acquiring the geometric attributes, visual style attributes, and semantic role tag sets of visible design elements in the design document, a layout relationship network is constructed and matched with preset rules to identify layout and visual defects. The defects are then prioritized and merged based on their severity level to generate a defect detection report.

Benefits of technology

It enables efficient and accurate visual design defect detection, ensuring the integrity and accuracy of the detection, improving work efficiency and decision-making quality, and providing consistent and accessible visual design inspection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122176740A_ABST
    Figure CN122176740A_ABST
Patent Text Reader

Abstract

The application provides a visual design defect intelligent detection method and system, obtains a design document exported from a visual design tool, extracts geometric attribute sets, visual style attribute sets and semantic role label sets of each visible design element in the design document, constructs a layout relationship network based on all the geometric attribute sets, relative positions, overlapping relationships and spacings of the boundary boxes of each visible design element, and further identifies a layout defect set, matches all the visual style attribute sets with a design specification knowledge base to identify a basic visual defect set, and performs correlation analysis on the basic visual defect set and the layout defect set, when a visible design element triggers multiple defects, performs priority sorting and defect merging on the visible design element based on a preset defect type severity level, and generates a corresponding core defect list. According to the scheme of the application, the defect detection of visual design can be performed based on deep understanding of design semantics and multi-dimensional design rules.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual design technology, and in particular to a method and system for intelligent detection of visual design defects. Background Technology

[0002] With the increasing importance of user experience in digital products, user interface and user experience design have become key links in the software development lifecycle. During the design phase, ensuring that visual design drafts comply with brand specifications, design system standards, accessibility guidelines, and basic layout aesthetic principles is the foundation for guaranteeing the high quality, consistency, and professionalism of the final product.

[0003] Currently, defect detection in visual design drafts mainly relies on two methods: First, manual visual review and design walkthroughs. This method depends on personal experience and memory to identify inconsistencies in style, layout errors, color misuse, and insufficient text readability. However, for large projects or complex pages, manual item-by-item checking is not only time-consuming and labor-intensive, but also prone to overlooking defects or causing disputes due to different reviewers' experiences and focus. Second, automated scripts or plugins based on simple rules exist. Existing technologies have some automated inspection tools, which typically perform inspections based on specific, isolated rules. For example, checking whether color contrast meets the WCAG standard (Web Content Accessibility Guidelines) or measuring the specific pixel distance between two elements. However, these tools suffer from problems such as single detection dimensions, high false positive rates, and insufficient intelligence. Therefore, how to perform defect detection in visual design based on deep understanding of design semantics and multi-dimensional design rules has become a challenge for the industry. Summary of the Invention

[0004] Based on this, this application provides a visual design defect intelligent detection method and system that uses deep understanding of design semantics and multi-dimensional design rules to detect visual design defects.

[0005] In a first aspect, this application provides a method for intelligent detection of visual design defects, comprising the following steps: Obtain design documents exported from visual design tools; Extract the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and filter out hidden layers and non-interactive decorative elements; Based on all the geometric attribute sets, as well as the relative positions, overlaps, and spacing of the bounding boxes of each visible design element, a layout relationship network representing the alignment and spatial distribution among the visible design elements is constructed. The layout relationship network is matched with preset layout rules to identify layout defect sets, and all visual style attribute sets are matched with preset design specification knowledge bases to identify basic visual defect sets. The design specification knowledge bases contain mandatory style rules bound to all semantic role tag sets. The basic visual defect set and the layout defect set are correlated and analyzed. When a visible design element triggers multiple defects, the defects are prioritized and merged based on the preset severity level of the defect type to generate a corresponding core defect list, and then the defect detection report of the design document is output.

[0006] In some embodiments, extracting the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and filtering hidden layers and non-interactive decorative elements specifically includes: Iterate through all nodes of the design document and filter out all visible design elements based on the node's visibility attribute; For each visible design element, parse the node data of the visible design element to extract its geometric attribute set and visual style attribute set; Based on the component association attributes or layer naming information of visible design elements, match and determine their semantic role tag set, and remove non-interactive decorative elements from them according to predefined filtering rules.

[0007] In some embodiments, based on all geometric attribute sets, and the relative positions, overlaps, and spacing of the bounding boxes of each visible design element, constructing a layout relationship network representing the alignment and spatial distribution among the visible design elements specifically includes: Based on the geometric attribute set of each visible design element, determine the relative positional relationship, overlap area, and minimum spacing between the bounding boxes of any two visible design elements; Based on the obtained relative positional relationships, overlapping areas, and minimum spacing, and according to predefined judgment thresholds, a descriptor describing the spatial relationship type between pairs of visible design elements is generated. Using each visible design element as a node and the descriptor of the spatial relationship type as the attribute of the edge connecting the corresponding node, an undirected graph network with attributes is constructed as the layout relationship network.

[0008] In some embodiments, matching the layout relationship network with preset layout rules to identify a set of layout defects specifically includes: Load the preset layout rules, which define constraints on element alignment, spacing distribution, and safety margins; Traverse each edge and its attributes in the layout relationship network, and compare and logically verify the two visible design elements connected by the edge and the spatial relationship type descriptor between them with the corresponding constraints in the layout rules. An instance that violates any constraint in the layout rules and is found during the comparison and verification process is recorded as a layout defect record containing the identifier of the violating element, the specific rule violated, and details of the violation. Summarize all layout defect records to obtain a layout defect set.

[0009] In some embodiments, matching all visual style attribute sets with a pre-defined design specification knowledge base to identify a basic set of visual defects specifically includes: Load a pre-built design specification knowledge base, which stores measurable mandatory style rules bound to different semantic role tags; For each visible design element, all applicable mandatory style rules are retrieved from the design specification knowledge base based on its semantic role tag set, and the visual style attribute set of the visible design element is compared item by item with all applicable mandatory style rules. Instances whose visual style attribute values ​​do not meet the requirements of the queried mandatory style rules are recorded as a basic visual defect record containing the identifier of the violating element, the specific style rule violated, and detailed deviation information. All basic visual defect records are compiled to form a basic visual defect set.

[0010] In some embodiments, the correlation analysis between the basic visual defect set and the layout defect set specifically includes: Establish an association index with the unique identifier of the visible design element as the key, and merge and group all defect records in the basic visual defect set and the layout defect set according to their corresponding violation element identifiers to obtain multiple defect groups; For each visible design element, analyze the defect grouping under the visible design element identifier to identify all basic visual and layout defects triggered by the visible design, and record the co-occurrence relationships between the defects.

[0011] In some embodiments, when a visible design element triggers multiple defects, the defects are prioritized and merged based on a preset defect type severity level to generate a corresponding core defect list, specifically including: For each defect group obtained after the association analysis, based on the defect type corresponding to each defect record in the defect group, the pre-set defect type severity level mapping table is queried, and a severity level value is assigned to each defect. Based on the severity level value, all defect records within the same defect group are sorted in descending order to ensure that defects with higher severity levels are given priority. Perform a logical merging operation on the sorted defect records to merge multiple defects describing the same attribute problem of the same visible design element into a comprehensive defect description; All sorted and merged defects are grouped and integrated to generate a global list of core defects organized by severity level and with redundancy removed.

[0012] Secondly, this application provides a visual design defect intelligent detection system, comprising: The acquisition module is used to acquire design documents exported from visual design tools; The processing module is used to extract the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and to filter hidden layers and non-interactive decorative elements. The processing module is also used to construct a layout relationship network representing the alignment and spatial distribution between visible design elements based on all geometric attribute sets and the relative positions, overlap relationships and spacing of the bounding boxes of each visible design element. The processing module is also used to match the layout relationship network with preset layout rules to identify layout defect sets, and to match all visual style attribute sets with preset design specification knowledge bases to identify basic visual defect sets. The design specification knowledge base contains mandatory style rules bound to all semantic role tag sets. The execution module is used to perform correlation analysis on the basic visual defect set and the layout defect set. When a visible design element triggers multiple defects, it prioritizes and merges the defects based on the preset defect type severity level to generate a corresponding core defect list, and then outputs a defect detection report of the design document.

[0013] Thirdly, this application provides a computer device, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps of the above-described intelligent detection method for visual design defects.

[0014] Fourthly, this application provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps of the above-described intelligent detection method for visual design defects.

[0015] The technical solutions provided by the embodiments disclosed in this application have the following beneficial effects: The intelligent detection method and system for visual design defects provided in this application firstly acquires a design document exported from a visual design tool, extracts the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and filters out hidden layers and non-interactive decorative elements. This step can extract structured data from the design tool without loss and accurately remove irrelevant visual noise, thereby providing a clean, high-fidelity, and semantically rich set of design elements for subsequent analysis, ensuring the accuracy and completeness of the detection basis from the source, and avoiding misjudgment or missed detection due to data impurities or missing information; secondly, based on all geometric attribute sets... This process involves constructing a layout relationship network representing the alignment and spatial distribution of visible design elements, along with their relative positions, overlaps, and spacing. This systematically transforms discrete, isolated element coordinate information into a global, computable spatial relationship map, thereby converting the subjective and ambiguous issue of "layout aesthetics" into the verification of objective and explicit relationship patterns. This establishes a solid mathematical model foundation for automated and quantifiable layout compliance analysis. Then, the layout relationship network is matched with pre-defined layout rules to identify layout defect sets, and all visual style attribute sets are compared with pre-defined design specifications. A knowledge base is used for matching to identify a basic set of visual defects. This design specification knowledge base contains mandatory style rules bound to all semantic role tag sets. This step can be performed in parallel using a dual-channel approach: "targeted" detection based on the semantics of the design system and "pattern-based" detection based on geometric relationships. This simultaneously covers all design rules from micro-style attributes (such as color and font) to macro-layout structures (such as alignment and spacing), significantly improving the dimensionality and accuracy of the detection and ensuring that multiple requirements for accessibility and visual order are systematically verified. Finally, a correlation analysis is performed between the basic set of visual defects and the layout defect set. When a visible design element triggers multiple... When a defect is identified, it is prioritized and merged based on a pre-defined severity level to generate a corresponding core defect list. This process then outputs a defect detection report for the design document. This step enables intelligent cross-dimensional defect association, priority adjudication based on business impact, and automated integration of report information. This transforms a fragmented, raw problem list into a focused, logically clear action list that directly guides development and remediation, significantly improving efficiency and decision-making quality from problem discovery to resolution. In summary, the solution presented in this application can perform visual design defect detection based on deep understanding of design semantics and multi-dimensional design rules. Attached Figure Description

[0016] Figure 1 This is an exemplary flowchart of a visual design defect intelligent detection method according to some embodiments of this application; Figure 2This is a schematic diagram illustrating an application scenario of a defect detection data processing system according to some embodiments of this application; Figure 3 This is a flowchart illustrating the process of identifying a set of layout defects according to some embodiments of this application; Figure 4 This is a schematic diagram of the structure of a visual design defect intelligent detection system according to some embodiments of this application; Figure 5 This is a schematic diagram of the structure of a computer device for implementing an intelligent detection method for visual design defects according to some embodiments of this application. Detailed Implementation

[0017] To better understand the above technical solutions, the following will provide a detailed explanation of the technical solutions in conjunction with the accompanying drawings and specific implementation methods.

[0018] refer to Figure 1 The figure is an exemplary flowchart of a visual design defect intelligent detection method according to some embodiments of this application. The visual design defect intelligent detection method mainly includes the following steps: In step 101, obtain the design document exported from the visual design tool.

[0019] In practice, obtaining the design document exported from the visual design tool can be achieved in the following way: by calling the official application programming interface of the target visual design tool, such as Figma, Sketch, or Adobe XD, or parsing its public, standardized file storage format, a design document containing complete design metadata can be obtained. For example, when the target design document is located on the Figma platform, an authenticated HTTPS request can be initiated to the RESTful application programming interface provided by Figma. The request carries parameters consisting of a unique identifier for the design document. The interface will return a response in a structured JavaScript object representation format. This response data is the design document. The design document fully describes the hierarchical relationship, geometric transformation attributes, style attributes, and component definition information of all nodes in the file (including artboards, frames, component instances, vector graphics, text layers, etc.). Other methods can also be used in other embodiments, which are not limited here.

[0020] In some embodiments, reference Figure 2As shown in the figure, this figure is a schematic diagram of the application scenario of the defect detection data processing system shown in some embodiments of this application. The figure includes three main components: acquisition device, server and data storage device. The acquisition device is responsible for collecting design documents exported from visual design tools and sending the acquired design documents to the server through a communication network. The defect detection data processing system runs on the server. The server stores the processing results in the data storage device and visualizes them.

[0021] In step 102, the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document are extracted, and hidden layers and non-interactive decorative elements are filtered out.

[0022] In some embodiments, extracting the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and filtering hidden layers and non-interactive decorative elements, can be achieved by the following steps: Iterate through all nodes of the design document and filter out all visible design elements based on the node's visibility attribute; For each visible design element, parse the node data of the visible design element to extract its geometric attribute set and visual style attribute set; Based on the component association attributes or layer naming information of visible design elements, match and determine their semantic role tag set, and remove non-interactive decorative elements from them according to predefined filtering rules.

[0023] It should be noted that, in this application, visible design elements refer to all interface components such as graphics, text, or components that are ultimately presented to the user in a visual design document and carry certain functions or content meanings; the geometric attribute set is a set of data used to uniquely describe the physical characteristics of a visible design element, such as its spatial position, size, and orientation in a two-dimensional plane; the visual style attribute set is a set of attribute values ​​used to define and describe the visual appearance (such as color, font, stroke, effect, etc.) of a visible design element; the semantic role tag set is a set of one or more identifiers assigned to a visible design element to identify its function, content type, or design intent in the interface; and the non-interactive decorative elements refer to visible design elements in a visual design document that only serve to beautify, embellish, or serve as background, and do not have interactive functions or carry key information content.

[0024] In specific implementation, traversing all nodes of the design document and filtering all visible design elements based on the node's visibility attribute can be achieved in the following way: starting from the root node of the design document, which represents the entire design file structure, a depth-first recursive traversal is performed; when visiting each node, its stored "visible" boolean attribute, defined by the design tool, is read; only when the attribute value is "true" is the node determined to be a visible design element and added to the set of visible design elements to be processed; for container nodes of type "GROUP" or "FRAME", even if they are visible themselves, their child node list will continue to be recursively traversed to ensure that no visible design elements nested within the container are missed; this process ultimately outputs an ordered set containing visible leaf nodes and visible container nodes in all levels, which serves as the explicit object for attribute extraction and analysis in subsequent steps, thus completing the filtering of hidden layers. Other methods can also be used in other embodiments, which are not limited here.

[0025] In practical implementation, for each visible design element, parsing its node data to extract its geometric attribute set and visual style attribute set can be achieved as follows: For each visible design element, directly access its corresponding node data structure; the operation to extract the geometric attribute set includes: reading the numerical attributes "x", "y", "width", and "height" describing its absolute position and size, as well as the "rotation" attribute describing rotation, which together constitute the basic geometric attribute set describing the spatial occupancy of the visible design element; the operation to extract the visual style attribute set includes: first, parsing the node's "fills" array to obtain its fill style... The method includes color values, gradient parameters, or image fill references, such as RGB hexadecimal codes or RGBA values. Next, the "strokes" array is parsed to obtain the stroke width, color, and style. For visible design elements of text type, the "fontFamily," "fontSize," "fontWeight," "lineHeight," and "textAlign" attributes are additionally parsed to form a subset of their text styles. All these extracted parameters, directly related to visual presentation, are integrated into a set of visual style attributes for the visible design element. Other methods can be used in other embodiments, which are not limited here.

[0026] In practice, based on the component association attributes or layer naming information of visible design elements, matching and determining their semantic role tag set, and removing non-interactive decorative elements according to predefined filtering rules, can be achieved as follows: For each visible design element, determine its semantic role tag set. Specifically, first check if the visible design element node is associated with a component instance. If so, read its "componentProperties" field or component definition name, and match it according to the predefined "component name-semantic role" mapping table, such as mapping "Button / Primary" to "main button," assigning it the corresponding semantic role tag. If not associated with a component, analyze its "name" field, i.e., the layer name, and match it using keyword matching rules. If the name contains "title", it is assigned the "title text" role to determine the semantic role label. Then, a predefined filtering rule is loaded, which includes a list of semantic role labels for "non-interactive decorative elements", such as "decorative graphics" and "background patterns", and a list of keywords for matching layer names, such as "bg", "decoration", and "ornament". Then, the semantic role labels and layer names of the currently visible design elements are compared with the filtering rules. If any condition is matched, the element is removed from the set of visible design elements. Finally, the visible design elements and their corresponding geometric attribute sets, visual style attribute sets, and semantic role label sets are retained. Other methods can also be used in other embodiments, which are not limited here.

[0027] It should be noted that the above steps can extract structured data from the design tools without loss and accurately remove irrelevant visual noise, thereby providing a clean, high-fidelity and semantically rich set of design elements for subsequent analysis. This ensures the accuracy and integrity of the detection basis from the source and avoids misjudgment or missed detection due to data impurities or missing information.

[0028] In step 103, based on all the geometric attribute sets, as well as the relative positions, overlaps, and spacing of the bounding boxes of each visible design element, a layout relationship network representing the alignment and spatial distribution among the visible design elements is constructed.

[0029] In some embodiments, based on all geometric attribute sets and the relative positions, overlaps, and spacing of the bounding boxes of each visible design element, constructing a layout relationship network representing the alignment and spatial distribution among the visible design elements can be achieved through the following steps: Based on the geometric attribute set of each visible design element, determine the relative positional relationship, overlap area, and minimum spacing between the bounding boxes of any two visible design elements; Based on the obtained relative positional relationships, overlapping areas, and minimum spacing, and according to predefined judgment thresholds, a descriptor describing the spatial relationship type between pairs of visible design elements is generated. Using each visible design element as a node and the descriptor of the spatial relationship type as the attribute of the edge connecting the corresponding node, an undirected graph network with attributes is constructed as the layout relationship network.

[0030] It should be noted that the spatial relationship type descriptor in this application is a structured data object used to describe the specific relationship type and related quantitative parameters between two visible design elements in the layout; the layout relationship network is a data model that exists in the form of a graph structure, where nodes represent visible design elements and edges represent the spatial relationship between elements.

[0031] In practical implementation, based on the geometric attribute set of each visible design element, the relative positional relationship, overlap area, and minimum spacing between the bounding boxes of any two visible design elements can be determined as follows: For each pair of different visible design elements, the coordinate range of their bounding boxes in the two-dimensional plane is determined according to the "x", "y", "width", and "height" attributes contained in their respective geometric attribute sets; when calculating the relative positional relationship, the coordinate differences between the two bounding boxes are calculated by comparing the coordinate values ​​of each edge in the horizontal and vertical directions, namely the left edge, horizontal center line, right edge, top edge, vertical center line, and bottom edge. These differences constitute the coordinate differences describing the two bounding boxes in the x-axis and y-axis directions. The basic data for alignment and offset relationships on the Y-axis; when calculating the overlapping area, first calculate the intersection length of the projections of the two bounding boxes in the horizontal and vertical directions. If both intersection lengths are positive, multiply them to obtain the area of ​​the overlapping rectangle; otherwise, the overlapping area is zero. When calculating the minimum spacing, if the two bounding boxes overlap, the minimum spacing is defined as zero. If they do not overlap, calculate the nearest vertical or horizontal distance from each edge of one bounding box to the other bounding box, and take the minimum value among all distances as the minimum spacing. The above calculations generate a set of values ​​for each pair of visible design elements, including multiple coordinate differences, an overlapping area value, and a minimum spacing value. Other methods can also be used in other embodiments, which are not limited here.

[0032] In specific implementation, based on the obtained relative positional relationship, overlapping area, and minimum spacing, and according to predefined judgment thresholds, generating a descriptor describing the spatial relationship type between pairs of visible design elements can be achieved in the following way: loading a predefined judgment threshold configuration, which includes a pixel tolerance threshold (e.g., 2 pixels) for judging alignment, a minimum overlapping area ratio threshold for judging "overlap," and spacing interval thresholds for defining "adjacent," "medium spacing," "far distance," etc.; for the numerical set of each pair of visible design elements, comparing it with the corresponding judgment threshold and making logical judgments: for example, if two bounding boxes... If the absolute value of the coordinate difference of the left edge is less than the alignment tolerance threshold, a "left alignment" relationship is determined to exist; if the calculated minimum spacing value falls within the "nearby" spacing range, a "nearby" relationship is determined to exist; if the overlapping area is greater than zero, it is determined to be "slight overlap" or "severe overlap" based on the overlapping area ratio; all spatial relationship types that are established in this determination loop, such as "left alignment", "horizontal equidistance", and "nearby", are summarized and encapsulated into a structured data object. This data object serves as a descriptor describing the spatial relationship type between this pair of visible design elements. Other methods can also be used in other embodiments, which are not limited here.

[0033] In specific implementation, using each visible design element as a node and the spatial relationship type descriptor as the attribute of the edge connecting the corresponding node, an attributed undirected graph network as the layout relationship network can be constructed in the following way: Initialize an empty undirected graph data structure; First, add each visible design element in the set of visible design elements as a node with a unique identifier to the graph; Next, traverse all pairs of visible design elements, and for each pair of visible design elements that has generated a non-empty spatial relationship type descriptor, create an edge between the corresponding two nodes in the graph; Finally, assign the calculated spatial relationship type descriptor as an attribute to this edge completely. This attribute at least includes a list of relationship types and related quantification parameters, such as specific spacing values ​​and aligned edge identifiers; Ultimately, this undirected graph data structure, where all nodes represent visible design elements and all edges are accompanied by specific spatial relationship descriptions, is constructed as the layout relationship network. Other methods can also be used in other embodiments, which are not limited here.

[0034] It should be noted that the above steps can systematically transform discrete and isolated element coordinate information into a global and computable spatial relationship map, thereby transforming the subjective and vague issue of "layout aesthetics" into the verification of objective and clear relationship patterns, and establishing a solid mathematical model foundation for automated and quantifiable layout compliance analysis.

[0035] In step 104, the layout relationship network is matched with preset layout rules to identify layout defect sets, and all visual style attribute sets are matched with preset design specification knowledge bases to identify basic visual defect sets. The design specification knowledge bases contain mandatory style rules bound to all semantic role tag sets.

[0036] In some embodiments, reference Figure 3 As shown in the figure, this is a flowchart illustrating the process of identifying layout defect sets in some embodiments of this application. In this embodiment, the layout relationship network is matched with preset layout rules to identify layout defect sets, which can be achieved through the following steps: In step 1031, a preset layout rule is loaded, which defines constraints regarding element alignment, spacing distribution, and safety margins. In step 1032, each edge and its attributes in the layout relationship network are traversed, and the two visible design elements connected by the edge and the spatial relationship type descriptor between them are compared and logically verified one by one with the corresponding constraints in the layout rules. In step 1033, an instance that violates any constraint in the layout rules and is found during the comparison and verification process is recorded as a layout defect record containing the identifier of the violating element, the specific rule violated, and details of the violation. In step 1034, all layout defect records are summarized to obtain a layout defect set.

[0037] It should be noted that the preset layout rules in this application are a set of predefined constraints or best practices that interface elements should follow in terms of layout, such as alignment standards, spacing specifications, and margin safety requirements; the layout defect set is a set of specific problem instances that have been identified and exist due to violations of the preset layout rules, including information such as the violating elements, the violated rules, and deviation details.

[0038] In specific implementation, pre-defined layout rules are loaded. These layout rules define constraints regarding element alignment, spacing distribution, and safety margins. This can be achieved by reading a predefined layout rule library, which is typically stored in a structured data format (such as JSON or YAML). Each layout rule explicitly describes its applicable conditions, constraint type, and specific parameter thresholds. For example, an alignment rule might state that "the left edges of all visible design elements with the semantic role of 'title text' should be vertically aligned with a tolerance of 2 pixels." A spacing rule might state that "the vertical spacing between visible design elements belonging to the same semantic group (such as 'form input items') should be strictly equal." A safety margin rule might state that "the minimum distance between the bounding box of any visible design element and the edge of its canvas or screen must not be less than 20 pixels." After loading, these layout rules are parsed into data structures in memory that can be directly queried and executed by the program logic, providing clear criteria for subsequent matching and verification. Other methods can also be used in other embodiments, which are not limited here.

[0039] In specific implementation, traversing each edge and its attributes in the layout relationship network, and comparing and logically verifying the two visible design elements connected by the edge and the spatial relationship type descriptor between them with the corresponding constraints in the layout rules, can be achieved as follows: Perform a comprehensive edge traversal of the layout relationship network; for each edge, obtain the two visible design element nodes it connects to and the spatial relationship type descriptor attached to that edge; then, based on the attributes of the two visible design elements, such as their semantic role label sets, whether they belong to the same predefined group, and the specific relationship indicated by the edge descriptor, such as "left aligned" and "16-pixel spacing", from the loaded... All applicable layout rules are filtered from the layout rule library. Then, for each applicable layout rule, the corresponding logical verification is performed: for example, for a "title left alignment" rule, it is verified whether all related nodes are connected to form a connected subgraph through the "left alignment" edge; for a "equal spacing" rule, it is verified whether the spacing values ​​recorded in the edge descriptors of all adjacent element pairs in the group are consistent; for a "safe margin" rule, the shortest distance between the element bounding box and the canvas boundary needs to be calculated and compared with the rule threshold. This traversal and verification process generates a pass or fail status flag for each pair of potentially violating element relationships. Other methods can also be used in other embodiments, which are not limited here.

[0040] In specific implementation, instances found during the comparison and verification process that violate any constraint of the layout rules are recorded as layout defect records containing the identifier of the violating element, the specific rule violated, and violation details. This can be achieved in the following way: whenever the above verification process determines that a constraint of a layout rule is violated, a structured layout defect record is immediately generated. This record contains at least the following fields: a unique identifier of the violating main visible design element (which can be linked back to the original design document), a specific description of the violated layout rule, and detailed violation details. The violation details include the detected actual value and the rule expected value or expected state. The actual value is, for example, an actual spacing of 18 pixels. The rule expected value is, for example, an expected spacing of 16 pixels. The expected state is, for example, an expected left alignment of all headings. All generated layout defect records are added to an initially empty set. After completing the traversal of the entire layout relationship network and the verification of all rules, this set is determined as the layout defect set. Other methods can also be used in other embodiments, which are not limited here.

[0041] In some embodiments, matching all visual style attribute sets with a pre-defined design specification knowledge base to identify basic visual defect sets can be achieved through the following steps: Load a pre-built design specification knowledge base, which stores measurable mandatory style rules bound to different semantic role tags; For each visible design element, all applicable mandatory style rules are retrieved from the design specification knowledge base based on its semantic role tag set, and the visual style attribute set of the visible design element is compared item by item with all applicable mandatory style rules. Instances whose visual style attribute values ​​do not meet the requirements of the queried mandatory style rules are recorded as a basic visual defect record containing the identifier of the violating element, the specific style rule violated, and detailed deviation information. All basic visual defect records are compiled to form a basic visual defect set.

[0042] It should be noted that the pre-built design specification knowledge base in this application is a structured knowledge base that stores design system specifications. Its core is to bind "semantic roles" with "mandatory visual style requirements," which serves as the authoritative basis for judging whether visual styles are compliant in automated detection. The basic visual defect set is a collection that records specific style problem instances that have been identified and exist due to violations of the rules in the pre-built design specification knowledge base. It includes information such as the violating elements, the violated style rules, and deviation details.

[0043] In specific implementation, a pre-defined design specification knowledge base is loaded. This knowledge base stores measurable mandatory style rules bound to different semantic role tags. This can be achieved by: reading a predefined design specification knowledge base file, which is described using a structured data format such as JSON or YAML; in this file, each mandatory style rule is explicitly associated with one or more semantic role tags, such as "main button" or "title text," and defines its allowed values ​​or value ranges for specific style attributes; for example, one rule can be defined as: when the semantic role is "main button," its "fill color" attribute must be "main brand color #007AFF" in the brand color palette, its "corner radius" attribute must be "8 pixels," and its "font size" must be no less than "14 pixels"; another rule can be defined as: when the semantic role is "body text," the contrast between its "font color" and background color must meet WCAG. The AA standard (i.e., greater than 4.5:1) is used. These rules are loaded and parsed into an in-memory hash table or an index data structure that the rule engine can efficiently query during initialization. Semantic role tags serve as query keys, thereby providing accurate and executable specification basis for subsequent style matching. Other methods can also be used in other embodiments, which are not limited here.

[0044] In practice, for each visible design element, all applicable mandatory style rules are retrieved from the design specification knowledge base based on its semantic role tag set. The visual style attribute set of the visible design element is then compared item by item with all applicable mandatory style rules. This can be achieved in the following way: For each visible design element, its semantic role tag set (such as ["title text", ...) is used to retrieve all applicable mandatory style rules from the design specification knowledge base. Using "first-level heading" as input, the system queries the design specification knowledge base index loaded into memory to retrieve mandatory style rules whose associated semantic role tags match the current element tag, forming an "applicable rule list" for that element. Then, it iterates through this applicable rule list. For each mandatory style rule in the list, it extracts the specific values ​​of the style attributes targeted by the rule from the visual style attribute set of the currently visible design element, such as "font size" and "fill color," and compares them precisely with the allowed values ​​or allowed ranges defined in the rule. The comparison logic depends on the rule type: for fixed-value rules, such as the color must be #007AFF, it checks if they are completely equal, allowing for small tolerances; for range-value rules (such as the font size must be between 12-18 pixels), it checks if they fall within the range; for calculated-value rules, such as color contrast, it calculates and judges whether the threshold is met based on relevant attribute values, i.e., based on the foreground and background colors in real time. Other methods can also be used in other embodiments, which are not limited here.

[0045] In practice, instances where visual style attribute values ​​discovered during the comparison process do not meet the requirements of the queried mandatory style rules are recorded as a basic visual defect record containing a violation element identifier, the specific style rule violated, and detailed deviation information. This can be achieved in the following way: During the above item-by-item comparison process, once a visual style attribute value of a visible design element is found to violate a mandatory style rule, a new basic visual defect record is immediately created. This record contains at least three core fields: first, the "violation element identifier," which is the unique ID of the visible design element that triggered the defect. This ID is related to the attribute set extracted in previous steps and the subsequent layout relationship network. The record is generated by the following methods: 1) the node identifier; 2) the specific style rule violated, i.e., the complete description or unique rule ID of the mandatory style rule violated; 3) detailed deviation information, specifically specifying which attribute (e.g., "fill color"), the actual detected value (e.g., "#0066CC"), and the expected value or range of the rule (e.g., "#007AFF"); all such records are added to a global basic visual defect record list upon generation; once the rule comparison of all visible design elements is completed, this basic visual defect record list is finally determined as the basic visual defect set. Other methods can also be used in other embodiments, which are not limited here.

[0046] It should be noted that the above steps can be carried out in parallel through two channels: “targeted” detection based on the semantics of the design system and “pattern-based” detection based on geometric relationships. This allows for the simultaneous coverage of all design rules, from micro-style attributes (such as color and font) to macro-layout structures (such as alignment and spacing). This significantly improves the dimensionality and accuracy of the detection, ensuring that the multiple requirements for accessibility and visual order are systematically verified.

[0047] In step 105, the basic visual defect set and the layout defect set are correlated and analyzed. When a visible design element triggers multiple defects, the defects are prioritized and merged based on the preset defect type severity level to generate a corresponding core defect list, and then the defect detection report of the design document is output.

[0048] In some embodiments, the correlation analysis between the basic visual defect set and the layout defect set can be performed using the following steps: Establish an association index with the unique identifier of the visible design element as the key, and merge and group all defect records in the basic visual defect set and the layout defect set according to their corresponding violation element identifiers to obtain multiple defect groups; For each visible design element, analyze the defect grouping under the visible design element identifier to identify all basic visual and layout defects triggered by the visible design, and record the co-occurrence relationships between the defects.

[0049] In specific implementation, an association index is established with the unique identifier of the visible design element as the key. All defect records in the basic visual defect set and the layout defect set are merged and grouped according to their corresponding violation element identifiers. Multiple defect groups can be obtained by: initializing an empty hash map data structure as the association index, where the key of the hash map is the unique identifier string of the visible design element, and the value is a list used to store defect records; subsequently, each basic visual defect record in the basic visual defect set and each layout defect record in the layout defect set are traversed sequentially. For each record... Extract the value of the "violation element identifier" field as the key and query the hash map. If the key does not exist, create a new key-value pair in the map and add the defect record to the corresponding value list. If the key already exists, append the current defect record directly to the end of the existing value list. After traversal, each key-value pair in the hash map constitutes a defect group centered on a specific visible design element. This defect group contains all types of defects triggered by the element, namely, basic visual and layout defect records, thus completing the initial merging and organization of defect data. Other methods can also be used in other embodiments, which are not limited here.

[0050] In practice, for each visible design element, the defect groups under the visible design element identifier are analyzed to identify all basic visual and layout defects triggered by the visible design, and the co-occurrence relationships between defects are recorded. This can be achieved as follows: For each defect group generated in the hash mapping above, the unique identifier of the visible design element corresponding to the defect group and the list of defect records attached to it are read; by checking the type tag or source of each defect record, for example, whether the record contains the "specific style rule violated" field to determine it as a basic visual defect, or whether it contains the "specific rule violated" field and the content involves layout to determine it as a layout defect. Then, all defect records within the defect group are explicitly classified into a subset of "basic visual defects" and a subset of "layout defects". At the same time, a "defect co-occurrence relationship" summary about the visible design element is generated. The "defect co-occurrence relationship" summary records at least the following information: whether the element triggers two types of defects at the same time, how many defects are triggered, and whether these defects may be related to the same underlying cause. For example, a basic visual defect of "insufficient font color contrast" and a layout defect of "text overlapping with background" may originate from the same color and position setting error. Other methods can also be used in other embodiments, which are not limited here.

[0051] In some embodiments, when a visible design element triggers multiple defects, prioritizing and merging these defects based on a preset defect type severity level to generate a corresponding core defect list can be achieved through the following steps: For each defect group obtained after the association analysis, based on the defect type corresponding to each defect record in the defect group, the pre-set defect type severity level mapping table is queried, and a severity level value is assigned to each defect. Based on the severity level value, all defect records within the same defect group are sorted in descending order to ensure that defects with higher severity levels are given priority. Perform a logical merging operation on the sorted defect records to merge multiple defects describing the same attribute problem of the same visible design element into a comprehensive defect description; All sorted and merged defects are grouped and integrated to generate a global list of core defects organized by severity level and with redundancy removed.

[0052] It should be noted that the pre-defined defect type severity level mapping table in this application is a predefined mapping relationship table that maps different types of defects, such as color contrast problems, brand color problems, alignment problems, etc., to a level representing the urgency or importance of their repair; the severity level value is used to quantify the severity of a specific defect, and the value directly corresponds to the priority of defect repair; the comprehensive defect description is a single defect record formed by logically integrating and merging multiple related defects on the same visible design element that target the same core attribute. Its purpose is to simplify the report, avoid information redundancy, and directly point to the fundamental problem that needs to be repaired.

[0053] In specific implementation, for each defect group obtained after association analysis, based on the defect type corresponding to each defect record in the defect group, a preset defect type severity level mapping table is queried, and a severity level value is assigned to each defect. This can be achieved in the following way: The preset defect type severity level mapping table is read. This table is stored in key-value pair format, where the key is a defect type string, such as "color contrast violation", "brand color violation", "left alignment violation", or "safety margin violation", and the value is an integer representing the severity level, for example, 1 represents the highest level and 3 represents the lowest level. For each defect record in the defect group, the corresponding defect type keyword is extracted or matched from its "specific style rule violated" or "specific rule violated" description. Then, the mapping table is queried using this keyword, and the retrieved level integer is added to the current defect record as the "severity level value" field. If a defect type is not explicitly defined in the mapping table, it is assigned a default lower severity level value to ensure that each defect record obtains a comparable priority quantification index. Other methods can also be used in other embodiments, and are not limited here.

[0054] In specific implementation, all defect records within the same defect group are sorted in descending order based on the severity level value to ensure that high-severity defects are given priority. This can be achieved as follows: After adding a "severity level value" field to all defect records within a defect group, a standard list sorting algorithm, such as quicksort, is called. Using this field as the sort key, the list of defect records contained in the defect group is rearranged in place according to the value from largest to smallest, i.e., from highest to lowest severity level. After sorting, the first record in the list is the highest priority defect triggered by the visible design element, thus ensuring that the most important issues are given priority in subsequent processing and display. Other methods can also be used in other embodiments, which are not limited here.

[0055] In specific implementation, a logical merging operation is performed on the sorted defect records to merge multiple defects describing the same attribute problem of the same visible design element into a comprehensive defect description. This can be achieved in the following way: traverse the sorted defect record list. For consecutive defect records in the list, determine whether they point to the same core attribute of the same visible design element. The judgment rules include: comparing whether the "violation element identifier" of the defect records is the same, and analyzing whether the attributes described in their "detailed deviation information" or "violation details" are the same or highly related. For example, both the "fill color" violation and the "fill color contrast" violation target the "fill color" attribute. If the merging conditions are met, all defect records that meet the conditions are merged into a new comprehensive defect record. The new record retains the highest severity level value in the original record, and its defect description integrates the core problems of each original record, and is marked as being merged from multiple rules. The original merged record is marked as "merged" and removed from the subsequent output list. This operation effectively reduces report redundancy and focuses on the root problem. Other methods can also be used in other embodiments, which are not limited here.

[0056] In specific implementation, integrating all sorted and merged defect groups into a global core defect list organized by severity level and free of redundancy can be achieved as follows: Create a global empty list as a container for the core defect list; then, iterate through all defect groups that have undergone internal sorting and merging, and sequentially extract the remaining defect records from each group that are not marked as "merged"; during the extraction process, a global stability sort can be performed again based on the "severity level value" of each record to ensure that the final list maintains an overall order from high to low severity; finally, add all extracted defect records to the global container in this order. This resulting list is the core defect list, which serves as the direct, unique, and non-redundant data basis for generating subsequent defect detection reports. Other methods can also be used in other embodiments, and are not limited here.

[0057] In specific implementation, the defect detection report of the design document can be output in the following way: using the final generated core defect list as the core input, combined with the attribute information of relevant elements in the visible design element set, a structured defect detection report is generated; specifically, firstly, a report framework is created, which includes two parts: report metadata and a main defect list. The report metadata includes, for example, the name of the inspected design document, the detection time, and the detection rule version. For each defect record in the core defect list, it is converted into a readable report entry: this report entry clearly lists the location information of the visible design element that triggered the defect, including its page name, layer path, or its unique identifier, clearly describes the defect content, i.e., the specific style rule or layout rule violated, and compares and displays the details of the violation, such as the actual value detected, the rule, etc. The expected standard value or range is then determined. Simultaneously, based on the layout rule base and element attributes, a specific correction suggestion is generated for each entry, such as "change the fill color from #0066CC to #007AFF" or "move this element 4 pixels to the left to align with the adjacent element." Finally, this structured report content is serialized into one or more deliverable formats, such as generating an HTML webpage report with interactive links, where each defect entry can link back to the original design tool to highlight the problematic element, or generating a structured JSON / XML data file for downstream system integration, or rendering it as a PDF document for easy distribution. This defect detection report, as the final output of this method, provides users with a clear and actionable list of design problems and repair guidelines. Other methods can also be used in other embodiments, and are not limited here.

[0058] It should be noted that the above steps enable intelligent association of cross-dimensional defects, priority adjudication based on business impact, and automated integration of report information. This transforms a fragmented and raw list of issues into an action list that highlights key points, is logically clear, and can directly guide development and remediation, greatly improving work efficiency and decision-making quality from problem discovery to resolution.

[0059] Furthermore, in another aspect of this application, in some embodiments, this application provides a visual design defect intelligent detection system, referring to... Figure 4 The figure is a schematic diagram of the structure of a visual design defect intelligent detection system according to some embodiments of this application. The visual design defect intelligent detection system includes: an acquisition module 401, a processing module 402, and an execution module 403, which are described below: The acquisition module 401 in this application is mainly used to acquire design documents exported from visual design tools. Processing module 402, in this application, is mainly used to extract the geometric attribute set, visual style attribute set and semantic role tag set of each visible design element in the design document, and filter hidden layers and non-interactive decorative elements. The processing module 402 described in this application is also used to construct a layout relationship network representing the alignment and spatial distribution between visible design elements based on all geometric attribute sets and the relative positions, overlap relationships and spacing of the bounding boxes of each visible design element; The processing module 402 described in this application is also used to match the layout relationship network with preset layout rules to identify layout defect sets, and to match all visual style attribute sets with preset design specification knowledge base to identify basic visual defect sets. The design specification knowledge base contains mandatory style rules bound to all semantic role tag sets. The execution module 403 in this application is mainly used to perform correlation analysis on the basic visual defect set and the layout defect set. When a visible design element triggers multiple defects, it prioritizes and merges the defects based on the preset defect type severity level to generate a corresponding core defect list, and then outputs the defect detection report of the design document.

[0060] Each module in the aforementioned intelligent visual design defect detection system can be implemented entirely or partially through software, hardware, or a combination thereof. These modules can be embedded in the processor of a computer device in hardware form or independent of it, or stored in the memory of the computer device in software form, so that the processor can call and execute the corresponding operations of each module.

[0061] In another embodiment, this application provides a computer device, which may be a server, and its internal structure diagram may be as follows. Figure 5 As shown, the computer device includes a processor, memory, and a network interface connected via a system bus. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and a database. The internal memory provides an environment for the operation of the operating system and computer programs stored in the non-volatile storage media. The database stores intelligent detection data for visual design defects. The network interface communicates with external terminals via a network connection. When the computer program is executed by the processor, it implements an intelligent detection method for visual design defects.

[0062] Those skilled in the art will understand that Figure 5The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0063] In one embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described embodiment of the intelligent detection method for visual design defects.

[0064] In one embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described embodiment of the intelligent detection method for visual design defects.

[0065] In one embodiment, a computer program product or computer program is provided, comprising computer instructions stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium and executes the computer instructions, causing the computer device to perform the steps described in the above-described embodiment of the intelligent detection method for visual design defects.

[0066] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the methods described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, or optical storage, etc. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM), etc.

[0067] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0068] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are relatively specific and detailed, they should not be construed as limiting the scope of the invention patent. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for intelligent detection of visual design defects, characterized in that, Includes the following steps: Obtain design documents exported from visual design tools; Extract the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and filter out hidden layers and non-interactive decorative elements; Based on all the geometric attribute sets, as well as the relative positions, overlaps, and spacing of the bounding boxes of each visible design element, a layout relationship network representing the alignment and spatial distribution among the visible design elements is constructed. The layout relationship network is matched with preset layout rules to identify layout defect sets, and all visual style attribute sets are matched with preset design specification knowledge bases to identify basic visual defect sets. The design specification knowledge bases contain mandatory style rules bound to all semantic role tag sets. The basic visual defect set and the layout defect set are correlated and analyzed. When a visible design element triggers multiple defects, the defects are prioritized and merged based on the preset severity level of the defect type to generate a corresponding core defect list, and then the defect detection report of the design document is output.

2. The method as described in claim 1, characterized in that, Extracting the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and filtering hidden layers and non-interactive decorative elements specifically includes: Iterate through all nodes of the design document and filter out all visible design elements based on the node's visibility attribute; For each visible design element, parse the node data of the visible design element to extract its geometric attribute set and visual style attribute set; Based on the component association attributes or layer naming information of visible design elements, match and determine their semantic role tag set, and remove non-interactive decorative elements from them according to predefined filtering rules.

3. The method as described in claim 1, characterized in that, Based on all geometric attribute sets, and the relative positions, overlaps, and spacing of the bounding boxes of each visible design element, a layout relationship network representing the alignment and spatial distribution among the visible design elements is constructed, specifically including: Based on the geometric attribute set of each visible design element, determine the relative positional relationship, overlap area, and minimum spacing between the bounding boxes of any two visible design elements; Based on the obtained relative positional relationships, overlapping areas, and minimum spacing, and according to predefined judgment thresholds, a descriptor describing the spatial relationship type between pairs of visible design elements is generated. Using each visible design element as a node and the descriptor of the spatial relationship type as the attribute of the edge connecting the corresponding node, an undirected graph network with attributes is constructed as the layout relationship network.

4. The method as described in claim 1, characterized in that, Matching the layout relationship network with preset layout rules to identify layout defect sets specifically includes: Load the preset layout rules, which define constraints on element alignment, spacing distribution, and safety margins; Traverse each edge and its attributes in the layout relationship network, and compare and logically verify the two visible design elements connected by the edge and the spatial relationship type descriptor between them with the corresponding constraints in the layout rules. An instance that violates any constraint in the layout rules and is found during the comparison and verification process is recorded as a layout defect record containing the identifier of the violating element, the specific rule violated, and details of the violation. Summarize all layout defect records to obtain a layout defect set.

5. The method as described in claim 1, characterized in that, All visual style attribute sets are matched against a pre-built design specification knowledge base to identify the basic set of visual defects, specifically including: Load a pre-built design specification knowledge base, which stores measurable mandatory style rules bound to different semantic role tags; For each visible design element, all applicable mandatory style rules are retrieved from the design specification knowledge base based on its semantic role tag set, and the visual style attribute set of the visible design element is compared item by item with all applicable mandatory style rules. Instances whose visual style attribute values ​​do not meet the requirements of the queried mandatory style rules are recorded as a basic visual defect record containing the identifier of the violating element, the specific style rule violated, and detailed deviation information. All basic visual defect records are compiled to form a basic visual defect set.

6. The method as described in claim 1, characterized in that, The correlation analysis between the basic visual defect set and the layout defect set specifically includes: Establish an association index with the unique identifier of the visible design element as the key, and merge and group all defect records in the basic visual defect set and the layout defect set according to their corresponding violation element identifiers to obtain multiple defect groups; For each visible design element, analyze the defect grouping under the visible design element identifier to identify all basic visual and layout defects triggered by the visible design, and record the co-occurrence relationships between the defects.

7. The method as described in claim 1, characterized in that, When a visible design element triggers multiple defects, they are prioritized and merged based on a preset defect type severity level, generating a corresponding core defect list, which specifically includes: For each defect group obtained after the association analysis, based on the defect type corresponding to each defect record in the defect group, the pre-set defect type severity level mapping table is queried, and a severity level value is assigned to each defect. Based on the severity level value, all defect records within the same defect group are sorted in descending order to ensure that defects with higher severity levels are given priority. Perform a logical merging operation on the sorted defect records to merge multiple defects describing the same attribute problem of the same visible design element into a comprehensive defect description; All sorted and merged defects are grouped and integrated to generate a global list of core defects organized by severity level and with redundancy removed.

8. A visual design defect intelligent detection system, characterized in that, include: The acquisition module is used to acquire design documents exported from visual design tools; The processing module is used to extract the geometric attribute set, visual style attribute set, and semantic role tag set of each visible design element in the design document, and to filter hidden layers and non-interactive decorative elements. The processing module is also used to construct a layout relationship network representing the alignment and spatial distribution between visible design elements based on all geometric attribute sets and the relative positions, overlap relationships and spacing of the bounding boxes of each visible design element. The processing module is also used to match the layout relationship network with preset layout rules to identify layout defect sets, and to match all visual style attribute sets with preset design specification knowledge bases to identify basic visual defect sets. The design specification knowledge base contains mandatory style rules bound to all semantic role tag sets. The execution module is used to perform correlation analysis on the basic visual defect set and the layout defect set. When a visible design element triggers multiple defects, it prioritizes and merges the defects based on the preset defect type severity level to generate a corresponding core defect list, and then outputs a defect detection report of the design document.

9. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that, When the processor executes the computer program, it implements the steps of the intelligent detection method for visual design defects as described in any one of claims 1 to 7.

10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by the processor, it implements the steps of the intelligent detection method for visual design defects as described in any one of claims 1 to 7.