CN111597364A - Engineering quantity calculation intermediate layer generation method and device, storage medium and electronic equipment - Google Patents

Engineering quantity calculation intermediate layer generation method and device, storage medium and electronic equipment Download PDF

Info

Publication number
CN111597364A
CN111597364A CN202010227732.XA CN202010227732A CN111597364A CN 111597364 A CN111597364 A CN 111597364A CN 202010227732 A CN202010227732 A CN 202010227732A CN 111597364 A CN111597364 A CN 111597364A
Authority
CN
China
Prior art keywords
primitive
data
storing
identifier
main thread
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202010227732.XA
Other languages
Chinese (zh)
Other versions
CN111597364B (en
Inventor
秦国海
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Glodon Co Ltd
Original Assignee
Glodon Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Glodon Co Ltd filed Critical Glodon Co Ltd
Priority to CN202010227732.XA priority Critical patent/CN111597364B/en
Publication of CN111597364A publication Critical patent/CN111597364A/en
Application granted granted Critical
Publication of CN111597364B publication Critical patent/CN111597364B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/50Information retrieval; Database structures therefor; File system structures therefor of still image data
    • G06F16/51Indexing; Data structures therefor; Storage structures

Abstract

The embodiment of the invention relates to a method and a device for generating an intermediate layer for calculating engineering quantity, a storage medium and electronic equipment, wherein the method comprises the following steps: when a target project is operated, a main thread timer corresponding to the target project is created; acquiring a first identifier of a primitive contained in the target project, and storing the first identifier into a primitive list to be generated; when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated; and storing the first graphic element data into a file according to a preset storage mode.

Description

Engineering quantity calculation intermediate layer generation method and device, storage medium and electronic equipment
Technical Field
The embodiment of the invention relates to the technical field of engineering quantity calculation, in particular to a method and a device for generating an engineering quantity calculation intermediate layer, a storage medium and electronic equipment.
Background
With the improvement of the requirement of people on the computing performance of engineering quantity, people increasingly expect that the computing time in the process of computing quantity is as short as possible and real-time computing can be realized at best, so various solutions such as multi-thread computing, distributed computing, cloud computing and the like are produced at the same time.
However, the amount of engineering calculation design data is large, processing links are many, especially for some large projects, such as 10 ten thousand primitives and 20 ten thousand primitives, which requires tens of minutes or even hours for calculation once, the calculation efficiency is low, and the user experience is poor.
Disclosure of Invention
In view of this, to solve the above technical problem or some technical problems, embodiments of the present invention provide a method and an apparatus for generating an engineering quantity calculation intermediate layer, a storage medium, and an electronic device.
In a first aspect, an embodiment of the present invention provides a method for generating an intermediate layer for calculating an engineering quantity, where the method includes:
when a target project is operated, a main thread timer corresponding to the target project is created;
acquiring a first identifier of a primitive contained in the target project, and storing the first identifier into a primitive list to be generated;
when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated;
and storing the first graphic element data into a file according to a preset storage mode.
In one possible embodiment, the method further comprises:
when the model in the target project is edited, determining a second identifier of the edited primitive from the primitives contained in the target project, and storing the second identifier into a primitive updating list;
when the main thread timer is triggered, generating second primitive data corresponding to the second identifier in the primitive update list;
and updating the second primitive data into a file.
In a possible embodiment, the storing the first primitive data in a file according to a preset storage manner includes:
storing the first primitive data into a cache;
and when the quantity of the first primitive data in the cache exceeds a preset threshold value, storing the first primitive data in the cache into a file according to a preset storage mode.
In a possible embodiment, the storing the first primitive data in a file according to a preset storage manner includes:
and averagely distributing the first primitive data and storing the first primitive data into a plurality of files.
In a possible embodiment, the generating, when the main thread timer is triggered, first primitive data corresponding to the first identifier in the primitive list to be generated includes:
monitoring whether the main thread is in an idle state;
if the main thread is in an idle state, triggering the main thread timer;
and when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated.
In a second aspect, an embodiment of the present invention provides an engineering quantity calculation intermediate layer generation apparatus, where the apparatus includes:
the timer creating module is used for creating a main thread timer corresponding to a target project when the target project is operated;
the identification storage module is used for acquiring a first identification of the primitive contained in the target project and storing the first identification into a primitive list to be generated;
the first generation module is used for generating first primitive data corresponding to the first identifier in the primitive list to be generated when the main thread timer is triggered;
and the data storage module is used for storing the first primitive data into a file according to a preset storage mode.
In one possible embodiment, the apparatus further comprises:
the identification determining module is used for determining a second identification of the edited graphic primitive from the graphic primitives contained in the target project when the model in the target project is edited, and storing the second identification into a graphic primitive updating list;
the second generation module is used for generating second primitive data corresponding to the second identifier in the primitive update list when the main thread timer is triggered;
and the data updating module is used for updating the second primitive data into a file.
In one possible implementation, the data storage module is specifically configured to:
storing the first primitive data into a cache;
and when the quantity of the first primitive data in the cache exceeds a preset threshold value, storing the first primitive data in the cache into a file according to a preset storage mode.
In a third aspect, an embodiment of the present invention provides a storage medium, where one or more programs are stored, and the one or more programs are executable by one or more processors to implement the foregoing engineering quantity calculation intermediate layer generation method.
In a fourth aspect, an embodiment of the present invention provides an electronic device, including: the processor is used for executing the engineering quantity calculation intermediate layer generation program stored in the memory so as to realize the engineering quantity calculation intermediate layer generation method.
According to the technical scheme provided by the embodiment of the invention, the main thread timer corresponding to the target project is created, the first identification of the primitive contained in the target project is obtained and stored in the primitive list to be generated, when the main thread timer is triggered, the first primitive data corresponding to the first identification in the primitive list to be generated is generated, and the first primitive data is stored in the file according to the preset storage mode, so that the intermediate layer is calculated based on the quantity of the primitive generation project, and the calculation efficiency and the user experience are improved.
Drawings
In order to more clearly illustrate the embodiments of the present specification or the technical solutions in the prior art, the drawings needed to be used in the description of the embodiments or the prior art will be briefly described below, it is obvious that the drawings in the following description are only some embodiments described in the embodiments of the present specification, and other drawings can be obtained by those skilled in the art according to the drawings.
FIG. 1 is a schematic diagram illustrating a specific structure of an engineering quantity calculation intermediate layer according to an embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a specific configuration of primitive data according to an embodiment of the present invention;
fig. 3 is a schematic flow chart illustrating an implementation of a method for generating an intermediate layer for calculating engineering quantity according to an embodiment of the present invention;
FIG. 4 is a diagram illustrating an embodiment of storing primitive data;
FIG. 5 is a diagram illustrating a primitive update according to an embodiment of the present invention;
FIG. 6 is a schematic structural diagram of an engineering calculation intermediate layer generation apparatus according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
For the convenience of understanding of the embodiments of the present invention, the following description will be further explained with reference to specific embodiments, which are not to be construed as limiting the embodiments of the present invention.
In the embodiment of the present invention, the inventive concept of the embodiment of the present invention is described first, and the intermediate layer for calculating the engineering quantity is composed of primitive data, component data, engineering setting information, calculation setting information, and the like, where the primitive data occupies most of the intermediate layer for calculating the engineering quantity, and simultaneously occupies almost all of the intermediate layer for calculating the engineering quantity, as shown in fig. 1, which is a specific configuration of the intermediate layer for calculating the engineering quantity.
Through analysis, the intermediate layer for calculating the engineering quantity shown in fig. 1 has small data quantity except for the primitive data, but the logical relationship is very complex, and it is difficult to extract the increment generation, and it is important to see the primitive data occupying the largest proportion, as shown in fig. 2, which is a specific composition of the primitive data.
As can be seen from fig. 2, the primitive data itself mainly consists of primitive attribute data and primitive geometric data, and the geometric data of the primitives in the actual computation model is calculated from the attribute data, so that theoretically, only the primitive attribute data needs to be monitored. The embodiment of the invention is an incremental updating scheme (a specific method is shown below) mainly based on a primitive, taking the primitive as a center, combing the relation between the primitive and other data of a middle layer and the relation between the primitive and the whole project, generating data required by the primitive, such as member data and floor data, all of which are included in a monitoring range, and keeping the data synchronous and correct all the time; data irrelevant to the generation of the middle layer, such as calculation setting, table input and the like, can be completely disregarded, so that the incremental processing of main data is ensured, and the complexity of the whole scheme is reduced as much as possible.
As shown in fig. 3, an implementation flow diagram of a method for generating an intermediate layer for calculating engineering quantity according to an embodiment of the present invention is provided, and the method specifically includes the following steps:
s301, when a target project is operated, a main thread timer corresponding to the target project is created;
in the embodiment of the invention, because the computational model is complex, the special creation of one thread in background processing involves a great deal of multi-thread asynchronous processing risks, and data access abnormity is easy to occur. Therefore, a thread internal timer technology is adopted, the timer is triggered to process when the modeling thread is idle, only one primitive is processed at least each time, and one primitive is generally within 10 milliseconds, so that the modeling thread is not influenced by perception, the data processing safety is ensured, and meanwhile, the user operation experience is not influenced.
Based on the above, when the target project is executed, a main thread timer corresponding to the target project is created. Where it may be for the timer that it may enable a specified function to be triggered regularly within the current thread.
S302, acquiring a first identifier of a primitive contained in the target project, and storing the first identifier into a primitive list to be generated;
after the main thread timer corresponding to the target project is created, a first identifier of a primitive included in the target project may be acquired and stored in a list of primitives to be generated. The first identifier may be an ID of a primitive, which is not limited in this embodiment of the present invention.
S303, when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated;
when the main thread timer is triggered, first primitive data corresponding to the first identifier in the primitive list to be generated is generated, specifically, the first primitive data may be generated one by one.
In the embodiment of the present invention, whether the main thread is in an idle state is monitored; if the main thread is in an idle state, triggering the main thread timer; and when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated.
S304, storing the first primitive data into a file according to a preset storage mode.
The main data of the engineering quantity calculation middle layer is primitive data, and there is no relation between primitives, so long as the incremental generation of the primitives is realized, the incremental generation of the whole middle layer (namely the engineering quantity calculation middle layer) is basically realized, and other small amount of data can be generated in real time during click calculation, and the basic principle is shown in fig. 4.
Therefore, the generated first primitive data can be stored in a file according to a preset storage mode. Wherein, the first primitive data is stored in a buffer memory by using a primitive buffer memory technology; and when the quantity of the first primitive data in the cache exceeds a preset threshold value, storing the first primitive data in the cache into a file according to a preset storage mode.
For example, in the embodiment of the present invention, a file is not written once every time a primitive data is generated, the currently generated data is cached in a cache list first, and the file is not written once until the number of cached primitives reaches a certain number (for example, 1000 primitives), so that the performance consumption problem of frequently writing the file is reduced by this method.
In addition, when the model in the target project is edited, determining a second identifier of the edited primitive from the primitives contained in the target project, and storing the second identifier into a primitive updating list; when the main thread timer is triggered, generating second primitive data corresponding to the second identifier in the primitive update list; and updating the second primitive data into a file.
For example, when a user modifies or adds and deletes primitive data, which primitives need to be regenerated or deleted are determined by monitoring the modification of the primitive data, and the specific mode can be through a monitoring database or a monitoring modeling model, wherein the primitive modification related message of the monitoring modeling model obtains the primitive modification message, and then the ID of the modified primitive is obtained and added into a primitive update list;
when a user modifies or adds and deletes component data, the ID of the modified component is obtained through the monitoring component, then all the corresponding primitive IDs are obtained through the component ID, and then the primitive IDs are added into a primitive updating list;
when the primitive exists in the primitive updating list, traversing all primitive IDs in the primitive updating list, retrieving through the stored primitive list, and if the primitive does not exist, directly generating data of the primitive and adding the data into a storage file; if the primitive does not exist in the modeling model, directly finding the storage data of the primitive and deleting the storage data; if the primitive is already in the list of stored primitives, the data of the primitive is generated first, and the file where the primitive is located and the position of the primitive in the file are found for updating.
Incremental updating relates to updating of generated primitive data, updating efficiency is an important index of the method, and how to ensure updating efficiency is an important part of the method.
The invention realizes the quick update of the primitive data by a method of multi-file storage and single file update. The specific method is to divide the graph metadata into a plurality of shares, each share is about 1 million, and when the size of one storage file exceeds 1 million spaces, another file is newly created for storage.
When the primitive data change exists, the invention meets the requirement of the primitive data update on the performance through an integral memory copy method based on memory mapping. The overall details are as follows:
acquiring a change primitive ID;
generating memory data of the middle layer according to the ID;
fluidizing into a byte stream;
finding the file where the data is located according to the ID;
opening an original file in a memory mapping mode;
creating a new file, opening the new file in a memory mapping mode, and setting the file length of the new file through calculation;
copying the data before the primitive to a new file according to the primitive starting position;
writing the byte stream data corresponding to the current graphic element into the tail of the new file;
copying the data after the primitive to the end of the new file according to the end position of the primitive;
and saving the file to complete the updating.
For the convenience of understanding the implementation principle, the time statistics of updating primitives once based on different file sizes are as follows, and a file of 1 million needs about 0 time without updating once. 02 seconds, about 0.05 second is needed for each update of a file of 10 million, about 0.8 second is needed for each update of a primitive of 100 million, and about 6 seconds is needed for each update of a file of 500 million
The primitive list in the embodiment of the invention needs to meet two requirements, one is capable of being found quickly, and the other is capable of ensuring high-efficiency updating. The embodiment of the invention can be quickly searched by utilizing a conventional map mapping table, and the embodiment of the invention is efficiently updated by customizing the linked list structure. Conventionally, the embodiment of the present invention records a file where primitive information is located, and records a start position and an end position of the primitive in the file, so that there is a problem that when data of a primitive is updated, the embodiment of the present invention needs to calculate and update the real positions and end positions of all subsequent primitives, so that the embodiment of the present invention specially designs a linked list data structure that only records the length of the primitive data, as shown below:
struct EDOInfo{
int fileNum;
int length;
EDOInfo*preEDO;
EDOInfo*nextEDO;
int elementID;
}
the structure records basic belonging file information and belonging member information, and simultaneously records the length of the graphic element data and the front and back associated graphic elements. Therefore, the starting and stopping positions of each primitive do not depend on the starting and stopping information recorded by the primitive, but depend on the primitive information before the primitive, so that the embodiment of the invention only needs to change the primitive information when changing the current primitive information, and only needs to change two primitives related to the front and the back of the primitive if the primitive is deleted, thereby greatly improving the efficiency of updating the primitive data.
The position information of each primitive only depends on the length information stored by the primitive and the information of the primitive before the primitive, when the initial position of a certain primitive needs to be calculated, the initial position of the primitive can be calculated only by adding the lengths of all the primitives before the primitive, and the end position of the primitive can be calculated by adding the length of the primitive.
StartPosition=length1+length2+…+length(n-1);
EndPosition=StartPosition+lengthn;
Therefore, the updating speed of the structure is theoretically very fast, only the information of one primitive needs to be updated when the primitive is changed, and the embodiment of the invention becomes very efficient when the local primitive is updated by combining the efficient file updating technology realized in the above.
According to the technical scheme provided by the embodiment of the invention, the main thread timer corresponding to the target project is created, the first identifier of the primitive contained in the target project is obtained and stored in the primitive list to be generated, when the main thread timer is triggered, the first primitive data corresponding to the first identifier in the primitive list to be generated is generated, and the first primitive data is stored in the file according to the preset storage mode, so that the intermediate layer is calculated based on the primitive generation project amount, and the calculation efficiency and the user experience are improved.
With respect to the method embodiment, an embodiment of an apparatus for generating an intermediate layer for calculating an engineering quantity is further provided in the embodiments of the present invention, as shown in fig. 6, the apparatus may include: a timer creating module 610, an identification storage module 620, a first generating module 630, and a data storage module 640.
A timer creating module 610, configured to create a main thread timer corresponding to a target project when the target project is executed;
the identifier storage module 620 is configured to obtain a first identifier of a primitive included in the target project, and store the first identifier in a primitive list to be generated;
a first generating module 630, configured to generate, when the main thread timer is triggered, first primitive data corresponding to the first identifier in the primitive list to be generated;
and the data storage module 640 is configured to store the first primitive data in a file according to a preset storage manner.
Fig. 7 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device 700 shown in fig. 7 includes: at least one processor 701, memory 702, at least one network interface 704, and other user interfaces 703. The various components in the mobile terminal 700 are coupled together by a bus system 705. It is understood that the bus system 705 is used to enable communications among the components. The bus system 705 includes a power bus, a control bus, and a status signal bus in addition to a data bus. But for clarity of illustration the various busses are labeled in figure 7 as the bus system 705.
The user interface 703 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 702 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile memory may be a Read-only memory (ROM), a programmable Read-only memory (PROM), an erasable programmable Read-only memory (erasabprom, EPROM), an electrically erasable programmable Read-only memory (EEPROM), or a flash memory. The volatile memory may be a Random Access Memory (RAM) which functions as an external cache. By way of example, but not limitation, many forms of RAM are available, such as static random access memory (staticiram, SRAM), dynamic random access memory (dynamic RAM, DRAM), synchronous dynamic random access memory (syncronous DRAM, SDRAM), Double Data Rate Synchronous Dynamic Random Access Memory (DDRSDRAM), enhanced synchronous dynamic random access memory (EnhancedSDRAM, ESDRAM), synchronous link dynamic random access memory (synchlink DRAM, SLDRAM), and direct memory bus random access memory (DRRAM). The memory 702 described herein is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 702 stores the following elements, executable units or data structures, or a subset thereof, or an expanded set thereof: an operating system 7021 and application programs 7022.
The operating system 7021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, for implementing various basic services and processing hardware-based tasks. The application 7022 includes various applications, such as a media player (MediaPlayer), a Browser (Browser), and the like, for implementing various application services. Programs that implement methods in accordance with embodiments of the present invention can be included within application program 7022.
In the embodiment of the present invention, the processor 701 is configured to execute the method steps provided by the method embodiments by calling a program or an instruction stored in the memory 702, specifically, a program or an instruction stored in the application 7022, for example, and includes: when a target project is operated, a main thread timer corresponding to the target project is created; acquiring a first identifier of a primitive contained in the target project, and storing the first identifier into a primitive list to be generated; when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated; and storing the first graphic element data into a file according to a preset storage mode.
The method disclosed in the above embodiments of the present invention may be applied to the processor 701, or implemented by the processor 701. The processor 701 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 701. The processor 701 may be a general-purpose processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable gate array (FPGA) or other programmable logic device, discrete gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software elements in the decoding processor. The software elements may be located in ram, flash, rom, prom, or eprom, registers, among other storage media that are well known in the art. The storage medium is located in the memory 702, and the processor 701 reads the information in the memory 702 and performs the steps of the above method in combination with the hardware thereof.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described herein may be implemented by means of units performing the functions described herein. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
The electronic device provided in this embodiment may be the electronic device shown in fig. 7, and may execute all the steps of the method for generating the engineering quantity calculation intermediate layer shown in fig. 3, so as to achieve the technical effect of the method for generating the engineering quantity calculation intermediate layer shown in fig. 3.
The embodiment of the invention also provides a storage medium (computer readable storage medium). The storage medium herein stores one or more programs. Among others, the storage medium may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as read-only memory, flash memory, a hard disk, or a solid state disk; the memory may also comprise a combination of memories of the kind described above.
When one or more programs in the storage medium are executable by one or more processors, the method for generating the engineering quantity calculation intermediate layer, which is executed on the engineering quantity calculation intermediate layer generation device side, is realized.
The processor is configured to execute the engineering quantity calculation intermediate layer generation program stored in the memory to realize the following steps of the engineering quantity calculation intermediate layer generation method executed on the engineering quantity calculation intermediate layer generation device side:
when a target project is operated, a main thread timer corresponding to the target project is created; acquiring a first identifier of a primitive contained in the target project, and storing the first identifier into a primitive list to be generated; when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated; and storing the first graphic element data into a file according to a preset storage mode.
Those of skill would further appreciate that the various illustrative components and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware, computer software, or combinations of both, and that the various illustrative components and steps have been described above generally in terms of their functionality in order to clearly illustrate this interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
The steps of a method or algorithm described in connection with the embodiments disclosed herein may be embodied in hardware, a software module executed by a processor, or a combination of the two. A software module may reside in Random Access Memory (RAM), memory, Read Only Memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
The above-mentioned embodiments are intended to illustrate the objects, technical solutions and advantages of the present invention in further detail, and it should be understood that the above-mentioned embodiments are merely exemplary embodiments of the present invention, and are not intended to limit the scope of the present invention, and any modifications, equivalent substitutions, improvements and the like made within the spirit and principle of the present invention should be included in the scope of the present invention.

Claims (10)

1. A method for generating an engineering quantity calculation intermediate layer is characterized by comprising the following steps:
when a target project is operated, a main thread timer corresponding to the target project is created;
acquiring a first identifier of a primitive contained in the target project, and storing the first identifier into a primitive list to be generated;
when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated;
and storing the first graphic element data into a file according to a preset storage mode.
2. The method of claim 1, further comprising:
when the model in the target project is edited, determining a second identifier of the edited primitive from the primitives contained in the target project, and storing the second identifier into a primitive updating list;
when the main thread timer is triggered, generating second primitive data corresponding to the second identifier in the primitive update list;
and updating the second primitive data into a file.
3. The method according to claim 1, wherein storing the first primitive data in a file according to a preset storage manner comprises:
storing the first primitive data into a cache;
and when the quantity of the first primitive data in the cache exceeds a preset threshold value, storing the first primitive data in the cache into a file according to a preset storage mode.
4. The method according to claim 1, wherein storing the first primitive data in a file according to a preset storage manner comprises:
and averagely distributing the first primitive data and storing the first primitive data into a plurality of files.
5. The method according to claim 1, wherein the generating, when the main thread timer is triggered, first primitive data corresponding to the first identifier in the primitive list to be generated comprises:
monitoring whether the main thread is in an idle state;
if the main thread is in an idle state, triggering the main thread timer;
and when the main thread timer is triggered, generating first primitive data corresponding to the first identifier in the primitive list to be generated.
6. An engineering quantity calculation intermediate layer generation apparatus, characterized by comprising:
the timer creating module is used for creating a main thread timer corresponding to a target project when the target project is operated;
the identification storage module is used for acquiring a first identification of the primitive contained in the target project and storing the first identification into a primitive list to be generated;
the first generation module is used for generating first primitive data corresponding to the first identifier in the primitive list to be generated when the main thread timer is triggered;
and the data storage module is used for storing the first primitive data into a file according to a preset storage mode.
7. The apparatus of claim 6, further comprising:
the identification determining module is used for determining a second identification of the edited graphic primitive from the graphic primitives contained in the target project when the model in the target project is edited, and storing the second identification into a graphic primitive updating list;
the second generation module is used for generating second primitive data corresponding to the second identifier in the primitive update list when the main thread timer is triggered;
and the data updating module is used for updating the second primitive data into a file.
8. The apparatus of claim 6, wherein the data storage module is specifically configured to:
storing the first primitive data into a cache;
and when the quantity of the first primitive data in the cache exceeds a preset threshold value, storing the first primitive data in the cache into a file according to a preset storage mode.
9. An electronic device, comprising: a processor and a memory, wherein the processor is used for executing the engineering quantity calculation intermediate layer generation program stored in the memory so as to realize the engineering quantity calculation intermediate layer generation method of any one of claims 1 to 5.
10. A storage medium storing one or more programs executable by one or more processors to implement the engineering quantity calculation intermediate layer generation method according to any one of claims 1 to 5.
CN202010227732.XA 2020-03-27 2020-03-27 Engineering quantity calculation middle layer generation method and device, storage medium and electronic equipment Active CN111597364B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010227732.XA CN111597364B (en) 2020-03-27 2020-03-27 Engineering quantity calculation middle layer generation method and device, storage medium and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010227732.XA CN111597364B (en) 2020-03-27 2020-03-27 Engineering quantity calculation middle layer generation method and device, storage medium and electronic equipment

Publications (2)

Publication Number Publication Date
CN111597364A true CN111597364A (en) 2020-08-28
CN111597364B CN111597364B (en) 2024-01-30

Family

ID=72185436

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010227732.XA Active CN111597364B (en) 2020-03-27 2020-03-27 Engineering quantity calculation middle layer generation method and device, storage medium and electronic equipment

Country Status (1)

Country Link
CN (1) CN111597364B (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514112A (en) * 2012-06-29 2014-01-15 浙江大华技术股份有限公司 Data storage method and system
CN103617073A (en) * 2013-11-01 2014-03-05 广东电网公司茂名供电局 Method for analyzing and displaying picture file of electrical power system
CN104240148A (en) * 2014-08-28 2014-12-24 国家电网公司 Power grid visualization method based on plugins
CN105404785A (en) * 2015-12-10 2016-03-16 国网山东省电力公司经济技术研究院 System and method for calculating engineering quantity of basic hole
US20170116700A1 (en) * 2015-10-27 2017-04-27 Nvidia Corporation Techniques for maintaining atomicity and ordering for pixel shader operations
GB201714836D0 (en) * 2017-09-15 2017-11-01 Advanced Risc Mach Ltd Forward killing of threads corresponding to graphics fragments obscured by later graphics fragments
CN109587264A (en) * 2018-12-20 2019-04-05 新华三技术有限公司 Data monitoring method, device and cloud platform server
CN109634724A (en) * 2018-10-16 2019-04-16 深圳壹账通智能科技有限公司 Collecting method, device, equipment and computer storage medium
CN110580188A (en) * 2019-09-05 2019-12-17 珠海格力电器股份有限公司 multithreading network distribution method and storage medium

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103514112A (en) * 2012-06-29 2014-01-15 浙江大华技术股份有限公司 Data storage method and system
CN103617073A (en) * 2013-11-01 2014-03-05 广东电网公司茂名供电局 Method for analyzing and displaying picture file of electrical power system
CN104240148A (en) * 2014-08-28 2014-12-24 国家电网公司 Power grid visualization method based on plugins
US20170116700A1 (en) * 2015-10-27 2017-04-27 Nvidia Corporation Techniques for maintaining atomicity and ordering for pixel shader operations
CN105404785A (en) * 2015-12-10 2016-03-16 国网山东省电力公司经济技术研究院 System and method for calculating engineering quantity of basic hole
GB201714836D0 (en) * 2017-09-15 2017-11-01 Advanced Risc Mach Ltd Forward killing of threads corresponding to graphics fragments obscured by later graphics fragments
CN109634724A (en) * 2018-10-16 2019-04-16 深圳壹账通智能科技有限公司 Collecting method, device, equipment and computer storage medium
CN109587264A (en) * 2018-12-20 2019-04-05 新华三技术有限公司 Data monitoring method, device and cloud platform server
CN110580188A (en) * 2019-09-05 2019-12-17 珠海格力电器股份有限公司 multithreading network distribution method and storage medium

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
张鹏;马琦;聂镭;: "网络环境中GIS图层信息的实时共享" *
林献坤;冯万浩;聂成;朱琳;: "融合机器视觉的制造过程监控组态平台研究" *
郭立君,袁满,高升,文必龙: "基于Epicentre数据模型的图形数据存取规范及实现" *

Also Published As

Publication number Publication date
CN111597364B (en) 2024-01-30

Similar Documents

Publication Publication Date Title
US8996468B1 (en) Block status mapping system for reducing virtual machine backup storage
US11068268B2 (en) Data structure processing
TW201539187A (en) Flash memory compression
US8850148B2 (en) Data copy management for faster reads
CN111881135A (en) Data aggregation method, device, equipment and computer readable storage medium
AU2018306114B2 (en) Dynamic TRIM processing with disk caching
Lee et al. ActiveSort: Efficient external sorting using active SSDs in the MapReduce framework
CN115576501B (en) Node updating method, system and related device of RAID card
CN115237599B (en) Rendering task processing method and device
CN113923472B (en) Video content analysis method, device, electronic equipment and storage medium
TW201435585A (en) Electronic apparatus for data access and data access method therefor
KR20140042431A (en) Computing system and method for managing data in the system
CN111597364A (en) Engineering quantity calculation intermediate layer generation method and device, storage medium and electronic equipment
CN111722800A (en) Method for realizing ROW snapshot of distributed storage system and related components
US20180004412A1 (en) DISK I/O Attribution
Lee et al. Last block logging mechanism for improving performance and lifetime on SCM-based file system
CN116188247B (en) Register information processing method, device, computer equipment and storage medium
CN113821458B (en) Data operation method, device, computer equipment and storage medium
KR102160527B1 (en) Method for Processing Data in In-Memory Database Using Snapshot and In-Memory Database
Park et al. Optimizing Fsync Performance with Dynamic Queue Depth Adaptation
CN117806551A (en) Processing method and device suitable for high-speed data stream
JPH0375942A (en) Editing history control system for file
CN112347037A (en) Snapshot processing method, device, medium and electronic equipment for storage volume
CN116721238A (en) Three-dimensional model batch preview method and device based on Unity3D editor
CN115858423A (en) Switching method and device of cache elimination strategies, electronic equipment and storage medium

Legal Events

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