Component data processing method, device and electronic equipment

By storing the attribute items of large data component in BIM software as files and recording the storage path, the problems of high data storage cost and slow read and write performance are solved, and more efficient data storage and read and write performance are achieved.

CN113420025BActive Publication Date: 2025-02-28GLODON CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202110653597.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-06-11
Publication Date
2025-02-28
Estimated Expiration
2041-06-11

AI Technical Summary

Technical Problem

In the case of large data volume, in database-based BIM software, data storage costs are high and the database read and write performance is slow.

Method used

By saving the attribute items to be stored in the corresponding files, obtaining the target file and storing the target file to obtain the storage path, only the storage path needs to be guaranteed in the component database, rather than the attribute items to be stored.

Benefits of technology

It reduces the storage cost of data, improves the performance of data reading and writing, and solves the problem of small files by merging storage, avoiding the decline in file reading and writing performance caused by massive small files.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113420025B_ABST
    Figure CN113420025B_ABST
Patent Text Reader

Abstract

The present invention relates to the field of computer-aided design, and in particular to a component data processing method, device and electronic device, wherein the processing method comprises obtaining at least one attribute item to be stored of a target component; saving the at least one attribute item to be stored in a corresponding file to obtain a target file; storing the target file and saving a storage path of the target file; and determining a component database based on the storage path. The attribute item to be stored is stored in a file to obtain a target file, and the target file is stored to obtain a storage path. In the component database, only the storage path needs to be guaranteed, rather than the attribute item to be stored, which reduces the data storage cost and improves the data reading and writing performance.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of computer-aided design, and in particular to a component data processing method, device and electronic equipment. Background Art

[0002] In database-based BIM software, BIM model data is stored in a structured database. The main data items of a component include id, parametric model, BERP model, grid model, style, etc. Each component data is stored as a row in the database table, and different data items are saved as different columns of the table.

[0003] Among them, the data size of different data items in component data varies greatly. For example, the data size of four types of data items, namely parametric model, BREP model, mesh model and style, varies from 0 to 50M, and the data size of the entire database table can reach tens of millions or even hundreds of millions of entries. In the case of large amounts of data, the above data storage method will have the problems of high data storage cost and slow database read and write performance. Summary of the invention

[0004] In view of this, an embodiment of the present invention provides a component data processing method, device and electronic device to solve the problem of high data storage cost.

[0005] According to a first aspect, an embodiment of the present invention provides a method for processing component data, comprising:

[0006] Obtain at least one attribute item to be stored of the target component;

[0007] Saving the at least one attribute item to be stored in corresponding files respectively to obtain a target file;

[0008] Storing the target file and saving the storage path of the target file;

[0009] A component database is determined based on the storage path.

[0010] The component data processing method provided by the embodiment of the present invention stores the attribute items to be stored in a file to obtain a target file, and stores the target file to obtain a storage path. In the component database, only the storage path needs to be guaranteed, rather than the attribute items to be stored, thereby reducing the storage cost of data and improving the performance of data reading and writing.

[0011] In combination with the first aspect, in a first implementation of the first aspect, the step of saving the at least one attribute item to be stored into corresponding files to obtain a target file includes:

[0012] Saving the attribute items to be stored in a corresponding file to obtain a compressed file;

[0013] At least one of the compressed files is merged to obtain the target file.

[0014] The component data processing method provided by the embodiment of the present invention solves the problem of small files by merging and storing them, thereby avoiding the problem of decreased file reading and writing performance due to massive small files.

[0015] In combination with the first implementation of the first aspect, in the second implementation of the first aspect, merging at least one of the compressed files to obtain the target file includes:

[0016] Obtain a compressed file corresponding to at least one attribute item to be stored of the same type;

[0017] The obtained compressed files are merged to obtain the target file.

[0018] The component data processing method provided by the embodiment of the present invention merges compressed files corresponding to at least one attribute item to be stored of the same type, thereby further reducing the amount of data storage.

[0019] In combination with the first implementation or the second implementation of the first aspect, in the third implementation of the first aspect, merging at least one of the compressed files to obtain the target file includes:

[0020] Acquire at least one compressed file whose relevance meets a preset condition;

[0021] At least one compressed file that meets the preset condition is merged to obtain the target file.

[0022] The component data processing method provided in the embodiment of the present invention merges at least one compressed file whose correlation meets preset conditions. On the one hand, it can reduce the amount of data, and on the other hand, it ensures that the target file obtained after the merger can meet business needs. Subsequently, related data can be obtained through only one download, thereby improving the efficiency of data reading and writing.

[0023] In combination with the first aspect, in a fourth implementation of the first aspect, storing the target file and saving the storage path of the target file includes:

[0024] Uploading the target files to a preset location in parallel to determine component file data;

[0025] The preset location corresponding to the target file is saved to obtain the storage path.

[0026] The component data processing method provided by the embodiment of the present invention uploads files in a parallel manner, thereby improving the data uploading efficiency.

[0027] In combination with the fourth implementation manner of the first aspect, in the fifth implementation manner of the first aspect, determining the component database based on the storage path includes:

[0028] Obtaining a storage attribute item category of the component database;

[0029] Based on the attribute item corresponding to the target file and the storage attribute item category, the storage path is saved under the corresponding storage attribute category to determine the component database.

[0030] The component data processing method provided by the embodiment of the present invention combines the database with the file system, which can give full play to the advantages of both and further improve the data processing efficiency.

[0031] In combination with the first aspect, in a sixth implementation of the first aspect, the method further includes:

[0032] Obtaining a data access request, wherein the data access request carries an identifier of the target data;

[0033] Based on the identifier of the target data, the component database is queried to determine the target storage path of the target data;

[0034] The target data is extracted using the target storage path.

[0035] The component data processing method provided by the embodiment of the present invention obtains the target storage path of the target data from the component database to extract the target data, which can reduce the data access amount and improve the data reading efficiency.

[0036] According to a second aspect, an embodiment of the present invention further provides a component data processing device, including:

[0037] An acquisition module, used for acquiring at least one attribute item to be stored of a target component;

[0038] A saving module, used for saving the at least one attribute item to be stored into corresponding files respectively to obtain a target file;

[0039] A storage module, used for storing the target file and saving the storage path of the target file;

[0040] A determination module is used to determine a component database based on the storage path.

[0041] The component data processing device provided by the embodiment of the present invention stores the attribute items to be stored in a file to obtain a target file, and stores the target file to obtain a storage path. In the component database, only the storage path needs to be guaranteed, rather than the attribute items to be stored, thereby reducing the storage cost of data and improving the performance of data reading and writing.

[0042] According to the third aspect, an embodiment of the present invention provides an electronic device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the component data processing method described in the first aspect or any one of the embodiments of the first aspect by executing the computer instructions.

[0043] According to a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the component data processing method described in the first aspect or any one of the embodiments of the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS

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

[0045] Figure 1 is a schematic diagram of an application scenario according to an embodiment of the present invention;

[0046] Figure 2 is a flowchart of a method for processing component data according to an embodiment of the present invention;

[0047] Figure 3 is a flowchart of a method for processing component data according to an embodiment of the present invention;

[0048] Figure 4 is a flowchart of a method for processing component data according to an embodiment of the present invention;

[0049] Figure 5 is a schematic diagram of processing component data according to an embodiment of the present invention;

[0050] Figure 6 is a flowchart of a method for processing component data according to an embodiment of the present invention;

[0051] Figure 7 is a structural block diagram of a device for processing component data according to an embodiment of the present invention;

[0052] Figure 8 It is a schematic diagram of the hardware structure of an electronic device provided by an embodiment of the present invention. DETAILED DESCRIPTION

[0053] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0054] Figure 1 An optional application scenario of the component data processing method described in the embodiment of the present invention is shown. Specifically, the client is used to process the acquired component data and upload the processing results to the server for storage. The data stored in the server is divided into two parts, one part is the stored data, and the other part is the storage path of the stored data. That is, what is stored in the component database is the storage path of the data, not the actual data, thereby reducing the storage cost of the data and improving the performance of data reading and writing. The server can be deployed in the cloud or in other locations, and there is no limitation on it here.

[0055] certainly, Figure 1 This is only an example, and the protection scope of the present invention is not limited to this. The corresponding settings can be made according to actual needs.

[0056] According to an embodiment of the present invention, an embodiment of a method for processing component data is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0057] In this embodiment, a method for processing component data is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 2 is a flowchart of a method for processing component data according to an embodiment of the present invention. Figure 2 As shown, the process includes the following steps:

[0058] S11, obtaining at least one attribute item to be stored of the target component.

[0059] The attribute items to be stored may be attribute items with a large amount of data in the target component, and the specific attribute items to be processed may be set accordingly according to actual needs. For example, the four attribute items of the target component, namely, the parametric model, BREP model, mesh model and style, may be processed.

[0060] The parametric model is used to represent the serialized data of the component; the BREP model is used to represent the geometric data of the component; the grid model is used for rendering, specifically the triangulated data obtained by discretizing the geometric data of the component; the style refers to the rendering data that the component depends on, which is used to define how to express the appearance of the component when rendering.

[0061] The above-mentioned attribute items to be stored may be acquired by the electronic device from the outside, or may be obtained by converting the component data after the electronic device acquires the component data. For example, by converting the component data using Revit software, the corresponding attribute items to be stored may be obtained.

[0062] The definition of the attribute items to be stored may be artificially defined or determined by the electronic device based on the data size of each attribute item, and no limitation is imposed on it. In the following description, the electronic device obtains the above four attribute items to be stored as an example. Specifically, they are parameterized model, BREP model, meshed model and style.

[0063] The electronic device may obtain the BIM model and then process the attribute items to be stored of each component in the BIM model, or it may process the attribute items to be stored of the components specified in the BIM model; or, the electronic device may obtain only one or more components and process the stored attribute items of the obtained components.

[0064] S12, saving at least one attribute item to be stored into corresponding files respectively to obtain a target file.

[0065] The electronic device may store each attribute item to be stored of each component in one file, or store the same attribute items to be stored of multiple components in one file; or store multiple attribute items to be stored of each component in one file, etc. Which attribute items to be stored in the same file may be set accordingly according to actual needs, and no limitation is imposed on it herein.

[0066] The electronic device may first compress each data item to be stored to obtain a small compressed file, then merge the small compressed files and compress them again to obtain the target file; or it may put multiple data items to be stored into one file, compress the file, and obtain the target file.

[0067] The target file may be one or more. It should be noted that there is no special correspondence between the target file and the component, or between the target file and the attribute item to be stored. The target file merely represents the result of saving at least one attribute item to be stored, that is, saving it in the form of a file.

[0068] This step will be described in detail below.

[0069] S13, storing the target file and saving the storage path of the target file.

[0070] After obtaining the target file, the electronic device stores the target file in a corresponding location and saves the storage path. Specifically, the electronic device may be provided with a storage space locally for storing the target file, or may be provided with a storage space on the server side for storing the target file remotely.

[0071] When the target file is stored locally, the electronic device records the location information of the storage space to obtain the storage path; when the target file is stored remotely, the electronic device records the access information of the storage space to obtain the storage path.

[0072] The target file can be stored in the corresponding storage space according to actual needs, and the electronic device records the corresponding storage path. As for whether the storage space is set locally or elsewhere, it can be set according to actual needs.

[0073] This step will be described in detail below.

[0074] S14, determining a component database based on the storage path.

[0075] After determining the storage path, the electronic device saves the storage path corresponding to each target file in the form of a database, and the component database can be obtained. The component database is used to save the storage path of each target file, that is, the electronic device can determine the storage path of a certain attribute item to be stored of a certain component by querying the component database, and then use the storage path to obtain the data of the attribute item to be stored.

[0076] The component data processing method provided in this embodiment stores the attribute items to be stored in a file to obtain a target file, and stores the target file to obtain a storage path. In the component database, only the storage path needs to be guaranteed, rather than the attribute items to be stored, which reduces the data storage cost and improves the data reading and writing performance.

[0077] In this embodiment, a method for processing component data is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 3 is a flowchart of a method for processing component data according to an embodiment of the present invention. Figure 3 As shown, the process includes the following steps:

[0078] S21, obtaining at least one attribute item to be stored of the target component.

[0079] For details, please see Figure 2S11 of the illustrated embodiment will not be described in detail here.

[0080] S22, saving at least one attribute item to be stored into corresponding files respectively to obtain a target file.

[0081] Specifically, the above S22 may include:

[0082] S221, saving the attribute item to be stored into a corresponding file to obtain a compressed file.

[0083] Taking the four attribute items to be stored, namely the parametric model, BREP model, mesh model and style mentioned above as an example, the electronic device distributes and saves these four attribute items to be stored into separate files, and alleviates the pressure of memory consumption by exchanging memory and disk files.

[0084] Specifically, once the four types of data are written to the file, they do not need to be repeatedly held in the memory object model. For example, the BREP model data of a component is 200MB. Before the exchange, it is stored in the memory object Element. After writing to the file, the Element object does not need to hold this 200MB of data. It only needs to hold the local path pointing to this file, so that the memory usage is reduced by 200MB, that is, the memory and I / O data exchange.

[0085] The electronic device saves each attribute item to be stored of each component into a separate file and compresses the file to obtain a compressed file. If the component has the above four attribute items to be stored, then there will be four compressed files corresponding to each component, and the compressed files correspond to the attribute items to be stored of the component one by one.

[0086] The compressed file may be in the form of a ZIP file or a compressed file in other formats, which is not limited here.

[0087] S222: merge at least one compressed file to obtain a target file.

[0088] Combine multiple small compressed files into a large compressed file. For example, each component has a BREP model, and the BREP model of each component is written into a small compressed file. However, too many small compressed files are not conducive to network upload. Therefore, multiple such small compressed files are combined into a slightly larger compressed file for network upload.

[0089] The specific merging method may be to merge the compressed files corresponding to the same type of attribute items to be stored of multiple components. For example, the BREP model of component A, the BREP model of component B, and the BREP model of component C; for another example, the BIM model has N components, each of which has a BREP model, then the compressed files corresponding to the BREP models of the N components are merged to obtain a target file. Accordingly, the target file has N compressed files.

[0090] Alternatively, the compressed files corresponding to the attribute items to be stored with high correlation of multiple components may be merged, that is, the data with high correlation may be stored in one ZIP file, and the data with low correlation may be stored in different ZIP files.

[0091] By combining a large number of small files in the form of ZIP files, the stored data can be compressed and the performance bottleneck of the file system caused by a large number of small files can be avoided.

[0092] As an optional implementation of this embodiment, the above S222 may include:

[0093] (1) Obtain a compressed file corresponding to at least one attribute item of the same type to be stored.

[0094] As described above, each component has four types of identical attribute items, namely, parametric model, BREP model, mesh model, and style. Therefore, the electronic device extracts the compressed files corresponding to the parametric model, the compressed files corresponding to the BREP model, the compressed files corresponding to the mesh model, and the compressed files corresponding to the style of each component.

[0095] (2) Merge the obtained compressed files to obtain the target file.

[0096] The electronic device puts the extracted compressed files into corresponding files according to the attribute items and merges them to obtain the target files. For example, corresponding to four types of attribute items, each attribute item corresponds to a target file, so four target files can be obtained after the merging process.

[0097] The compressed files corresponding to at least one attribute item to be stored of the same type are merged, thereby further reducing the amount of data storage.

[0098] As another optional implementation of this embodiment, the above S222 may include:

[0099] (1) Obtain at least one compressed file whose relevance meets a preset condition.

[0100] The preset conditions can be determined according to the actual usage scenario. For example, if MESH is always used together with STYLE data, then the two data are related. When processing data, put the highly related data into a compressed file. If there is no correlation, put them into a separate compressed file.

[0101] The electronic device may compare the correlation between the attribute items to be stored with the preset condition based on the business requirements to determine which attribute items to be stored have correlations that meet the preset condition. After determining the attribute items that meet the preset condition, at least one compressed file related to the attribute items is obtained.

[0102] For example, through analysis, it can be known that the two types of attribute items, parameterized model and style, are related, so the compressed files corresponding to the two types of attribute items, parameterized model and style, are extracted.

[0103] (2) Merging at least one compressed file that meets a preset condition to obtain a target file.

[0104] The electronic device puts the extracted compressed files into the same file, and then compresses the file to obtain the target file. Based on the local new principle of data access, the efficiency of data access can be improved. For example, data of the same data item type of different components are saved in one compressed file.

[0105] The following business scenarios reflect the situation of local data access:

[0106] Business scenario 1: When editing components in modeling software, the modeling software only needs to download two types of data: parametric model and style. Accordingly, the correlation between the two types of attribute items, parametric model and style, is high, so these two types of attribute items can be merged.

[0107] Business scenario 2: Lightweight display of components. In this scenario, lightweight applications only need to download two types of data: grid model and style. Accordingly, the correlation between the two types of attribute items, grid model and style, is high, so these two types of attribute items can be merged.

[0108] Business scenario 3: collision detection between components. In this scenario, the collision detection application only needs to download two types of data: mesh model and BREP model. Accordingly, the correlation between the two types of attribute items of mesh model and BREP is high, so these two types of attribute items can be merged.

[0109] Merging at least one compressed file whose relevance meets preset conditions can reduce the amount of data on the one hand, and ensure that the target file obtained after the merger can meet business needs on the other hand. Subsequently, related data can be obtained through only one download, which improves the efficiency of data reading and writing.

[0110] S23, storing the target file and saving the storage path of the target file.

[0111] For details, please see Figure 2 S13 of the illustrated embodiment will not be described in detail here.

[0112] S24, determining a component database based on the storage path.

[0113] For details, please see Figure 2 S14 of the illustrated embodiment will not be described in detail here.

[0114] The component data processing method provided in this embodiment solves the problem of small files by merging and storing them, avoiding the problem of file read and write performance degradation caused by massive small files. At the same time, the data storage solution is designed by combining the database and the file system, fully combining the advantages of both.

[0115] In this embodiment, a method for processing component data is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. Figure 4 is a flowchart of a method for processing component data according to an embodiment of the present invention. Figure 4 As shown, the process includes the following steps:

[0116] S31, obtaining at least one attribute item to be stored of the target component.

[0117] For details, please see Figure 3 S21 of the illustrated embodiment will not be described in detail here.

[0118] S32, saving at least one attribute item to be stored into corresponding files respectively to obtain a target file.

[0119] For details, please see Figure 3 S22 of the illustrated embodiment will not be described in detail here.

[0120] S33, storing the target file and saving the storage path of the target file.

[0121] Specifically, the above S33 may include:

[0122] S331, uploading the target file to a preset location in parallel to determine the component file data.

[0123] The electronic device can use multi-threaded concurrent technology to upload multiple target files to the preset location in parallel. It should be noted that the electronic device can upload multiple target files to the same preset location at the same time, or to different preset locations at the same time, without any limitation.

[0124] The preset location is a name for component file data, and does not specifically refer to a specific location. The component file data is data representing attribute items to be stored, and the target file can be stored in a file system.

[0125] S332, save the preset location corresponding to the target file to obtain a storage path.

[0126] The electronic device stores the preset location corresponding to each target file to obtain the corresponding storage path. As described above, the storage path can be the location information of the disk, or the access address information of a remote location, etc. In this embodiment, the preset location is set on the server side, and the storage path is the access address information of each target file.

[0127] S34, determining a component database based on the storage path.

[0128] Specifically, the above S34 may include:

[0129] S341, obtaining storage attribute item categories of the component database.

[0130] The storage attribute item category is used to represent the category division in the component database, and the storage path is saved according to the corresponding storage attribute item category. Figure 5 The component database shown includes five types of storage attribute item categories, namely: meshFile, brepFile, styleFile, blobFile and other data.

[0131] Furthermore, an id is also set in the component database, and the id is used to distinguish different data.

[0132] S342, based on the property items and storage property item categories corresponding to the target file, save the storage path under the corresponding storage property category to determine the component database.

[0133] When the electronic device saves the storage path, it compares the attribute item of the target file corresponding to the storage path with the storage attribute item category to determine the storage attribute category of the storage path of the target file in the component database to obtain the component database.

[0134] Figure 5 The storage diagram of the target file is shown, which includes two parts, one is the component file data, and the other is the component database. Specifically, the target file corresponding to the attribute item to be stored is stored in the component file data, and the storage path corresponding to each target file is saved using the component database, and each data in the component database represents the storage path of the corresponding target file.

[0135] In this embodiment, the component file data is stored in the server side, and the data application needs to download the data to the local through the network before it can be used. In order to facilitate parallel downloading and reduce the cost of failed retransmission, the target file can be controlled to about 2M. As mentioned above, the component database can only save the file path, which can reduce the cost of data storage and improve the data API performance. The use of the component database and component file data to save the attribute items to be stored can reduce the peak value of memory usage during the data conversion process and improve the performance of data transmission. Specifically, for example, when the existing method is used for saving, a component has 20 attribute items, and each attribute item is saved in the database. Then, when parsing the database, a large amount of memory needs to be consumed. However, when the method described in this embodiment is used, since only the storage path is saved in the component database, when parsing the component database, the file is small and only a small amount of content needs to be consumed.

[0136] The component data processing method provided in this embodiment uploads files in parallel to improve the data uploading efficiency. Combining the database with the file system can give full play to the advantages of both and further improve the data processing efficiency.

[0137] In this embodiment, a component data processing method is provided, which can be used in electronic devices such as computers, mobile phones, tablet computers, etc. In this embodiment, reading corresponding data is taken as an example for description, and the data storage process can be referred to above, which will not be repeated here. Figure 6 is a flowchart of a method for processing component data according to an embodiment of the present invention. Figure 6 As shown, the process includes the following steps:

[0138] S41, obtaining at least one attribute item to be stored of the target component.

[0139] For details, please see Figure 4 S31 of the illustrated embodiment will not be described in detail here.

[0140] S42, saving at least one attribute item to be stored into corresponding files respectively to obtain a target file.

[0141] For details, please see Figure 4 S32 of the illustrated embodiment will not be described in detail here.

[0142] S43, storing the target file and saving the storage path of the target file.

[0143] For details, please see Figure 4 S33 of the illustrated embodiment will not be described in detail here.

[0144] S44, determining a component database based on the storage path.

[0145] For details, please see Figure 4 S34 of the illustrated embodiment will not be described in detail here.

[0146] S45, obtaining a data access request.

[0147] The data access request carries the identifier of the target data.

[0148] The data access request may be obtained by the electronic device from other terminals, may be sent by the user through the electronic device, or may be obtained by the electronic device through other means, and no limitation is made here.

[0149] S46, querying the component database based on the identification of the target data to determine the target storage path of the target data.

[0150] After obtaining the data access request, the electronic device first queries the component database using the identifier of the target data to determine the target storage path of the target data.

[0151] S47, extracting target data using the target storage path.

[0152] After the electronic device determines the target storage path in the component database, the corresponding target data can be extracted using the target storage path.

[0153] like Figure 5 As shown, the electronic device first determines the target storage path from the component database using the identifier of the target data, and then extracts the target data from the component file data using the target storage path.

[0154] The component data processing method provided in this embodiment obtains the target storage path of the target data from the component database to extract the target data, which can reduce the data access amount and improve the data reading efficiency.

[0155] In the present embodiment, a processing device for component data is also provided, and the device is used to implement the above-mentioned embodiment and preferred implementation mode, and the description has been made no further. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented with software, the implementation of hardware, or a combination of software and hardware is also possible and conceived.

[0156] This embodiment provides a component data processing device, such as Figure 7 As shown, including:

[0157] An acquisition module 51 is used to acquire at least one attribute item to be stored of a target component;

[0158] A saving module 52, used for saving the at least one attribute item to be stored into corresponding files respectively to obtain a target file;

[0159] A storage module 53, used for storing the target file and saving the storage path of the target file;

[0160] The determination module 54 is used to determine the component database based on the storage path.

[0161] The component data processing device provided in this embodiment stores the attribute items to be stored in a file to obtain a target file, and stores the target file to obtain a storage path. In the component database, only the storage path needs to be guaranteed, rather than the attribute items to be stored, which reduces the data storage cost and improves the data reading and writing performance.

[0162] The component data processing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.

[0163] The further functional description of each of the above modules is the same as that of the above corresponding embodiments and will not be repeated here.

[0164] The embodiment of the present invention also provides an electronic device having the above Figure 7 The component data processing device shown.

[0165] See also Figure 8 , Figure 8 is a schematic diagram of the structure of an electronic device provided by an optional embodiment of the present invention, such as Figure 8 As shown, the electronic device may include: at least one processor 61, such as a CPU (Central Processing Unit), at least one communication interface 63, a memory 64, and at least one communication bus 62. The communication bus 62 is used to realize the connection and communication between these components. The communication interface 63 may include a display screen (Display) and a keyboard (Keyboard), and the optional communication interface 63 may also include a standard wired interface and a wireless interface. The memory 64 may be a high-speed RAM memory (Random Access Memory) or a non-volatile memory (non-volatile memory), such as at least one disk storage. The memory 64 may optionally be at least one processing device located away from the aforementioned processor 61. The processor 61 may be combined with Figure 7In the described device, the memory 64 stores an application program, and the processor 61 calls the program code stored in the memory 64 to execute any of the above method steps.

[0166] The communication bus 62 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus. The communication bus 62 may be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 8 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.

[0167] Among them, the memory 64 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 64 may also include a combination of the above types of memory.

[0168] The processor 61 may be a central processing unit (CPU), a network processor (NP), or a combination of a CPU and a NP.

[0169] The processor 61 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof.

[0170] Optionally, the memory 64 is also used to store program instructions. The processor 61 can call the program instructions to implement the present application Figure 2-4 as well as Figure 6 The component data processing method shown in the embodiment.

[0171] The embodiment of the present invention further provides a non-transitory computer storage medium, wherein the computer storage medium stores computer executable instructions, and the computer executable instructions can execute the component data processing method in any of the above method embodiments. The storage medium can be a disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk (HDD) or a solid-state drive (SSD), etc.; the storage medium can also include a combination of the above types of memory.

[0172] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A method for processing component data, characterized in that: include: Obtain at least one attribute item to be stored of the target component; Saving the at least one attribute item to be stored in corresponding files respectively to obtain a target file; Storing the target file and saving the storage path of the target file; A component database is determined based on the storage path, and the component database is used to store the storage path of the target file.

2. The processing method according to claim 1, characterized in that: The step of saving the at least one attribute item to be stored into corresponding files to obtain a target file includes: Saving the attribute items to be stored in a corresponding file to obtain a compressed file; At least one of the compressed files is merged to obtain the target file.

3. The processing method according to claim 2, characterized in that: The step of merging at least one of the compressed files to obtain the target file comprises: Obtain a compressed file corresponding to at least one attribute item to be stored of the same type; The obtained compressed files are merged to obtain the target file.

4. The processing method according to claim 2 or 3, characterized in that: The step of merging at least one of the compressed files to obtain the target file comprises: Acquire at least one compressed file whose relevance meets a preset condition; At least one compressed file that meets the preset condition is merged to obtain the target file.

5. The processing method according to claim 1, characterized in that: The storing the target file and saving the storage path of the target file includes: Uploading the target files to a preset location in parallel to determine component file data; The preset location corresponding to the target file is saved to obtain the storage path.

6. The processing method according to claim 5, characterized in that: The determining of the component database based on the storage path comprises: Obtaining a storage attribute item category of the component database; Based on the attribute item corresponding to the target file and the storage attribute item category, the storage path is saved under the corresponding storage attribute category to determine the component database.

7. The processing method according to claim 1, characterized in that: The method further comprises: Obtaining a data access request, wherein the data access request carries an identifier of the target data; Based on the identifier of the target data, the component database is queried to determine the target storage path of the target data; The target data is extracted using the target storage path.

8. A component data processing device, characterized in that: include: An acquisition module, used for acquiring at least one attribute item to be stored of a target component; A saving module, used for saving the at least one attribute item to be stored into corresponding files respectively to obtain a target file; A storage module, used for storing the target file and saving the storage path of the target file; The determination module is used to determine a component database based on the storage path, and the component database is used to store the storage path of the target file.

9. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the component data processing method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the component data processing method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • Ship data index establishing method, loading method, device and computer equipment

    CN109471855A