Design drawing file processing method and device, storage medium and electronic equipment

Through the design drawing file processing method, the style information that does not meet the standards is detected and marked, which solves the problem of difficulty for users to identify in massive style information and improves the efficiency of design drawing correction.

CN118643548APending Publication Date: 2024-09-13BEIJING CHUANGZUOMEIHAO TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410701048.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-31
Publication Date
2024-09-13

AI Technical Summary

Technical Problem

In design drawings, it is difficult for users to quickly and accurately identify and modify style information that does not meet standards, especially when there is a large amount of style information.

Method used

Provides a method for processing design drawing files. By receiving detection instructions, it obtains layer data, determines the design drawing data, detects whether the style information meets the standard conditions, sets a mark to prompt the style information that does not meet the standards, and provides a selection control to the user. Modify or delete tags.

Benefits of technology

It realizes the rapid and accurate marking of style information that does not meet standard conditions, improves the efficiency of correction of design drawings, and enables users to promptly discover and correct non-standard style information in design drawings.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118643548A
    Figure CN118643548A
Patent Text Reader

Abstract

The invention provides a design drawing file processing method and device, a storage medium and electronic equipment, and the method comprises the steps: receiving a detection instruction which is used for indicating the detection of a target style type of a design drawing file; the target style type comprises at least one of a character style type, a fillet style type, a spacing style type, an edge distance style type and an external shadow style type; in response to the detection instruction, obtaining layer data of each to-be-detected layer in the design drawing file corresponding to the detection instruction; determining design drawing data in each to-be-detected layer according to each layer data; acquiring style information of a target style type in the design drawing data; under the condition that the style information of the target style type does not meet the standard condition, a mark corresponding to the style information is set in the design drawing file, and the mark is used for prompting that the style information does not meet the standard condition. And the style information which does not conform to the standard condition can be quickly and accurately marked.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer technology, and in particular to a method, device, storage medium and electronic equipment for processing a design drawing file. Background Art

[0002] Currently, when users draw design drawings, they often need to check the various styles in the design drawings to find out the style information that does not meet the standards and make modifications. However, when the design drawings have a lot of content, it is difficult for users to find the style information that does not meet the standards in the massive amount of style information. Summary of the invention

[0003] The technical problem to be solved by the present invention is to provide a method, device, storage medium and electronic device for processing design drawing files, which can quickly and accurately mark style information that does not meet standard conditions. The specific solution is as follows:

[0004] A method for processing a design drawing file, comprising:

[0005] Receive a detection instruction, wherein the detection instruction is used to instruct to detect a target style type of a design drawing file; the target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type;

[0006] In response to the detection instruction, obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction;

[0007] Determine the design drawing data in each of the layers to be detected according to the data of each layer;

[0008] Acquire style information of the target style type in the design drawing data;

[0009] Detecting whether the style information of the target style type meets the standard condition corresponding to the target style type;

[0010] In the case where the style information of the target style type does not meet the standard condition, a mark corresponding to the style information is set in the design drawing file, and the mark is used to prompt that the style information does not meet the standard condition.

[0011] In the above method, optionally, the step of obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction includes:

[0012] Parsing the detection instruction to obtain instruction information;

[0013] Determine the layer to be detected among the layers of the design drawing file according to the layer identifier in the instruction information;

[0014] The layer data in each of the layers to be detected is obtained.

[0015] In the above method, optionally, determining the design drawing data in each of the layers to be detected according to the layer data includes:

[0016] According to the level, display and hiding status, rotation angle and number of sub-layers in each of the layer data, the design drawing data in each of the layers to be detected is determined.

[0017] In the above method, optionally, the detecting whether the style information of the target style type meets the standard condition corresponding to the target style type includes:

[0018] In the case where the target style type includes a text style type, determining the style information of the text style type in the design drawing data, wherein the style information of the text style type includes the number of font styles, the font attributes of each font style, the font size of each character, and the contrast between the color of each character and the background color; if the number of font styles is less than a preset first quantity threshold, the number of font attributes of each font style is less than a preset second quantity threshold, the font size of each character is within a preset font size range, the font size of each character satisfies a preset font size distribution condition, and the contrast between the color of each character and the background color is greater than a preset contrast threshold, then determining that the style information of the text style type satisfies the standard condition corresponding to the text style type; otherwise, determining that the style information of the text style type does not satisfy the standard condition corresponding to the text style type;

[0019] In the case where the target style type includes a rounded corner style type, determining the style information of the rounded corner style type in the design drawing data; the style information of the rounded corner style type includes the rounded corners of a container and / or a button; if the rounded corner is a full rounded corner or the rounded corner satisfies a preset rounded corner rule, determining that the style information of the rounded corner style type satisfies a standard condition corresponding to the rounded corner style type; otherwise, determining that the style information of the rounded corner style type does not satisfy the standard condition corresponding to the rounded corner style type;

[0020] In the case where the target style type includes a spacing style type, determining style information of the spacing style type in the design drawing data; the style information of the spacing style type includes the spacing between elements; if the spacing between elements satisfies a preset spacing rule, determining that the style information of the spacing style type satisfies a standard condition corresponding to the spacing style type; otherwise, determining that the style information of the spacing style type does not satisfy the standard condition corresponding to the spacing style type;

[0021] In the case where the target style type includes a margin style type, determining style information of the margin style type in the design drawing data; the style information of the margin style type includes the margins of each element; if the margins between the elements meet the preset margin rules, determining that the style information of the margin style type meets the standard condition corresponding to the margin style type; otherwise, determining that the style information of the margin style type does not meet the standard condition corresponding to the margin style type;

[0022] In a case where the target style type includes an outer shadow style type, style information of the outer shadow style type in the design drawing data is determined; the style information of the outer shadow style type includes an outer shadow color; if the outer shadow color is consistent with a preset color specification, it is determined that the style information of the outer shadow style type satisfies the standard condition corresponding to the outer shadow style type; otherwise, it is determined that the style information of the outer shadow style type does not satisfy the standard condition corresponding to the outer shadow style type.

[0023] The above method may, optionally, after setting the mark in the layer to which the design drawing data belongs, further comprises:

[0024] Display the mark and the selection control corresponding to the mark; the selection control is used to instruct the user to choose whether to modify the style information that does not meet the standard condition;

[0025] When receiving a first selection operation of the selection control by the user, modifying the style information that does not meet the standard condition so that the modified style information meets the standard condition;

[0026] When a second selection operation of the user on the selection control is received, the mark is deleted.

[0027] A device for processing a design drawing file, comprising:

[0028] A receiving unit, configured to receive a detection instruction, wherein the detection instruction is used to instruct to detect a target style type of a design drawing file; the target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type;

[0029] An execution unit, configured to obtain, in response to a detection instruction, layer data of each layer to be detected in a design drawing file corresponding to the detection instruction;

[0030] A determination unit, used for determining the design drawing data in each of the layers to be detected according to the data of each layer;

[0031] An acquisition unit, configured to acquire style information of the target style type in the design drawing data;

[0032] A detection unit, configured to detect whether the style information of the target style type meets a standard condition corresponding to the target style type;

[0033] A setting unit is used to set a mark corresponding to the style information in the design drawing file when the style information of the target style type does not meet the standard condition, and the mark is used to prompt that the style information does not meet the standard condition.

[0034] In the above device, optionally, the execution unit includes:

[0035] A parsing subunit, used to parse the detection instruction to obtain instruction information;

[0036] A first determining subunit, configured to determine a layer to be detected among the layers of the design drawing file according to a layer identifier in the instruction information;

[0037] The acquisition subunit is used to acquire the layer data in each of the layers to be detected.

[0038] In the above device, optionally, the determining unit includes:

[0039] The second determining subunit is used to determine the design drawing data in each of the layers to be detected according to the level, display and hide status, rotation angle and number of sub-layers in each of the layer data.

[0040] A storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned method for processing design drawing files.

[0041] An electronic device includes a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the above-mentioned method for processing a design drawing file.

[0042] Based on the above-mentioned implementation of the present invention, a method, device, storage medium and electronic device for processing a design drawing file are provided, the method comprising: receiving a detection instruction, the detection instruction is used to indicate the target style type of the design drawing file; the target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type and an outer shadow style type; in response to the detection instruction, obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction; determining the design drawing data in each layer to be detected according to each layer data; obtaining the style information of the target style type in the design drawing data; detecting whether the style information of the target style type meets the standard conditions corresponding to the target style type; in the case where the style information of the target style type does not meet the standard conditions, setting a mark corresponding to the style information in the design drawing file, the mark is used to prompt that the style information does not meet the standard conditions. Through the method provided by the embodiment of the present invention, the style information that does not meet the standard conditions can be quickly and accurately marked, so that the user can promptly find the non-standard style information in the design drawing, and effectively improve the correction efficiency of the design drawing. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.

[0044] Figure 1 A method flow chart of a method for processing a design drawing file provided by the present invention;

[0045] Figure 2 A flowchart of a process of obtaining layer data of a layer to be detected provided by the present invention;

[0046] Figure 3 A schematic diagram of the structure of a device for processing design drawing files provided by the present invention;

[0047] Figure 4 The present invention provides a schematic structural diagram of an electronic device. DETAILED DESCRIPTION

[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.

[0049] In this application, the terms "comprises", "comprising" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device comprising a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprising a ..." does not exclude the presence of other identical elements in the process, method, article or device comprising the element.

[0050] The embodiment of the present invention provides a method for processing a design file, which can be applied to electronic devices. The method flow chart of the method is as follows: Figure 1 As shown, specifically including:

[0051] S101: Receive a detection instruction, where the detection instruction is used to instruct to detect a target style type of a design drawing file; the target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type.

[0052] Optionally, the detection instruction may be an instruction triggered by a user clicking a preset software control, or may be an instruction triggered when it is detected that the design drawing progress of the design drawing file meets a preset condition.

[0053] S102: In response to the detection instruction, obtaining layer data of each to-be-detected layer in the design drawing file corresponding to the detection instruction.

[0054] Optionally, the layer to be detected may be a layer specified for detection by a detection instruction, may be part of the layers in the design drawing file, or may be all the layers in the design drawing file.

[0055] Optionally, the layer data may include data such as level, display and hide status, rotation angle, and number of sub-layers.

[0056] In an embodiment provided by the present invention, based on the above implementation process, optionally, the process of obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction is as follows: Figure 2 As shown, including:

[0057] S201: Parse the detection instruction to obtain instruction information.

[0058] In this embodiment, the instruction information may include a layer identifier and a target style type specified by the user for detection.

[0059] S202: Determine a layer to be detected among the layers of the design drawing file according to the layer identifier in the instruction information.

[0060] Optionally, the layer corresponding to the layer identifier may be determined as the layer to be detected.

[0061] S203: Acquire layer data in each of the layers to be detected.

[0062] In this embodiment, the user can select the design drawing and target style type to be tested, which can improve the detection efficiency and effectively meet the user's detection needs.

[0063] S103: Determine the design drawing data in each of the layers to be detected according to the layer data.

[0064] In this embodiment, the design drawing data in each layer to be detected can be located according to the layer data.

[0065] Specifically, the process of determining the design drawing data in each layer to be detected based on each layer data may include: determining the design drawing data in each layer to be detected based on the level, display and hide status, rotation angle and number of sub-layers in each layer data.

[0066] S104: Acquire style information of the target style type in the design drawing data.

[0067] In this embodiment, the style information of different target style types may be different. For example, the style information of the text style type may include one or more of the number of font styles, the font attributes of each font style, the font size of each text, and the contrast between the color of each text and the background color. The style information of the rounded corner style type may include one or more of the rounded corners of the container and the rounded corners of the button. The style information of the outer shadow style type may include the outer shadow color.

[0068] S105: Detect whether the style information of the target style type meets the standard condition corresponding to the target style type.

[0069] In this embodiment, different target style types correspond to different standard conditions. For example, the standard condition corresponding to the text style type is different from the standard condition corresponding to the rounded corner style type.

[0070] Optionally, the standard condition corresponding to each target style type may be determined based on a style specification of the target style type.

[0071] S106: When the style information of the target style type does not satisfy the standard condition, a mark corresponding to the style information is set in the design drawing file, where the mark is used to prompt that the style information does not satisfy the standard condition.

[0072] In this embodiment, the mark corresponding to the style information can also be used to prompt the user a modification method of the style information, so that the user can modify the style information according to the modification method, thereby obtaining the modified style information that meets the standard condition.

[0073] By applying the method provided in the embodiment of the present invention, by setting marks corresponding to style information, the user can quickly determine the style information in the design drawing that does not meet the specifications, thereby effectively improving the correction efficiency of the design drawing.

[0074] In an embodiment provided by the present invention, based on the above implementation process, optionally, the detecting whether the style information of the target style type meets the standard condition corresponding to the target style type includes:

[0075] In the case where the target style type includes a text style type, determining the style information of the text style type in the design drawing data, wherein the style information of the text style type includes the number of font styles, the font attributes of each font style, the font size of each character, and the contrast between the color of each character and the background color; if the number of font styles is less than a preset first quantity threshold, the number of font attributes of each font style is less than a preset second quantity threshold, the font size of each character is within a preset font size range, the font size of each character satisfies a preset font size distribution condition, and the contrast between the color of each character and the background color is greater than a preset contrast threshold, then determining that the style information of the text style type satisfies the standard condition corresponding to the text style type; otherwise, determining that the style information of the text style type does not satisfy the standard condition corresponding to the text style type;

[0076] In the case where the target style type includes a rounded corner style type, determining the style information of the rounded corner style type in the design drawing data; the style information of the rounded corner style type includes the rounded corners of a container and / or a button; if the rounded corner is a full rounded corner or the rounded corner satisfies a preset rounded corner rule, determining that the style information of the rounded corner style type satisfies a standard condition corresponding to the rounded corner style type; otherwise, determining that the style information of the rounded corner style type does not satisfy the standard condition corresponding to the rounded corner style type;

[0077] In the case where the target style type includes a spacing style type, determining style information of the spacing style type in the design drawing data; the style information of the spacing style type includes the spacing between elements; if the spacing between elements satisfies a preset spacing rule, determining that the style information of the spacing style type satisfies a standard condition corresponding to the spacing style type; otherwise, determining that the style information of the spacing style type does not satisfy the standard condition corresponding to the spacing style type;

[0078] In the case where the target style type includes a margin style type, determining style information of the margin style type in the design drawing data; the style information of the margin style type includes the margins of each element; if the margins between the elements meet the preset margin rules, determining that the style information of the margin style type meets the standard condition corresponding to the margin style type; otherwise, determining that the style information of the margin style type does not meet the standard condition corresponding to the margin style type;

[0079] In a case where the target style type includes an outer shadow style type, style information of the outer shadow style type in the design drawing data is determined; the style information of the outer shadow style type includes an outer shadow color; if the outer shadow color is consistent with a preset color specification, it is determined that the style information of the outer shadow style type satisfies the standard condition corresponding to the outer shadow style type; otherwise, it is determined that the style information of the outer shadow style type does not satisfy the standard condition corresponding to the outer shadow style type.

[0080] In this embodiment, the font size distribution condition is that the font size ∈(10,18) is an integer; or the font size ∈(18,32) is an even number; or the font size ∈(32,48) is an integer multiple of 4; or the font size ∈(48,∞) is an integer multiple of 8.

[0081] In this embodiment, the rounding rule includes: rounding angle ∈(0,12), and the rounding angle is an even number; or rounding angle ∈(12,∞), and the rounding angle is an integer multiple of 4.

[0082] In this embodiment, the spacing rule includes: if the spacing ∈ (0, 12), and the spacing is an even number; or the spacing ∈ (12, ∞), and the spacing is an integer multiple of 4.

[0083] In this embodiment, the margin rule includes: if the margin∈(0,12), and the margin is an even number; or the margin∈(12,∞), and the margin is an integer multiple of 4.

[0084] In an embodiment provided by the present invention, based on the above implementation process, optionally, after setting a mark in the layer to which the design drawing data belongs, the method further includes:

[0085] Display the mark and the selection control corresponding to the mark; the selection control is used to instruct the user to choose whether to modify the style information that does not meet the standard condition;

[0086] When receiving a first selection operation of the selection control by the user, modifying the style information that does not meet the standard condition so that the modified style information meets the standard condition;

[0087] When a second selection operation of the user on the selection control is received, the mark is deleted.

[0088] In this embodiment, the mark can be one or more of modified comment information, modified annotation information, underline, color marking and specific marking symbols, which can be used to indicate style information that does not meet standard conditions, and can also indicate the modification method of style information that does not meet standard conditions.

[0089] Optionally, the first selection operation is used to instruct to modify the style information, and specifically, may instruct to modify the style information according to the modification method of the style information. The second selection operation is used to instruct to delete or ignore the mark.

[0090] By applying the method provided in the embodiment of the present invention, it is possible to realize automatic modification of style information with one key, so that the modified style information meets the standard conditions, thereby effectively improving the modification efficiency of the design drawing.

[0091] In order to clearly illustrate the implementation process and principle of the present invention, the following examples are given:

[0092] The user can select the target style type and layer to be detected in the design software interface of the electronic device.

[0093] The electronic device identifies all layer data in the design drawing file in the design drawing software; locates all the design drawings through the layer hierarchy, display and hide status, rotation angle, number of sub-layers, etc., and excludes all non-design drawing elements.

[0094] If the target style type is a text style type, style information of the text style type may be obtained, including the number of font styles, the number of text attributes under each font style, the font size, and the contrast between the text color and the background color.

[0095] Then, check all the font layers in each design drawing. If the number of font styles is greater than 3, or the number of different text attributes under the same font is greater than 5, it is determined that it does not meet the standard conditions corresponding to the text style type, that is, it does not meet the design specifications. In this case, you can add comments on the corresponding picture to suggest that users reduce the number of fonts and text attributes to meet the design specifications and avoid disturbing the user's vision. The font style refers to font-family, such as Source Han Sans, Apple Square, Microsoft YaHei, etc. Each text attribute can include font size, font weight, line height, character spacing, etc.

[0096] Furthermore, all text layers in the design drawing are checked. If any font size that does not meet the standard conditions is found, a comment is added to the corresponding layer to give modification suggestions; if the font size ∈(0,10), the user is advised not to use a font size that is too small to avoid reading difficulties; if the font size ∈(10,18) and it is not an integer, the user is advised to change the font size to an integer, and one-click modification to the nearest integer is supported; if the font size ∈(18,32) and it is not an even number, the user is advised to change the font size to an even number, and one-click modification to the nearest even number is supported; if the font size ∈(32,48) and it is not an integer multiple of 4, the user is advised to change the font size to an integer multiple of 4, and one-click modification to the nearest integer multiple of 4 is supported; if the font size ∈(48,∞) and it is not an integer multiple of 8, the user is advised to change the font size to an integer multiple of 8, and one-click modification to the nearest integer multiple of 8 is supported. By modifying the font size of text that does not meet standard conditions, the text size in the interface can be made suitable for normal reading by users, and the font sizes follow a certain increase pattern, thereby improving the user's reading experience.

[0097] Finally, check the colors of all text layers and their background colors in the design. If any text that does not meet the WCAG standard is found, add comments on the corresponding layer, suggesting that users increase the contrast between the text and the background to reduce reading costs; the contrast between the color of the text in the interface and the background color should reach AA level or above to ensure good readability and facilitate users to obtain information.

[0098] If the target style type is the rounded corner style type, the rounded corners of all containers and rectangular layers in the design drawing are checked. If the rounded corner is ≥ min(layer width, layer height) / 2, the rounded corner is determined to be a full rounded corner attribute, which meets the design specifications and no modification suggestions are given; if the rounded corner is ∈(0,12) and is not an even number, the user is advised to change the rounded corner to an even number, and one-click modification to the nearest even number is supported; if the rounded corner is ∈(12,∞) and is not an integer multiple of 4, the user is advised to change the rounded corner to an integer multiple of 4, and one-click modification to the nearest integer multiple of 4 is supported.

[0099] If the target style type includes margin style type and spacing style type, the spacing and margin properties in the automatic layout settings of all container layers in the design drawing are checked. If non-compliant spacing or margins are found, comments are added to the corresponding layers to give modification suggestions; if the spacing / margin ∈ (0, 12) and is not an even number, it is recommended that the user change the spacing / margin to an even number, and one-click modification to the nearest even number is supported; if the spacing / margin ∈ (12, ∞) and is not an integer multiple of 4, it is recommended that the user change the spacing / margin to an integer multiple of 4, and one-click modification to the nearest integer multiple of 4 is supported.

[0100] If the target style type is an outer shadow style type, check the colors of all outer shadow styles in the design drawing. If it is found that the color value is different from the color style in the design specification, add a comment on the corresponding layer, suggesting that the user use the color defined in the design specification to make the outer shadow.

[0101] and Figure 1 Corresponding to the method described above, the embodiment of the present invention further provides a design file processing device for Figure 1 The specific implementation of the method is shown in the following diagram: Figure 3 As shown, including:

[0102] A receiving unit 301 is used to receive a detection instruction, wherein the detection instruction is used to instruct to detect a target style type of a design drawing file; the target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type;

[0103] The execution unit 302 is used to obtain the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction in response to the detection instruction;

[0104] A determination unit 303, configured to determine the design drawing data in each of the layers to be detected according to the layer data;

[0105] An acquisition unit 304 is used to acquire style information of the target style type in the design drawing data;

[0106] A detection unit 305, configured to detect whether the style information of the target style type meets a standard condition corresponding to the target style type;

[0107] The setting unit 306 is used to set a mark corresponding to the style information in the design drawing file when the style information of the target style type does not meet the standard condition, and the mark is used to prompt that the style information does not meet the standard condition.

[0108] In an embodiment provided by the present invention, based on the above solution, optionally, the execution unit 302 includes:

[0109] A parsing subunit, used to parse the detection instruction to obtain instruction information;

[0110] A first determining subunit, configured to determine a layer to be detected among the layers of the design drawing file according to a layer identifier in the instruction information;

[0111] The acquisition subunit is used to acquire the layer data in each of the layers to be detected.

[0112] In an embodiment provided by the present invention, based on the above solution, optionally, the determining unit 303 includes:

[0113] The second determining subunit is used to determine the design drawing data in each of the layers to be detected according to the level, display and hide status, rotation angle and number of sub-layers in each of the layer data.

[0114] In an embodiment provided by the present invention, based on the above solution, optionally, the detection unit includes:

[0115] A first detection subunit is used to determine, when the target style type includes a text style type, style information of the text style type in the design drawing data, the style information of the text style type including the number of font styles, the font attributes of each font style, the font size of each character, and the contrast between the color of each character and the background color; if the number of font styles is less than a preset first quantity threshold, the number of font attributes of each font style is less than a preset second quantity threshold, the font size of each character is within a preset font size range, the font size of each character meets a preset font size distribution condition, and the contrast between the color of each character and the background color is greater than a preset contrast threshold, then it is determined that the style information of the text style type meets the standard condition corresponding to the text style type; otherwise, it is determined that the style information of the text style type does not meet the standard condition corresponding to the text style type;

[0116] A second detection subunit is used to determine, when the target style type includes a rounded corner style type, style information of the rounded corner style type in the design drawing data; the rounded corner style type style information includes rounded corners of a container and / or a button; if the rounded corner is a full rounded corner or the rounded corner satisfies a preset rounded corner rule, determine that the style information of the rounded corner style type satisfies a standard condition corresponding to the rounded corner style type; otherwise, determine that the style information of the rounded corner style type does not satisfy the standard condition corresponding to the rounded corner style type;

[0117] A third detection subunit is used to determine, when the target style type includes a spacing style type, style information of the spacing style type in the design drawing data; the style information of the spacing style type includes the spacing between each element; if the spacing between each element satisfies a preset spacing rule, then determine that the style information of the spacing style type satisfies a standard condition corresponding to the spacing style type; otherwise, determine that the style information of the spacing style type does not satisfy the standard condition corresponding to the spacing style type;

[0118] a fourth detection subunit, configured to determine, when the target style type includes a margin style type, style information of the margin style type in the design drawing data; the style information of the margin style type includes the margins of each element; if the margins between the elements satisfy a preset margin rule, determine that the style information of the margin style type satisfies a standard condition corresponding to the margin style type; otherwise, determine that the style information of the margin style type does not satisfy the standard condition corresponding to the margin style type;

[0119] The fifth detection subunit is used to determine the style information of the outer shadow style type in the design drawing data when the target style type includes an outer shadow style type; the style information of the outer shadow style type includes an outer shadow color; if the outer shadow color is consistent with a preset color specification, it is determined that the style information of the outer shadow style type meets the standard conditions corresponding to the outer shadow style type; otherwise, it is determined that the style information of the outer shadow style type does not meet the standard conditions corresponding to the outer shadow style type.

[0120] In an embodiment provided by the present invention, based on the above solution, optionally, the processing device for the design drawing file further includes:

[0121] A display unit, used to display the mark and a selection control corresponding to the mark; the selection control is used to instruct the user to choose whether to modify the style information that does not meet the standard condition;

[0122] A first processing unit is configured to modify the style information that does not meet the standard condition when receiving a first selection operation of the user on the selection control, so that the modified style information meets the standard condition;

[0123] The second processing unit is configured to delete the mark when receiving a second selection operation of the selection control by the user.

[0124] The specific principles and execution processes of each unit and module in the design drawing file processing device disclosed in the above embodiment of the present invention are the same as the design drawing file processing method disclosed in the above embodiment of the present invention. Please refer to the corresponding parts of the design drawing file processing method provided in the above embodiment of the present invention, and will not be repeated here.

[0125] An embodiment of the present invention further provides a storage medium, which includes stored instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the above-mentioned design drawing file processing method.

[0126] The embodiment of the present invention further provides an electronic device, the structural diagram of which is shown in FIG. Figure 4 As shown, it specifically includes a memory 401 and one or more instructions 402, wherein the one or more instructions 402 are stored in the memory 401 and are configured to be executed by one or more processors 403 to perform the following operations:

[0127] Receive a detection instruction, wherein the detection instruction is used to instruct to detect a target style type of a design drawing file; the target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type;

[0128] In response to the detection instruction, obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction;

[0129] Determine the design drawing data in each of the layers to be detected according to the data of each layer;

[0130] Acquire style information of the target style type in the design drawing data;

[0131] Detecting whether the style information of the target style type meets the standard condition corresponding to the target style type;

[0132] In the case where the style information of the target style type does not meet the standard condition, a mark corresponding to the style information is set in the design drawing file, and the mark is used to prompt that the style information does not meet the standard condition.

[0133] It should be noted that each embodiment in this specification is described in a progressive manner, and each embodiment focuses on the differences from other embodiments, and the same or similar parts between the embodiments can be referred to each other. For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0134] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are merely used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations.

[0135] For the convenience of description, the above device is described as being divided into various units according to their functions. Of course, when implementing the present invention, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0136] It can be known from the description of the above implementation methods that those skilled in the art can clearly understand that the present invention can be implemented by means of software plus a necessary general hardware platform. Based on such an understanding, the technical solution of the present invention is essentially or the part that contributes to the prior art can be embodied in the form of a software product, which can be stored in a storage medium such as ROM / RAM, a magnetic disk, an optical disk, etc., and includes a number of instructions for enabling a computer device (which can be a personal computer, a server, or a network device, etc.) to execute the methods described in the various embodiments of the present invention or certain parts of the embodiments.

[0137] The above is a detailed introduction to a method for processing a design drawing file provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A method for processing a design drawing file, characterized in that: include: Receive a detection instruction, wherein the detection instruction is used to instruct to detect a target style type of a design drawing file; The target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type; In response to the detection instruction, obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction; Determine the design drawing data in each of the layers to be detected according to the data of each layer; Acquire style information of the target style type in the design drawing data; Detecting whether the style information of the target style type meets the standard condition corresponding to the target style type; In the case where the style information of the target style type does not meet the standard condition, a mark corresponding to the style information is set in the design drawing file, and the mark is used to prompt that the style information does not meet the standard condition.

2. The method according to claim 1, characterized in that The step of obtaining the layer data of each layer to be detected in the design drawing file corresponding to the detection instruction includes: Parsing the detection instruction to obtain instruction information; Determine the layer to be detected among the layers of the design drawing file according to the layer identifier in the instruction information; The layer data in each of the layers to be detected is obtained.

3. The method according to claim 1, characterized in that Determining the design drawing data in each of the layers to be detected according to the layer data includes: According to the level, display and hiding status, rotation angle and number of sub-layers in each of the layer data, the design drawing data in each of the layers to be detected is determined.

4. The method according to claim 1, characterized in that: The detecting whether the style information of the target style type meets the standard condition corresponding to the target style type includes: In the case where the target style type includes a text style type, determining the style information of the text style type in the design drawing data, wherein the style information of the text style type includes the number of font styles, the font attributes of each font style, the font size of each character, and the contrast between the color of each character and the background color; if the number of font styles is less than a preset first quantity threshold, the number of font attributes of each font style is less than a preset second quantity threshold, the font size of each character is within a preset font size range, the font size of each character satisfies a preset font size distribution condition, and the contrast between the color of each character and the background color is greater than a preset contrast threshold, then determining that the style information of the text style type satisfies the standard condition corresponding to the text style type; otherwise, determining that the style information of the text style type does not satisfy the standard condition corresponding to the text style type; In the case where the target style type includes a rounded corner style type, determining the style information of the rounded corner style type in the design drawing data; the style information of the rounded corner style type includes the rounded corners of a container and / or a button; if the rounded corner is a full rounded corner or the rounded corner satisfies a preset rounded corner rule, determining that the style information of the rounded corner style type satisfies a standard condition corresponding to the rounded corner style type; otherwise, determining that the style information of the rounded corner style type does not satisfy the standard condition corresponding to the rounded corner style type; In the case where the target style type includes a spacing style type, determining style information of the spacing style type in the design drawing data; the style information of the spacing style type includes the spacing between elements; if the spacing between elements satisfies a preset spacing rule, determining that the style information of the spacing style type satisfies a standard condition corresponding to the spacing style type; otherwise, determining that the style information of the spacing style type does not satisfy the standard condition corresponding to the spacing style type; In the case where the target style type includes a margin style type, determining style information of the margin style type in the design drawing data; the style information of the margin style type includes the margins of each element; if the margins between the elements meet the preset margin rules, determining that the style information of the margin style type meets the standard condition corresponding to the margin style type; otherwise, determining that the style information of the margin style type does not meet the standard condition corresponding to the margin style type; In a case where the target style type includes an outer shadow style type, style information of the outer shadow style type in the design drawing data is determined; the style information of the outer shadow style type includes an outer shadow color; if the outer shadow color is consistent with a preset color specification, it is determined that the style information of the outer shadow style type satisfies the standard condition corresponding to the outer shadow style type; otherwise, it is determined that the style information of the outer shadow style type does not satisfy the standard condition corresponding to the outer shadow style type.

5. The method according to claim 1, characterized in that After setting the mark in the layer to which the design drawing data belongs, the method further includes: Display the mark and the selection control corresponding to the mark; the selection control is used to instruct the user to choose whether to modify the style information that does not meet the standard condition; When receiving a first selection operation of the selection control by the user, modifying the style information that does not meet the standard condition so that the modified style information meets the standard condition; When a second selection operation of the user on the selection control is received, the mark is deleted.

6. A device for processing design drawing files, characterized in that: include: A receiving unit, used for receiving a detection instruction, wherein the detection instruction is used for indicating a target style type of a detection design file; The target style type includes at least one of a text style type, a rounded corner style type, a spacing style type, a margin style type, and an outer shadow style type; An execution unit, configured to obtain, in response to a detection instruction, layer data of each layer to be detected in a design drawing file corresponding to the detection instruction; A determination unit, used for determining the design drawing data in each of the layers to be detected according to the data of each layer; An acquisition unit, configured to acquire style information of the target style type in the design drawing data; A detection unit, configured to detect whether the style information of the target style type meets a standard condition corresponding to the target style type; A setting unit is used to set a mark corresponding to the style information in the design drawing file when the style information of the target style type does not meet the standard condition, and the mark is used to prompt that the style information does not meet the standard condition.

7. The device according to claim 6, characterized in that The execution unit comprises: A parsing subunit, used to parse the detection instruction to obtain instruction information; A first determining subunit, configured to determine a layer to be detected among the layers of the design drawing file according to a layer identifier in the instruction information; The acquisition subunit is used to acquire the layer data in each of the layers to be detected.

8. The device according to claim 6, characterized in that The determining unit comprises: The second determining subunit is used to determine the design drawing data in each of the layers to be detected according to the level, display and hide status, rotation angle and number of sub-layers in each of the layer data.

9. A storage medium, characterized in that: The storage medium includes storage instructions, wherein when the instructions are executed, the device where the storage medium is located is controlled to execute the method for processing a design drawing file according to any one of claims 1 to 5.

10. An electronic device, characterized in that: It comprises a memory and one or more instructions, wherein the one or more instructions are stored in the memory and are configured to be executed by one or more processors to perform the method for processing a design drawing file as described in any one of claims 1 to 5.