CN102855280A - Heterogeneous data processing method and device - Google Patents

Heterogeneous data processing method and device Download PDF

Info

Publication number
CN102855280A
CN102855280A CN2012102716394A CN201210271639A CN102855280A CN 102855280 A CN102855280 A CN 102855280A CN 2012102716394 A CN2012102716394 A CN 2012102716394A CN 201210271639 A CN201210271639 A CN 201210271639A CN 102855280 A CN102855280 A CN 102855280A
Authority
CN
China
Prior art keywords
data
business object
processing unit
data fields
many data
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2012102716394A
Other languages
Chinese (zh)
Other versions
CN102855280B (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.)
Beijing Eren Eben Information Technology Co Ltd
Original Assignee
Beijing Eren Eben Information 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 Beijing Eren Eben Information Technology Co Ltd filed Critical Beijing Eren Eben Information Technology Co Ltd
Priority to CN201210271639.4A priority Critical patent/CN102855280B/en
Publication of CN102855280A publication Critical patent/CN102855280A/en
Application granted granted Critical
Publication of CN102855280B publication Critical patent/CN102855280B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a heterogeneous data processing method and a device. The method includes that a plurality of corresponding data field processing units are established on the basis of heterogeneous data layers; parameter information of the heterogeneous data layers is acquired; the parameter information is matched to obtain a plurality of corresponding data field processing units; and the plurality of data field processing units generate service objects, and the service objects comprise data operation objects. The invention further discloses a heterogeneous data processing device. According to the heterogeneous data processing method and the device, parameters of the heterogeneous data layers are matched, and the plurality of corresponding data field processing units are found to generate the service objects, so that processing scenes of the heterogeneous data layers are simplified, processing details of a plurality of data fields can be avoided during data layer development stages, developers can finish development work as flexibly and conveniently as develop applications of single data layers and are not interfered by trivial details brought by a plurality of field scenes, and development efficiencies are guaranteed.

Description

A kind of Heterogeneous Data Processing method and apparatus
Technical field
The application relates to a kind of data processing method, relates in particular to a kind of Heterogeneous Data Processing method and apparatus.
Background technology
The development of Internet technology so that the application of data Layer is more and more extensive, often can face the operational issue of isomeric data layer.The isomeric data layer refers to follow the set of a series of data manipulation objects of the identical or different realization of same-interface.For example, ORACLE, SQL Server and MySQL etc. are even as the data Layer of increasing income of MySQL one class, also have various implementation.In the prior art, realize for the ccf layer that operates in of isomeric data layer, write corresponding processing code for a certain data Layer often, these codes are constantly piled up, so that logical boundary is more and more unintelligible, it is chaotic that mutual calling also seems, development efficiency is low.
Summary of the invention
The application provides a kind of Heterogeneous Data Processing method and apparatus that guarantees development efficiency.
According to the application's first aspect, the application provides a kind of Heterogeneous Data Processing method, and described method comprises:
Set up corresponding many data fields processing unit based on the isomeric data layer;
Obtain the parameter information of described isomeric data layer;
Described parameter information is mated, obtain corresponding many data fields processing unit;
Described many data fields processing unit generates business object, and described business object comprises the data manipulation object.
Wherein said many data fields processing unit generates business object and comprises: load the data field configuration information; Generate business object according to described data field configuration information.
Wherein said described parameter information is mated, comprise: analyze and mate by the mode of URL(uniform resource locator) mapping.
Wherein also comprise the process that the business object that generates is shown.
Said process is by any is realized among supertext pre-service language, JAVA, the Python.
According to the application's second aspect, the application provides a kind of Heterogeneous Data Processing device, and described device comprises:
Many data fields processing unit, described many data fields processing unit is corresponding with described isomeric data layer;
Matching unit, the parameter information for obtaining described isomeric data layer mates described parameter information, calls corresponding many data fields processing unit and processes;
Described many data fields processing unit also is used for generating business object, and described business object comprises the data manipulation object.
Wherein said many data fields processing unit also is used for loading the data field configuration information, generates business object according to described data field configuration information.
Wherein said matching unit is also for analyzing by the mode of URL(uniform resource locator) mapping and mating.
Said apparatus also comprises display unit, is used for the business object that generates is shown.
Said apparatus is used for also that any realizes the generation of the business object of described isomeric data layer by supertext pre-service language, JAVA, Python.
Owing to adopted above technical scheme, the beneficial effect that the application is possessed is:
In the application's embodiment, parameter by coupling isomeric data layer, find corresponding many data fields processing unit to generate business object, so that the processing scene of isomeric data layer is simplified, can avoid processing details to many data fields in the data Layer development phase, the developer can finish development flexible as the application of in the past developing single data layer, easily, and can not disturbed by the little detail that the multiple domain scene is brought, and has guaranteed the efficient of exploitation.
Description of drawings
Fig. 1 is the process flow diagram according to an embodiment of the application's Heterogeneous Data Processing method;
Fig. 2 is the process flow diagram according to another embodiment of the application's Heterogeneous Data Processing method;
Fig. 3 is the structural representation according to an embodiment of the application's Heterogeneous Data Processing device;
Fig. 4 is the structural representation according to another embodiment of the application's Heterogeneous Data Processing device.
Embodiment
By reference to the accompanying drawings the application is described in further detail below by embodiment.
Embodiment one:
As shown in Figure 1, the application's Heterogeneous Data Processing method, its a kind of embodiment may further comprise the steps:
Step 102: set up corresponding many data fields processing unit based on the isomeric data layer; Such as generating business object (BO:Business Object) for operating the ORACLE data Layer, need to set up the many data fields processing unit corresponding to this ORACLE data Layer.
Step 104: the parameter information that obtains the isomeric data layer; It should be appreciated by those skilled in the art that step 104 and step 102 can the exchange orders.
Step 106: parameter information is mated, obtain corresponding many data fields processing unit;
Step 108: many data fields processing unit generates business object, and this business object comprises the data manipulation object.
In one implementation, parameter information is mated in the step 106 comprises: analyze and mate by the mode of URL(uniform resource locator) mapping (URL Mapping).
In one implementation, step 108 specifically comprises: load the data field configuration information; Generate BO according to the data field configuration information.
We call BO to the data manipulation object.The configuration information of all BO that provide under this territory is provided the data field configuration information, and each BO specific configuration information depends on its bottom layer realization, can comprise for the BO that a data Layer is realized:
A1:BO realizes class;
A2: data Layer type;
A3: data Layer address and port;
A4: data Layer user name and password;
A5: data Layer coded format.
For one by the general distributed high-performance caching system of memcached() BO that realizes says and comprises:
B1:BO realizes class;
B2:memcached address, port;
B3: user name and password (optional).
Because the diversity of BO implementation, the content in the configuration information also is not quite similar, and it should be appreciated by those skilled in the art that the content in the configuration information should support this BO to carry out the initial work of related resource, can design as required.
About generating the process of BO, main points of at first emphasizing are: " business object of all instantiations must be followed a unified interface; use BO by this unified interface on the upper strata; and and be indifferent to the process of establishment and the loading of concrete BO ", the establishment of concrete BO then is that framework is by importing configuration information into, calling the building method of concrete BO realization class finishes, BO related resource (data Layer handle, memcached connection etc.) initial work can be finished when structure, also can initialized delays in work be carried out in concrete operational approach according to performance need.
The BO specific implementation can be more flexible, the effect of BO is to provide calling of operational approach by unified interface to the upper strata, BO on ordinary meaning can comprise one or more data manipulation objects (DAO), but also can support to be realized by non-DAO, or DAO consists of in conjunction with the complexity that other modes realize.The realization of concrete BO is not subject to the restriction of framework, and the developer can realize flexibly that what framework was paid close attention to is the unified calling interface that these BO externally provide.
In one implementation, also comprise the process that the business object that generates is shown in the application's the method.This demonstration obviously can be independent of generative process, so can obtain realizing irrelevant view object define method with concrete template engine, thoroughly removes the coupled relation of framework and template engine, so that the developer has had larger degree of freedom in the selection of template engine.
In one implementation, the application's method can be by any is realized among supertext pre-service language (PHP:Hypertext Preprocessor), JAVA, the Python.It should be appreciated by those skilled in the art that those language of supporting scripts can realize the application's technical scheme.
The concept of many data fields is that the demand scene of corresponding " application engine, a plurality of data back-end " proposes, and its essence is and can operate a plurality of isomeric data layers.Under the support of above-described embodiment, the developer can be flexible as the application of in the past developing single data layer, finish easily development, and can not disturbed by the little detail that many data fields territory scene is brought, guaranteed the efficient of exploitation, even during the demand scene of reply forms data rear end, many data fields framework is research and development, test, produce stages and bring the benefit of isolation, this is embodied in the production data territory and separates with the test data territory, the developer can under the prerequisite of not disturbing production data, finish using test and the adjustment work of logic based on test data.
Be different from the past framework just the simple ORM(of proposition be Object-Relational Mapping, Object Relation Mapping) scheme and clearly do not propose the concept of business object, simple ORM scheme can't satisfy complicated application demand, these application demands are paid close attention to the concept of the business object that possesses the unified operation interface, on the specific implementation of business object then without limits, framework was responsible for the miscellaneous service subjects transparent is injected in the web services process after business object was finished by many data field configurations, with other frame assembly collaborative work, thisly transparently refer to many data fields processing unit developer transparently, they need not to pay close attention to what use themselves is for which BO.
Fig. 2 illustrates the process flow diagram according to the another kind of embodiment of the application's Heterogeneous Data Processing method, this embodiment is implemented on the PHP language, also portable is to other web development languages, such as: Java, Python etc., present embodiment uses the Smarty view engine by default of PHP, it should be appreciated by those skilled in the art, also can realize with other template engine such as templatelite, php-sugar etc.Generate business object with the PHP language, can fully satisfy complicated demand than ORM.
Step 202: system initialization, the configuration information of establishment BO;
Step 204: send the Heterogeneous Data Processing request, this processing request has comprised the parameter information of many data fields, and this information can be embodied as a character string, by various ways transmission such as http parameters, adopts following mode in this example:
URL:/controller/action/param1/param2
In this example, many data fields processing unit is embodied as the controller class, and this controller class comprises the action method, param1, the param2 parameter for transmitting.This information also can be transmitted by the form of http head value.
Step 206: obtain this request by the index.php script.
Step 208: mated by the PHP class of being responsible for reception and assignment request of access, be embodied as dispatcher in this example, dispatcher resolves most according to field parameter, again the http request of access is analyzed by the URLMapping rule and mated, find corresponding many data fields processing unit to process.Parameter during dispatcher can ask http passes to controller with the form of action method parameter.
Such as, the http request is arranged: GET/test/hello HTTP/1.1, X-Domain:web
After entering dispatcher, look for control class TestController (supposing that TestController remains to be injected business object class title boGreeting) according to set matched rule by first order directory name test, instantiation it, this time domain parameter is web, then find the relevant configuration information of GreetingBO under the web territory, instantiation GreetingBO also is injected into the TestController.boGreeting attribute, then finds control method hello () and calls the method at TestController by second level directory name hello according to set coupling.Framework also reserved with the URL pattern match to " control class. control method " extension point.
Step 210: create the many data field processing unit corresponding with each isomeric data layer.In the present embodiment, many data fields processing unit is embodied as the controller class, specifically the controller class is corresponding to the action method of different structure isomeric data layer, those skilled in the art should understand that, can corresponding be embodied as different classes, perhaps other mode, such as function, subroutine etc.The controller class makes up the BO that meets this data field in the isomeric data layer according to the class title of the BO that meets injection condition of statement.In the present embodiment, this injection condition is embodied as the rule by the Property Name agreement.BO has represented the data Layer object under this data field, the configuration information of these BO creates when system initialization, and can find these configuration informations by the data field parameter of importing into, thereby in needs, carry out instantiation, for example: business object MessageCenter is arranged, be configured to the MysqlMessageCenter that realized by Mysql for data field A, be configured to the MongoMessageCenter that realized by Mongodb for data field B, when the majority that carries when request was B according to field parameter, framework was responsible for MongoMessageCenter of instantiation and is injected.
Step 212:controller-〉after action is finished, to return a view object (VO:View Object) of describing with PHP array structure to dispatcher, the definition of view object is irrelevant with realization, and dispatcher is responsible for resolving this view object and is submitted to the view engine and finishes the tasks such as last page output.
Step 214:Smarty is responsible for playing up with the page and shows.
The application removes the coupling of framework and template engine by the generation of business object and separating of demonstration, has improved the flexibility ratio of exploitation.
Embodiment two:
As shown in Figure 3, the application's Heterogeneous Data Processing device, its a kind of embodiment comprises many data fields processing unit and matching unit, and many data fields processing unit is corresponding with the isomeric data layer, and each many data fields processing unit can corresponding isomeric data layer; Matching unit, the parameter information for obtaining the isomeric data layer mates parameter information, calls corresponding many data fields processing unit and processes; Many data fields processing unit is used for generating business object, and this business object comprises the data manipulation object.
In one embodiment, this many data fields processing unit also is used for loading the data field configuration information, generates business object according to the data field configuration information.
In one embodiment, this matching unit is also for analyzing by the mode of URL(uniform resource locator) mapping and mating.
In one embodiment, this device also comprises display unit, is used for the business object that generates is shown.
In one embodiment, this device also is used for the generation by the business object of PHP, JAVA, any realization isomeric data layer of Python.
Fig. 4 illustrates the structural representation according to a kind of instantiation of the application's Heterogeneous Data Processing device, this embodiment is based on method shown in Figure 2, its core component is the PHP class of being responsible for receiving and assigning request of access: dispatcher, it has realized the function of matching unit.Also comprise for the controller class that generates BO, such comprises the action method, in the present embodiment, each action method is corresponding to a kind of BO, those skilled in the art should understand that, also can be embodied as corresponding to the controller class of each BO or other implementation, such as function, subroutine etc., and be used for the Smarty class that shows, the Index.php that is used for receiving request.The workflow of these classes repeats no more here with reference to embodiment shown in Figure 2.
Above content is the further description of the application being done in conjunction with concrete embodiment, can not assert that the application's implementation is confined to these explanations.For the application person of an ordinary skill in the technical field, under the prerequisite that does not break away from the application's design, can also make some simple deduction or replace, all should be considered as belonging to the application's protection domain.

Claims (10)

1. a Heterogeneous Data Processing method is characterized in that, described method comprises:
Set up corresponding many data fields processing unit based on the isomeric data layer;
Obtain the parameter information of described isomeric data layer;
Described parameter information is mated, obtain corresponding many data fields processing unit;
Described many data fields processing unit generates business object, and described business object comprises the data manipulation object.
2. the method for claim 1 is characterized in that, described many data fields processing unit generates business object and comprises:
Load the data field configuration information;
Generate business object according to described data field configuration information.
3. the method for claim 1 is characterized in that, described described parameter information is mated comprises:
Analyze and mate by the mode of URL(uniform resource locator) mapping.
4. the method for claim 1 is characterized in that, also comprises the process that the business object that generates is shown.
5. such as the arbitrary described method of claim 1 to 4, it is characterized in that described method is by any is realized among supertext pre-service language, JAVA, the Python.
6. a Heterogeneous Data Processing device is characterized in that, described device comprises:
Many data fields processing unit, described many data fields processing unit is corresponding with described isomeric data layer;
Matching unit, the parameter information for obtaining described isomeric data layer mates described parameter information, calls corresponding many data fields processing unit and processes;
Described many data fields processing unit also is used for generating business object, and described business object comprises the data manipulation object.
7. device as claimed in claim 6 is characterized in that, described many data fields processing unit also is used for loading the data field configuration information, generates business object according to described data field configuration information.
8. device as claimed in claim 6 is characterized in that, described matching unit is also for analyzing by the mode of URL(uniform resource locator) mapping and mating.
9. device as claimed in claim 6 is characterized in that, also comprises display unit, is used for the business object that generates is shown.
10. such as the arbitrary described device of claim 6 to 9, it is characterized in that described device is used for also that any realizes the generation of the business object of described isomeric data layer by supertext pre-service language, JAVA, Python.
CN201210271639.4A 2012-07-31 2012-07-31 A kind of Heterogeneous Data Processing method and apparatus Active CN102855280B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201210271639.4A CN102855280B (en) 2012-07-31 2012-07-31 A kind of Heterogeneous Data Processing method and apparatus

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201210271639.4A CN102855280B (en) 2012-07-31 2012-07-31 A kind of Heterogeneous Data Processing method and apparatus

Publications (2)

Publication Number Publication Date
CN102855280A true CN102855280A (en) 2013-01-02
CN102855280B CN102855280B (en) 2015-10-21

Family

ID=47401868

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201210271639.4A Active CN102855280B (en) 2012-07-31 2012-07-31 A kind of Heterogeneous Data Processing method and apparatus

Country Status (1)

Country Link
CN (1) CN102855280B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808534A (en) * 2014-12-27 2016-07-27 株洲南车时代电气股份有限公司 A method of extracting original data in a heterogeneous data fusion file
WO2019183918A1 (en) * 2018-03-30 2019-10-03 Beijing Yi Zhang Yun Feng Technology Co., Ltd. Cross-domain mapped compound network instruction system
CN110502662A (en) * 2019-08-23 2019-11-26 南京信易达计算技术有限公司 A kind of Heterogeneous Data Processing system and method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1093060A2 (en) * 1999-10-14 2001-04-18 Dharma Systems, Inc. SQL interface for business application software
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
CN101281466A (en) * 2008-05-27 2008-10-08 北京中企开源信息技术有限公司 Service object modeling method based on service main body characteristic

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1093060A2 (en) * 1999-10-14 2001-04-18 Dharma Systems, Inc. SQL interface for business application software
CN101114226A (en) * 2007-08-28 2008-01-30 北京中企开源信息技术有限公司 Code automatically generating device based on model component, system and method
CN101281466A (en) * 2008-05-27 2008-10-08 北京中企开源信息技术有限公司 Service object modeling method based on service main body characteristic

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105808534A (en) * 2014-12-27 2016-07-27 株洲南车时代电气股份有限公司 A method of extracting original data in a heterogeneous data fusion file
CN105808534B (en) * 2014-12-27 2019-06-11 株洲中车时代电气股份有限公司 A kind of method that isomeric data merges extraction initial data in file
WO2019183918A1 (en) * 2018-03-30 2019-10-03 Beijing Yi Zhang Yun Feng Technology Co., Ltd. Cross-domain mapped compound network instruction system
CN110502662A (en) * 2019-08-23 2019-11-26 南京信易达计算技术有限公司 A kind of Heterogeneous Data Processing system and method

Also Published As

Publication number Publication date
CN102855280B (en) 2015-10-21

Similar Documents

Publication Publication Date Title
CA2915619C (en) Method and apparatus for customized software development kit (sdk) generation
US20180365305A1 (en) System and method of consuming and integrating with rest-based cloud and enterprise services
CN106170789B (en) For providing the method and system of Function Extension to the landing page of intention
US9503310B1 (en) Methods and systems of dynamic management of resources in a virtualized environment
CN111580820B (en) Applet generation method and device
CN104735030B (en) Using open method, device and system
US20160050128A1 (en) System and Method for Facilitating Communication with Network-Enabled Devices
CN106293765A (en) A kind of layout updates method and device
CN103955482B (en) A kind of method and apparatus calling service in the terminal
CN108415710A (en) The method and system of API is issued, called in Intelligent dialogue development platform
CN106230889B (en) resource management method and system for mobile application service components
CN103235718A (en) Method and device for generating remote procedure call (RPC) code
CN110619002A (en) Data processing method, device and storage medium
CN102855280B (en) A kind of Heterogeneous Data Processing method and apparatus
CN103957255A (en) Lightweight application development cloud service platform and method for having access to resources thereof
Sharma et al. Modeling cloud SaaS with SOA and MDA
CN101409731A (en) Remote control method for household electrical equipment through IE
CN109766489A (en) Data processing method, client, server and computer readable storage medium
CN105005678B (en) The method and apparatus of Resource Exchange platform acquisition Role Information
US20110041069A1 (en) User interface for aggregating services in a data processing system
US11838294B2 (en) Method for identifying user, storage medium, and electronic device
CN109976713A (en) Script processing method and device for Service Assembly
CN114661274A (en) Method and device for generating intelligent contract
Bryksin et al. Ubiq Mobile+ QReal a Technology for Development of Distributed Mobile Services
Aziz Service-oriented layered architecture for smart home

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant