[go: up one dir, main page]
More Web Proxy on the site http://driver.im/

CN114417064A - Data processing method and device, computer equipment and storage medium - Google Patents

Data processing method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN114417064A
CN114417064A CN202111524266.2A CN202111524266A CN114417064A CN 114417064 A CN114417064 A CN 114417064A CN 202111524266 A CN202111524266 A CN 202111524266A CN 114417064 A CN114417064 A CN 114417064A
Authority
CN
China
Prior art keywords
primitive
file
type
attribute information
revit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202111524266.2A
Other languages
Chinese (zh)
Inventor
黄抒艺
邹学通
梁华光
孙文琳
陈新民
程奕玮
袁培辙
张琰
张玮珊
陆树娜
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Power Supply Co ltd
Original Assignee
Shenzhen Power Supply Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Power Supply Co ltd filed Critical Shenzhen Power Supply Co ltd
Priority to CN202111524266.2A priority Critical patent/CN114417064A/en
Publication of CN114417064A publication Critical patent/CN114417064A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/901Indexing; Data structures therefor; Storage structures
    • G06F16/9024Graphs; Linked lists
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/90Details of database functions independent of the retrieved data types
    • G06F16/95Retrieval from the web
    • G06F16/958Organisation or management of web site content, e.g. publishing, maintaining pages or automatic linking
    • G06F16/986Document structures and storage, e.g. HTML extensions
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T17/00Three dimensional [3D] modelling, e.g. data description of 3D objects

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • Databases & Information Systems (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • General Engineering & Computer Science (AREA)
  • Computer Graphics (AREA)
  • Geometry (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The application relates to a data parsing method, a data parsing device, a computer device, a storage medium and a computer program product. The method comprises the steps of converting a Revit family file into file object model structure data by acquiring the Revit family file; traversing the structural data of the file object model to obtain the primitives of each type; analyzing each type of primitive to obtain attribute information of each type of primitive; and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file, wherein the extensible markup language file can be read to realize parametric modeling, so that the Revit file information can be acquired.

Description

Data processing method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of three-dimensional modeling technologies, and in particular, to a data processing method, an apparatus, a computer device, a storage medium, and a computer program product.
Background
With the development of three-dimensional modeling techniques, model data extraction techniques have emerged. At present, the conventional government Development Assistance (ODA) component can solve the daily data extraction requirement, but cannot provide effective information for secondary rendering of graphics.
Disclosure of Invention
In view of the above, it is necessary to provide a data processing method, an apparatus, a computer device, a computer readable storage medium, and a computer program product for solving the above technical problems.
In a first aspect, the present application provides a data processing method. The method comprises the following steps: obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In one embodiment, the converting the Revit family file into file object model structure data includes:
and loading the Revit family file in a Document loading mode to obtain the file object model structure data.
In one embodiment, the analyzing the each type of primitive to obtain the attribute information of the each type of primitive includes:
analyzing the Revit file to obtain a primitive operation function;
and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
In one embodiment, the method further comprises:
reading the extensible markup language file corresponding to the Revit family file, and acquiring attribute information of a primitive in the extensible markup language file;
acquiring a generating mode of the primitive from the attribute information of the primitive, and determining a parameter model type according to the generating mode;
and generating a parameter model taking the attribute information of the primitive as a variable according to the primitive, the type of the parameter model and a constraint condition, wherein the constraint condition is used for constraining the relationship among the primitives.
In one embodiment, the generating a parametric model with attribute information of a primitive as a variable according to the primitive, the parametric model type and a constraint condition includes:
generating a parameter model frame according to the type of the parameter model and the constraint condition;
and adding the graphic primitives into the parameter model frame to be drawn to obtain a parameter model taking the attribute information of the graphic primitives as variables.
In one embodiment, the method further comprises:
receiving a parameter modification instruction, and modifying parameter values and corresponding constraint conditions according to the parameter modification instruction;
and adjusting the parameter model according to the modified parameter value and the constraint condition.
In a second aspect, the present application further provides a data processing apparatus, comprising:
the conversion module is used for acquiring a Revit family file and converting the Revit family file into file object model structure data;
the traversal module is used for traversing the file object model structure data to obtain the graphic elements of various types;
the analysis module is used for analyzing each type of primitive to obtain attribute information of each type of primitive;
and the storage module is used for storing each type of diagram element and the attribute information in an extensible markup language file corresponding to the Revit family file.
In a third aspect, the present application also provides a computer device. The computer device comprises a memory storing a computer program and a processor implementing the following steps when executing the computer program:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In a fourth aspect, the present application further provides a computer-readable storage medium. The computer-readable storage medium having stored thereon a computer program which, when executed by a processor, performs the steps of:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In a fifth aspect, the present application further provides a computer program product. The computer program product comprising a computer program which when executed by a processor performs the steps of:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
According to the data processing method, the data processing device, the computer equipment, the storage medium and the computer program product, the Revit family file is converted into the file object model structure data by acquiring the Revit family file; traversing the structural data of the file object model to obtain the primitives of each type; analyzing each type of primitive to obtain attribute information of each type of primitive; and storing the each type of diagram element and the attribute information in an extensible markup language file corresponding to the Revit family file, wherein the extensible markup language file can be read to realize parametric modeling, so that the Revit file information can be acquired.
Drawings
FIG. 1 is a diagram of an application environment of a data processing method in one embodiment;
FIG. 2 is a flow diagram illustrating a data processing method according to one embodiment;
FIG. 3 is a flow diagram that illustrates data processing steps, according to one embodiment;
FIG. 4 is a flow chart illustrating a data processing method according to another embodiment;
FIG. 5 is a schematic diagram of a parameterized model in one embodiment;
FIG. 6 is a block diagram of a data processing apparatus according to one embodiment;
FIG. 7 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The data processing method provided by the embodiment of the application can be applied to the application environment shown in fig. 1. Wherein the terminal 102 communicates with the server 104 via a network. The data storage system may store data that the server 104 needs to process. The data storage system may be integrated on the server 104, or may be located on the cloud or other network server. The server 104 acquires a Revit family file on the terminal 102, and converts the Revit family file into file object model structure data; traversing the structural data of the file object model to obtain the primitives of each type; analyzing each type of primitive to obtain attribute information of each type of primitive; and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file. The terminal 102 may be, but not limited to, various personal computers, notebook computers, smart phones, tablet computers, internet of things devices and portable wearable devices, and the internet of things devices may be smart speakers, smart televisions, smart air conditioners, smart car-mounted devices, and the like. The portable wearable device can be a smart watch, a smart bracelet, a head-mounted device, and the like. The server 104 may be implemented as a stand-alone server or as a server cluster comprised of multiple servers.
In one embodiment, as shown in fig. 2, a data processing method is provided, which is described by taking the application of the method to the server in fig. 1 as an example, and includes the following steps:
step 202, obtaining a Revit family file, and converting the Revit family file into file object model structure data.
The family is a powerful concept in Revit and is also an indispensable function in Revit, and each family file of Revit contains many parameters and information, such as size, shape, type and other parameter variable settings. The Document Object Model (DOM) is a standard programming interface for the W3C organization to process extensible markup language recommendations. The DOM is an Application Programming Interface (API) that is platform and language independent, and can dynamically access programs and scripts to update their content, structure, and style of www documents (HTML and XML documents are defined by the declarative parts). The document may be further processed and the results of the processing may be added to the current page. The DOM consists of three parts, including: the core (core), the HTML interface and the XML interface, the core part is a set of the comparison bottom object of the structured document, and the defined object can express the data in any HTML and XML document completely. The method can convert the Revit family file into the file object model structure data in a Document loading mode.
Specifically, the processor acquires a Revit family file, and then converts the Revit family file into file object model structure data.
And step 204, traversing the structural data of the file object model to obtain the primitives of various types.
Wherein, traversing means that each node in the tree (or graph) is visited once in turn along a certain search route. The operation performed by the access node depends on the specific application problem, and the specific access operation may be to check the value of the node, update the value of the node, and the like. A primitive is a graphic representation of any one graphic representation composed of a number of different dots, lines, surface patterns, or cycles of the same pattern. These dot, line, and plane patterns are basic graphic elements. The traversing mode mainly comprises the following steps: obtaining a set element traversal List and traversing the List using an iterator, wherein the List represents an ordered set of elements. There are two common implementation data structures for a List: arrays and linked lists. The internal implementation of the different methods is performed for the different List implementation data structures.
Specifically, the processor first acquires an element set in the Collection, and then traverses the elements in the set to obtain the primitives of each type after acquiring the iterator corresponding to the set.
And step 206, analyzing each type of primitive to obtain attribute information of each type of primitive.
The primitive attributes refer to display characteristics of control primitives. The attribute information of the primitive includes one of a point attribute, a line attribute, a fill area attribute, an area, a character, a primitive generation method, and the like, but is not limited thereto. Where dot attributes include color and size, in a raster system, dots of various sizes are displayed with a square array of pixels. Line attributes include color, width, and type. The line width is specified in multiples of the standard single pixel width. Line attributes include solid, dashed and dotted lines and various brush or brush types. The fill area properties include a solid color fill, a fill pattern fill, or an open fill that merely shows the area boundaries. Various pattern fills are described in terms of color arrays, mapped to the interior of the region. The characters include color, size, spacing, and orientation.
Specifically, the processor analyzes each type of primitive to obtain attribute information of each type of primitive.
And step 208, storing each type of diagram element and the attribute information in an extensible markup language file corresponding to the Revit family file.
The extensible markup language refers to a subset of standard universal markup languages, and is abbreviated as XML. Is a markup language for marking electronic documents to be structured.
Specifically, the processor acquires each type of diagram element and attribute information, and stores each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In the data processing method, a Revit family file is obtained and converted into file object model structure data; traversing the structural data of the file object model to obtain the primitives of each type; analyzing each type of primitive to obtain attribute information of each type of primitive; and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file, wherein the extensible markup language file can be read to realize parametric modeling, so that the Revit file information can be acquired.
In one embodiment, converting a Revit family file into file object model structure data includes: and loading the Revit family file in a Document loading mode to obtain the file object model structure data.
There are many different types of nodes in the DOM, similar to atoms containing sub-atom particles, and many types of DOM nodes containing other types of nodes. Which comprises the following steps: element nodes, text nodes, and attribute nodes. An element node refers to an atom in the DOM. The DOM access element node includes: obtaining through a top-level document node, obtaining through a father node, obtaining through a neighbor node, and obtaining through a child node. A text node is one of the element node types. For example, in our home page, the '< p >' element contains text, sharee: 'Xiaoming'. A minutia is a text node that is always contained inside an element node. The attribute nodes are used to make more detailed descriptions of the elements.
Specifically, the processor analyzes an HTML file in a Revit family file, loads an external script and a style, analyzes and executes the script in the file, completely constructs an HTML DOM, loads a picture and external content, and loads a webpage to obtain file object model structure data.
In this embodiment, the review family file is loaded in a Document loading manner, so as to obtain an object model structure.
In one embodiment, analyzing each type of primitive to obtain attribute information of each type of primitive includes: analyzing the Revit file to obtain a primitive operation function; and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
Wherein the primitive operation function is a function for primitive drawing. The primitive is described using some fixed point sets with order. In the use of primitive manipulation functions, mostly a pair of functions glBegain () and glEnd () are used, and the argument passed to the glBegain () function uniquely determines what kind of geometric primitive is to be drawn, and at the same time, the definition of the geometric primitive is given in the function pair, and the function glEnd () marks the end of the vertex list.
Specifically, the processor analyzes the Revit file to obtain a primitive operation function, and then analyzes each type of primitive according to the obtained primitive operation function to obtain attribute information of each type of primitive.
In this embodiment, the attribute information of each type of primitive is obtained by obtaining the primitive operation function.
In one embodiment, the data processing method further includes:
step 302, the processor reads the extensible markup language file corresponding to the Revit family file, and then obtains attribute information of the primitives in the extensible markup language file.
Specifically, the processor reads an XML file in the Revit family file first, and obtains primitive attribute information in the XML file.
And 304, acquiring a generating mode of the primitive from the attribute information of the primitive, and determining the type of the parameter model according to the generating mode.
The primitive generation methods include stretching (Extrusion), merging (Blend), rotation (Revolume), lofting (Sweep), and lofting merging (SweptBlend). Stretching refers to stretching the lines in the graphical elements proportionally. Blending refers to blending multiple figures together, such as blending two circles. Rotation is the rotation of one figure around a fixed point by a certain angle to obtain the change of another figure. Lofting is the formation of complex three-dimensional objects using a two-dimensional volumetric object as a cross-section along a path. Lofting fusion is that a lofting path needs to be given by a reference line, then two contours of lofting fusion are drawn at two ends of the reference line, and finally the reference line and the two contours at the two ends are simultaneously selected to create a shape.
Specifically, the processor acquires a primitive generation mode from the attribute information of the primitive, and determines the type of the parameter model according to the primitive generation mode.
And step 306, generating a parameter model taking the attribute information of the primitive as a variable according to the primitive, the type of the parameter model and the constraint condition.
Specifically, the processor acquires the primitive, the type of the parameter model and the constraint condition, and generates the parameter model using the attribute information of the primitive as a variable according to the primitive, the type of the parameter model and the constraint condition.
In this embodiment, parameters for constructing the model are obtained through attribute information of the primitive.
In one embodiment, generating a parametric model with attribute information of a primitive as a variable according to the primitive, the type of the parametric model and a constraint condition comprises: generating a parameter model frame according to the type of the parameter model and the constraint condition; and adding the primitive into a parameter model frame to be drawn to obtain a parameter model taking the attribute information of the primitive as a variable.
Wherein, the constraint condition refers to an additional condition for the relationship between the graphs. Variables are concepts in computer language that can store a result of a computation or can represent a value. Variables may be accessed by variable names. In an instructional language, variables are usually variable; but in purely functional languages (such as Haskell), the variables may be immutable.
Specifically, a constraint condition is preset, one or more items of attribute information of the primitive are used as variables, the processor obtains a parameter model type and the constraint condition, a parameter model frame is generated according to the parameter model type and the constraint condition, and the primitive is added into the parameter model frame to be drawn to obtain a parameter model with the attribute information of the primitive as variables.
In this embodiment, a parameterized model can be established through the parametric model and the constraint conditions.
In one embodiment, further comprising: receiving a parameter modification instruction, and modifying parameter values and corresponding constraint conditions according to the parameter modification instruction; and adjusting the parameter model according to the modified parameter value and the constraint condition.
The parameter modification instruction refers to an instruction generated by modifying a parameter of a constructed model, for example, the processor obtains an operation of modifying attribute information in a parameter model constructed by using attribute information of a primitive as a variable to generate a corresponding parameter modification instruction.
Specifically, the processor receives a parameter modification instruction, modifies a parameter value and a corresponding constraint condition according to the parameter modification instruction; and adjusting the parameter model according to the modified parameter value and the constraint condition. For example, the processor obtains a change in the length of the primitive from S1 to S2, where S2 is greater than S1, and generates a new parametric model based on the modified parameter values S2 and constraint condition rendering.
In this embodiment, the construction of the parameterized model can be adjusted by modifying the parameters.
According to the data processing method, the establishment of the parameterized model is realized by analyzing the Revit family file to obtain the primitive information. The following describes specific steps of the data processing method with reference to a detailed embodiment, as shown in fig. 4:
(1) loading a Revit family file in a Document loading mode to obtain DOM structure data, and taking all elements ElementCollector through Document;
(2) traversing DOM structure data to obtain all types of primitives;
(3) analyzing the Revit family file by using the C # to obtain a primitive operation function;
(4) according to the primitive operation function, different analyses are carried out on different primitives to obtain attribute information of the primitives;
(5) storing all types of primitives and attributes of the primitives into an XML file;
(6) reading and analyzing an XML file to obtain attribute information of a primitive;
(7) reading primitive generation mode in attribute information of primitive to determine construction type of model
(8) And processing the primitive modeling by using the attribute information of the primitive as a parameter of the model and drawing a function through an Operation Control Center (OCC) in an open source modeling library.
The parametric modeling is mainly composed of a graph, parameters, variables and constraint conditions, and as shown in fig. 6, the graph can be secondarily rendered through the set variables and constraints.
It should be understood that, although the steps in the flowcharts related to the embodiments as described above are sequentially displayed as indicated by arrows, the steps are not necessarily performed sequentially as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least a part of the steps in the flowcharts related to the embodiments described above may include multiple steps or multiple stages, which are not necessarily performed at the same time, but may be performed at different times, and the execution order of the steps or stages is not necessarily sequential, but may be rotated or alternated with other steps or at least a part of the steps or stages in other steps.
Based on the same inventive concept, the embodiment of the present application further provides a data processing apparatus for implementing the above-mentioned data processing method. The implementation scheme for solving the problem provided by the device is similar to the implementation scheme described in the above method, so the specific limitations in one or more embodiments of the data processing device provided below may refer to the limitations on the data processing method in the above description, and are not described herein again.
In one embodiment, as shown in fig. 6, there is provided a data processing apparatus including: a conversion module 610, a traversal module 620, a parsing module 630, and a storage module 640, wherein:
the conversion module 610 is configured to obtain a Revit family file, and convert the Revit family file into file object model structure data;
a traversal module 620, configured to traverse the file object model structure data to obtain primitives of each type;
the analyzing module 630 is configured to analyze each type of primitive to obtain attribute information of each type of primitive;
and the storage module 640 is configured to store each type of primitive and attribute information in an extensible markup language file corresponding to the Revit family file.
In one embodiment, the data processing apparatus includes: and the loading module is used for loading the Revit family file in a Document loading mode to obtain the file object model structure data.
In one embodiment, the parsing module 630 is configured to parse the Revit file to obtain a primitive operation function; and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
In one embodiment, the data processing apparatus further includes: the acquisition module is used for reading the extensible markup language file corresponding to the Revit family file and acquiring the attribute information of the graphic primitive in the extensible markup language file; acquiring a generating mode of the primitive from the attribute information of the primitive, and determining the type of the parameter model according to the generating mode; and generating a parameter model taking the attribute information of the primitive as a variable according to the primitive, the type of the parameter model and the constraint condition.
In one embodiment, the data processing apparatus includes: the device comprises a generating module and a drawing module. The generating module is used for generating a parameter model frame according to the type of the parameter model and the constraint conditions; and the drawing module is used for adding the primitives into the parameter model framework to draw so as to obtain the parameter model taking the attribute information of the primitives as variables.
In one embodiment, the data processing apparatus includes: a modification module and an adjustment module. The modification module is used for receiving the parameter modification instruction, and modifying the parameter value and the corresponding constraint condition according to the parameter modification instruction; and the adjusting module is used for adjusting the parameter model according to the modified parameter value and the constraint condition.
The various modules in the data processing apparatus described above may be implemented in whole or in part by software, hardware, and combinations thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, the internal structure of which may be as shown in fig. 7. The computer device includes a processor, a memory, and a network interface connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used for storing the data after data processing. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a data processing method.
Those skilled in the art will appreciate that the architecture shown in fig. 7 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, a computer device is provided, comprising a memory and a processor, the memory having a computer program stored therein, the processor implementing the following steps when executing the computer program:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and loading the Revit family file in a Document loading mode to obtain the file object model structure data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
analyzing the Revit file to obtain a primitive operation function;
and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
reading the extensible markup language file corresponding to the Revit family file, and acquiring attribute information of a primitive in the extensible markup language file;
acquiring a generating mode of the primitive from the attribute information of the primitive, and determining the type of the parameter model according to the generating mode;
and generating a parameter model taking the attribute information of the graphic primitives as variables according to the graphic primitives, the type of the parameter model and constraint conditions, wherein the constraint conditions are used for constraining the relationship among the graphic primitives.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating a parameter model frame according to the type of the parameter model and the constraint condition;
and adding the primitive into a parameter model frame to be drawn to obtain a parameter model taking the attribute information of the primitive as a variable.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving a parameter modification instruction, and modifying parameter values and corresponding constraint conditions according to the parameter modification instruction;
and adjusting the parameter model according to the modified parameter value and the constraint condition.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In one embodiment, the computer program when executed by the processor further performs the steps of:
and loading the Revit family file in a Document loading mode to obtain the file object model structure data.
In one embodiment, the computer program when executed by the processor further performs the steps of:
analyzing the Revit file to obtain a primitive operation function;
and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
In one embodiment, the computer program when executed by the processor further performs the steps of:
reading the extensible markup language file corresponding to the Revit family file, and acquiring attribute information of a primitive in the extensible markup language file;
acquiring a generating mode of the primitive from the attribute information of the primitive, and determining the type of the parameter model according to the generating mode;
and generating a parameter model taking the attribute information of the graphic primitives as variables according to the graphic primitives, the type of the parameter model and constraint conditions, wherein the constraint conditions are used for constraining the relationship among the graphic primitives.
In one embodiment, the computer program when executed by the processor further performs the steps of:
generating a parameter model frame according to the type of the parameter model and the constraint condition;
and adding the primitive into a parameter model frame to be drawn to obtain a parameter model taking the attribute information of the primitive as a variable.
In one embodiment, the computer program when executed by the processor further performs the steps of:
receiving a parameter modification instruction, and modifying parameter values and corresponding constraint conditions according to the parameter modification instruction;
and adjusting the parameter model according to the modified parameter value and the constraint condition.
In one embodiment, a computer program product is provided, comprising a computer program which, when executed by a processor, performs the steps of:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
and loading the Revit family file in a Document loading mode to obtain the file object model structure data.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
analyzing the Revit file to obtain a primitive operation function;
and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
reading the extensible markup language file corresponding to the Revit family file, and acquiring attribute information of a primitive in the extensible markup language file;
acquiring a generating mode of the primitive from the attribute information of the primitive, and determining the type of the parameter model according to the generating mode;
and generating a parameter model taking the attribute information of the graphic primitives as variables according to the graphic primitives, the type of the parameter model and constraint conditions, wherein the constraint conditions are used for constraining the relationship among the graphic primitives.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
generating a parameter model frame according to the type of the parameter model and the constraint condition;
and adding the primitive into a parameter model frame to be drawn to obtain a parameter model taking the attribute information of the primitive as a variable.
In one embodiment, the processor, when executing the computer program, further performs the steps of:
receiving a parameter modification instruction, and modifying parameter values and corresponding constraint conditions according to the parameter modification instruction;
and adjusting the parameter model according to the modified parameter value and the constraint condition.
It should be noted that, the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data for analysis, stored data, presented data, etc.) referred to in the present application are information and data authorized by the user or sufficiently authorized by each party.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, database, or other medium used in the embodiments provided herein may include at least one of non-volatile and volatile memory. The nonvolatile Memory may include Read-Only Memory (ROM), magnetic tape, floppy disk, flash Memory, optical Memory, high-density embedded nonvolatile Memory, resistive Random Access Memory (ReRAM), Magnetic Random Access Memory (MRAM), Ferroelectric Random Access Memory (FRAM), Phase Change Memory (PCM), graphene Memory, and the like. Volatile Memory can include Random Access Memory (RAM), external cache Memory, and the like. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM), among others. The databases referred to in various embodiments provided herein may include at least one of relational and non-relational databases. The non-relational database may include, but is not limited to, a block chain based distributed database, and the like. The processors referred to in the embodiments provided herein may be general purpose processors, central processing units, graphics processors, digital signal processors, programmable logic devices, quantum computing based data processing logic devices, etc., without limitation.
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present application. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present application shall be subject to the appended claims.

Claims (10)

1. A method of data processing, the method comprising:
obtaining a Revit family file, and converting the Revit family file into file object model structure data;
traversing the structural data of the file object model to obtain the primitives of each type;
analyzing each type of primitive to obtain attribute information of each type of primitive;
and storing each type of diagram element and attribute information in an extensible markup language file corresponding to the Revit family file.
2. The method of claim 1, wherein said converting said Revit family file into file object model structure data comprises:
and loading the Revit family file in a Document loading mode to obtain the file object model structure data.
3. The method according to claim 1, wherein analyzing for each type of primitive to obtain attribute information of each type of primitive comprises:
analyzing the Revit file to obtain a primitive operation function;
and analyzing each type of primitive according to the primitive operation function to obtain the attribute information of each type of primitive.
4. The method of claim 1, further comprising:
reading the extensible markup language file corresponding to the Revit family file, and acquiring attribute information of a primitive in the extensible markup language file;
acquiring a generating mode of the primitive from the attribute information of the primitive, and determining a parameter model type according to the generating mode;
and generating a parameter model taking the attribute information of the primitive as a variable according to the primitive, the type of the parameter model and a constraint condition, wherein the constraint condition is used for constraining the relationship among the primitives.
5. The method of claim 4, wherein generating the parametric model with the attribute information of the primitive as a variable according to the primitive, the type of the parametric model and constraint conditions comprises:
generating a parameter model frame according to the type of the parameter model and the constraint condition;
and adding the graphic primitives into the parameter model frame to be drawn to obtain a parameter model taking the attribute information of the graphic primitives as variables.
6. The method according to claim 4 or the method, further comprising:
receiving a parameter modification instruction, and modifying parameter values and corresponding constraint conditions according to the parameter modification instruction;
and adjusting the parameter model according to the modified parameter value and the constraint condition.
7. A data parsing apparatus, the apparatus comprising:
the conversion module is used for acquiring a Revit family file and converting the Revit family file into file object model structure data;
the traversal module is used for traversing the file object model structure data to obtain the graphic elements of various types;
the analysis module is used for analyzing each type of primitive to obtain attribute information of each type of primitive;
and the storage module is used for storing each type of diagram element and the attribute information in an extensible markup language file corresponding to the Revit family file.
8. A computer device comprising a memory and a processor, the memory storing a computer program, characterized in that the processor, when executing the computer program, implements the steps of the method of any of claims 1 to 6.
9. A computer-readable storage medium, on which a computer program is stored, which, when being executed by a processor, carries out the steps of the method of any one of claims 1 to 6.
10. A computer program product comprising a computer program, characterized in that the computer program realizes the steps of the method of any one of claims 1 to 6 when executed by a processor.
CN202111524266.2A 2021-12-14 2021-12-14 Data processing method and device, computer equipment and storage medium Pending CN114417064A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202111524266.2A CN114417064A (en) 2021-12-14 2021-12-14 Data processing method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111524266.2A CN114417064A (en) 2021-12-14 2021-12-14 Data processing method and device, computer equipment and storage medium

Publications (1)

Publication Number Publication Date
CN114417064A true CN114417064A (en) 2022-04-29

Family

ID=81266525

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111524266.2A Pending CN114417064A (en) 2021-12-14 2021-12-14 Data processing method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN114417064A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115081077A (en) * 2022-06-30 2022-09-20 国网北京市电力公司 Model conversion method, device and computer readable storage medium
CN115659477A (en) * 2022-11-14 2023-01-31 深圳市地铁集团有限公司 Data extraction method, device, equipment and storage medium based on BIM (building information modeling)
CN115906124A (en) * 2022-12-08 2023-04-04 广州优比建筑咨询有限公司 Revit project file encryption method, decryption method, device and equipment
CN116755684A (en) * 2023-08-16 2023-09-15 亚信科技(中国)有限公司 OAS Schema generation method, device, equipment and medium
CN117011421A (en) * 2023-08-09 2023-11-07 东莞稳控自动化技术有限公司 Sdt sewing file generation method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN115081077A (en) * 2022-06-30 2022-09-20 国网北京市电力公司 Model conversion method, device and computer readable storage medium
CN115659477A (en) * 2022-11-14 2023-01-31 深圳市地铁集团有限公司 Data extraction method, device, equipment and storage medium based on BIM (building information modeling)
CN115906124A (en) * 2022-12-08 2023-04-04 广州优比建筑咨询有限公司 Revit project file encryption method, decryption method, device and equipment
CN115906124B (en) * 2022-12-08 2023-08-18 广州优比建筑咨询有限公司 Encryption method, decryption method, device and equipment for Revit project file
CN117011421A (en) * 2023-08-09 2023-11-07 东莞稳控自动化技术有限公司 Sdt sewing file generation method and device
CN116755684A (en) * 2023-08-16 2023-09-15 亚信科技(中国)有限公司 OAS Schema generation method, device, equipment and medium
CN116755684B (en) * 2023-08-16 2023-12-05 亚信科技(中国)有限公司 OAS Schema generation method, device, equipment and medium

Similar Documents

Publication Publication Date Title
CN114417064A (en) Data processing method and device, computer equipment and storage medium
US9484006B2 (en) Manipulation of textual content data for layered presentation
CN104572967B (en) A kind of method and apparatus in page graphing
KR101494844B1 (en) System for Transforming Chart Using Metadata and Method thereof
US10650559B2 (en) Methods and systems for simplified graphical depictions of bipartite graphs
CN107992589B (en) SVG map data loading method, device and system
CN113010612A (en) Visual construction method, query method and device for graph data
US10067950B1 (en) Systems and methods for efficiently organizing map styling information
US9251548B1 (en) Object transformation for object trees utilized with multiprocessor systems
CN112800144B (en) Method and device for generating multi-granularity space-time object
CN114647409A (en) Large-screen visualization application creation platform, method, computing device and storage medium
CN110019969B (en) Method and system for processing semi-structured data
US20090193067A1 (en) Server-based recalculation of vector graphics
US20210397663A1 (en) Data reduction in a tree data structure for a wireframe
CN111768823B (en) SVG element-based medical expression editing method, device, equipment and medium
CN113419806B (en) Image processing method, device, computer equipment and storage medium
Antoniou et al. The potential of XML encoding in geomatics converting raster images to XML and SVG
CN112486378B (en) Graph generation method, device, terminal and storage medium
CN114090666A (en) Slide display method, apparatus, device and storage medium
CN114637731A (en) Format conversion method and device based on SVG file
Sloup et al. Optimizing Ray Tracing of Trimmed NURBS Surfaces on the GPU
CN102110166B (en) Browser-based body 3D (3-demensional) visualizing and editing system and method
Hadzhikoleva et al. Generalized net model for building responsive design of web pages
CN107636650A (en) Meet the document based on the condition for rendering assessment to present
CN114419197B (en) SVG-based function definition system, method and computer equipment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination