A method and apparatus for processing technical parameters in industrial component product manuals
By automatically parsing and structuring the technical parameter tables in industrial component product manuals, constructing JSON dictionaries of the main table and sub-tables, and merging them into a JSON list, the problems of low parsing efficiency, error susceptibility, and integration difficulty are solved, achieving efficient, reliable, and scalable data processing.
Patent Information
- Application Number
- CN202510432467.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-08
- Publication Date
- 2026-01-30
- Estimated Expiration
- 2045-04-08
AI Technical Summary
In product manuals for industrial components, the technical parameter tables are inefficient to parse, prone to errors, difficult to integrate, and hard to update dynamically. The lack of a unified parsing standard increases the complexity of data processing and makes it difficult to form large-scale data.
By constructing a technical parameter table for industrial parts, extracting data from the main table and sub-tables, structuring the data separately, building a JSON dictionary for the main table and a JSON dictionary for the sub-tables, and merging them into a JSON list, automatic parsing and data integration are achieved.
It effectively reduces human error and time costs, improves data parsing efficiency and reliability, and enhances data availability and scalability, making it suitable for data processing and analysis of large-scale industrial parts.
Smart Images

Figure CN120470696B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of technical document processing, in particular to a technical parameter processing method of an industrial part product manual, a technical parameter processing device of an industrial part product manual, an electronic device and a computer readable storage medium. BACKGROUND
[0002] In the design and manufacturing process of industrial parts, the technical parameter table is one of the important documents. When describing the related parameters of the parts, different part manufacturers adopt different description methods, and even the same part manufacturer may have differences in description methods when describing the related parameters of different categories of parts. Based on the technical parameter table with different description styles, it takes a lot of time to analyze the technical parameter table, and it is easy to make mistakes, and different description styles of the technical parameter table lack corresponding analysis standards, increase the complexity of data processing and integration difficulty, and cannot effectively process dynamic updated data, and it is difficult to form large-scale data. SUMMARY
[0003] The embodiments of the present application provide a technical parameter processing method and device of an industrial part product manual, to solve or partially solve the problems of low analysis efficiency, easy to make mistakes, high integration difficulty, and difficult to dynamically update and form large-scale data when processing the technical parameters corresponding to the product manual of the industrial part.
[0004] The embodiments of the present application disclose a technical parameter processing method of an industrial part product manual, comprising:
[0005] Obtain the technical parameter table corresponding to the industrial part, wherein the technical parameter table at least includes a main table and a plurality of sub-tables associated with the main table, the main table at least includes comprehensive attribute data corresponding to the industrial part, and the sub-tables at least include attribute relationship data corresponding to the industrial part;
[0006] According to the comprehensive attribute data, the data is structured, and the main table JSON dictionary corresponding to the main table is constructed;
[0007] According to the attribute relationship data, the data is structured, and the sub-table JSON dictionary corresponding to each sub-table is constructed;
[0008] Merge the main table JSON dictionary and each sub-table JSON dictionary to obtain the JSON list corresponding to the technical parameter table.
[0009] The embodiments of the present application also disclose a technical parameter processing device of an industrial part product manual, comprising:
[0010] A data table acquisition module is configured to acquire a technical parameter table corresponding to an industrial part, wherein the technical parameter table comprises at least a main table and a plurality of sub-tables associated with the main table, the main table comprises at least comprehensive attribute data corresponding to the industrial part, and the sub-tables comprise at least attribute relationship data corresponding to the industrial part.
[0011] A first processing module is configured to perform data structuring according to the comprehensive attribute data, and construct a main table JSON dictionary corresponding to the main table.
[0012] A second processing module is configured to perform data structuring according to the attribute relationship data, and construct a sub-table JSON dictionary corresponding to each of the sub-tables.
[0013] A merging module is configured to merge the main table JSON dictionary and each of the sub-table JSON dictionaries, and obtain a JSON list corresponding to the technical parameter table.
[0014] The embodiment of the application further discloses an electronic device, including a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory complete the communication between each other through the communication bus.
[0015] The memory is used for storing a computer program.
[0016] The processor is used for executing the program stored on the memory, and realizes the method as described in the embodiment of the application.
[0017] The embodiment of the application further discloses a computer readable storage medium, which stores instructions, and when executed by one or more processors, makes the processor execute the method as described in the embodiment of the application.
[0018] The embodiment of the application has the following advantages:
[0019] In the embodiment of the present application, for the technical parameter table of industrial parts, by analyzing the technical parameter table, the main table in the technical parameter table and the sub-table corresponding to the main table are extracted, then the main table and the sub-table are analyzed respectively, the comprehensive attribute data of the industrial parts contained in the main table is data structured, the main table JSON dictionary corresponding to the main table is constructed, and the attribute relationship data of each sub-table is data structured, the sub-table JSON dictionary corresponding to each sub-table is constructed, and then the main table JSON dictionary and each sub-table JSON dictionary are merged to obtain the JSON list corresponding to the technical parameter table, so that through the automatic analysis of the technical parameter table, the errors and time cost of manual operation can be effectively reduced, the difficulty of data integration is reduced, the data analysis efficiency and reliability are improved, and based on the generated JSON format data, the data can be called by various application programs, the data availability and expandability are improved, the subsequent data processing and analysis are facilitated, and the data processing of multiple workbooks is suitable for the technical parameter table analysis of large-scale industrial parts, which is beneficial to form large-scale data. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 is a step flow chart of a technical parameter processing method of an industrial parts product manual provided in the embodiment of the present application;
[0021] Figure 2 is a flowchart of data conversion provided in the embodiment of the present application;
[0022] Figure 3 is a structural block diagram of a technical parameter processing device of an industrial parts product manual provided in the embodiment of the present application. DETAILED DESCRIPTION
[0023] In order to make the above-mentioned purposes, features and advantages of the present application more obvious and easy to understand, the present application will be further described in detail below with reference to the drawings and specific embodiments.
[0024] As an example, for the technical parameter table with different description styles, it is easy to cause a lot of time to be consumed and easy to make mistakes when analyzing the technical parameter table, and different description styles of the technical parameter table lack corresponding analysis standards, which increases the complexity and difficulty of data processing and integration, and cannot effectively process dynamic updated data, and it is difficult to form large-scale data.
[0025] To this end, in the embodiment of the present application, the technical parameter table is automatically parsed by constructing a corresponding parsing method to improve the efficiency and reliability of data parsing in the technical parameter table. Specifically, for the technical parameter table of the industrial parts, the main table and the sub-table corresponding to the main table in the technical parameter table are extracted by parsing the technical parameter table, then the main table and the sub-table are parsed respectively, the comprehensive attribute data of the industrial parts contained in the main table is structured, the main table JSON dictionary corresponding to the main table is constructed, and the attribute relationship data of each sub-table is structured, the sub-table JSON dictionary corresponding to each sub-table is constructed, and then the main table JSON dictionary and each sub-table JSON dictionary are merged to obtain the JSON list corresponding to the technical parameter table. Thus, through the automatic parsing of the technical parameter table, the errors and time cost of manual operation can be effectively reduced, the difficulty of data integration is reduced, the data parsing efficiency and reliability are improved, and based on the generated JSON format data, the data can be called by various application programs, the data availability and expandability are improved, the subsequent data processing and analysis are facilitated, and the data processing of multiple workbooks is applicable, the technical parameter table parsing of large-scale industrial parts is applicable, and the formation of large-scale data is beneficial.
[0026] Referring to Figure 1 , a step flow chart of a technical parameter processing method of an industrial parts product manual provided in the embodiment of the present application is shown, which can specifically include the following steps:
[0027] Step 101, obtaining a technical parameter table corresponding to an industrial part, the technical parameter table at least including a main table and a plurality of sub-tables associated with the main table, the main table at least including comprehensive attribute data corresponding to the industrial part, and the sub-tables at least including attribute relationship data corresponding to the industrial part;
[0028] For industrial parts, it refers to various components or parts used in industrial production, which can be used to assemble larger mechanical equipment or systems, etc. Among them, the product manual is a document provided by the manufacturer, which describes the characteristics, use method, maintenance guide and technical specifications of the industrial parts in detail, and the technical parameter table is a part of the product manual. The key technical specifications and performance indicators of the industrial parts can be listed in the form of a table in the technical parameter table. By parsing the data contained in the technical parameter table and converting it into structured data, it is beneficial to the unified management and integration of data, and large-scale data is formed to be called by various application programs, improving the availability and expandability of data.
[0029] Wherein, for the technical parameter table (which can be in Excel format, etc.), it can at least include a main table and several sub-tables associated with the main table, the main table at least includes the comprehensive attribute data corresponding to the industrial parts, and the sub-tables at least include the attribute relationship data corresponding to the industrial parts. It should be noted that the main table contains all the part attributes corresponding to the industrial parts and the attribute values corresponding to part of the part attributes, and the sub-tables are used to represent the mapping relationship of the industrial parts with different attribute values, which can include specific part attributes, attribute values corresponding to specific part attributes and corresponding mapping relationship, etc., which are not limited by the present application.
[0030] Optionally, for the main table, it includes part attributes such as product name, series name, product model, configuration model, 3D model name, manufacturer, and the part attributes contained in the technical parameter tables corresponding to different industrial parts can be the same or different, for example, different industrial parts can contain fixed part attributes such as product name, series name, product model, configuration model, 3D model name, manufacturer, and according to the characteristics of the industrial parts, it can also contain exclusive part attributes, etc., which are not limited by the present application.
[0031] In the embodiment of the present application, for the technical parameter table of the industrial parts to be parsed, after the parsing program reads the technical parameter table and obtains the main table and the corresponding sub-tables in the technical parameter table, the main table and the sub-tables can be parsed according to the corresponding parsing mode to obtain the corresponding JSON dictionary, so as to realize the data structuring through the data structure of JSON format, and then be called by various application programs, thereby improving the data availability and expandability.
[0032] Step 102, data structuring according to the comprehensive attribute data, constructing the main table JSON dictionary corresponding to the main table;
[0033] The comprehensive attribute data contained in the master table at least includes part attributes corresponding to industrial parts and attribute values corresponding to each part attribute; wherein the part attributes at least include fixed attributes and active attributes, the attribute values at least include first attribute values corresponding to the fixed attributes and second attribute values corresponding to each active attribute, the fixed attributes and the first attribute values are located in the first n columns in the master table, and the active attributes and the second attribute values are located after the nth column in the master table; wherein the fixed attributes include product names corresponding to industrial parts, and the first attribute values include product name values corresponding to the product names, so that when the master table is parsed, the part attributes other than the product names in the fixed attributes can be taken as first target attributes, then a first attribute value mapping relationship between the product names and the first target attribute values corresponding to each first target attribute is obtained, and a second attribute value mapping relationship between the product name values and each second attribute value is obtained, and then the fixed attributes, the active attributes, the first attribute value mapping relationship and the second attribute value mapping relationship are data structured to construct a master table JSON dictionary corresponding to the master table.
[0034] Wherein, the fixed attribute refers to the part attribute that exists in the master table, which refers to the part attribute involved in each industrial part, such as product name, series name, product model, configuration model, 3D model name, manufacturer, etc.; the active attribute refers to a specific attribute related to the characteristics of the industrial part, and different industrial parts can correspond to different active attributes, such as type, national standard material, equivalent material and surface treatment, etc.
[0035] Optionally, the fixed attributes in the master table can be located in the first n columns of the master table, and the active attributes can be located after the nth column of the master table, for example, for the fixed attributes, they can be located in the first 6 columns of the master table, and the active attributes can start from the 7th column, etc. The first row of each column is the corresponding attribute name, and the second row of the attribute name can be the attribute value corresponding to the part attribute, such as the product name in the first column of the first row, and the second row of the first column can be xx (product name), and so on, so as to construct the comprehensive attribute data corresponding to the industrial parts in the master table.
[0036] It should be noted that the main table can contain all the part attributes of the industrial parts, but not necessarily all the attribute values corresponding to the part attributes. The values of part attributes can be represented by corresponding "symbols" to represent null values, and the corresponding attribute values can be recorded in the sub-table. For example, " / / " can be used in the main table to represent null values, indicating that the column data is not processed during parsing, and the corresponding attribute values are read in the related sub-table. At the same time, when the values of the part attributes in the main table are not all " / / ", the attribute values of the part attributes in the main table are only read by the system when parsing the technical parameter table, and the corresponding data is not read from the sub-table. Therefore, by constructing the corresponding data table parsing method, the system can accurately and quickly parse the technical parameter table to realize the structured processing of data.
[0037] In some possible implementations, the generated main table JSON dictionary can at least include a first main table JSON dictionary and a second main table JSON dictionary, and the information contained in the first main table JSON dictionary and the second main table JSON dictionary is partially the same. During the parsing of the main table, the system can perform data structuring on the fixed attributes, active attributes, and first attribute value mapping relationship, construct the first main table JSON dictionary corresponding to the main table, and perform data structuring on the active attributes and second attribute value mapping relationship, and construct the second main table JSON dictionary corresponding to the main table.
[0038] In addition, the comprehensive attribute data also includes unit information corresponding to the part attributes, and the system can also perform data structuring on the fixed attributes, active attributes, unit information, and first attribute value mapping relationship to construct the first main table JSON dictionary corresponding to the main table.
[0039] In an example, the parsing process of the main table can be as follows:
[0040] ① Parse the main table header: first, extract the table header of the main table, the table header is in the fourth row of the main table, and each column in the row is an attribute name. The entire row contains all the attribute names of the part. The attribute names of the main table of different part technical parameter tables are not necessarily the same except for the first six fixed attributes, which are product name, series name, product model, configuration model, 3D model name, and manufacturer.
[0041] ② Construct a data dictionary: traverse each row of data in the main table, associate each column attribute name with the corresponding attribute value, and form a dictionary object.
[0042] ③ Generate JSON structure:
[0043] A, the dictionary object of type 0: this kind of dictionary object contains four key values: type, names, units, and values.
[0044] The type key stores the type of data, including 200, 300, 400, 500, 600, 700, 800, 900, etc.
[0045] The names key contains a list representing the attribute names of all columns.
[0046] The units key contains a set of units corresponding to names (units refer to the values of part attributes that require units, such as the unit of the attribute "thread diameter" is [mm]).
[0047] The values key stores a tree-structured JSON that includes the values of the main table product model and their mapping relationship with the first six column attribute values.
[0048] B, the dictionary object of type 400: this kind of dictionary object contains four key values: type, names, cols, and values.
[0049] The values of type and names are the same as those of the dictionary object of type 0.
[0050] The cols key represents the index number of the column.
[0051] The values key stores a tree-structured data structure that includes the mapping relationship between the values of each row of product model and the attribute values after the sixth column.
[0052] It should be noted that for "0", "200", "300", "400", "500", "600", "700", "800", "900", etc. types, which are used for the structured description of the technical parameter table of industrial parts, it can be understood that those skilled in the art can also adjust according to actual needs. The dictionary object of type 0 is a structured description of the technical parameter table of the part, which includes the attribute names of the main table, the corresponding units, and the mapping relationship between the first six fixed attribute values and the product model; type 400 describes the mapping relationship between the attribute values of the product model of a certain part and the attribute values after the sixth column, etc. The present application does not limit this.
[0053] Step 103, data structuring according to the attribute relationship data, constructing a sub-table JSON dictionary corresponding to each sub-table;
[0054] For the sub-tables, they can at least include a relationship constraint table, an attribute hiding relationship table, a model variable mapping table, a feature compression relationship table, a geometric constraint relationship table, and a Chinese-English association table, etc. The relationship constraint table is used to describe the relationship between different part attributes in the industrial parts, the attribute hiding relationship table is used to describe the relationship between the active attributes and the hidden attributes in the industrial parts, the model variable mapping table is used to describe the relationship between the part attributes that affect the corresponding 3D model of the industrial parts and the model variables, the feature compression relationship table is used to describe the relationship between the model features of the corresponding 3D model of the industrial parts and the part attributes, the geometric constraint relationship table is used to describe the geometric relationship between the related part attributes in the industrial parts, and the Chinese-English association table is used to describe the mapping relationship between the Chinese and English expressions of the part attributes in the industrial parts.
[0055] For example, for each sub-table and the corresponding table type, the following Table 1 can be used:
[0056]
[0057] Table 1
[0058] In some examples, different sub-tables can correspond to different processing specifications, which are as follows:
[0059] For the relationship constraint table, according to the number of part attributes, it can be divided into a two-attribute relationship constraint table, a three-attribute relationship constraint table, and a multi-attribute relationship constraint table, etc. The two-attribute relationship constraint table represents the constraint relationship between two different part attributes in the industrial parts (for example, the attributes in the second column and after the second column in the table are only constrained by the attribute in the first column, etc.), the three-attribute relationship constraint table represents the constraint relationship between three different part attributes in the industrial parts (for example, the attribute 1 in the first column is constrained by the attribute 2 in the second column and the attribute 3 in the third column, i.e., the constraint relationship can be attribute 1 and attribute 2 constrain attribute 3), and the multi-attribute relationship constraint table represents the constraint relationship between at least three different part attributes in the industrial parts; in the two-attribute relationship constraint table, the part attribute in the latter column is constrained by the part attribute in the former column, in the three-attribute relationship constraint table, the part attribute in the first column is constrained by the part attributes in the latter two columns, and in the multi-attribute relationship constraint table, the constraint relationship between different part attributes is that the left part attribute constrains the right part attribute or the right part attribute constrains the left part attribute.
[0060] For the attribute hidden relationship table, which is used to describe the relationship between the active attribute and the hidden attribute in the industrial parts, it can include the active attribute name, attribute value and corresponding hidden attribute name, etc. For example, assuming that the attribute hidden relationship table records "add plane", in the case that the value of the part attribute is "add 2 planes", the part attributes "LA" and "G" can be hidden (not displayed in the front end) and so on. In addition, when the active attribute and attribute value in the same row are both " / / ", the value of the corresponding hidden attribute column is the default hidden attribute, and the selector can directly hide this attribute.
[0061] For the model variable mapping table, which describes the relationship between the part attribute that affects the 3D model corresponding to the industrial parts and the model variable, it can include the attribute name, model variable name and mapping relationship between the two. Among them, if the attribute value type is nominal, the value of the attribute name column can add "& maximum value" or "& minimum value" or "& nominal". For example: d&minimum value.
[0062] It should be noted that "d" in "d&minimum value" can be an attribute, and the variable name of "d" in the 3D model is d, and the minimum value of the nominal value is transmitted to the model when transmitting the value to the model. And when doing parameterized deformation, d and the value of the corresponding attribute need to be transmitted to CAD for modeling. In addition, all variables that affect the 3D model can be listed in the model variable relationship table, so that through the model variable mapping table, the part attributes that affect the modeling of the 3D model can be intuitively and quickly known.
[0063] For the feature compression relationship table, which is used to describe the relationship between the model feature of the 3D model corresponding to the industrial parts and the part attribute, it can include the attribute name, attribute value and the name of the model feature corresponding to the attribute, and the number of model features corresponds to the number of columns in the table. Optionally, the value of each model feature can be "0", "1" or " / / " and the like. For example, assuming that the feature compression relationship table records "gear shape", when the value of the part attribute is "A", the compression state of the model feature "hub boss" is "1", that is, the model feature adds a compression (hidden) tight screw hole, a tight screw hole and a key groove hole.
[0064] Among them, the model feature refers to a feature designed by the designer in the CAD model. It should be noted that when the platform is modeling with the CAD tool, the compression state of the feature needs to be sent to the modeler, so as to realize the compression effect.
[0065] For the geometric constraint relationship table, it can be used to describe the geometric relationship between the related part attributes in the industrial parts, which can include attribute name, geometric relationship and value, etc. For example, the third row of the geometric constraint relationship table starts, the first column of the odd row is the fixed text "attribute name", the second column indicates all attributes of the current row, one attribute per column; the first column of the even row is the fixed text "geometric relationship", the second column indicates the value on the left side of the equation, the third column indicates the equation symbol, the fourth column indicates the value on the right side of the equation, etc. The present application does not limit this.
[0066] Optionally, the geometric constraint relationship table has two modes, mode one uses the equation symbols "> " and "> =", for example, mode one can be "L> KA+A+KB+B+KC+C", which represents that in the same row, the value in the Lth column is greater than the sum of "KA", "A", "KB", "B", "KC", "C", etc. Mode 2 uses the equation symbol "in", such as obtaining the value range in the KA, KB, KC columns in the same row of the geometric constraint relationship table, etc. The present application does not limit this.
[0067] For the Chinese-English association table, it can be used to describe the mapping relationship between the Chinese and English expressions of part attributes in industrial parts, which can include attribute name, attribute value and mapped value (mapped value), etc. For example, when the attribute name is "add a set screw hole", the mapped value is " / / " when its corresponding value is "N / A (no processing)", and the mapped value is "HC90" when its corresponding value is "HC90", etc. The present application does not limit this. It should be noted that the function of the mapped value can be to use the mapped value to form the configuration model when the configuration model refers to the attribute.
[0068] Through the processing specification of each sub-table in the above embodiment, when the system parses the data contained in the sub-table, the data can be structured according to the corresponding processing specification to ensure the accuracy and effectiveness of data reading.
[0069] In the embodiment of the present application, since the attribute relationship data of the relationship constraint table includes at least two part attributes, attribute values corresponding to the part attributes, and constraint relationships between the part attributes, when the relationship constraint table is parsed, the data structure of each part attribute, the attribute values corresponding to each part attribute, and the constraint relationships can be structured, and a constraint table JSON dictionary corresponding to each relationship constraint table is constructed. In a specific implementation, if the sub-table is a two-attribute relationship constraint table, the data structure of each part attribute in the two-attribute relationship constraint table, the attribute values corresponding to each part attribute, and the constraint relationships are structured, and a first constraint table JSON dictionary in the form of a key-value pair corresponding to the two-attribute relationship constraint table is constructed; if the sub-table is a three-attribute relationship constraint table, the data structure of each part attribute in the three-attribute relationship constraint table, the attribute values corresponding to each part attribute, and the constraint relationships are structured, and a second constraint table JSON dictionary in the form of a nested dictionary structure corresponding to the three-attribute relationship constraint table is constructed; if the sub-table is a multi-attribute relationship constraint table, the data structure of each part attribute in the multi-attribute relationship constraint table, the attribute values corresponding to each part attribute, and the constraint relationships are structured, and a third constraint table JSON dictionary in the form of a list structure or a nested dictionary structure corresponding to the multi-attribute relationship constraint table is constructed. Thus, according to the number of part attributes, different data structures can be used for processing, so that the parsing process can be flexibly adjusted according to the data content of the data table, and the flexibility of data parsing is improved.
[0070] For the attribute hiding relationship table, the attribute relationship data corresponding thereto at least includes a driving attribute, a third attribute value corresponding to the driving attribute, and a hidden attribute. The data structure of the driving attribute, the third attribute value, and the hidden attribute can be structured, and a hidden relationship JSON dictionary corresponding to the attribute hiding relationship table is constructed.
[0071] For the model variable mapping table, the attribute relationship data corresponding thereto at least includes a first part attribute, a model variable name corresponding to the first part attribute in a 3D model, and a fourth attribute value corresponding to the first part attribute. The data structure of the first part attribute, the model variable name, and the fourth attribute value can be structured, and a model variable JSON dictionary corresponding to the model variable mapping table is constructed.
[0072] For the feature compression relationship table, the attribute relationship data corresponding thereto at least includes a second part attribute, a fifth attribute value corresponding to the second part attribute, and a model feature corresponding to the industrial part. The data structure of the second part attribute, the fifth attribute value, and the model feature can be structured, and a feature JSON dictionary corresponding to the feature compression relationship table is constructed.
[0073] For the geometric constraint relationship table, the corresponding attribute relationship data at least includes a third part attribute, a sixth attribute value corresponding to the third part attribute, and a geometric relationship between the sixth attribute values, so that the third part attribute, the sixth attribute value and the geometric relationship between the sixth attribute values can be data structured, and a geometric JSON dictionary corresponding to the geometric constraint relationship table is constructed.
[0074] For the English-Chinese association table, the corresponding attribute relationship data at least includes a fourth part attribute, a seventh attribute value corresponding to the fourth part attribute, and a mapping value corresponding to the seventh attribute value, so that the fourth part attribute, the seventh attribute value and the mapping value can be data structured, and a mapping JSON dictionary corresponding to the English-Chinese association table is constructed.
[0075] Through the above process, the data contained in each sub-table can be structured and processed to obtain a corresponding data dictionary, so as to merge the data dictionary corresponding to the main table to obtain the JSON data corresponding to the technical parameter table.
[0076] In addition, in the process of parsing, the data of the extracted main table and sub-table can also be formatted accordingly. In the formatting process, the following multiple data value taking modes can be processed:
[0077] ① Nominal: the format is nominal value [minimum value, maximum value], such as 8 [6, 10].
[0078] ② Enumeration: the format is value 1; value 2; value 3, such as 3; 4; 7; 10.
[0079] ③ Step: the format is start value-end value: step, such as 10-50: 5.
[0080] ④ Range: the format is <= value, value<&<= value, value<, etc.
[0081] ⑤ Formula: supports string and numerical operations, uses & symbol to connect column values, and supports basic addition, subtraction, multiplication and division operations.
[0082] ⑥ Null: represented by / / as no value.
[0083] It can be understood that the data value taking modes in the embodiments of the present application include but are not limited to the above-mentioned data value taking modes. In actual application, those skilled in the art can also adjust according to actual needs, and the present application does not limit this.
[0084] Step 104, merging the main table JSON dictionary and each sub-table JSON dictionary to obtain a JSON list corresponding to the technical parameter table.
[0085] After converting the data contained in the main table into a corresponding dictionary and converting the data contained in each sub-table into a corresponding dictionary, the main table JSON dictionary and each sub-table JSON dictionary can be merged to obtain a JSON list corresponding to the technical parameter table. Through automatic parsing of the technical parameter table, errors and time costs of manual operation can be effectively reduced, the difficulty of data integration can be reduced, the efficiency and reliability of data parsing can be improved, and the generated JSON format data can be called by various application programs, improving the usability and expandability of the data, facilitating subsequent data processing and analysis, and being applicable to data processing of multiple workbooks and technical parameter table parsing of large-scale industrial parts.
[0086] In a specific implementation, all sibling key-value pairs can be found by traversing the main table JSON dictionary and each sub-table JSON dictionary, and a corresponding digital index number can be added to each sibling key-value pair. Then, the key-value pairs in the main table JSON dictionary and each sub-table JSON dictionary can be updated using the digital index number, and a JSON list corresponding to the technical parameter table can be obtained. Thus, by parsing the technical parameter table into a JSON format data structure, subsequent data processing and analysis can be facilitated.
[0087] In some examples, after parsing the data corresponding to the main table and the sub-table, the obtained JSON dictionary can be a tree structure. When generating the final JSON object, since the parsed data structure is usually tree-shaped, to facilitate subsequent data processing and visualization, the sibling keys can be sorted (here, the sibling keys refer to the values of the keys at the same level in the JSON structure key-value pair), and the index information of the keys in the original table can be added. The specific steps can be as follows:
[0088] ①Traverse the tree structure: First, the parsed JSON structure can be recursively traversed to find all sibling key-value pairs.
[0089] ②Record the index: For each sibling key-value pair, a digital index number can be added to the left side of the key-value pair. For example, if a parsed key-value pair is at the 7th element at the same level, the name of the key should be modified to 7_index_key.
[0090] ③Maintain the original structure: While adding the index, the hierarchical relationship of the original data should be ensured. A new dictionary or list can be constructed in the traversal process to store the updated key-value pairs.
[0091] ④Merging data: merge the parsed data of the main table and the sub-tables to form a JSON list containing all information. The JSON library of Python can be used to convert the dictionary object into JSON format.
[0092] It should be noted that the embodiments of the present application include but are not limited to the above examples. It can be understood that those skilled in the art can set according to actual needs under the guidance of the idea of the embodiments of the present application, and the present application does not limit this.
[0093] In the embodiments of the present application, for the technical parameter table of industrial parts, the main table and the sub-tables corresponding to the main table in the technical parameter table are extracted by analyzing the technical parameter table, then the main table and the sub-tables are parsed respectively, the comprehensive attribute data of the industrial parts contained in the main table is structured, the main table JSON dictionary corresponding to the main table is constructed, and the attribute relationship data of each sub-table is structured, the sub-table JSON dictionary corresponding to each sub-table is constructed, and then the main table JSON dictionary and each sub-table JSON dictionary are merged to obtain the JSON list corresponding to the technical parameter table, so that through the automatic analysis of the technical parameter table, the errors and time cost of manual operation can be effectively reduced, the difficulty of data integration is reduced, the data analysis efficiency and reliability are improved, and based on the generated JSON format data, the data can be called by various application programs, the data availability and expandability are improved, and the subsequent data processing and analysis are facilitated, and the data processing of multiple workbooks is applicable, the technical parameter table analysis of large-scale industrial parts is applicable, and the formation of large-scale data is facilitated.
[0094] In order to make those skilled in the art better understand the technical solutions in the embodiments of the present application, the following will be exemplarily illustrated by corresponding examples:
[0095] As an example, as shown in Figure 2 , a flowchart of data conversion provided in the embodiments of the present application is shown, which specifically includes:
[0096] (1) Data preparation:
[0097] Prepare an Excel workbook containing a technical parameter table, and perform data format verification to ensure that the data format meets the expectations, including the attribute names and corresponding values of the main table and each constraint table.
[0098] (2) Data reading:
[0099] Load the Excel file of the technical parameter table using the openpyxl library.
[0100] Read the main table (first worksheet) and each constraint table, extract the valid column index, name, and data from the 5th row of the main table.
[0101] (3) Parsing order:
[0102] Main table (0 and 400):
[0103] First, parse the basic attributes in the main table, extract the product model and its corresponding basic attribute values.
[0104] Generate JSON dictionary of type 0 and 400, containing all attribute names, unit information, and values of the first six fixed attributes.
[0105] Constraint relationship table:
[0106] Next, parse the constraint relationship table (200, 300, 400) in turn, extract the relationship of two attributes, three attributes, and multiple attributes.
[0107] Generate JSON data of type 10 (parse parameter table json itself type) and 20 (series information).
[0108] Hidden relationship table (500):
[0109] Parse the attribute hidden relationship table to extract hidden attribute information.
[0110] Model variable table (600):
[0111] Parse the model variable and attribute association table to extract the model variable and its corresponding attribute.
[0112] Feature compression relationship table (700):
[0113] Parse the compression relationship table between attributes and model features to establish the relationship between attributes and features.
[0114] Geometric constraint relationship table (800):
[0115] Parse the attribute geometric constraint relationship table to extract the relationship between geometric constraints and attributes.
[0116] Chinese-English association table (900):
[0117] Finally, parse the Chinese-English name association table to extract the corresponding relationship between Chinese and English names.
[0118] (4) Data structure construction:
[0119] Use defaultdict to build nested dictionary structure to facilitate storage and organization of extracted attribute values.
[0120] Finally, convert the defaultdict to a normal dictionary and clean up empty dictionaries.
[0121] (5) Generate JSON output:
[0122] Convert the processed data structure to JSON format for subsequent data transmission and storage.
[0123] Return the result using the jsonify function.
[0124] (6) Exception handling:
[0125] Add an exception handling mechanism during data reading and processing to ensure that errors can be handled gracefully when encountering incorrect or missing data formats.
[0126] Through the above process, at least the following technical effects can be achieved:
[0127] Automatic parsing: Through programming, the automatic parsing of technical parameter tables is realized, reducing the errors and time cost of manual operation.
[0128] Efficiency improvement: The automatic parsing and conversion process greatly reduces the need for manual operation, significantly improving the speed and accuracy of data processing.
[0129] Error reduction: By using fixed parsing rules and algorithms, human errors are reduced, improving the reliability of data.
[0130] Enhanced data usability: The generated JSON format data is easy to call and process in various applications, improving the reusability and expandability of data.
[0131] Flexible function: Provides multiple data parsing and conversion rules to adapt to different data processing needs, increasing the scope of application of this method.
[0132] Efficiency: Quickly process data from multiple worksheets, suitable for large-scale industrial parts technical parameter table parsing.
[0133] Dynamic update support: Can handle dynamically updated technical parameter tables to adapt to rapidly changing industrial needs.
[0134] Unified format: The generated JSON data structure is uniform, facilitating subsequent data processing and analysis, and improving data usability.
[0135] It should be noted that for the method embodiments, the series of acts complement each other to achieve the purpose of this embodiment, therefore, the sequence of the method should not be construed as limiting the application. Optionally, the sequence of the acts can be changed or two or more acts can be combined, or can be performed at the same time. Other acts can also be added to the method.
[0136] With reference to Figure 3 , a structural block diagram of a technical parameter processing device for an industrial parts product manual is shown, which can specifically include the following modules:
[0137] A data table acquisition module 301 is configured to acquire a technical parameter table corresponding to an industrial part, wherein the technical parameter table includes at least a main table and a plurality of sub-tables associated with the main table, the main table includes at least comprehensive attribute data corresponding to the industrial part, and the sub-tables include at least attribute relationship data corresponding to the industrial part;
[0138] A first processing module 302 is configured to perform data structuring according to the comprehensive attribute data, and construct a main table JSON dictionary corresponding to the main table;
[0139] A second processing module 303 is configured to perform data structuring according to the attribute relationship data, and construct a sub-table JSON dictionary corresponding to each of the sub-tables;
[0140] A merging module 304 is configured to merge the main table JSON dictionary and each of the sub-table JSON dictionaries, and obtain a JSON list corresponding to the technical parameter table.
[0141] In some possible implementation manners, the comprehensive attribute data includes at least part attributes corresponding to the industrial part and attribute values corresponding to each of the part attributes; the part attributes include at least fixed attributes and active attributes, the attribute values include at least first attribute values corresponding to the fixed attributes and second attribute values corresponding to each of the active attributes, the fixed attributes and the first attribute values are located in the first n columns in the main table, and the active attributes and the second attribute values are located after the n-th column in the main table; the fixed attributes include a product name corresponding to the industrial part, the first attribute values include product name values corresponding to the product name, and the first processing module 302 is specifically configured to:
[0142] regard part attributes other than the product name in the fixed attributes as first target attributes;
[0143] obtaining a first attribute-value mapping relationship between the product name and each first target attribute value corresponding to each first target attribute, and obtaining a second attribute-value mapping relationship between the product name value and each second attribute value;
[0144] performing data structuring on the fixed attribute, the active attribute, the first attribute-value mapping relationship, and the second attribute-value mapping relationship to construct a master table JSON dictionary corresponding to the master table.
[0145] In some possible implementation manners, the master table JSON dictionary includes at least a first master table JSON dictionary and a second master table JSON dictionary, the first master table JSON dictionary and the second master table JSON dictionary include the same information, and the first processing module 302 is specifically configured to:
[0146] performing data structuring on the fixed attribute, the active attribute, and the first attribute-value mapping relationship to construct a first master table JSON dictionary corresponding to the master table.
[0147] performing data structuring on the active attribute and the second attribute-value mapping relationship to construct a second master table JSON dictionary corresponding to the master table.
[0148] In some possible implementation manners, the comprehensive attribute data further includes unit information corresponding to the part attribute, and the first processing module 302 is specifically configured to:
[0149] performing data structuring on the fixed attribute, the active attribute, the unit information, and the first attribute-value mapping relationship to construct a first master table JSON dictionary corresponding to the master table.
[0150] In some possible implementation manners, the sub-table includes at least a relationship constraint table, and attribute relationship data of the relationship constraint table includes at least two part attributes, attribute values corresponding to the part attributes, and constraint relationships between the part attributes, and the second processing module 303 is specifically configured to:
[0151] performing data structuring on each part attribute, each attribute value corresponding to the part attribute, and the constraint relationship to construct a constraint table JSON dictionary corresponding to each relationship constraint table.
[0152] In some possible implementation manners, the relationship constraint table at least includes a two-attribute relationship constraint table, a three-attribute relationship constraint table, and a multi-attribute relationship constraint table; the two-attribute relationship constraint table represents a constraint relationship between two different part attributes in the industrial parts, the three-attribute relationship constraint table represents a constraint relationship between three different part attributes in the industrial parts, and the multi-attribute relationship constraint table represents a constraint relationship between at least three different part attributes in the industrial parts; in the two-attribute relationship constraint table, a part attribute in a later column is constrained by a part attribute in an earlier column, in the three-attribute relationship constraint table, a part attribute in a first column is constrained by part attributes in two later columns, and in the multi-attribute relationship constraint table, a constraint relationship between different part attributes is that a part attribute on the left side constrains a part attribute on the right side or a part attribute on the right side constrains a part attribute on the left side.
[0153] In some possible implementation manners, the second processing module 303 is specifically configured to:
[0154] if the sub-table is a two-attribute relationship constraint table, data structures of each part attribute in the two-attribute relationship constraint table, an attribute value corresponding to each part attribute, and the constraint relationship are used to construct a first constraint table JSON dictionary in a key-value pair form corresponding to the two-attribute relationship constraint table;
[0155] if the sub-table is a three-attribute relationship constraint table, data structures of each part attribute in the three-attribute relationship constraint table, an attribute value corresponding to each part attribute, and the constraint relationship are used to construct a second constraint table JSON dictionary in a nested dictionary structure corresponding to the three-attribute relationship constraint table;
[0156] if the sub-table is a multi-attribute relationship constraint table, data structures of each part attribute in the multi-attribute relationship constraint table, an attribute value corresponding to each part attribute, and the constraint relationship are used to construct a third constraint table JSON dictionary in a list structure or a nested dictionary structure corresponding to the multi-attribute relationship constraint table.
[0157] In some possible implementation manners, the sub-table at least includes an attribute hiding relationship table, attribute relationship data of the attribute hiding relationship table at least includes an active attribute, a third attribute value corresponding to the active attribute, and a hidden attribute, and the second processing module 303 is specifically configured to:
[0158] perform data structuring on the active attribute, the third attribute value, and the hidden attribute to construct a hidden relationship JSON dictionary corresponding to the attribute hiding relationship table.
[0159] In some possible implementation manners, the sub-tables at least include a model variable mapping table, attribute relationship data of the model variable mapping table at least includes a first part attribute, a model variable name corresponding to the first part attribute in a 3D model, and a fourth attribute value corresponding to the first part attribute, and the second processing module 303 is specifically configured to:
[0160] perform data structuring on the first part attribute, the model variable name, and the fourth attribute value, and construct a model variable JSON dictionary corresponding to the model variable mapping table.
[0161] In some possible implementation manners, the sub-tables at least include a feature compression relationship table, attribute relationship data of the feature compression relationship table at least includes a second part attribute, a fifth attribute value corresponding to the second part attribute, and a model feature corresponding to the industrial part, and the second processing module 303 is specifically configured to:
[0162] perform data structuring on the second part attribute, the fifth attribute value, and the model feature, and construct a feature JSON dictionary corresponding to the feature compression relationship table.
[0163] In some possible implementation manners, the sub-tables at least include a geometric constraint relationship table, attribute relationship data of the geometric constraint relationship table at least includes a third part attribute, a sixth attribute value corresponding to the third part attribute, and a geometric relationship between the sixth attribute values, and the second processing module 303 is specifically configured to:
[0164] perform data structuring on the third part attribute, the sixth attribute value, and the geometric relationship between the sixth attribute values, and construct a geometric JSON dictionary corresponding to the geometric constraint relationship table.
[0165] In some possible implementation manners, the sub-tables at least include a Chinese-English association table, attribute relationship data of the Chinese-English association table at least includes a fourth part attribute, a seventh attribute value corresponding to the fourth part attribute, and a mapping value corresponding to the seventh attribute value, and the second processing module 303 is specifically configured to:
[0166] perform data structuring on the fourth part attribute, the seventh attribute value, and the mapping value, and construct a mapping JSON dictionary corresponding to the Chinese-English association table.
[0167] In some possible implementation manners, the merging module 304 is specifically configured to:
[0168] traverse the main table JSON dictionary and each of the sub-table JSON dictionaries, find all sibling key-value pairs, and add a corresponding digital index number to each sibling key-value pair;
[0169] The key-value pairs in the master table JSON dictionary and each of the sub-table JSON dictionaries are updated using the digital index number, and a JSON list corresponding to the technical parameter table is obtained.
[0170] For the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts refer to the part of the method embodiment.
[0171] In addition, the embodiment of the present application also provides an electronic device, which comprises a processor, a memory, and a computer program stored on the memory and executable on the processor, wherein the computer program is executed by the processor to implement each process of the technical parameter processing method for the industrial part product manual and achieve the same technical effect. To avoid repetition, this will not be repeated here.
[0172] The embodiment of the present application also provides a computer readable storage medium, which stores a computer program, and the computer program is executed by the processor to implement each process of the technical parameter processing method for the industrial part product manual and achieve the same technical effect. To avoid repetition, this will not be repeated here. The computer readable storage medium includes a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk, etc.
[0173] Each embodiment in the specification is described in a progressive manner, and each embodiment focuses on the difference from other embodiments. The same and similar parts of each embodiment can be referred to each other.
[0174] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a device, or a computer program product. Therefore, the embodiments of the present application can be in the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the embodiments of the present application can be in the form of a computer program product implemented on one or more computer usable storage media (including but not limited to disk storage, CD-ROM, optical storage, EEPROM, Flash, and eMMC, etc.) containing computer usable program code.
[0175] The embodiments of the present application are described with reference to the flowchart illustrations and / or block diagrams of the methods, terminal devices (systems) and computer program products according to the embodiments of the present application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing terminal devices to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing terminal devices, create means for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0176] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing terminal devices to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instructions which implement the function specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0177] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal devices, such that a series of operational steps are carried out on the computer or other programmable terminal devices to produce a computer implemented process so that the instructions executed on the computer or other programmable terminal devices provide steps for implementing the functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams. Figure 1 one or more functions specified in the flowchart illustrations and / or block diagrams.
[0178] Although preferred embodiments of the present application have been described, those skilled in the art will be able to make additional modifications and variations to these embodiments without departing from the scope of the present application. Accordingly, the appended claims are intended to encompass all such modifications and variations as falling within the scope of the present application.
[0179] Finally, it is to be understood that the phraseology or terminology such as "first" and "second" etc. used herein is merely intended to distinguish one entity or operation from another entity or operation, without necessarily requiring or implying any such actual relationship or order between such entities or operations. Moreover, the terms "comprises", "comprising", or any other variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements does not include only those elements but can include other elements not expressly listed or inherent to such process, method, article, or apparatus. An element proceeded by "comprises... a" does not, without more constraints, exclude the existence of additional identical elements in the process, method, article, or apparatus that comprises the recited element.
[0180] The technical parameter processing method and the technical parameter processing device of the industrial parts product manual provided by the present application are described in detail above, and the principles and implementation manners of the present application are described by using specific examples in this paper. The above description of the embodiments is only used to help understand the method of the present application and its core idea. Meanwhile, for those skilled in the art, according to the idea of the present application, the specific implementation manners and application ranges will be changed, and the above description should not be understood as a limitation of the present application.
Claims
1. A method of processing technical parameters of an industrial parts product manual, characterized in that, The method comprises the following steps: obtaining a technical parameter table corresponding to an industrial part, wherein the technical parameter table comprises at least a main table and a plurality of sub-tables associated with the main table, the main table comprises at least comprehensive attribute data corresponding to the industrial part, and the sub-tables comprise at least attribute relationship data corresponding to the industrial part; performing data structuring according to the comprehensive attribute data to construct a main table JSON dictionary corresponding to the main table; performing data structuring according to the attribute relationship data to construct a sub-table JSON dictionary corresponding to each of the sub-tables; merging the main table JSON dictionary and each of the sub-table JSON dictionaries to obtain a JSON list corresponding to the technical parameter table; wherein the comprehensive attribute data comprises at least part attributes corresponding to the industrial part and attribute values corresponding to each of the part attributes; wherein the part attributes comprise at least fixed attributes and active attributes, the attribute values comprise at least first attribute values corresponding to the fixed attributes and second attribute values corresponding to each of the active attributes, the fixed attributes and the first attribute values are located in the first n columns in the main table, and the active attributes and the second attribute values are located after the nth column in the main table; wherein the fixed attributes comprise a product name corresponding to the industrial part, the first attribute values comprise a product name value corresponding to the product name, and the data structuring according to the comprehensive attribute data to construct the main table JSON dictionary comprises: taking part attributes other than the product name in the fixed attributes as first target attributes; obtaining a first attribute value mapping relationship between the product name and each of the first target attribute values, and obtaining a second attribute value mapping relationship between the product name value and each of the second attribute values; performing data structuring on the fixed attributes, the active attributes, the first attribute value mapping relationship, and the second attribute value mapping relationship to construct the main table JSON dictionary; wherein the sub-tables comprise at least one of a relationship constraint table, an attribute hiding relationship table, a model variable mapping table, a feature compression relationship table, a geometric constraint relationship table, and an English-Chinese association table; wherein the merging of the main table JSON dictionary and each of the sub-table JSON dictionaries to obtain the JSON list corresponding to the technical parameter table comprises: traversing the main table JSON dictionary and each of the sub-table JSON dictionaries to find all sibling key-value pairs, and adding a corresponding digital index number to each sibling key-value pair; updating the key-value pairs in the main table JSON dictionary and each of the sub-table JSON dictionaries by using the digital index number to obtain the JSON list corresponding to the technical parameter table.
2. The method of claim 1, wherein, The main table JSON dictionary includes at least a first main table JSON dictionary and a second main table JSON dictionary, the first main table JSON dictionary and the second main table JSON dictionary include the same information, the data structuring of the fixed attribute, the active attribute, the first attribute value mapping relationship and the second attribute value mapping relationship constructs the main table JSON dictionary corresponding to the main table, including: The data structuring of the fixed attribute, the active attribute and the first attribute value mapping relationship constructs the first main table JSON dictionary corresponding to the main table; The data structuring of the active attribute and the second attribute value mapping relationship constructs the second main table JSON dictionary corresponding to the main table.
3. The method of claim 2, wherein, The comprehensive attribute data further includes unit information corresponding to the part attribute, the data structuring of the fixed attribute, the active attribute and the first attribute value mapping relationship constructs the first main table JSON dictionary corresponding to the main table, including: The data structuring of the fixed attribute, the active attribute, the unit information and the first attribute value mapping relationship constructs the first main table JSON dictionary corresponding to the main table.
4. The method according to any one of claims 1 to 3, characterized in that, The sub-table includes at least a relationship constraint table, the attribute relationship data of the relationship constraint table includes at least two part attributes, attribute values corresponding to the part attributes and constraint relationships between the part attributes, the data structuring according to the attribute relationship data constructs the sub-table JSON dictionary corresponding to each sub-table, including: The data structuring of each part attribute, attribute values corresponding to each part attribute and the constraint relationship constructs the constraint table JSON dictionary corresponding to each relationship constraint table.
5. The method of claim 4, wherein, The relationship constraint table includes at least a two-attribute relationship constraint table, a three-attribute relationship constraint table and a multi-attribute relationship constraint table; wherein the two-attribute relationship constraint table represents the constraint relationship between two different part attributes in the industrial part, the three-attribute relationship constraint table represents the constraint relationship between three different part attributes in the industrial part, and the multi-attribute relationship constraint table represents the constraint relationship between at least three different part attributes in the industrial part; wherein the part attribute in the last column of the two-attribute relationship constraint table is constrained by the part attribute in the front column, the part attribute in the first column of the three-attribute relationship constraint table is constrained by the part attributes in the last two columns, and the constraint relationship between different part attributes in the multi-attribute relationship constraint table is that the part attribute on the left side constrains the part attribute on the right side or the part attribute on the right side constrains the part attribute on the left side.
6. The method of claim 5, wherein, The data structuring of each part attribute, attribute values corresponding to each part attribute and the constraint relationship constructs the constraint table JSON dictionary corresponding to each relationship constraint table, including: If the sub-table is a two-attribute relationship constraint table, each part attribute in the two-attribute relationship constraint table, the attribute value corresponding to each part attribute, and the constraint relationship are data structured to construct a first constraint table JSON dictionary in the form of a key-value pair corresponding to the two-attribute relationship constraint table. If the sub-table is a three-attribute relationship constraint table, each part attribute in the three-attribute relationship constraint table, the attribute value corresponding to each part attribute, and the constraint relationship are data structured to construct a second constraint table JSON dictionary in the form of a nested dictionary structure corresponding to the three-attribute relationship constraint table. If the sub-table is a multi-attribute relationship constraint table, each part attribute in the multi-attribute relationship constraint table, the attribute value corresponding to each part attribute, and the constraint relationship are data structured to construct a third constraint table JSON dictionary in the form of a list structure or a nested dictionary structure corresponding to the multi-attribute relationship constraint table.
7. The method according to any one of claims 1 to 3, characterized in that, The sub-tables at least include an attribute hiding relationship table, the attribute relationship data of the attribute hiding relationship table at least includes a proactive attribute, a third attribute value corresponding to the proactive attribute, and a hidden attribute, and the data structuring according to the attribute relationship data to construct a sub-table JSON dictionary corresponding to each sub-table includes: The proactive attribute, the third attribute value, and the hidden attribute are data structured to construct a hidden relationship JSON dictionary corresponding to the attribute hiding relationship table.
8. The method according to any one of claims 1 to 3, characterized in that, The sub-tables at least include a model variable mapping table, the attribute relationship data of the model variable mapping table at least includes a first part attribute, a model variable name corresponding to the first part attribute in a 3D model, and a fourth attribute value corresponding to the first part attribute, and the data structuring according to the attribute relationship data to construct a sub-table JSON dictionary corresponding to each sub-table includes: The first part attribute, the model variable name, and the fourth attribute value are data structured to construct a model variable JSON dictionary corresponding to the model variable mapping table.
9. The method according to any one of claims 1 to 3, characterized in that, The sub-tables at least include a feature compression relationship table, the attribute relationship data of the feature compression relationship table at least includes a second part attribute, a fifth attribute value corresponding to the second part attribute, and a model feature corresponding to the industrial part, and the data structuring according to the attribute relationship data to construct a sub-table JSON dictionary corresponding to each sub-table includes: The second part attribute, the fifth attribute value, and the model feature are data structured to construct a feature JSON dictionary corresponding to the feature compression relationship table.
10. The method according to any one of claims 1 to 3, characterized in that, The sub-tables at least include a geometric constraint relationship table, the attribute relationship data of the geometric constraint relationship table at least includes a third part attribute, a sixth attribute value corresponding to the third part attribute, and a geometric relationship between the sixth attribute values, and the data structuring according to the attribute relationship data to construct a sub-table JSON dictionary corresponding to each sub-table includes: Data structure is constructed for the third part attribute, the sixth attribute value and the geometric relationship between the sixth attribute values, and a geometric JSON dictionary corresponding to the geometric constraint relationship table is constructed.
11. The method according to any one of claims 1 to 3, characterized in that, The attribute relationship data of the Chinese-English association table at least includes a fourth part attribute, a seventh attribute value corresponding to the fourth part attribute, and a mapping value corresponding to the seventh attribute value, and the data structure is constructed according to the attribute relationship data, and a sub-table JSON dictionary corresponding to each of the sub-tables is constructed, including: Data structure is constructed for the fourth part attribute, the seventh attribute value and the mapping value, and a mapping JSON dictionary corresponding to the Chinese-English association table is constructed.
12. An industrial parts product manual technical parameter processing device, characterized by, Including: The data table acquisition module is configured to acquire a technical parameter table corresponding to an industrial part, wherein the technical parameter table at least includes a main table and a plurality of sub-tables associated with the main table, the main table at least includes comprehensive attribute data corresponding to the industrial part, and the sub-tables at least include attribute relationship data corresponding to the industrial part; The first processing module is configured to construct a main table JSON dictionary corresponding to the main table according to the comprehensive attribute data; The second processing module is configured to construct a sub-table JSON dictionary corresponding to each of the sub-tables according to the attribute relationship data; The merging module is configured to merge the main table JSON dictionary and each of the sub-table JSON dictionaries to obtain a JSON list corresponding to the technical parameter table; The comprehensive attribute data at least includes part attributes corresponding to the industrial part and attribute values corresponding to each of the part attributes; the part attributes at least include fixed attributes and active attributes, the attribute values at least include first attribute values corresponding to the fixed attributes and second attribute values corresponding to each of the active attributes, the fixed attributes and the first attribute values are located in the first n columns in the main table, and the active attributes and the second attribute values are located after the nth column in the main table; the fixed attributes include a product name corresponding to the industrial part, the first attribute values include a product name value corresponding to the product name, and the first processing module is specifically configured to: Take other part attributes in the fixed attributes as first target attributes except the product name; Obtain a first attribute value mapping relationship between the product name and each of the first target attribute values, and obtain a second attribute value mapping relationship between the product name value and each of the second attribute values; Data structure is constructed for the fixed attributes, the active attributes, the first attribute value mapping relationship and the second attribute value mapping relationship, and a main table JSON dictionary corresponding to the main table is constructed; The sub-tables include at least one of a relationship constraint table, an attribute hiding relationship table, a model variable mapping table, a feature compression relationship table, a geometric constraint relationship table and a Chinese-English association table; The merging module is specifically configured to: Traverse the main table JSON dictionary and each of the sub-table JSON dictionaries to find all sibling key-value pairs, and add a corresponding digital index number to each sibling key-value pair; Update the key-value pairs in the main table JSON dictionary and each of the sub-table JSON dictionaries using the digital index number, to obtain a JSON list corresponding to the technical parameter table.
13. An electronic device, comprising: The device comprises a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory can communicate with each other through the communication bus; The memory is used for storing a computer program; The processor is used for executing the program stored on the memory, and the method in any one of claims 1-11 is implemented.
14. A computer readable storage medium having instructions stored thereon, which when executed by one or more processors, cause the processors to perform the method in any one of claims 1-11.
Citation Information
Patent Citations
Multi-format data processing method and device based on entity model, medium and equipment
CN115757342A
Excel configuration file conversion method and related equipment
CN115827085A