CN105787056A - Calculating method based on custom calculation model - Google Patents
Calculating method based on custom calculation model Download PDFInfo
- Publication number
- CN105787056A CN105787056A CN201610110331.XA CN201610110331A CN105787056A CN 105787056 A CN105787056 A CN 105787056A CN 201610110331 A CN201610110331 A CN 201610110331A CN 105787056 A CN105787056 A CN 105787056A
- Authority
- CN
- China
- Prior art keywords
- data
- cbdo
- self
- storage
- source
- 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.)
- Pending
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F16/00—Information retrieval; Database structures therefor; File system structures therefor
- G06F16/90—Details of database functions independent of the retrieved data types
Landscapes
- Engineering & Computer Science (AREA)
- Databases & Information Systems (AREA)
- Theoretical Computer Science (AREA)
- Data Mining & Analysis (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
The invention discloses a calculating method based on a custom calculation model, and belongs to the field of project management of enterprise resource planning.The calculating method can automatically extract calculating basic data objects for automatic calculation, and includes the steps that A, CBDO is set according to data sources; B, morphology semantic definition is carried out through the description information of metadata; C, automatic calculating is carried out according to semantic definition and calculating basic data.By means of the calculating method, automatic calculating of data can be carried out in a semantic-parsing-object definition mode, persistent storage of the data is carried out, the data is calculated without codes, the efficiency and the accuracy of data calculating are effectively improved, and reusing of the data is well achieved.
Description
Technical field
The present invention relates to data interface techniques field, specifically a kind of computational methods based on self-defined computation model.
Background technology
In prior art, mostly heterogeneous system is directly to adopt to be transmitted by data mediums such as third party transfer medium such as XML, JSON, is characterized in simple for structure and transmission is convenient.XML or JSON is especially suitable for WWW transmission, it is provided that unified method describes and exchange the data structure independent of application program or supplier.Be cross-platform in internet environment, depend on the technology of content, be also the current effective tool processing distributed structured information.
JSON (JavaScriptObjectNotation) is then the data interchange format of a kind of lightweight.It is based on a subset of ECMAScript.JSON adopts the text formatting being totally independent of language, but also using the custom (including C, C++, C#, Java, JavaScript, Perl, Python etc.) being similar to C language family.These characteristics make JSON become desirable data interchange language.It is prone to people read and write, is also easy to machine simultaneously and resolves and generate (being generally used for lifting network transmission speed).
The many employings of mode and WebService or REST(RepresentationalStateTransfer of data transmission) technology carries out data transmission.WebService is a platform independence, lower coupling, self-contained, application program based on programmable web, can use open XML standard to describe, issue, find, coordinate and configure these application programs, for developing the application program of distributed interoperability.REST is then a kind of design for network application and development scheme, it is possible to reduce the complexity of exploitation, improves the scalability of system.
Specifically, provider needs, according to service logic, data are carried out serializing and is packaged into XML or JSON form, it is transmitted by WebService or REST technology, after recipient carries out the data that acquisition is corresponding, after data are carried out unserializing, it is then stored into after being processed according to the service logic of self in the information system of self.
But, along with the extension that deepens continuously of the Internet+technology, IT application in enterprises degree constantly promotes, and the business datum source of enterprise operation data is increased gradually.The restriction of the factors such as the interface offer due to the fragmentation of present data and provider, causes the realization of data-interface is created very big restriction.
Summary of the invention
The technical assignment of the present invention is for above-mentioned the deficiencies in the prior art, it is provided that a kind of computational methods based on self-defined computation model.The method can adapt to the data-interface of various data source and automatically calculates.
The technical assignment of the present invention realizes in the following manner: a kind of computational methods based on self-defined computation model, comprises the following steps:
A, build CBDO(basic data object according to data source: CalculateBaseDataObject)
Described CBDO comprises the data object of data transmission and the direct incidence relation of object;
B, utilize metadata to describe information to carry out morphology semantical definition
B1, information according to source operation system, it is determined that the type of derived data, be used for defining the access mode of the storage mode of source data, storage media types and storage medium;
B2, the storage class according to defining, media type, the storage organization of definition target data;
B3, storage organization according to service needed and target data, the figure selection formula of the attribute in model in definition target data and calculate logic;
C, according to semantical definition and calculate basic data automatically calculate
According to the figure selection formula of definition in step B and calculating logic, original data source is operated, carries out automatically extracting of data, and be filled in CBDO example, then call persistence engine and carry out the persistence of instance data.
Further, step A includes:
A1, according to CBDO requirement, set up and the management of data source;
If a2 is absent from data source, then set up corresponding data source information according to business demand.
Step A preferably employs and is similar to non-relational storage organization structure CBDO.
As preferably, described in step b1, the storage mode of source data includes XML document, JSON, CSV, Excel document and structural data;Described storage media types is relevant database, non-relational database, text or Excel;The access mode of described storage medium is that data base is direct-connected, text message, non-relational database, Excel data source.
In step b3, described figure selection formula and calculating logic are to support the process of the aggregate function in simple four arithmetic operation and data base.By the process of aggregate function, it is possible to perform calculate and return single value to one group of data.Comprise the functions such as AVG, COUNT, MAX, MIN, SUM, and support TOP operator.
Compared with prior art, the computational methods based on self-defined computation model of the present invention have beneficial effect highlighted below:
(1) employing is similar to non-relational storage organization structure CBDO, it is not necessary to predefined data pattern, predefined list structure.Every record in data is all likely to have different attributes and form, when inserting data, is not required to pre-define their pattern;
(2) the deficiencies in the prior art are overcome, it is possible to adapt to the data-interface of various data source and automatically calculate, there is good compatibility.
Accompanying drawing explanation
Accompanying drawing 1 is the flow chart of the self-defined computation model computational methods of the present invention;
Accompanying drawing 2 is data model structure schematic diagram in the embodiment of the present invention;
Accompanying drawing 3 is the inventive method application schematic diagram.
Detailed description of the invention
The computational methods based on self-defined computation model of the present invention are described in detail below by parameter declaration book accompanying drawing with specific embodiment.
In the computational methods of the present embodiment, it is necessary to according to the predefined persistence engine of business demand.Wherein, this persistence engine can directly interact with non-relational database, and provides the access interface of corresponding insertion and inquiry.When user needs to carry out database manipulation time, this engine provides method: carry out update according to the CBDO object of origin definitions.
As shown in Figure 1, the computational methods based on self-defined computation model of the present invention comprise the following steps:
1. adopt and be similar to non-relational storage organization structure CBDO, for the result data of load capacity calculation and carry out persistence
Described CBDO is exactly OO a kind of form of presentation of last perdurable data.Be equivalent to the Model layer in MVC framework, play the transmission carrier function of data.
Specifically, CBDO comprises the data object of data transmission and the direct incidence relation of object.The structural representation of accompanying drawing 2, it is simply that this data object of description and the relation between them thereof.Relation between data object can pass through UML connecting line pictorial representation.
2. definition derived data type.Peek source can carry out class mark, and convenient peek is originated carries out unified planning and management.Wherein comprise data storage method, it is possible to be XML document, JSON, CSV, Excel document, structural data.Stored Data Type, for instance relevant database, non-relational database, text, Excel etc..
3., according to source systems type, support to define multiple access mode, the data acquiring mode such as direct-connected in data base, text message, non-relational database, Excel data source.
4. according to factors such as the storage mode of definition, Stored Data Types, the storage organization of definition target data.The data structure of CBDO thus can be determined by the data type defined.
5., according to definition access mode, resolve the data descriptive semantics of peek object.
6. describe according to data semantic, define computing formula.
7. pair data automatically extract and logical calculated, and derived data is extracted, and are synchronized to CBDO.
8., according to the CBDO object information obtained, convert business object to.
9. carry out data persistence according to business object.
[application example]
This application example describes peeks from financial accounting system, the then automatic calculating method of output VAT volume in tax administration system.
Accompanying drawing 2 contains the business object of financial accounting system and describes, and comprises Business Entity and inter-entity relation.
Shown in accompanying drawing 3, circular is:
Step 101: the description based on contract managing system is learnt, contract relevant information is to use relevant database to store, and namely Stored Data Type is relevant database.Storage medium is Sqlserver2008R2 data base.The access mode data base of storage medium is direct-connected.It is attached by ODBC specification.So, the description according to business object, construct the CBDO example of correspondence.Being specially generation balance data class, current object reference stores in internal memory.Data storage adopts JSON form.
Step 201: the computing formula of the definition amount of tax to be paid.Example is as follows:
The input tax amount of money declaring deduction is equal in financial accounting system, material purchases section purpose debit's amount.
The input tax amount of tax to be paid declaring deduction is equal in financial accounting system, debit's amount of output tax account.
Then, declaring deduction valency tax Amount in Total is: declare the input tax amount of tax to be paid of the input tax amount of money of deduction+declare deduction.
The input tax amount of money figure selection formula configuration declaring deduction is as follows:
FYELSEJS(,,,003,3,2,VALUE)
The input tax amount of tax to be paid figure selection formula configuration declaring deduction is as follows:
FYELSEJS(,,,005,3,3,VALUE)
Declare the configuration of deduction valency tax Amount in Total figure selection formula as follows:
FYELSEJS(,,,003,3,2,VALUE)+FYELSEJS(,,,005,3,3,VALUE)
Step 301: the formula according to definition, the peek that engine carries out correspondence according to the data source determined calculates.Draw the input tax amount of money declaring deduction, declare the input tax amount of tax to be paid of deduction and declare deduction valency tax Amount in Total.
The amount of money according to calculating fills out each property value in CBDO example.As follows:
{"CompanyName":"Langchao","email":"aaaainspur.com”,”Money”:”45638.90”,”Tax”:”54.78”,”TotalMoney”:”45693.68”}。
By persistence engine interface, the data of CBDO are carried out persistence preservation.The present embodiment have employed Redis and carried out data preservation.
using(varredisClient=RedisManager.GetClient())
{
varuser=redisClient.GetTypedClient<User>();
if(user.GetAll().Count>0)
{
user.DeleteAll();
}
varmoney=newInputMoney;
…
…
…
money.StoreAll(userToStore);
}。
The foregoing is only presently preferred embodiments of the present invention, be not limited to the present invention, all the spirit and principles in the present invention only in, any amendment of making, equivalent replacement, improvement etc., all should comprise again within the scope of protection of the invention.
Claims (6)
1. the computational methods based on self-defined computation model, it is characterised in that comprise the following steps:
A, build CBDO according to data source
Described CBDO comprises the data object of data transmission and the direct incidence relation of object;
B, utilize metadata to describe information to carry out morphology semantical definition
B1, information according to source operation system, it is determined that the type of derived data, be used for defining the access mode of the storage mode of source data, storage media types and storage medium;
B2, the storage class according to defining, media type, the storage organization of definition target data;
B3, storage organization according to service needed and target data, the figure selection formula of the attribute in model in definition target data and calculate logic;
C, according to semantical definition and calculate basic data automatically calculate
According to the figure selection formula of definition in step B and calculating logic, original data source is operated, carries out automatically extracting of data, and be filled in CBDO example, then call persistence engine and carry out the persistence of instance data.
2. the computational methods based on self-defined computation model according to claim 1, it is characterised in that step A includes:
A1, according to CBDO requirement, set up and the management of data source;
If a2 is absent from data source, then set up corresponding data source information according to business demand.
3. the computational methods based on self-defined computation model according to claim 2, it is characterised in that step A adopts non-relational storage organization structure CBDO.
4. the computational methods based on self-defined computation model according to claim 1, it is characterised in that described in step b1, the storage mode of source data includes XML document, JSON, CSV, Excel document and structural data.
5. the computational methods based on self-defined computation model according to claim 1, it is characterised in that storage media types described in step b1 is relevant database, non-relational database, text or Excel.
6. the computational methods based on self-defined computation model according to claim 1, it is characterised in that the access mode of storage medium described in step b1 is that data base is direct-connected, text message, non-relational database, Excel data source.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610110331.XA CN105787056A (en) | 2016-02-29 | 2016-02-29 | Calculating method based on custom calculation model |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201610110331.XA CN105787056A (en) | 2016-02-29 | 2016-02-29 | Calculating method based on custom calculation model |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105787056A true CN105787056A (en) | 2016-07-20 |
Family
ID=56403738
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201610110331.XA Pending CN105787056A (en) | 2016-02-29 | 2016-02-29 | Calculating method based on custom calculation model |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105787056A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019106613A1 (en) * | 2017-12-01 | 2019-06-06 | International Business Machines Corporation | Semantic normalization in document digitization |
US11647100B2 (en) | 2018-09-30 | 2023-05-09 | China Mobile Communication Co., Ltd Research Inst | Resource query method and apparatus, device, and storage medium |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102279750A (en) * | 2011-08-30 | 2011-12-14 | 浙江大学 | Iterative code generation method based on domain knowledge sharing |
US20120323811A1 (en) * | 2008-10-15 | 2012-12-20 | Adp Workscape, Inc. | Performance drive compensation for enterprise-level human capital management |
CN103955370A (en) * | 2014-04-28 | 2014-07-30 | 华为软件技术有限公司 | Persistence device and method of domain object model |
CN104268238A (en) * | 2014-09-28 | 2015-01-07 | 中国南方航空股份有限公司 | Configurable cost distribution calculation method based on open source technology |
-
2016
- 2016-02-29 CN CN201610110331.XA patent/CN105787056A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20120323811A1 (en) * | 2008-10-15 | 2012-12-20 | Adp Workscape, Inc. | Performance drive compensation for enterprise-level human capital management |
CN102279750A (en) * | 2011-08-30 | 2011-12-14 | 浙江大学 | Iterative code generation method based on domain knowledge sharing |
CN103955370A (en) * | 2014-04-28 | 2014-07-30 | 华为软件技术有限公司 | Persistence device and method of domain object model |
CN104268238A (en) * | 2014-09-28 | 2015-01-07 | 中国南方航空股份有限公司 | Configurable cost distribution calculation method based on open source technology |
Cited By (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2019106613A1 (en) * | 2017-12-01 | 2019-06-06 | International Business Machines Corporation | Semantic normalization in document digitization |
GB2581461A (en) * | 2017-12-01 | 2020-08-19 | Ibm | Semantic normalization in document digitization |
US10963686B2 (en) | 2017-12-01 | 2021-03-30 | International Business Machines Corporation | Semantic normalization in document digitization |
US11647100B2 (en) | 2018-09-30 | 2023-05-09 | China Mobile Communication Co., Ltd Research Inst | Resource query method and apparatus, device, and storage medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
EP2877943B1 (en) | Mapping entities in data models | |
CN110929042B (en) | Knowledge graph construction and query method based on power enterprise | |
US9508050B2 (en) | Executing a business process in a framework | |
CN102982075B (en) | Support to access the system and method for heterogeneous data source | |
US8510341B2 (en) | System, method and structures for a reusable custom-defined nestable compound data type for construction of database objects | |
US8341191B2 (en) | Methods and structures for utilizing reusable custom-defined nestable compound data types to permit product variations within an existing taxonomy | |
US20110087708A1 (en) | Business object based operational reporting and analysis | |
US9495475B2 (en) | Method of representing an XML schema definition and data within a relational database management system using a reusable custom-defined nestable compound data type | |
CN102609255B (en) | A kind of generation method of Spring IOC configuration file | |
US20150199378A1 (en) | Method and apparatus for realizing a dynamically typed file or object system enabling a user to perform calculations over the fields associated with the files or objects in the system | |
CN106547766A (en) | A kind of data access method and device | |
CN102073701A (en) | Semantic definition-based multi-data source data querying method | |
CN106415548B (en) | Computing platform for integrated design of products, materials and manufacturing processes | |
US20100131565A1 (en) | Method for creating a self-configuring database system using a reusable custom-defined nestable compound data type | |
CN101739452A (en) | Data exchange interface and realizing method thereof | |
CN103489061A (en) | Batch data processing device and batch data processing method | |
CN104408171A (en) | Receipt sub-table row-correlated query device and method | |
CN103279543A (en) | Path mode inquiring system for massive image data | |
CN111124405A (en) | Method and system for realizing online form design supporting front-end and back-end decoupling | |
CN105787056A (en) | Calculating method based on custom calculation model | |
CN102420862B (en) | A kind of Internet of things middleware message form conversion method | |
US20110087567A1 (en) | Using account symbols instead of general ledger accounts in the transaction messages of the business applications of an enterprise | |
US10521431B2 (en) | Relational conversion of multiprovider operations in a calculation scenario for executing a query | |
US20150081672A1 (en) | Automatic conversion of units of measure during data stream processing | |
CN109933622A (en) | A kind of data visualisation system and implementation method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160720 |
|
RJ01 | Rejection of invention patent application after publication |