CN108509220B - Revit engineering calculation amount parallel processing method, device, terminal and medium - Google Patents

Revit engineering calculation amount parallel processing method, device, terminal and medium Download PDF

Info

Publication number
CN108509220B
CN108509220B CN201810282395.7A CN201810282395A CN108509220B CN 108509220 B CN108509220 B CN 108509220B CN 201810282395 A CN201810282395 A CN 201810282395A CN 108509220 B CN108509220 B CN 108509220B
Authority
CN
China
Prior art keywords
component
task
calculation
model
engineering
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.)
Active
Application number
CN201810282395.7A
Other languages
Chinese (zh)
Other versions
CN108509220A (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.)
Xiamen Hymake Technology Co ltd
Original Assignee
Xiamen Hymake Technology 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 Xiamen Hymake Technology Co ltd filed Critical Xiamen Hymake Technology Co ltd
Priority to CN201810282395.7A priority Critical patent/CN108509220B/en
Publication of CN108509220A publication Critical patent/CN108509220A/en
Application granted granted Critical
Publication of CN108509220B publication Critical patent/CN108509220B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/46Multiprogramming arrangements
    • G06F9/48Program initiating; Program switching, e.g. by interrupt
    • G06F9/4806Task transfer initiation or dispatching
    • G06F9/4843Task transfer initiation or dispatching by program, e.g. task dispatcher, supervisor, operating system
    • G06F9/4881Scheduling strategies for dispatcher, e.g. round robin, multi-level priority queues
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F9/00Arrangements for program control, e.g. control units
    • G06F9/06Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
    • G06F9/30Arrangements for executing machine instructions, e.g. instruction decode
    • G06F9/38Concurrent instruction execution, e.g. pipeline or look ahead
    • G06F9/3802Instruction prefetching
    • G06F9/3814Implementation provisions of instruction buffers, e.g. prefetch buffer; banks

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Control By Computers (AREA)

Abstract

The invention discloses a method, a device, a terminal and a medium for parallel processing based on Revit engineering calculated quantity, which comprises the steps of mapping a Revit model into a calculated quantity model, caching data required by the calculation of all the component engineering quantities according to component characteristics in the calculated quantity model, carrying out parallel calculation on all the component engineering quantity data cached in the calculated quantity model, carrying out task scheduling by using a Task Parallel Library (TPL), and controlling the overall progress of the component engineering quantity calculation until the parallel calculation is completed. That is to say, the data required by the component engineering quantity calculation is completely cached in a caching mode and then is subjected to parallel calculation, and the progress of each calculation task is monitored by the task parallel library TPL, so that the parallel processing of the Revit engineering calculation quantity is realized, the working efficiency and the software performance of the Revit engineering calculation quantity are improved, and meanwhile, the user experience and the software competitiveness are improved.

Description

Revit engineering calculation amount parallel processing method, device, terminal and medium
Technical Field
The invention relates to the technical field of building information processing, in particular to a method, a device, a terminal and a medium for parallel processing based on Revit engineering calculated quantity.
Background
Revit is the name of a suite of software series available from Autodesk. The Revit series software is specially constructed for Building Information Modeling (BIM), and can help architects to design, build and maintain buildings with better quality and higher energy efficiency. Revit is one of the most widely used software in BIM system in the construction industry in China. Due to the high number of uses, the demand for supporting the amount of BIM engineering calculations based on software development is increasing. With the increasing of the BIM model, the calculation amount of software is also increased, and the calculation time of the whole project is increased no matter the calculation amount of civil engineering and steel bar engineering or the calculation amount of electromechanical specialty installation.
In addition, at present, multi-core of hardware processors has become popular, and the computing power of hardware is increasing. If software is unable to fully utilize these enhanced computing capabilities, the benefits of advances in computer hardware technology are not realized. At present, the computation amount of software is more and more complex, the linear data processing is realized, the performance is low, the working efficiency is low, the user experience is extremely poor, and the competitiveness of the software is further reduced. Therefore, it is desirable to provide a fast processing method based on the amount of Revit engineering calculation.
Disclosure of Invention
The embodiment of the invention provides a method, a device, a terminal and a medium for parallel processing based on Revit engineering calculated quantity, which are used for solving the problems of low performance, low working efficiency, poor user experience and weak software competitiveness caused by the adoption of a linear data processing mode in the conventional Revit engineering calculated quantity.
The embodiment of the invention provides a parallel processing method based on Revit engineering calculated quantity, which comprises the following steps:
mapping the Revit model into a computation model, and caching data required by the calculation of all component engineering quantities according to component characteristics in the computation model;
performing parallel computation on all the component engineering quantity data cached in the computation quantity model;
and performing task scheduling by using a Task Parallel Library (TPL) to control the overall progress of the component engineering quantity calculation until the parallel calculation is completed.
Further, as an executable scheme, the caching data required by all component engineering quantity calculation according to the component features in the calculation quantity model comprises:
generating a corresponding calculation service object through a component calculator factory according to the calculation model type of the component;
and caching the component engineering quantity data according to a caching method provided by the computing service object.
Further, as an executable scheme, the parallel computation of all the component engineering quantity data cached in the computation quantity model includes the following steps:
step 1: the task progress controller creates a task, and the task is derived from TPL;
step 2: the task creates a component calculator and associates corresponding components;
and step 3: the component calculator calculates the engineering quantity of the component;
and 4, step 4: and (4) circularly executing the step 1 to the step 3 until all the components are allocated with the component calculator for calculation, and stopping creating the task by the task progress controller.
Further, as an executable scheme, in executing the step 1: before the task schedule controller creates a task, the method further comprises:
the task progress controller calculates the number of tasks task to be created for the plan based on the computing system configuration and the number of components.
Further, as an executable scheme, the task scheduling is performed by using the task parallel library TPL, and the overall progress of the component engineering quantity calculation is controlled, including:
putting the computing task of each component calculator into a sub-thread by utilizing TPL (thread to load) for parallel computing, and controlling and displaying a progress bar of the computing task of each component calculator;
and after the parallel computation of the component engineering quantity is finished, calling a countdown activity event to finish the processing task, and closing the progress bar.
Further, an embodiment of the present invention further provides a device for parallel processing based on Revit engineering computation load, where the device includes:
the cache unit is used for mapping the Revit model into an operand model and caching data required by the engineering quantity calculation of all components according to the component characteristics in the operand model;
the calculation unit is used for carrying out parallel calculation on all the component engineering quantity data cached in the calculation quantity model;
and the control unit is used for scheduling tasks by utilizing the task parallel library TPL and controlling the overall progress of the component engineering quantity calculation until the parallel calculation is completed.
Further, an embodiment of the present invention further provides a Revit engineering computation workload-based parallel processing terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, where the processor implements the steps of the method when executing the computer program.
Further, an embodiment of the present invention also provides a computer-readable storage medium, which stores a computer program, wherein the computer program is characterized in that, when being executed by a processor, the computer program implements the steps of the method as described above.
The invention has the following beneficial effects:
the embodiment of the invention provides a Revit engineering calculation amount-based parallel processing method, a device, a terminal and a medium, which comprises the steps of mapping a Revit model into a calculation amount model, caching data required by calculation of all component engineering amounts according to component characteristics in the calculation amount model, carrying out parallel calculation on all component engineering amount data cached in the calculation amount model, carrying out task scheduling by using a Task Parallel Library (TPL), and controlling the overall progress of the component engineering amount calculation until the parallel calculation is completed. That is to say, the data required by the component engineering quantity calculation is completely cached in a caching mode and then is subjected to parallel calculation, and the progress of each calculation task is monitored by the task parallel library TPL, so that the parallel processing of the Revit engineering calculation quantity is realized, the working efficiency and the software performance of the Revit engineering calculation quantity are improved, and meanwhile, the user experience and the software competitiveness are improved.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the drawings needed to be used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings based on these drawings without creative efforts.
Fig. 1 is a schematic flow chart illustrating a method for parallel processing based on Revit engineering computation load according to a first embodiment of the present invention;
fig. 2 is a schematic diagram illustrating a mapping relationship between a Revit model and a computational model according to a first embodiment of the present invention;
FIG. 3 is a schematic diagram illustrating a workflow of each functional module of a component engineering quantity data cache according to an embodiment of the present invention;
FIG. 4 is a schematic diagram illustrating a workflow of each functional module of parallel computing according to a first embodiment of the present invention;
FIG. 5 is a schematic diagram illustrating a workflow of each functional module for task scheduling according to an embodiment of the present invention;
FIG. 6 is a schematic diagram illustrating a design flow of a multitasking progress bar according to an embodiment of the present invention;
fig. 7 is a schematic structural diagram of a parallel processing apparatus based on Revit engineering computation load according to the second embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention clearer, the present invention will be described in further detail with reference to the accompanying drawings, and it is apparent that the described embodiments are only a part of the embodiments of the present invention, not all of the embodiments. 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.
Example one
An embodiment of the present invention provides a method for parallel processing based on Revit engineering computation load, as shown in fig. 1, which is a schematic flow diagram of the method for parallel processing based on Revit engineering computation load according to the embodiment of the present invention, and the method includes:
step 101: and mapping the Revit model into an operand model, and caching data required by the engineering quantity calculation of all components according to the component characteristics in the operand model.
The mapping relation between the Revit model and the computation model can be shown in FIG. 2, the computation model in the application refers to a predefined component template meeting budget requirements, the template appoints information such as profession and category to which a component belongs, and appoints characteristic parameters and calculation items of the component.
Specifically, mapping the Revit model to the operand model may be performed as the following operational steps:
step S1, an object (hereinafter referred to as a building block) for each family instance of the structural part in the Revit model is generated for convenient operation. This object will reference the family instance of Revit and encapsulate some necessary information, such as a list of feature parameters, a list of computing items, etc. In the process, a component list is generated, and the components in the component list are one of basic data relied on by the invention.
Step S2, the generated member is associated (mapped) with an operand model (such as a frame column, a frame beam, a concrete wall and the like) meeting the operand requirement, and the method specifically comprises the following steps:
1. and updating the component list to adapt to the change of the Revit model, if the family examples are added in the Revit model, correspondingly generating new components, adding the component list, and if some family examples are deleted, correspondingly deleting the corresponding components from the component list.
2. Automatic mapping, matching the component to a (predefined) computation model that meets the computation requirements according to predefined model mapping rules. A most possible calculation quantity model is selected from the calculation quantity model library according to the type name of the component and the mapping rule. If the name of the component cannot be automatically mapped, no identification is returned, and at this time, the quantity model can be manually calculated for the component.
3. The mapping is manually changed, and after automatic mapping, when the matching result is not satisfactory or an unidentified component exists, the calculation quantity model can be manually appointed for the component.
4. Establishing a relation, associating the computation model for the component when determining after confirming the computation model corresponding to the component, and initializing a parameter and a computation result list of the component.
After the mapping relationship is established, in one example, the caching data required for engineering quantity calculation of all the components according to the component features in the calculation quantity model includes:
generating a corresponding calculation service object through a component calculator factory according to the calculation model type of the component;
and caching the component engineering quantity data according to a caching method provided by the computing service object.
The computing model types such as frame columns, frame beams, concrete walls and the like need to use functional modules such as a data cache controller, a member, a calculator factory, a member calculator, a Revit Element and the like when the actual caching operation is carried out, a cache database cacheData service is provided for realizing the computing of the computing model, each type of calculator stores data needing to be cached into a cache data list of the member according to business computing requirements such as civil engineering, installation, reinforcing steel bars and the like, each type of calculator realizes computing logic according to the business computing requirements such as civil engineering, installation, reinforcing steel bars and the like, all data access requests generated in the running process of the computing logic are obtained from the cache data list of the related member, wherein the calculator factory is used for registering the calculator service and is associated with the model characteristics of the member so as to be used externally; the data cache controller is used for controlling the execution flow of all component data caches; revit Element is an Element in the Revit model. In particular, the functional module workflow diagram may be as shown in fig. 3.
Step 102: and carrying out parallel computation on all the component engineering quantity data cached in the computation quantity model.
Specifically, as an executable scheme, the parallel computation of all the component engineering quantity data cached in the computation quantity model includes the following steps:
step 1: the task progress controller creates a task, and the task is derived from TPL;
step 2: the task creates a component calculator and associates corresponding components;
and step 3: the component calculator calculates the engineering quantity of the component;
and 4, step 4: and (4) circularly executing the step 1 to the step 3 until all the components are allocated with the component calculator for calculation, and stopping creating the task by the task progress controller.
The task progress controller is initialized, a task progress notification mechanism is realized by a CountdownEvent of net in the initialization process, and specifically, a CountdownEvent semaphore is initialized firstly; secondly, setting task scheduling, and putting CountdownEvent.Signal () into a main thread for execution through a task scheduling method to inform that the task is completed; finally, to ensure that the main thread is in a non-blocking state, steps 1, 2 are placed in the sub-thread for execution.
It should be noted that, in one example, in the step 1: before the task schedule controller creates a task, the method further comprises:
the task progress controller calculates the number of tasks task to be created for the plan based on the computing system configuration and the number of components.
That is, for the compute task internal execution logic, first the child task number is programmed by parallel. Secondly, executing the logic of the calculator through the sub task, wherein the calculator uses the component and the cache data thereof as input data to calculate the engineering quantity; and finally, utilizing the characteristic of parallel. ForEach blocking to wait for the end of the execution of each sub task. The main flow diagram of parallel computing can be as shown in fig. 4.
Step 103: and performing task scheduling by using a Task Parallel Library (TPL) to control the overall progress of the component engineering quantity calculation until the parallel calculation is completed.
Specifically, as an executable scheme, the task scheduling is performed by using a task parallel library TPL, and the overall progress of the component engineering quantity calculation is controlled, including:
putting the calculation task of each component calculator into a main thread by utilizing TPL (thread per load) for parallel calculation, and controlling and displaying a progress bar of the calculation task of each component calculator;
and after the parallel computation of the component engineering quantity is finished, calling a countdown activity event to finish the processing task, and closing the progress bar.
It should be noted that Task scheduling specifically adopts Task Parallel Library in the technology of Net Parallel framework (Net Parallel framework). In the actual transferring operation process, functional modules such as a calculation progress controller, component engineering quantity parallel calculation, a multi-task progress bar, a CountDownEvent and the like are needed, wherein the calculation progress controller is mainly used for displaying the calculation task progress bar, and after a task is started, an ending processing task is immediately started to wait for other tasks being executed to end; the multitask progress bar can be used for adding a plurality of task information and displaying the execution progress of each task, and the sub-tasks report the progress through the report interface of the multitask progress bar; and after the parallel computation of the component engineering quantity is finished, calling a Singal method of CountDownEvent to send a signal, finishing processing task, waiting until the signal is obtained, and closing the progress bar. This concludes the calculation. Specifically, the work flow chart of each functional module is shown in fig. 5.
Regarding the multitask progress bar, the design flow chart can be as shown in fig. 6. The irreport interface returned by the task Progress bar is used for reporting the Progress of task report in the construction project amount parallel computing, and the implementation is realized by adopting a Progress < T > object in the net technology so as to meet the multithreading operation.
The embodiment of the invention provides a Revit engineering calculation amount-based parallel processing method, which comprises the steps of mapping a Revit model into a calculation amount model, caching data required by calculation of all component engineering amounts according to component characteristics in the calculation amount model, carrying out parallel calculation on all component engineering amount data cached in the calculation amount model, carrying out task scheduling by using a Task Parallel Library (TPL), and controlling the overall progress of the component engineering amount calculation until the parallel calculation is completed. That is to say, the data required by the component engineering quantity calculation is completely cached in a caching mode and then is subjected to parallel calculation, and the progress of each calculation task is monitored by the task parallel library TPL, so that the parallel processing of the Revit engineering calculation quantity is realized, the working efficiency and the software performance of the Revit engineering calculation quantity are improved, and meanwhile, the user experience and the software competitiveness are improved.
Example two
An embodiment of the present invention provides a parallel processing apparatus based on Revit engineering computation amount, as shown in fig. 7, which is a schematic structural diagram of the parallel processing apparatus based on Revit engineering computation amount according to the embodiment of the present invention, and the apparatus includes:
the cache unit 71 is used for mapping the Revit model into an operand model and caching data required by the engineering quantity calculation of all components according to the component characteristics in the operand model;
the calculation unit 72 is used for performing parallel calculation on all the component engineering quantity data cached in the calculation quantity model;
and the control unit 73 can be used for scheduling tasks by using the task parallel library TPL and controlling the overall progress of the component engineering quantity calculation until the parallel calculation is completed.
Further, as an executable solution, the cache unit 71 may be specifically configured to generate a corresponding computing service object through a component calculator factory according to a class of a computation model to which a component belongs; and caching the component engineering quantity data according to a caching method provided by the computing service object.
Further, as an executable scheme, the computing unit 72 may be specifically configured to create a task by the task schedule controller, where the task is derived from the TPL; the task creates a component calculator and associates corresponding components; the component calculator calculates the engineering quantity of the component; and circularly executing the steps until all the components are allocated with the component calculator for calculation, and stopping creating the task by the task progress controller.
Further, as an executable solution, the calculating unit 72 may be further configured to calculate the number of planned created task tasks according to the computing system configuration and the number of components before the task schedule controller creates a task.
Further, as an executable solution, the control unit 73 may be specifically configured to put the computing task of each component calculator into a sub-thread by using the TPL for parallel computing, and control a progress bar that displays the computing task of each component calculator; and after the parallel computation of the component engineering quantity is finished, calling a countdown activity event to finish the processing task, and closing the progress bar.
The second embodiment of the invention provides a Revit engineering computation workload-based parallel processing device, which is used for caching all data required by component engineering computation in a caching mode and then performing parallel computation, and a Task Parallel Library (TPL) is used for monitoring the progress of each computation task, so that the Revit engineering computation workload is processed in parallel, the working efficiency and the software performance of the Revit engineering computation workload are improved, and meanwhile, the user experience and the competitiveness of software are improved.
Further, an embodiment of the present invention further provides a Revit engineering computation amount-based parallel processing terminal device, which includes a memory, a processor, and a computer program that is stored in the memory and can be run on the processor, where the processor executes the computer program to implement the steps in the foregoing method embodiments of the present invention, for example, the method steps such as steps 101 to 103 shown in fig. 1. Alternatively, the processor implements the functions of the modules/units in the device embodiments, for example, the functions of the units such as the cache unit 71, the calculation unit 72, and the control unit 73, when executing the computer program.
Illustratively, the computer program may be partitioned into one or more modules/units that are stored in the memory and executed by the processor to implement the invention. The one or more modules/units may be a series of instruction segments of a computer program capable of performing specific functions, and the instruction segments are used for describing the execution process of the computer program in the Revit engineering computation amount based parallel processing terminal device. For example, the computer program may be divided into the above-mentioned buffer unit 71, calculation unit 72, and control unit 73, and the specific functions of each unit are as follows:
the cache unit 71 is used for mapping the Revit model into an operand model and caching data required by the engineering quantity calculation of all components according to the component characteristics in the operand model;
the calculation unit 72 is used for performing parallel calculation on all the component engineering quantity data cached in the calculation quantity model;
and the control unit 73 can be used for scheduling tasks by using the task parallel library TPL and controlling the overall progress of the component engineering quantity calculation until the parallel calculation is completed.
Further, as an executable scheme, the Revit engineering computation-based parallel processing terminal device may be a desktop computer, a notebook, a palm computer, a cloud server, and other computing devices. The Revit engineering computation amount-based parallel processing terminal device can comprise, but is not limited to, a processor and a memory. Those skilled in the art will understand that the above-mentioned constituent structure of the Revit engineering computation amount-based parallel processing terminal device is only an example of the Revit engineering computation amount-based parallel processing terminal device, and does not constitute a limitation on the Revit engineering computation amount-based parallel processing terminal device, and may include more or less components than the above, or combine some components, or different components, for example, the Revit engineering computation amount-based parallel processing terminal device may further include an input-output device, a network access device, a bus, and the like, which is not limited in this embodiment of the present invention.
Further, as an executable solution, the Processor may be a Central Processing Unit (CPU), other 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, a discrete Gate or transistor logic device, a discrete hardware component, and the like. The general-purpose processor may be a microprocessor, or the processor may be any conventional processor, and the processor is a control center of the Revit engineering calculation amount-based parallel processing terminal device, and various interfaces and lines are used to connect various parts of the entire Revit engineering calculation amount-based parallel processing terminal device.
The memory can be used for storing the computer program and/or the module, and the processor realizes various functions of the Revit engineering computation-based parallel processing terminal device by running or executing the computer program and/or the module stored in the memory and calling data stored in the memory. The memory may mainly include a storage program area and a storage data area, wherein the storage program area may store an operating system, an application program required for at least one function (such as a sound playing function, an image playing function, etc.), and the like. In addition, the memory may include high speed random access memory, and may also include non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a Smart Media Card (SMC), a Secure Digital (SD) Card, a Flash memory Card (Flash Card), at least one magnetic disk storage device, a Flash memory device, or other volatile solid state storage device.
Further, an embodiment of the present invention also provides a computer-readable storage medium, in which a computer-readable storage medium is stored, and the computer-readable storage medium stores a computer program, and the computer program, when executed by a processor, implements the steps of the above method of the embodiment of the present invention.
The Revit engineering computation amount-based parallel processing terminal device integrated module/unit can be stored in a computer-readable storage medium if it is implemented in the form of a software functional unit and sold or used as an independent product. Based on such understanding, all or part of the flow of the method according to the embodiments of the present invention may also be implemented by a computer program, which may be stored in a computer-readable storage medium, and when the computer program is executed by a processor, the steps of the method embodiments may be implemented. Wherein the computer program comprises computer program code, which may be in the form of source code, object code, an executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, usb disk, removable hard disk, magnetic disk, optical disk, computer Memory, Read-Only Memory (ROM), Random Access Memory (RAM), electrical carrier wave signals, telecommunications signals, software distribution medium, and the like. It should be noted that the computer readable medium may contain content that is subject to appropriate increase or decrease as required by legislation and patent practice in jurisdictions, for example, in some jurisdictions, computer readable media does not include electrical carrier signals and telecommunications signals as is required by legislation and patent practice.
That is to say, in the embodiment of the present invention, the data required for calculating the engineering quantity of the component is completely cached in a cache manner, and then parallel calculation is performed, and the progress of each calculation task is monitored by the task parallel library TPL, so that parallel processing of the computational quantity of the Revit engineering is achieved, the work efficiency and the software performance of the computational quantity of the Revit engineering are further improved, and meanwhile, the user experience and the competitiveness of the software are also improved.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including preferred embodiments and all such alterations and modifications as fall within the scope of the invention.
It will be apparent to those skilled in the art that various changes and modifications may be made in the present invention without departing from the spirit and scope of the invention. Thus, if such modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention is also intended to include such modifications and variations.

Claims (7)

1. A parallel processing method based on Revit engineering calculated quantity is characterized by comprising the following steps:
mapping the Revit model into a computation model, and caching data required by the calculation of all component engineering quantities according to component characteristics in the computation model;
performing parallel computation on all the component engineering quantity data cached in the computation quantity model;
task scheduling is carried out by utilizing a task parallel library TPL, and the overall progress of component engineering quantity calculation is controlled until parallel calculation is completed;
the computation model refers to a predefined component template meeting budget requirements, the template appoints the professional and category information of the component, and appoints characteristic parameters and computation items of the component;
the mapping the Revit model to the computational model comprises:
generating a convenient operation component for each family example of the structural part in the Revit model;
mapping the generated component with a computation model meeting the computation requirement;
the parallel computation of all the component engineering quantity data cached in the computation quantity model comprises the following steps:
step 1: the task progress controller creates a task, and the task is derived from TPL;
step 2: the task creates a component calculator and associates corresponding components;
and step 3: the component calculator calculates the engineering quantity of the component;
and 4, step 4: circularly executing the step 1 to the step 3 until all the components are allocated with the component calculator for calculation, and stopping creating the task by the task progress controller;
the method comprises the steps that firstly, a task progress controller is initialized, a task progress notification mechanism is realized by a CountdownEvent of net in the initialization process, and specifically, a CountdownEvent semaphore is initialized firstly; secondly, setting task scheduling, and putting CountdownEvent.Signal () into a main thread for execution through a task scheduling method to inform that the task is completed; finally, to ensure that the main thread is in a non-blocking state, steps 1, 2 are placed in the sub-thread for execution.
2. The method of claim 1, wherein caching data required for all component engineering calculations based on component features in the computational model comprises:
generating a corresponding calculation service object through a component calculator factory according to the calculation model type of the component;
caching the component engineering quantity data according to a caching method provided by the computing service object;
the calculator factory is used for registering calculator services and is associated with the model features of the components for external use; the data cache controller is used for controlling the execution flow of all the component data caches.
3. The method of claim 1, wherein, in performing step 1: before the task schedule controller creates a task, the method further comprises:
the task progress controller calculates the number of tasks task to be created for the plan based on the computing system configuration and the number of components.
4. The method of claim 1, wherein the controlling the overall progress of component engineering volume calculations using task parallel libraries TPL for task scheduling comprises:
putting the computing task of each component calculator into a sub-thread by utilizing TPL (thread to load) for parallel computing, and controlling and displaying a progress bar of the computing task of each component calculator;
and after the parallel computation of the component engineering quantity is finished, calling a countdown activity event to finish the processing task, and closing the progress bar.
5. A Revit engineering computation-based parallel processing apparatus, comprising:
the cache unit is used for mapping the Revit model into an operand model and caching data required by the engineering quantity calculation of all components according to the component characteristics in the operand model;
the calculation unit is used for carrying out parallel calculation on all the component engineering quantity data cached in the calculation quantity model;
the control unit is used for scheduling tasks by utilizing the task parallel library TPL and controlling the overall progress of the component engineering quantity calculation until the parallel calculation is completed;
the computation model refers to a predefined component template meeting budget requirements, the template appoints the professional and category information of the component, and appoints characteristic parameters and computation items of the component;
the mapping the Revit model to the computational model comprises:
generating a convenient operation component for each family example of the structural part in the Revit model;
mapping the generated component with a computation model meeting the computation requirement;
the parallel computation of all the component engineering quantity data cached in the computation quantity model comprises the following steps:
step 1: the task progress controller creates a task, and the task is derived from TPL;
step 2: the task creates a component calculator and associates corresponding components;
and step 3: the component calculator calculates the engineering quantity of the component;
and 4, step 4: circularly executing the step 1 to the step 3 until all the components are allocated with the component calculator for calculation, and stopping creating the task by the task progress controller;
the method comprises the steps that firstly, a task progress controller is initialized, a task progress notification mechanism is realized by a CountdownEvent of net in the initialization process, and specifically, a CountdownEvent semaphore is initialized firstly; secondly, setting task scheduling, and putting CountdownEvent.Signal () into a main thread for execution through a task scheduling method to inform that the task is completed; finally, to ensure that the main thread is in a non-blocking state, steps 1, 2 are placed in the sub-thread for execution.
6. A Revit engineering computation workload based parallel processing terminal device, comprising a memory, a processor and a computer program stored in the memory and operable on the processor, wherein the processor implements the steps of the method according to claims 1-4 when executing the computer program.
7. A computer-readable storage medium, in which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to claims 1 to 4.
CN201810282395.7A 2018-04-02 2018-04-02 Revit engineering calculation amount parallel processing method, device, terminal and medium Active CN108509220B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810282395.7A CN108509220B (en) 2018-04-02 2018-04-02 Revit engineering calculation amount parallel processing method, device, terminal and medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810282395.7A CN108509220B (en) 2018-04-02 2018-04-02 Revit engineering calculation amount parallel processing method, device, terminal and medium

Publications (2)

Publication Number Publication Date
CN108509220A CN108509220A (en) 2018-09-07
CN108509220B true CN108509220B (en) 2021-01-22

Family

ID=63379844

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810282395.7A Active CN108509220B (en) 2018-04-02 2018-04-02 Revit engineering calculation amount parallel processing method, device, terminal and medium

Country Status (1)

Country Link
CN (1) CN108509220B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109344458A (en) * 2018-09-11 2019-02-15 羊兆亮 Method and apparatus based on REVIT design software statistical engineering amount
CN109815560A (en) * 2019-01-04 2019-05-28 中国建筑东北设计研究院有限公司 A method of calculation amount construction Life cycle application is set based on BIM
CN109858138B (en) * 2019-01-28 2022-09-16 厦门海迈科技股份有限公司 BIM-based room decoration component processing method, device, terminal and medium
CN112559188A (en) * 2020-12-22 2021-03-26 中设数字技术股份有限公司 BIM model external contour layered parallel rapid extraction method and system
CN113434937A (en) * 2021-06-29 2021-09-24 广联达科技股份有限公司 Method, apparatus, device and medium for converting design model into computation model

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577305A (en) * 2003-07-28 2005-02-09 华为技术有限公司 Parallel processing method and system
CN102057353A (en) * 2008-06-04 2011-05-11 微软公司 Configurable partitioning for parallel data
CN103295100A (en) * 2013-05-28 2013-09-11 机械工业第六设计研究院有限公司 Project management progress arranging method and project management progress arranging system
CN104899074A (en) * 2015-06-12 2015-09-09 天津大学 High parallelism electric system real-time simulation method based on FPGA (field programmable gate array)
CN104375806B (en) * 2014-11-19 2015-12-09 北京应用物理与计算数学研究所 A kind of parallel computation component, method and corresponding parallel software development method and system
CN105528243A (en) * 2015-07-02 2016-04-27 中国科学院计算技术研究所 A priority packet scheduling method and system utilizing data topological information
CN106326184A (en) * 2016-08-23 2017-01-11 成都卡莱博尔信息技术股份有限公司 CPU (Central Processing Unit), GPU (Graphic Processing Unit) and DSP (Digital Signal Processor)-based heterogeneous computing framework

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20100241477A1 (en) * 2009-03-19 2010-09-23 Scenario Design, Llc Dimensioned modeling system
US7912807B2 (en) * 2009-04-30 2011-03-22 Integrated Environmental Solutions, Ltd. Method and system for modeling energy efficient buildings using a plurality of synchronized workflows

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1577305A (en) * 2003-07-28 2005-02-09 华为技术有限公司 Parallel processing method and system
CN102057353A (en) * 2008-06-04 2011-05-11 微软公司 Configurable partitioning for parallel data
CN103295100A (en) * 2013-05-28 2013-09-11 机械工业第六设计研究院有限公司 Project management progress arranging method and project management progress arranging system
CN104375806B (en) * 2014-11-19 2015-12-09 北京应用物理与计算数学研究所 A kind of parallel computation component, method and corresponding parallel software development method and system
CN104899074A (en) * 2015-06-12 2015-09-09 天津大学 High parallelism electric system real-time simulation method based on FPGA (field programmable gate array)
CN105528243A (en) * 2015-07-02 2016-04-27 中国科学院计算技术研究所 A priority packet scheduling method and system utilizing data topological information
CN106326184A (en) * 2016-08-23 2017-01-11 成都卡莱博尔信息技术股份有限公司 CPU (Central Processing Unit), GPU (Graphic Processing Unit) and DSP (Digital Signal Processor)-based heterogeneous computing framework

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
Study on Project Information Management Based on Building Information Modeling;Mo Lianguang;《2016 International Conference on Smart City and Systems Engineering (ICSCSE)》;20170119;第238-240页 *
Toward Automatic Calculation of Construction Quantity Based on Building Information Modeling;Qin Zhao 等;《2015 11th International Conference on Computational Intelligence and Security (CIS)》;20160204;第482-485页 *
基于BIM技术的精细化算量实现方法研究;裴艳 等;《工程经济》;20160430;第26卷(第4期);第39-44页 *
基于Revit的机电安装工程BIM算量研究与思考;崔树成;《建设监理》;20180331;第40-42页 *
简析C#多核并行编程;张文培 等;《网络安全技术与应用》;20170331;第65-66页 *

Also Published As

Publication number Publication date
CN108509220A (en) 2018-09-07

Similar Documents

Publication Publication Date Title
CN108509220B (en) Revit engineering calculation amount parallel processing method, device, terminal and medium
US9262216B2 (en) Computing cluster with latency control
US10884822B2 (en) Deterministic parallelization through atomic task computation
CN109858138B (en) BIM-based room decoration component processing method, device, terminal and medium
JP2018533795A (en) Stream based accelerator processing of calculation graph
US20120284730A1 (en) System to provide computing services
WO2020082611A1 (en) Method for carrying out deep learning on basis of blockchain platform and electronic device
US11188348B2 (en) Hybrid computing device selection analysis
US20080221857A1 (en) Method and apparatus for simulating the workload of a compute farm
CN113515382A (en) Cloud resource allocation method and device, electronic equipment and program product
US10936367B2 (en) Provenance driven job relevance assessment
CN112035229A (en) Calculation graph processing method and device and storage medium
Hosny et al. Characterizing and optimizing EDA flows for the cloud
CN113570175B (en) Method for establishing industrial refined working hour and quantity management platform
CN115033374A (en) Task-to-thread matching method of multi-core programmable controller
CN113971074A (en) Transaction processing method and device, electronic equipment and computer readable storage medium
CN114596009A (en) Computing resource deployment method, device, equipment and storage medium of intelligent computing center
US20130245804A1 (en) Network based calculations for planning and decision support tasks
Wen et al. EdgeCloudBenchmark: A Benchmark Driven by Real Trace to Generate Cloud-Edge Workloads
CN110620797B (en) Node delivery method and device, electronic equipment and storage medium
US20220050718A1 (en) Scalability advisor
WO2023207630A1 (en) Task solving method and apparatus therefor
Wang et al. Adaptive Pricing and Online Scheduling for Distributed Machine Learning Jobs
CN117993668A (en) Task allocation method, device, equipment and storage medium
CN114565309A (en) Logistics scheduling method and device, electronic equipment and computer readable 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