CN109857448A - A kind of multi-data source cut-in method and device - Google Patents

A kind of multi-data source cut-in method and device Download PDF

Info

Publication number
CN109857448A
CN109857448A CN201811648719.0A CN201811648719A CN109857448A CN 109857448 A CN109857448 A CN 109857448A CN 201811648719 A CN201811648719 A CN 201811648719A CN 109857448 A CN109857448 A CN 109857448A
Authority
CN
China
Prior art keywords
data source
source
data
class
policy
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
Application number
CN201811648719.0A
Other languages
Chinese (zh)
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.)
Beike Technology Co Ltd
Original Assignee
Beike 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 Beike Technology Co Ltd filed Critical Beike Technology Co Ltd
Priority to CN201811648719.0A priority Critical patent/CN109857448A/en
Publication of CN109857448A publication Critical patent/CN109857448A/en
Pending legal-status Critical Current

Links

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The embodiment of the invention provides a kind of multi-data source cut-in method and devices, method includes: when having detected the access of multiple source of new data, one corresponding data source policy is set for each different source of new data and realizes class, the data source policy realizes that class is used to encapsulate the event and node data information of the source of new data;And the operation data source policy realizes class, by each source of new data isolation processing.A kind of multi-data source cut-in method and device provided in an embodiment of the present invention so that each data source is carried out isolation processing, facilitate the later period to extend, while meeting software design opening and closing principle by the way that an independent data source abstract class is arranged for each newly-increased data source.

Description

A kind of multi-data source cut-in method and device
Technical field
The present embodiments relate to transaction visualization technique field more particularly to a kind of multi-data source cut-in methods and dress It sets.
Background technique
Currently, needing to dock multiple data sources on carrying out transaction visualization business, for example, contract dataset in label, System data, financial data etc. after label.
But existing transaction visualization system to data source operation processing when, it may be desirable in view of multi-data source Compatible processing can generate many judgement branches when carrying out logical process, and these judge that branch can be to later period code Maintenance process causes very big trouble, so that system has very big risk hidden danger.
Therefore, a kind of multi-data source cut-in method is needed now to solve the above problems.
Summary of the invention
To solve the above-mentioned problems, the embodiment of the present invention provides one kind and overcomes the above problem or at least be partially solved State a kind of multi-data source cut-in method and device of problem.
The first aspect embodiment of the present invention provides a kind of multi-data source cut-in method, comprising:
When having detected the access of multiple source of new data, one corresponding data source is set for each different source of new data Strategy realizes class, and the data source policy realizes that class is used to encapsulate event and node data information and the behaviour of the source of new data Make the data source policy and realize class, by each source of new data isolation processing.
The embodiment of the invention provides a kind of multi-data source access devices for second aspect, comprising:
Abstract class definition module, for being each different source of new data when having detected the access of multiple source of new data The corresponding data source policy of setting one realizes class, and the data source policy realizes that class is used to encapsulate the event of the source of new data With node data information;And isolation processing module, class is realized for operating the data source policy, by each source of new data Isolation processing.
The embodiment of the invention provides a kind of electronic equipment for the third aspect, comprising:
Processor, memory, communication interface and bus;Wherein, the processor, memory, communication interface pass through described Bus completes mutual communication;The memory is stored with the program instruction that can be executed by the processor, the processor Described program instruction is called to be able to carry out above-mentioned multi-data source cut-in method.
The embodiment of the invention provides a kind of non-transient computer readable storage medium, the non-transient calculating for fourth aspect Machine readable storage medium storing program for executing stores computer instruction, and the computer instruction makes the computer execute above-mentioned multi-data source access Method.
A kind of multi-data source cut-in method and device provided in an embodiment of the present invention, by being arranged for each newly-increased data source One independent data source abstract class facilitates the later period to extend, while meeting software so that each data source is carried out isolation processing Design opening and closing principle.
Detailed description of the invention
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, to embodiment or will show below There is attached drawing needed in technical description to be briefly described, it should be apparent that, the accompanying drawings in the following description is this hair Bright some embodiments for those of ordinary skill in the art without creative efforts, can be with root Other attached drawings are obtained according to these attached drawings.
Fig. 1 is a kind of multi-data source cut-in method flow diagram provided in an embodiment of the present invention;
Fig. 2 is a kind of multi-data source access device structural schematic diagram provided in an embodiment of the present invention;
Fig. 3 is the structural block diagram of electronic equipment provided in an embodiment of the present invention.
Specific embodiment
In order to make the object, technical scheme and advantages of the embodiment of the invention clearer, below in conjunction with the embodiment of the present invention In attached drawing, technical solution in the embodiment of the present invention is explicitly described, it is clear that described embodiment is the present invention A part of the embodiment, instead of all the embodiments.Based on the embodiments of the present invention, those of ordinary skill in the art are not having Every other embodiment obtained under the premise of creative work is made, shall fall within the protection scope of the present invention.
Currently, second-hand house details page needs are opened up according to different situations when carrying out such as second-hand house transaction Show a variety of different data informations, it is common such as data information, financial data information after data information, label in label, these The data source of polymorphic type can concentrate carry out compatible processing, but when later period progress code maintenance, can band due to the mode of compatible management Carry out very big risk hidden danger.
For above-mentioned scene and scene problems faced, Fig. 1 is a kind of data source access provided in an embodiment of the present invention Method flow schematic diagram, as shown in Figure 1, comprising:
101, when having detected the access of multiple source of new data, one corresponding number is set for each different source of new data Class is realized according to source policy, and the data source policy realizes that class is used to encapsulate the event and node data information of the source of new data;
102, it operates the data source policy and realizes class, by each source of new data isolation processing.
The data processing of visualization process it should be noted that method provided in an embodiment of the present invention is suitable for trading, example Such as second-hand house transaction, transaction environment of renting a house, are not especially limited this embodiment of the present invention.The execution master of the embodiment of the present invention Body is computer equipment, is realized by software programming, and the scheme provided through the embodiment of the present invention can be using the present invention Each data source is carried out isolation processing by the strategy pattern that embodiment provides, consequently facilitating data management, while meeting software and setting Meter opening and closing principle.
Specifically, in a step 101, the embodiment of the present invention in data processing can the access situation to data source examine It surveys, when detecting new data source access, such as: data source A, data source B and data source have been only existed in previous system C can trigger the strategy pattern of the embodiment of the present invention when detecting by data source D and data source E.The strategy of the embodiment of the present invention Mode is that each data source defines a corresponding data source abstract class, i.e., the data source policy in the embodiment of the present invention Realize class, which is used to define the event and node data information of data source, and each data source is not according to respectively Same business is realized, so that each Data Source Independent is encapsulated in corresponding data source abstract class.It is understood that , the above process realizes the isolation of each data source from code, when the data in each data source are adjusted, that This will not affect that between each other, consequently facilitating data management.
Such as: when currently having that data source, financial data source and proxy data source are accessed after data source, label in label, this hair Bright embodiment can in label after data source, label data source, financial data source and proxy data source be respectively set one it is corresponding Data source policy realizes class, which realizes that class can quote data source reference in corresponding strategy pattern, such as label Data source reference strategy 2, financial data source reference strategy 3, proxy data source reference strategy 4 after strategy 1, label.According to respective The different data source of strategy pattern can carry out operation processing respectively.At the same time, which realizes that class can also be after The same node data of same abstract class data source is held, but the classification inherited is different, such as data source inherits classification 1, label in label Data source inherits classification 2 afterwards, classification 3 is inherited in financial data source, classification 4 is inherited in proxy data source, thus to same node data Operation processing is carried out using different strategy patterns.
Further, in a step 102, when according to strategy pattern provided in an embodiment of the present invention be each data source be arranged After good corresponding data source abstract class, since different data sources respectively corresponds different data source abstract class, then to it In data source when carrying out operation processing, it is only necessary to by the corresponding data source abstract class in oriented instruction operation data source, Without operating the corresponding data source abstract class of other data sources, accomplish the independent control of each data source, that is, the present invention The isolation of multiple data sources as described in the examples controls.Such as: it is current for data source, financial data after data source, label in label Source and proxy data source are respectively arranged with data source abstract class A, data source abstract class B, data source abstract class C and data source Abstract class D, then when needing to carry out data source in label control processing, it is only necessary to which operation class is sent to data source abstract class A Instruction, without controlling each data source abstract class.
A kind of multi-data source cut-in method provided in an embodiment of the present invention, by being arranged one solely for each newly-increased data source Vertical data source abstract class facilitates the later period to extend, while meeting software design and opening so that each data source is carried out isolation processing Close principle.
It on the basis of the above embodiments, is each different described when having detected the access of multiple source of new data Source of new data is arranged before a corresponding data source policy realization class, the method also includes:
A corresponding data source policy is respectively set for preset multiple stale sources and realizes class.
By the content of above-described embodiment it is found that the embodiment of the present invention is when there is new data source access, one can be arranged for it A corresponding data source policy realizes class, then can realize that class is individually adjusted for the data source policy.
It is understood that for data source already existing in system, i.e. legacy data described in the embodiment of the present invention Source, a corresponding data source policy can also be arranged for it and realize class for the embodiment of the present invention, likewise, the data source policy is realized Class is also used in the event and node data of encapsulation stale source.
On the basis of the above embodiments, the stale source includes:
One or more of data source and financial data source after data source, label in label.
Be directed to house transaction field, general frequently-used data can comprising data and financial data after data, label in label, So embodiment of the present invention, can will be in data after data, label in label and the corresponding label of financial data in order to simplify system operatio One or more after data source, label in data source and financial data source is preset as stale source, to reduce and be It unites the workload of each data processing.
On the basis of the above embodiments, the method also includes:
When needing to eliminate any one data source, operates the corresponding data source policy of the data source and realize Class.
By the content of above-described embodiment it is found that the process that the embodiment of the present invention can complete data source access, then can be with Understand, when a certain data source no longer demand, in order to save system resource, the embodiment of the present invention can equally be gone It removes.
For removal process without being operated to data source itself, due to the relevant event of data source and node data It is encapsulated to be realized in class in corresponding data source policy, so directly operating its corresponding data source policy realizes that class can be complete It is removed at data source.
On the basis of the above embodiments, to the data source policy realize class data analysis layer and Business Logic into Row function division carries out different function treatments in the data analysis layer and the Business Logic.
Currently, in the prior art, for model-view-controller (MVC) architecture system, the control side of multi-data source Formula can generally be accessed in data processing (Model) layer, but that service logic can be made to mix is miscellaneous in business for this processing mode Logic (Controller) layer, to be unfavorable for the extension and maintenance of later data.
In view of the above-mentioned problems, strategy pattern used in the embodiment of the present invention, can be drawn from Model, Controller layers Point, corresponding Model, Controller layer of processing of different data sources is respectively different, such as: Model layers only carry out data source pass In the relevant treatment of function A, and the Controller layers of relevant treatment only carried out about function B so that Model layer with Controller layers, from each other without influence, it is controllable to be changed maintenance cost.
Fig. 2 is a kind of multi-data source access device structural schematic diagram provided in an embodiment of the present invention, as shown in Figure 2, comprising: Abstract class definition module 201 and isolation processing module 202, in which:
Abstract class definition module 201 is used for when having detected the access of multiple source of new data, is each different new data Source is arranged a corresponding data source policy and realizes class, and the data source policy realizes that class is used to encapsulate the thing of the source of new data Part and node data information;
Isolation processing module 202 realizes class for operating the data source policy, by each source of new data isolation processing.
Specific how to be accessed by abstract class definition module 201 and the progress multi-data source of isolation processing module 202 can For executing the technical solution of multi-data source cut-in method embodiment shown in FIG. 1, it is similar that the realization principle and technical effect are similar, this Place repeats no more.
A kind of multi-data source access device provided in an embodiment of the present invention, by being arranged one solely for each newly-increased data source Vertical data source abstract class facilitates the later period to extend, while meeting software design and opening so that each data source is carried out isolation processing Close principle.
On the basis of the above embodiments, the multi-data source access device further include:
Generic module is arranged in stale source, for a corresponding data source plan to be respectively set for preset multiple stale sources Slightly realize class.
On the basis of the above embodiments, the stale source includes:
Data source and financial data source after data source, label in label.
On the basis of the above embodiments, the multi-data source access device further include:
Data source cancellation module, for operating the data source pair when needing to eliminate any one data source The data source policy answered realizes class.
On the basis of the above embodiments, the multi-data source access device further include:
Function division module, for realizing that class carries out function in data analysis layer and Business Logic to the data source policy It can divide, carry out different function treatments in the data analysis layer and the Business Logic.
The embodiment of the present invention provides a kind of electronic equipment, comprising: at least one processor;And with the processor communication At least one processor of connection, in which:
Fig. 3 is the structural block diagram of electronic equipment provided in an embodiment of the present invention, referring to Fig. 3, the electronic equipment, comprising: Processor 301, communication interface 302, memory 303 and bus 304, wherein processor 301, communication interface 302, memory 303 Mutual communication is completed by bus 304.Processor 301 can call the logical order in memory 303, as follows to execute Method: when having detected the access of multiple source of new data, one corresponding data source plan is set for each different source of new data Slightly realize class, the data source policy realizes that class is used to encapsulate the event and node data information of the source of new data;Operation institute It states data source policy and realizes class, by each source of new data isolation processing.
The embodiment of the present invention discloses a kind of computer program product, and the computer program product is non-transient including being stored in Computer program on computer readable storage medium, the computer program include program instruction, when described program instructs quilt When computer executes, computer is able to carry out method provided by above-mentioned each method embodiment, for example, more when having detected When a source of new data accesses, one corresponding data source policy is set for each different source of new data and realizes class, the data Source policy realizes that class is used to encapsulate the event and node data information of the source of new data;The data source policy is operated to realize Class, by each source of new data isolation processing.
The embodiment of the present invention provides a kind of non-transient computer readable storage medium, the non-transient computer readable storage Medium storing computer instruction, the computer instruction make the computer execute side provided by above-mentioned each method embodiment Method, for example, when having detected the access of multiple source of new data, one corresponding number is set for each different source of new data Class is realized according to source policy, and the data source policy realizes that class is used to encapsulate the event and node data information of the source of new data; It operates the data source policy and realizes class, by each source of new data isolation processing.
Through the above description of the embodiments, those skilled in the art can be understood that each embodiment can It realizes by means of software and necessary general hardware platform, naturally it is also possible to pass through hardware.Based on this understanding, on Stating technical solution, substantially the part that contributes to existing technology can be embodied in the form of software products in other words, should Computer software product may be stored in a computer readable storage medium, such as ROM/RAM, magnetic disk, CD, including several fingers It enables and using so that a computer equipment (can be personal computer, server or the network equipment etc.) executes each implementation Method described in certain parts of example or embodiment.
Finally, it should be noted that the above embodiments are merely illustrative of the technical solutions of the present invention, rather than its limitations;Although Present invention has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that: it still may be used To modify the technical solutions described in the foregoing embodiments or equivalent replacement of some of the technical features; And these are modified or replaceed, technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution spirit and Range.

Claims (10)

1. a kind of multi-data source cut-in method characterized by comprising
Abstract class definition step is arranged one when having detected the access of multiple source of new data for each different source of new data Corresponding data source policy realizes class, and the data source policy realizes that class is used to encapsulate the event and number of nodes of the source of new data It is believed that breath;And
Isolation processing step operates the data source policy and realizes class, by each source of new data isolation processing.
2. the method according to claim 1, wherein the method is also before the abstract class definition step Include:
Class step is arranged in stale source, and a corresponding data source policy is respectively set for preset multiple stale sources and realizes Class.
3. according to the method described in claim 2, it is characterized in that, the stale source includes:
One or more of data source and financial data source after data source, label in label.
4. method according to claim 1 to 3, which is characterized in that the method also includes:
Data source removal process operates the corresponding data of the data source when needing to eliminate any one data source Source policy realizes class.
5. method according to claim 1 to 3, which is characterized in that the method also includes:
Function division step realizes that class carries out function division in data analysis layer and Business Logic to the data source policy, Different function treatments is carried out in the data analysis layer and the Business Logic.
6. a kind of multi-data source access device characterized by comprising
Abstract class definition module, for being arranged for each different source of new data when having detected the access of multiple source of new data One corresponding data source policy realizes class, and the data source policy realizes that class is used to encapsulate the event and section of the source of new data Point data information;With
Isolation processing module realizes class for operating the data source policy, by each source of new data isolation processing.
7. multi-data source access device according to claim 6, which is characterized in that the multi-data source access device also wraps It includes:
Generic module is arranged in stale source, real for a corresponding data source policy to be respectively set for preset multiple stale sources Existing class.
8. multi-data source access device according to claim 6, which is characterized in that the multi-data source access device also wraps It includes:
Data source cancellation module, for it is corresponding to operate the data source when needing to eliminate any one data source Data source policy realizes class.
9. a kind of electronic equipment, which is characterized in that including memory and processor, the processor and the memory pass through always Line completes mutual communication;The memory is stored with the program instruction that can be executed by the processor, the processor tune Method as claimed in claim 1 to 5 is able to carry out with described program instruction.
10. a kind of non-transient computer readable storage medium, which is characterized in that the non-transient computer readable storage medium is deposited Computer instruction is stored up, the computer instruction makes the computer execute such as method described in any one of claim 1 to 5.
CN201811648719.0A 2018-12-30 2018-12-30 A kind of multi-data source cut-in method and device Pending CN109857448A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201811648719.0A CN109857448A (en) 2018-12-30 2018-12-30 A kind of multi-data source cut-in method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201811648719.0A CN109857448A (en) 2018-12-30 2018-12-30 A kind of multi-data source cut-in method and device

Publications (1)

Publication Number Publication Date
CN109857448A true CN109857448A (en) 2019-06-07

Family

ID=66893484

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201811648719.0A Pending CN109857448A (en) 2018-12-30 2018-12-30 A kind of multi-data source cut-in method and device

Country Status (1)

Country Link
CN (1) CN109857448A (en)

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7024468B1 (en) * 2000-04-27 2006-04-04 Hewlett-Packard Development Company, L.P. Internet usage data recording system and method with configurable data collector system
CN101650747A (en) * 2009-09-09 2010-02-17 金蝶软件(中国)有限公司 Method and device for integrating multiple data sources and single sign-on system
CN104166704A (en) * 2014-08-05 2014-11-26 华为技术有限公司 Method and device for shielding heterogeneous data sources
CN104484182A (en) * 2014-12-25 2015-04-01 广东电子工业研究院有限公司 Elastic extensible multi-data-source mvc (model-view-controller) model architecture
CN104765843A (en) * 2015-04-16 2015-07-08 国家电网公司 Control method used for graphic interface of electric power real-time monitoring system
CN105447146A (en) * 2015-11-26 2016-03-30 陕西艾特信息化工程咨询有限责任公司 Massive data collecting and exchanging system and method
CN106294486A (en) * 2015-06-04 2017-01-04 交通银行股份有限公司 The processing method of finance market data and system
CN107276992A (en) * 2017-05-26 2017-10-20 亿海蓝(北京)数据技术股份公司 A kind of method and system of multi-data source access
CN108710693A (en) * 2018-05-22 2018-10-26 浪潮软件集团有限公司 Data visualization method and device

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7024468B1 (en) * 2000-04-27 2006-04-04 Hewlett-Packard Development Company, L.P. Internet usage data recording system and method with configurable data collector system
CN101650747A (en) * 2009-09-09 2010-02-17 金蝶软件(中国)有限公司 Method and device for integrating multiple data sources and single sign-on system
CN104166704A (en) * 2014-08-05 2014-11-26 华为技术有限公司 Method and device for shielding heterogeneous data sources
CN104484182A (en) * 2014-12-25 2015-04-01 广东电子工业研究院有限公司 Elastic extensible multi-data-source mvc (model-view-controller) model architecture
CN104765843A (en) * 2015-04-16 2015-07-08 国家电网公司 Control method used for graphic interface of electric power real-time monitoring system
CN106294486A (en) * 2015-06-04 2017-01-04 交通银行股份有限公司 The processing method of finance market data and system
CN105447146A (en) * 2015-11-26 2016-03-30 陕西艾特信息化工程咨询有限责任公司 Massive data collecting and exchanging system and method
CN107276992A (en) * 2017-05-26 2017-10-20 亿海蓝(北京)数据技术股份公司 A kind of method and system of multi-data source access
CN108710693A (en) * 2018-05-22 2018-10-26 浪潮软件集团有限公司 Data visualization method and device

Non-Patent Citations (4)

* Cited by examiner, † Cited by third party
Title
侯玉香等: "《JSP Web应用开发案例教程》", 30 September 2017, pages: 235 - 237 *
张东平: "《区域成人高校服务学习型城区建设的实践研究》", 31 October 2016, pages: 345 - 348 *
黎昭声: "异构数据源的数据访问封装功能的实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》 *
黎昭声: "异构数据源的数据访问封装功能的实现", 《中国优秀硕士学位论文全文数据库 信息科技辑》, no. 11, 15 November 2013 (2013-11-15) *

Similar Documents

Publication Publication Date Title
US20220237532A1 (en) System and Method for Modelling and Monitoring Processes in Organizations Using Digital Twins
US11385613B2 (en) Process image within controllers enabling visibility and accessibility of real world objects
CN102594919B (en) Information technology (IT) resource supporting system
CN107526624A (en) A kind of intelligent contract enforcement engine based on Java Virtual Machine
EP3063655A1 (en) Management of the lifecycle of a cloud service modeled as a topology
CN107766147A (en) Distributed data analysis task scheduling system
CN108897587B (en) Pluggable machine learning algorithm operation method and device and readable storage medium
CN109032590B (en) Configuration method, device, terminal and storage medium of visual development environment
CN109976779A (en) Robot software's online upgrading dissemination method, device, equipment and storage medium
CN104423968A (en) Method of designing business logic, server performing the same and storage medium storing the same
CN109359809A (en) Task distribution method, system, computer equipment and storage medium
CN109359732A (en) A kind of chip and the data processing method based on it
CN103077070A (en) Cloud computing management system and management method for cloud computing systems
CN108876619A (en) Processing method, device, equipment and medium based on block chain intelligence contract
CN109491571A (en) A kind of association of configuration item and its associated diagram methods of exhibiting and system
CN108415758A (en) Distributed transaction coordination approach and device
CN109634714A (en) A kind of method and device of intelligent scheduling
WO2018223678A1 (en) Data processing method and processing device
CN109857448A (en) A kind of multi-data source cut-in method and device
WO2020062277A1 (en) Management method and apparatus for computing resources in data pre-processing phase of neural network
CN109710272A (en) Update the packaging method and device of file
CN107861807A (en) The optimization method and device of routine call
CN109345122A (en) The management method and device of application process in cloud computing system
CN107908391A (en) The optimization method and device of routine call
CN107528724A (en) A kind of optimized treatment method and device of node cluster

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20190607