Detailed Description
So that the manner in which the features and objects of the present invention can be understood in more detail, a more particular description of the invention, briefly summarized above, may be had by reference to the appended drawings, which are not necessarily limited to the embodiments described.
Fig. 1 is a schematic implementation flow chart of a data processing method according to an embodiment of the present invention, as shown in fig. 1, where the method includes:
step S101, acquiring and analyzing a price computing file, acquiring a corresponding analysis file, and uploading the analysis file to a server;
Specifically, the pricing file may be a broadcast cloud pricing file (GBQ). And analyzing the pricing file at the client, and uploading the analyzed file to a remote server, so that the subsequent operation of the server is facilitated.
Further, before acquiring the pricing file, when the client is started, a request is sent to the back-end server, and all template information, business state information, caliber information and the like defaulted by the user are acquired, so that the user can conveniently input the pricing file at the client.
Step S102, receiving input first information, and uploading the first information to the server;
the first information input by the client interface at least comprises engineering information, amateur information, template information and caliber information, then the next step is clicked, the information is uploaded to a server, the server caches the data and then asynchronously stores the data in a database, and the database can be mysql, oracle and the like.
Step S103, initiating a calculation request to the server in a multithreading mode according to the analysis file and the first information so that the server side performs asynchronous calculation;
When the transmission of the analysis file and the first information transmission are completed, the client initiates a calculation request to the server, so that the server performs asynchronous calculation, and the data processing pressure of the client is relieved.
Step S104, obtaining the asynchronous calculation result returned by the server, and displaying the calculation result of each index;
after the server performs asynchronous processing, the client continuously initiates a query request, so that the processing state of the server and a final calculation result are obtained. That is, huge and complex pricing data to be processed by the client is transmitted to the remote server, calculation is performed through the remote server, calculation pressure of the client is shared, the client directly receives the calculation result, display of the calculation result is performed, and when the client encounters a sudden new task, the client can rapidly process the new task, and is more flexible and high-speed.
When the calculation of the server is completed, the calculation state and the calculation result are stored in a cache, and the calculation result is asynchronously stored in a database. When the client-side inquiry and calculation state is completed, an inquiry calculation result interface is called, the server-side returns calculation results, and the client-side displays calculation results of all indexes.
In another embodiment, the obtaining the pricing file and parsing the pricing file to obtain a corresponding parsed file, and uploading the parsed file to a server includes:
analyzing the structure information of the pricing file, and uploading the structure information to the server, wherein the structure information at least comprises file structure information and data structure information.
Further, the parsing file structure may be the structure information of the parsing compressed package file, or other forms of file structure, and the parsing data structure may be a parsing table structure or an image structure or other data structures.
In another embodiment, as shown in fig. 2, the server performs asynchronous calculation, including matching corresponding information types according to the first information, including:
step S201, obtaining a unique identification code of the first information;
Wherein the single project belongs to the first information, and all unit projects contained are queried according to a unique identification code (UUID) of the single project.
Step S202, obtaining basic data corresponding to the first information according to the unique identification code;
and inquiring basic data in the cache according to the unique identification code of the unit project, wherein the basic data at least comprises subsection item list data, measure item list data, expense summary data and the like.
And step S203, placing the basic data into a public set.
In particular implementations, the underlying information is placed into context variables, i.e., a common set, for later template computation and matching use.
In another embodiment, the first information at least includes first template information, and after the base data is placed in a common set, the method includes:
And performing multi-thread calculation according to the unique identification code of the first template information of the first information to obtain a calculation result.
The multi-thread calculation is carried out according to the unique identification code of the template, and the multi-thread calculation comprises a cost index (content index), an economic index, a main engineering quantity index and a main material index.
In another embodiment, as shown in fig. 3, the performing the multithreading calculation according to the unique identification code of the first template information includes:
Step S301, a service configuration table is obtained according to the type of the first template information;
step S302, matching service is carried out through the service configuration table, and a first matching result is obtained;
In another embodiment, as shown in fig. 4, performing the matching service through the service configuration table to obtain a first matching result, including:
Step S401, classifying the basic data to obtain classified data;
specifically, the partial item list and the measure item list are converted into a list with the first 9 bits as keys and the first 9 bits as fixed values, so that the same list set of the first 9 bits is used as a standard to be classified, and the matching range is reduced. And (3) cycling the subject list, calling a matching method (asynchronous multithreading), acquiring a matching rule on the subject, cycling the rule list, and acquiring a list through a key.
Step S402, carrying out the matching service on the classified data through a preset strategy to obtain the first matching result, wherein the preset strategy at least comprises matching the classified data according to the following data types, namely a list name, a characteristic keyword, a unit name, a single name and a blacklist;
The classification data at least comprises a data list, and the data list is matched with preset subjects in a database through data types, for example, the unit names of the data list are matched with the unit names under a plurality of subjects, so that a final result is obtained. That is, the invention also solves the problem that the calculation rule is changed frequently according to the index due to the compiling of different manifests in different regions in a matching service mode, and the calculation of the new rule cannot be quickly solved. That is, the pluggable chain service is adopted, so that the newly added data can be inserted more flexibly under the condition of changing the original data, and the influence of the newly added data on the original data is avoided.
In another embodiment, the method further comprises the steps of judging that the first matching result is successful when the first matching result is not empty, confirming the number of the first matching result to obtain the matching number, and if the matching number is larger than 1, performing second matching operation according to the data type to obtain a unique result, or performing third matching operation according to the priority of the data type to obtain the unique result.
Further, when the first matching result is not null, at least one pair of matching is necessarily successful, that is, the data list of the classification data corresponds to at least 1 subject matching in the database, and may also correspond to 2,3 or more subject matching. When the data list is matched with a plurality of subjects, secondary matching is carried out to obtain a unique result, namely the data list and the subjects are one by one. The secondary matching can be performed again in a data type mode, namely, the list name, the feature key words, the unit names, the single names and the blacklist of the two are matched, and the secondary matching can be performed again in a data type priority mode, namely, when the data type priority is matched with a plurality of subjects, the high priority in the subjects is used as a final unique result.
Preferably, if the number of matches is equal to 1 or 0, it is sufficient to record directly in the database.
In another embodiment, the matching service is performed on the classified data by a preset policy, and after the first matching result is obtained, the method further includes:
And carrying out summarizing calculation according to the first matching result to obtain a summarizing result, wherein the summarizing result at least comprises engineering quantity, comprehensive price, unilateral manufacturing cost and occupation proportion.
The calculation service in the specific implementation comprises the steps of obtaining a matching relation list, circulating the matching relation list, finding out corresponding subject objects according to subject codes, finding out corresponding list objects according to a list uuid, and accumulating engineering quantity and comprehensive price on the list to the subjects. The summary service in specific implementation comprises the steps of summarizing comprehensive cost and engineering quantity on the child subjects upwards according to rule configuration and summarizing the comprehensive cost and engineering quantity to the parent subjects. And summarizing the list which is not matched with the subjects to other subjects. And record the inventory relationship.
In another embodiment, a pluggable chained service (support sub-service) is also provided, for example, by having 17 listings and 08 listings with different calculation rules, the 17 listings and the 08 listings can be configured with different service chains, the 17 listings' service chains are 17 listings matching service- > (sub-service: 17 listings rule 1 service- >17 listings rule 2 service) - >17 listings calculation service- > (sub-service: 17 listings calculation rule 1- >17 listings calculation rule 2 service) if the user 17 listings add a rule again, the service or sub-service can be added at the service logic in the service chain.
The computing mode of the end plus cloud is fast, can be laterally expanded, and is suitable for increasing back-end server nodes or server configuration, and the user group is continuously increased. The pluggable chained service is convenient to develop codes and deploy services compared with one service.
In another embodiment, the invention provides a data processing device, which comprises an analysis unit, an initiating unit and a display unit, wherein the analysis unit is used for acquiring and analyzing a price file, acquiring a corresponding analysis file, uploading the analysis file to a server, the initiating unit is used for receiving input first information and uploading the first information to the server, initiating a calculation request to the server in a multithreading mode according to the analysis file and the first information so that the server can perform asynchronous calculation, and the display unit is used for acquiring a result of the asynchronous calculation returned by the server and displaying calculation results of various indexes.
In another embodiment the invention also provides an electronic device comprising a memory, a processor and a responsive program stored in the memory for execution by the processor, characterized in that the processor is arranged to respond to the steps of the data processing method when executing the responsive program.
Fig. 5 is a schematic structural diagram of an electronic device according to an embodiment of the present invention, where the electronic device may be a data processing device, and the data processing device 500 may be, for example, a handle, a mouse, a track ball, a mobile phone, a smart pen, a smart watch, a smart ring, a smart bracelet, a smart glove, etc. as shown in fig. 5. The data processing device 500 shown in fig. 5 comprises at least one processor 501, a memory 502, at least one network interface 504 and a user interface 503. The various components in data processing apparatus 500 are coupled together by bus system 505. It is understood that bus system 505 is used to enable connected communications between these components. The bus system 505 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 buses are labeled as bus system 505 in fig. 5.
The user interface 503 may include, among other things, a display, keyboard, mouse, trackball, click wheel, keys, buttons, touch pad, or touch screen, etc.
It is to be appreciated that memory 502 can be either volatile memory or nonvolatile memory, and can include both volatile and nonvolatile memory. the non-volatile Memory may be, among other things, a Read Only Memory (ROM), a programmable Read Only Memory (PROM, programmable Read-Only Memory), erasable programmable Read-Only Memory (EPROM, erasable Programmable Read-Only Memory), electrically erasable programmable Read-Only Memory (EEPROM, ELECTRICALLY ERASABLE PROGRAMMABLE READ-Only Memory), magnetic random access Memory (FRAM, ferromagnetic random access Memory), flash Memory (Flash Memory), magnetic surface Memory, optical disk, or compact disk-Only Memory (CD-ROM, compact Disc Read-Only Memory), which may be disk Memory or tape Memory. The volatile memory may be random access memory (RAM, random Access Memory) which acts as external cache memory. By way of example and not limitation, many forms of RAM are available, such as static random access memory (SRAM, static Random Access Memory), synchronous static random access memory (SSRAM, synchronous Static Random Access Memory), dynamic random access memory (DRAM, dynamic Random Access Memory), synchronous dynamic random access memory (SDRAM, synchronous Dynamic Random Access Memory), and, Double data rate synchronous dynamic random access memory (DDRSDRAM, double Data Rate Synchronous Dynamic Random Access Memory), enhanced synchronous dynamic random access memory (ESDRAM, enhanced Synchronous Dynamic Random Access Memory), synchronous link dynamic random access memory (SLDRAM, syncLink Dynamic Random Access Memory), direct memory bus random access memory (DRRAM, direct Rambus Random Access Memory). The memory 302 described in embodiments of the present invention is intended to comprise, without being limited to, these and any other suitable types of memory.
The memory 502 in embodiments of the present invention is used to store various types of data to support the operation of the data processing apparatus 500. Examples of such data include any computer programs for operating on the data processing apparatus 500, such as an operating system 5021 and application 5022, music data, animation data, book information, video, drawing information, and the like. The operating system 5021 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 5022 may include various application programs such as a media player (MEDIA PLAYER), a Browser (Browser), etc. for implementing various application services. A program for implementing the method according to the embodiment of the present invention may be included in the application 5022.
The method disclosed in the above embodiment of the present invention may be applied to the processor 501 or implemented by the processor 501. The processor 501 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be performed by integrated logic circuitry in hardware or instructions in software in the processor 501. The Processor 501 may be a general purpose Processor, a digital signal Processor (DSP, digital Signal Processor), or other programmable logic device, discrete gate or transistor logic device, discrete hardware components, or the like. The processor 501 may implement or perform the methods, steps and logic blocks disclosed in embodiments of the present invention. The general purpose processor may be a microprocessor or any conventional processor or the like. The steps of the method disclosed in the embodiment of the invention can be directly embodied in the hardware of the decoding processor or can be implemented by combining hardware and software modules in the decoding processor. The software modules may be located in a storage medium in the memory 502 and the processor 501 reads information in the memory 302, in combination with its hardware, to perform the steps of the method as described above.
In the exemplary embodiment, data processing apparatus 500 may be implemented by one or more Application Specific Integrated Circuits (ASICs), DSPs, programmable logic devices (PLDs, programmable Logic Device), complex Programmable logic devices (CPLDs, complex Programmable Logic Device), field-Programmable gate arrays (FPGAs), general purpose processors, controllers, microcontrollers (MCUs, micro Controller Unit), microprocessors (micro processors), or other electronic components for performing the methods described above.
The processor 501 executes the computer program when running, and obtains and parses a pricing file, obtains a corresponding parsing file, uploads the parsing file to a server, receives input first information, uploads the first information to the server, initiates a calculation request to the server in a multithreading mode according to the parsing file and the first information so that the server performs asynchronous calculation, obtains a result of the asynchronous calculation returned by the server, and displays a calculation result of each index.
The processor 501 further performs the steps of obtaining and analyzing the charging file to obtain a corresponding analysis file, and uploading the analysis file to a server, including analyzing the structure information of the charging file and uploading the structure information to the server, wherein the structure information at least includes file structure information and data structure information.
The processor 501 performs asynchronous calculation at the server side, including matching a corresponding information type according to the first information, specifically including obtaining a unique identification code of the first information, obtaining basic data corresponding to the first information according to the unique identification code, and placing the basic data in a public set.
The processor 501 further executes the computer program when executing the first information includes at least first template information, and after placing the basic data in a public set, performing multi-thread computation according to a unique identification code of the first template information of the first information to obtain a computation result.
The processor 501 further performs, when running the computer program, the multi-thread computation according to the unique identifier of the first template information, including obtaining a service configuration table according to the type of the first template information, and performing a matching service through the service configuration table to obtain a first matching result.
The processor 501 further performs, when running the computer program, performing a matching service through the service configuration table to obtain a first matching result, including classifying the basic data to obtain classified data, and performing the matching service on the classified data through a preset policy to obtain the first matching result, where the preset policy includes at least matching the classified data according to a data type including a list name, a feature keyword, a unit name, a single name, and a blacklist.
The processor 501 further executes the steps of determining that the first matching result is successful when the first matching result is not empty, and performing quantity confirmation on the first matching result to obtain a matching quantity, and if the matching quantity is greater than 1, performing a second matching operation according to the data type to obtain a unique result, or performing a third matching operation according to the priority of the data type to obtain the unique result.
The processor 501 further performs, when running the computer program, performing the matching service on the classification data through a preset policy, and obtaining the first matching result, and further performs summary calculation according to the first matching result to obtain a summary result, where the summary result at least includes an engineering amount, a comprehensive price, a unilateral manufacturing cost, and a occupation proportion.
In an exemplary embodiment, the present invention also provides a computer readable storage medium, such as a memory 502 comprising a computer program executable by the processor 501 of the data processing apparatus 500 to perform the steps of the method described above. The computer readable storage medium may be FRAM, ROM, PROM, EPROM, EEPROM, flash Memory, magnetic surface Memory, optical disk, or CD-ROM, or various devices including one or any combination of the above, such as mobile phones, computers, tablet devices, personal digital assistants, etc.
A computer readable storage medium is provided, and when the computer program is run by a processor, the computer program is executed, wherein the computer program is used for acquiring and analyzing a price computing file, acquiring a corresponding analysis file, uploading the analysis file to a server, receiving input first information, uploading the first information to the server, initiating a calculation request to the server in a multithreading mode according to the analysis file and the first information so as to enable the server to perform asynchronous calculation, acquiring a result of the asynchronous calculation returned by the server, and displaying a calculation result of each index.
The computer program is executed when being run by a processor, and further executes the steps of obtaining and analyzing the pricing file to obtain a corresponding analysis file, and uploading the analysis file to a server, wherein the method comprises the steps of analyzing the structure information of the pricing file and uploading the structure information to the server, and the structure information at least comprises file structure information and data structure information.
The computer program is executed when being run by a processor, and the server side performs asynchronous calculation, and comprises the steps of matching corresponding information types according to the first information, and specifically comprises the steps of obtaining a unique identification code of the first information, obtaining basic data corresponding to the first information according to the unique identification code, and placing the basic data in a public set.
The computer program is executed by the processor, and the first information at least comprises first template information, and the step of carrying out multithreading calculation according to the unique identification code of the first template information of the first information after the base data are placed in the public set to obtain a calculation result.
The computer program is executed by the processor and further performs the multi-thread computation according to the unique identification code of the first template information, including obtaining a service configuration table according to the type of the first template information, and performing matching service through the service configuration table to obtain a first matching result.
The computer program is executed when being run by a processor, and further executes matching service through the service configuration table to obtain a first matching result, wherein the first matching result comprises classifying the basic data to obtain classified data, and performing the matching service on the classified data through a preset strategy to obtain the first matching result, wherein the preset strategy at least comprises matching the classified data according to the following data types, namely a list name, a characteristic keyword, a unit name, a single name and a blacklist.
The computer program is executed by the processor, and further comprises the steps of judging that the first matching result is successful when the first matching result is not empty, confirming the number of the first matching result to obtain the matching number, and if the matching number is larger than 1, carrying out second matching operation according to the data type to obtain a unique result, or carrying out third matching operation according to the priority of the data type to obtain the unique result.
The computer program is executed when being run by a processor, and further comprises the steps of carrying out the matching service on the classified data through a preset strategy, obtaining the first matching result, and carrying out summarization calculation according to the first matching result to obtain a summarization result, wherein the summarization result at least comprises engineering quantity, comprehensive price, unilateral manufacturing cost and occupation proportion.
The foregoing is merely illustrative of the present invention, and the present invention is not limited thereto, and any person skilled in the art will readily recognize that changes and substitutions are within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.