A method, device, equipment and readable storage medium for data processing
By determining and converting the differential data after the model edit in BIM collaborative design, incremental transmission and storage are realized, and the problems of low data transmission efficiency and inability to parse third-party applications in the existing technology are solved, and efficient cross-professional collaborative design is achieved. and standardized data storage.
Patent Information
- Application Number
- CN202310316332.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-24
- Publication Date
- 2024-12-27
- Estimated Expiration
- 2043-03-24
AI Technical Summary
The existing BIM collaborative design products are difficult to meet the efficient collaborative design across majors, mainly because data transmission is not incremental, low efficiency, and collaborative data is a central file, which cannot meet the requirements of cross-professional collaborative design, and third-party applications cannot analyze and application.
By determining the differential data edited by the model, it is converted into structured differential data that can be used by third parties and stored in local and cloud databases, it realizes incremental transmission and storage, and supports cross-professional collaboration of third-party applications.
It realizes incremental transmission and efficient collaboration of BIM design data, meets the cross-professional collaborative design needs of multiple people and multiple ends, supports third-party applications, and improves design efficiency and standardized storage of data.
Smart Images

Figure CN116340293B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of computer-aided design, and in particular to a data processing method, device, equipment and readable storage medium. Background Art
[0002] Architectural design includes multiple disciplines: architecture, structure, water supply and drainage, electrical, HVAC and other disciplines. Each discipline is generally completed by one or more designers. The professional differences between different disciplines are very strong, which leads to communication barriers between disciplines. At the same time, the multi-person collaboration process itself is a process of continuous iteration and deepening of each person's design results. At the same time, there is a very strong interdependence between the designs of various disciplines, which requires frequent communication and collaboration among designers in the same project to ensure the smooth completion of the project. Therefore, users urgently need BIM collaborative design. At present, most of the BIM collaborative design products available on the market are based on the central file solution to achieve collaboration; that is, after user A edits the component, the document data is stored in the local central file, and then the entire central file is uploaded to the cloud. User B collaborates with user A's data by synchronizing the latest version of the central file on the cloud. Existing BIM design products are difficult to meet the requirements of cross-disciplinary efficient collaborative design. The main disadvantages are: data transmission is not incremental, it belongs to full data collaboration, and the efficiency is not high; in addition, the collaborative data is a central file, which is transmitted and stored in a "black box" manner, and standard data is not defined according to the BIM specification, resulting in BIM design data being difficult to meet the requirements of cross-disciplinary collaborative design, and third-party applications cannot parse it, nor can it be applied to other design tools. Summary of the invention
[0003] The purpose of the present invention is to provide a data processing method, device, equipment and readable storage medium, which can realize incremental transmission, secure storage and efficient collaboration of BIM design data.
[0004] According to one aspect of the present invention, a method for data processing is provided, the method comprising:
[0005] When the first model is edited to obtain a second model, determining difference data between the second model and the first model;
[0006] converting the difference data into structured difference data that can be used by a third party;
[0007] The structured difference data is stored in a local database, and the structured difference data is synchronized to a cloud database for use by a third party.
[0008] Optionally, when the first model is edited to obtain the second model, before determining difference data between the second model and the first model, the method further includes:
[0009] When a modeling instruction is received, determining a work unit corresponding to the modeling instruction;
[0010] Acquire a first version of the latest difference data of the work unit from the local database, and acquire a second version of the latest difference data of the work unit from the cloud database;
[0011] Determining whether the first version and the second version are consistent;
[0012] If so, forming the first model according to all difference data of the work unit in the local database;
[0013] If not, the first model is formed according to the latest difference data of the working unit in the cloud database and all the difference data of the working unit in the local database.
[0014] Optionally, converting the difference data into structured difference data that can be used by a third party includes:
[0015] Parsing the native data of each component from the difference data;
[0016] Traverse each parsed component in turn, and determine the field values of the following standard fields based on the native data of the currently traversed component: component work unit ID, component work unit version, component name, component ID, component type, component deletion flag, component standard parameter set, component grid data, component graphic data, component relationship data;
[0017] The field values of all the parsed components under each standard field form the structured difference data.
[0018] Optionally, the field values of the component grid data and the component graphic data are determined based on the native data of the currently traversed component, including:
[0019] Parse the unit body from the native data of the currently traversed component; wherein a component is composed of one or more unit bodies;
[0020] Serializing all parsed unit bodies to obtain the field value of the component graphic data of the currently traversed component;
[0021] All the parsed unit bodies are discretized to obtain the field value of the component grid data of the currently traversed component.
[0022] Optionally, the field values of the component standard parameter set are determined based on the native data of the currently traversed component, including:
[0023] Parse a property list containing multiple parameters from the native data of the currently traversed component;
[0024] The standard parameters are screened out from the attribute list according to preset rules, and all the screened out standard parameters are used to form field values of the component standard parameter set.
[0025] Optionally, the field values of all the components parsed under each standard field are used to form the structured difference data, including:
[0026] Obtaining a structured data table containing each of the standard fields;
[0027] Add the following standard fields of each component directly to the structured data table: component work unit ID, component work unit version, component name, component ID, component type, component deletion flag, component standard parameter set, and component relationship data;
[0028] Forming a grid file with the field value of the component grid data of each component, and adding the storage location of the grid file in the cloud database as the field value of the component grid data to the structured data table;
[0029] The field values of the component graphic data of each component are formed into a graphic file, and the storage location of the graphic file in the cloud database is added to the structured data table as the field value of the component graphic data.
[0030] Optionally, synchronizing the structured difference data to a cloud database for use by a third party includes:
[0031] An asynchronous thread is created in a task queue to asynchronously synchronize the structured difference data in the local database to the cloud database through the asynchronous thread.
[0032] In order to achieve the above object, the present invention further provides a data processing device, the device comprising:
[0033] A determination module, configured to determine difference data between the second model and the first model when the second model is obtained by editing the first model;
[0034] A conversion module, used for converting the difference data into structured difference data that can be used by a third party;
[0035] The storage module is used to store the structured difference data in a local database and synchronize the structured difference data to a cloud database for use by a third party.
[0036] In order to achieve the above-mentioned purpose, the present invention also provides a computer device, which specifically includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the processor implements the steps of the data processing method introduced above when executing the computer program.
[0037] In order to achieve the above object, the present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the data processing method introduced above are implemented.
[0038] The data processing method, device, equipment and readable storage medium provided by the present invention organize the model into structured standard data according to the BIM data standard, and store the structured standard data in a structured and versioned manner in the cloud; each submitted structured difference data will generate a version in the cloud; the structured difference data stored in the cloud can be parsed and used by a third-party platform, which is the data basis for realizing cross-professional collaborative modeling. The data processing method provided by the present invention is a BIM data transmission, storage and collaborative design solution based on cloud + terminal. The advantage is that the model data generated by 3D design is converted according to BIM standard data, realizing incremental transmission and distributed cloud storage, meeting the requirements of multi-person and multi-terminal BIM collaborative design, and supporting third-party applications with high performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0039] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0040] Figure 1 An optional flowchart of the data processing method provided in Example 1;
[0041] Figure 2 A schematic diagram of a BIM project data structure provided in Example 1;
[0042] Figure 3 A schematic diagram of an incremental and versioned storage method provided in Example 1;
[0043] Figure 4 A schematic diagram of a process for forming component geometric data provided in Example 1;
[0044] Figure 5 A schematic diagram of a process for forming component standard parameter data provided in Example 1;
[0045] Figure 6A schematic diagram of the full data of structured data provided in Example 1;
[0046] Figure 7 A schematic diagram of data provided in Example 1 being stored in the cloud;
[0047] Figure 8 A schematic diagram of implementing cross-disciplinary collaborative modeling provided in Example 1;
[0048] Fig. 9 A schematic diagram of an optional structure of a data processing device provided in Embodiment 2;
[0049] Fig.10 A schematic diagram of an optional hardware architecture of a computer device provided in Example 3. DETAILED DESCRIPTION
[0050] In order to make the purpose, technical scheme and advantages of the present invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not intended to limit the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0051] Embodiment 1
[0052] The embodiment of the present invention provides a data processing method, which is applied to a client having a modeling platform installed, such as Figure 1 As shown, the method specifically comprises the following steps:
[0053] Step S101: when a second model is obtained by editing the first model, difference data between the second model and the first model is determined.
[0054] Among them, the BIM (Building Information Modeling) project data structure is as follows Figure 2 As shown, the modeling platform manages data based on projects and breaks down the design work of each project into work units. The smallest data granularity in a work unit is a component, and a component contains attribute information such as parameters, shapes, and relationships.
[0055] The first model and the second model in this embodiment are both model data of a work unit; in this embodiment, the model data of the work unit is versioned and stored in the cloud in an incremental manner.
[0056] Specifically, when the first model is a model of a work unit that has been previously edited on the client, before step S101, the method further includes:
[0057] Step A1: when a modeling instruction is received, determining a work unit corresponding to the modeling instruction;
[0058] Step A2: Acquire a first version of the latest difference data of the work unit from a local database, and acquire a second version of the latest difference data of the work unit from a cloud database;
[0059] Step A3: Determine whether the first version and the second version are consistent;
[0060] Step A4: If yes, the first model is formed according to all difference data of the working unit in the local database; if no, the first model is formed according to the latest difference data of the working unit in the cloud database and all difference data of the working unit in the local database.
[0061] In this embodiment, when the user opens the model data, the work unit version of the local database will be detected, and then compared with the latest version in the cloud, and the "incremental" data will be calculated and downloaded to update the local database. After the update, the version of the local database is consistent with the cloud database and reaches the latest state. Then, all version data of the local database is "accumulated" to complete the full calculation, and finally the full data is loaded into the memory to complete the modeling process of the BIM model.
[0062] In addition, when the first model is a model of a work unit that has not been edited on the client before, before step S101, the method further includes:
[0063] Step A1': sending an acquisition instruction to the cloud database;
[0064] Step A2': receiving all difference data of the working unit corresponding to the acquisition instruction fed back by the cloud database;
[0065] Step A3': forming the first model according to all the difference data.
[0066] In the scenario of cross-disciplinary collaborative modeling, if a model of a work unit that does not belong to one's own responsibility is needed, the model of another work unit can be obtained from a remote end through a link. For example, after a user opens an electromechanical work unit A, the architectural work unit B is referenced through the "link" function; the data processing process of link B is similar to that of opening the work unit, which is also done through incremental download, updating the local database, and then full calculation, and finally completing the modeling, ultimately achieving cross-disciplinary collaboration.
[0067] In this embodiment, an incremental and versioned storage method is adopted, such as Figure 3As shown, version 1 of work unit A has 6 components: E001, E002, E003, E004, E005, and E006. Since version 1 is the first version of work unit A, all model data in work unit A constitute differential data (i.e., incremental data), and each component data in the differential data is stored in the HBase database on the cloud in a structured manner, while the supporting files are managed in the form of metaInfo and stored separately in the OBS database on the cloud. After opening version 1 of work unit A, components E001 and E003 are edited, and component E002 is deleted to form version 2 of work unit A. Therefore, the differential data between version 2 (i.e., the second model) of work unit A and version 1 (i.e., the first model) only includes components E001, component E002, and component E003; and so on, and then similar edits are made to generate differential data of different versions of work unit A.
[0068] Furthermore, determining the difference data between the second model and the first model specifically includes:
[0069] Obtain a first document component list of the first model, and obtain a second document component list of the second model, and compare the first document component list with the second document component list to determine the difference data; wherein the difference data includes native data of each difference component, and the difference components include: newly added components, deleted components and updated components.
[0070] Step S102: converting the difference data into structured difference data that can be used by a third party.
[0071] Specifically, the step S102 includes:
[0072] Step B1: parsing the original data of each component from the difference data;
[0073] Step B2: traverse each parsed component in turn, and determine the field values of the following standard fields based on the native data of the currently traversed component: component work unit ID, component work unit version, component name, component ID, component type, component deletion flag, component standard parameter set, standard parameter index, component grid data, component graphic data, component relationship data;
[0074] It should be noted that the component deletion flag is used to indicate whether a component is deleted in the second model; the component standard parameter set includes all parameters that meet the preset standard rules; the component mesh data is the Mesh triangular patch data of the component model; the component graphic data is the component model BRep (Boundary Representation) data;
[0075] Step B3: The field values of all the parsed components under each standard field are used to form the structured difference data.
[0076] Furthermore, based on the native data of the currently traversed component, the field values of the component grid data and the component graphic data are determined, including:
[0077] Step B21: parse the unit body from the native data of the currently traversed component; wherein a component is composed of one or more unit bodies;
[0078] Step B22: Serializing all parsed unit bodies to obtain field values of the component graphic data of the currently traversed component;
[0079] Step B23: discretize all the parsed unit bodies to obtain the field value of the component grid data of the currently traversed component.
[0080] like Figure 4 As shown in the figure, it is a process of forming component geometry data, obtaining the native geometry data of each component in the difference data by traversing the document component list; obtaining the units bodies constituting the component for the geometry data of a component; traversing each unit body in turn, serializing the currently traversed unit body, generating BRep streaming data to obtain component graphic data, and performing discretization on the currently traversed unit body to calculate MESH data to obtain component mesh data.
[0081] Furthermore, based on the native data of the currently traversed component, the field values of the component standard parameter set are determined, including:
[0082] Step B21': parse the native data of the currently traversed component to obtain a property list containing multiple parameters;
[0083] Step B22': filter out standard parameters from the attribute list according to preset rules, and form field values of the component standard parameter set with all the filtered out standard parameters.
[0084] like Figure 5As shown, the process of forming component standard parameter data is to obtain the native attribute data of each component in the difference data by traversing the document component list, wherein the native attribute data includes: an attribute list and a standard attribute set; judging whether each parameter in the attribute list is a standard parameter according to a preset rule, and if so, adding it to the list of standard parameters to be exported; in addition, since all parameters in the standard attribute set are standard parameters, all standard parameters in the standard attribute set are added to the list of standard attribute sets to be exported; first judging whether the list of standard attribute sets to be exported is empty, if not, traversing each standard parameter in the list of standard attribute sets to be exported and adding it to the list of standard parameters to be exported; then judging whether the list of standard parameters to be exported is empty, and if not, forming each standard parameter in the list of standard parameters to be exported into the field value of the component standard parameter set.
[0085] Furthermore, the field values of all the components parsed under each standard field are used to form the structured difference data, which specifically includes:
[0086] Step B31: Obtain a structured data table containing each of the standard fields;
[0087] Step B32: directly adding the field values of the following standard fields of each component to the structured data table: component work unit ID, component work unit version, component name, component ID, component type, component deletion flag, component standard parameter set, and component relationship data;
[0088] Step B33: Forming a grid file with the field values of the component grid data of each component, and adding the storage location of the grid file in the cloud database as the field value of the component grid data to the structured data table again;
[0089] Step B34: Form a graphic file with the field value of the component graphic data of each component, and add the storage location of the graphic file in the cloud database into the structured data table as the field value of the component graphic data.
[0090] Since the amount of component mesh data and component graphic data is large, they need to be converted into files in advance, and then the data is transmitted and stored in the form of files. The corresponding fields only need to be associated with the storage address of the file.
[0091] In addition, if Figure 6As shown, it is the full data of the structured data, that is, in addition to the standard data introduced above, the structured data table also includes non-standard data formed according to the native data of the component; since the amount of non-standard data is large, it also needs to be converted into a file, and the storage address of the file is stored as a field value in the structured data table.
[0092] It should be noted that the component data designed by the user is converted into standard data and non-standard data at the same time according to the BIM specification. Standard data is used for cross-disciplinary collaboration or third-party applications (such as lightweight display or collision detection on the web); non-standard data is completely "black box" to the external platform and is used for local user design. Standard data is actually a derivative of non-standard data, with a small amount of information loss compared to the native data of the component. Standard data is used for cross-disciplinary collaboration and docking with third-party applications and is readable externally; non-standard data is limited to the use of this profession on the local platform. The data is lossless, but it cannot be docked with third-party applications and is black box data to the outside. Data structured conversion includes two parts: standard data export and non-standard data export. The main logic of standard data export is to extract geometric data and attribute data from the memory model data of the component. The detailed export process is described in steps B1 to B3. Non-standard data export is relatively simple, and the native data of the component is directly obtained. After the data structured conversion, the following will be generated Figure 6 The full component data (standard data + non-standard data) shown is used for incremental transmission and cloud storage. In particular, for the heavier fields in the component data, such as component native data, component mesh data, and component graphic data, they will be converted into files and then stored in the form of files. The corresponding fields only need to be associated with the storage address of the file.
[0093] Step S103: storing the structured difference data in a local database, and synchronizing the structured difference data to a cloud database for use by a third party.
[0094] Specifically, synchronizing the structured difference data to a cloud database for use by a third party includes:
[0095] An asynchronous thread is created in a task queue to asynchronously synchronize the structured difference data in the local database to the cloud database through the asynchronous thread.
[0096] In this embodiment, the user edits the memory model and then saves / submits it. The system will collect "increments" based on the memory model, perform standard / non-standard data conversion, and then save the incremental data to the local database. Then, a job thread is created and added to the job system queue, waiting for job data push processing. At this point, the user can continue to edit the memory model, and the job system will read the local database asynchronously, perform "incremental" uploads, and finally write the data to the cloud database. Since the "incremental" upload process is asynchronous and runs in an independent job thread, it is completely transparent to the user and will not block the user's BIM model design. Small incremental "asynchronous" uploads can complete the data upload operation without the user noticing.
[0097] like Figure 7 As shown in the figure, it is a schematic diagram of data storage in the cloud. It can be seen that the structured difference data (i.e., structured data table) is stored in the HBase database, while the component native data (i.e., non-standard data), component mesh data and component geometry data (i.e., component graphic data) stored in the form of files are stored in OBS. Project management data is stored in MySQL to characterize the relationship between projects and work units and the relationship between work unit versions. In addition, an ES index is established to realize fast query of component data.
[0098] Based on the data processing method of this embodiment, cross-disciplinary collaborative modeling can be achieved, such as Figure 8 As shown, each professional user opens his own professional work unit A, B, and C, and performs independent editing and design, and then uploads it to the cloud after completion. Work unit D references A, B, and C through links to complete data model integration. After modeling, if A is modified and a new version v2 is submitted to the cloud, D can apply A's v2 data by updating the link. If D does not need C, it can also delete the link and cancel the data reference to C. If B has multiple versions in the cloud, D can choose the version of interest to link when linking B. The entire collaborative process is like a tower of building blocks, which can easily combine work units in the cloud to achieve efficient cross-professional collaboration.
[0099] Most of the BIM collaborative design products currently available on the market are based on central file solutions to achieve collaboration. Collaborative data tends to be "black boxes" and cannot meet cross-disciplinary collaboration. Third-party tools cannot parse it, and even the data transmission of many products is not incremental. It belongs to full data collaboration and is inefficient. The data processing method provided in this embodiment is a BIM data transmission, storage and collaborative design solution based on cloud + terminal. The advantage is that the model data generated by 3D design is converted according to BIM standard data, realizing incremental transmission and distributed cloud storage, meeting multi-person and multi-terminal BIM collaborative design, and supporting third-party applications with high performance.
[0100] Embodiment 2
[0101] The embodiment of the present invention provides a data processing device, such as Fig. 9 As shown, the device specifically includes the following components:
[0102] A determination module 901 is used to determine difference data between the second model and the first model when the second model is obtained by editing the first model;
[0103] A conversion module 902, configured to convert the difference data into structured difference data that can be used by a third party;
[0104] The storage module 903 is used to store the structured difference data in a local database, and synchronize the structured difference data to a cloud database for use by a third party.
[0105] Specifically, the device further includes:
[0106] A judgment module is used to, when receiving a modeling instruction, determine a work unit corresponding to the modeling instruction; obtain a first version of the latest difference data of the work unit from the local database, and obtain a second version of the latest difference data of the work unit from the cloud database; determine whether the first version and the second version are consistent; if so, form the first model based on all the difference data of the work unit in the local database; if not, form the first model based on the latest difference data of the work unit in the cloud database and all the difference data of the work unit in the local database.
[0107] Specifically, the conversion module 902 includes:
[0108] A parsing unit, used for parsing the native data of each component from the difference data;
[0109] The determination unit is used to traverse the parsed components in turn, and determine the field values of the following standard fields based on the native data of the currently traversed component: the work unit ID to which the component belongs, the work unit version to which the component belongs, the component name, the component ID, the component type, the component deletion flag, the component standard parameter set, the component grid data, the component graphic data, and the component relationship data;
[0110] The processing unit is used to form the structured difference data from the field values of all the parsed components under each standard field.
[0111] Furthermore, the determining unit is specifically configured to:
[0112] Parse the unit body from the native data of the currently traversed component; wherein a component is composed of one or more unit bodies;
[0113] Serializing all parsed unit bodies to obtain the field value of the component graphic data of the currently traversed component;
[0114] All the parsed unit bodies are discretized to obtain the field value of the component grid data of the currently traversed component.
[0115] Furthermore, the determining unit is further configured to:
[0116] Parse a property list containing multiple parameters from the native data of the currently traversed component;
[0117] The standard parameters are screened out from the attribute list according to preset rules, and all the screened out standard parameters are used to form field values of the component standard parameter set.
[0118] Furthermore, the processing unit is specifically used for:
[0119] Obtaining a structured data table containing each of the standard fields;
[0120] Add the following standard fields of each component directly to the structured data table: component work unit ID, component work unit version, component name, component ID, component type, component deletion flag, component standard parameter set, and component relationship data;
[0121] Forming a grid file with the field value of the component grid data of each component, and adding the storage location of the grid file in the cloud database as the field value of the component grid data to the structured data table;
[0122] The field values of the component graphic data of each component are formed into a graphic file, and the storage location of the graphic file in the cloud database is added to the structured data table as the field value of the component graphic data.
[0123] Specifically, the storage module 903 is used to:
[0124] An asynchronous thread is created in a task queue to asynchronously synchronize the structured difference data in the local database to the cloud database through the asynchronous thread.
[0125] Embodiment 3
[0126] This embodiment also provides a computer device, such as a smart phone, tablet computer, laptop computer, desktop computer, rack server, blade server, tower server or cabinet server (including an independent server or a server cluster composed of multiple servers) that can execute programs. Fig.10 As shown, the computer device 100 of this embodiment includes at least but not limited to: a memory 1001 and a processor 1002 that can communicate with each other via a system bus. It should be noted that Fig.10 The computer device 100 is shown only with components 1001 - 1002 , but it should be understood that implementing all of the components shown is not a requirement, and more or fewer components may alternatively be implemented.
[0127] In this embodiment, the memory 1001 (i.e., a readable storage medium) includes a flash memory, a hard disk, a multimedia card, a card-type memory (e.g., an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a magnetic disk, an optical disk, etc. In some embodiments, the memory 1001 may be an internal storage unit of the computer device 100, such as a hard disk or a memory of the computer device 100. In other embodiments, the memory 1001 may also be an external storage device of the computer device 100, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device 100. Of course, the memory 1001 may also include both the internal storage unit of the computer device 100 and its external storage device. In this embodiment, the memory 1001 is generally used to store an operating system and various application software installed on the computer device 100. In addition, the memory 1001 can also be used to temporarily store various types of data that have been output or are to be output.
[0128] In some embodiments, the processor 1002 may be a central processing unit (CPU), a controller, a microcontroller, a microprocessor, or other data processing chips. The processor 1002 is generally used to control the overall operation of the computer device 100 .
[0129] Specifically, in this embodiment, the processor 1002 is used to execute the program of the data processing method stored in the memory 1001, and the program of the data processing method is executed to implement the following steps:
[0130] When the first model is edited to obtain a second model, determining difference data between the second model and the first model;
[0131] converting the difference data into structured difference data that can be used by a third party;
[0132] The structured difference data is stored in a local database, and the structured difference data is synchronized to a cloud database for use by a third party.
[0133] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.
[0134] Embodiment 4
[0135] This embodiment also provides a computer-readable storage medium, such as a flash memory, a hard disk, a multimedia card, a card-type memory (for example, an SD or DX memory, etc.), a random access memory (RAM), a static random access memory (SRAM), a read-only memory (ROM), an electrically erasable programmable read-only memory (EEPROM), a programmable read-only memory (PROM), a magnetic memory, a disk, an optical disk, a server, an App application store, etc., on which a computer program is stored. When the computer program is executed by a processor, the following method steps are implemented:
[0136] When the first model is edited to obtain a second model, determining difference data between the second model and the first model;
[0137] converting the difference data into structured difference data that can be used by a third party;
[0138] The structured difference data is stored in a local database, and the structured difference data is synchronized to a cloud database for use by a third party.
[0139] The specific implementation process of the above method steps can be found in Example 1, and this embodiment will not be repeated here.
[0140] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0141] The serial numbers of the above embodiments of the present invention are only for description and do not represent the advantages or disadvantages of the embodiments.
[0142] Through the description of the above implementation methods, those skilled in the art can clearly understand that the above embodiment methods can be implemented by means of software plus a necessary general hardware platform, and of course by hardware, but in many cases the former is a better implementation method.
[0143] The above are only preferred embodiments of the present invention, and are not intended to limit the patent scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A method for data processing, characterized in that: The method comprises: When the first model is edited to obtain the second model, a first document component list of the first model is obtained, and a second document component list of the second model is obtained, and the first document component list and the second document component list are compared to determine difference data; converting the difference data into structured difference data that can be used by a third party; Storing the structured difference data in a local database, and synchronizing the structured difference data to a cloud database for use by a third party; The converting of the difference data into structured difference data that can be used by a third party includes: Parsing the native data of each component from the difference data; Traverse each parsed component in turn, and determine the field value of each standard field based on the native data of the currently traversed component; The field values of all the parsed components under each standard field are used to form the structured difference data, specifically: a structured data table containing each standard field is obtained; the field values of the following standard fields of each component are directly added to the structured data table: component work unit ID, component work unit version, component name, component ID, component type, component deletion mark, component standard parameter set, component relationship data; the field values of the following standard fields of each component are used to form a grid file: component grid data, and the storage location of the grid file in the cloud database is added to the structured data table as the field value of the component grid data; the field values of the following standard fields of each component are used to form a graphic file: component graphic data, and the storage location of the graphic file in the cloud database is added to the structured data table as the field value of the component graphic data; the component grid data is Mesh triangle patch data, the component graphic data is boundary representation data, and the component standard parameter set contains all parameters that meet the preset standard rules; Based on the native data of the currently traversed component, the field values of the component standard parameter set are determined, including: Acquire native attribute data of each component in the difference data by traversing the document component list, wherein the native attribute data includes: an attribute list and a standard attribute set; Determine whether each parameter in the attribute list is a standard parameter according to the preset rules, and if so, add it to the list of standard parameters to be exported; Adding all standard parameters in the standard attribute set to a list of standard attribute sets to be exported; Determine whether the list of standard attribute sets to be exported is empty, and if not, traverse each standard parameter in the list of standard attribute sets to be exported and add them to the list of standard parameters to be exported; It is determined whether the list of standard parameters to be exported is empty. If not, each standard parameter in the list of standard parameters to be exported is used as a field value of the component standard parameter set.
2. The data processing method according to claim 1, characterized in that: When the first model is edited to obtain the second model, before determining the difference data between the second model and the first model, the method further includes: When a modeling instruction is received, determining a work unit corresponding to the modeling instruction; Acquire a first version of the latest difference data of the work unit from the local database, and acquire a second version of the latest difference data of the work unit from the cloud database; Determining whether the first version and the second version are consistent; If so, forming the first model according to all difference data of the work unit in the local database; If not, the first model is formed according to the latest difference data of the working unit in the cloud database and all the difference data of the working unit in the local database.
3. The data processing method according to claim 1, characterized in that: Based on the native data of the currently traversed component, the field values of the component grid data and component graphic data are determined, including: Parse the unit body from the native data of the currently traversed component; wherein a component is composed of one or more unit bodies; Serializing all parsed unit bodies to obtain the field value of the component graphic data of the currently traversed component; All the parsed unit bodies are discretized to obtain the field value of the component grid data of the currently traversed component.
4. The data processing method according to any one of claims 1 to 3, characterized in that: The step of synchronizing the structured difference data to a cloud database for use by a third party includes: An asynchronous thread is created in a task queue to asynchronously synchronize the structured difference data in the local database to the cloud database through the asynchronous thread.
5. A data processing device, characterized in that: The device comprises: a determination module, configured to, when a first model is edited to obtain a second model, obtain a first document component list of the first model, obtain a second document component list of the second model, and compare the first document component list with the second document component list to determine difference data; A conversion module, used for converting the difference data into structured difference data that can be used by a third party; A storage module, used to store the structured difference data in a local database, and synchronize the structured difference data to a cloud database for use by a third party; Wherein, the conversion module is specifically used for: Parsing the native data of each component from the difference data; Traverse each parsed component in turn, and determine the field value of each standard field based on the native data of the currently traversed component; The field values of all the parsed components under each standard field are used to form the structured difference data, specifically: a structured data table containing each standard field is obtained; the field values of the following standard fields of each component are directly added to the structured data table: component work unit ID, component work unit version, component name, component ID, component type, component deletion mark, component standard parameter set, component relationship data; the field values of the following standard fields of each component are used to form a grid file: component grid data, and the storage location of the grid file in the cloud database is added to the structured data table as the field value of the component grid data; the field values of the following standard fields of each component are used to form a graphic file: component graphic data, and the storage location of the graphic file in the cloud database is added to the structured data table as the field value of the component graphic data; the component grid data is Mesh triangle patch data, the component graphic data is boundary representation data, and the component standard parameter set contains all parameters that meet the preset standard rules; Based on the native data of the currently traversed component, the field values of the component standard parameter set are determined, including: Acquire native attribute data of each component in the difference data by traversing the document component list, wherein the native attribute data includes: an attribute list and a standard attribute set; Determine whether each parameter in the attribute list is a standard parameter according to the preset rules, and if so, add it to the list of standard parameters to be exported; Adding all standard parameters in the standard attribute set to a list of standard attribute sets to be exported; Determine whether the list of standard attribute sets to be exported is empty, and if not, traverse each standard parameter in the list of standard attribute sets to be exported and add them to the list of standard parameters to be exported; It is determined whether the list of standard parameters to be exported is empty. If not, each standard parameter in the list of standard parameters to be exported is used as a field value of the component standard parameter set.
6. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the method according to any one of claims 1 to 4 when executing the computer program.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.