CN110262854A - Multi-source data processing method and terminal device - Google Patents
Multi-source data processing method and terminal device Download PDFInfo
- Publication number
- CN110262854A CN110262854A CN201910426004.9A CN201910426004A CN110262854A CN 110262854 A CN110262854 A CN 110262854A CN 201910426004 A CN201910426004 A CN 201910426004A CN 110262854 A CN110262854 A CN 110262854A
- Authority
- CN
- China
- Prior art keywords
- program
- section
- data
- function
- 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
- 238000003672 processing method Methods 0.000 title claims abstract description 20
- 238000012545 processing Methods 0.000 claims abstract description 31
- 238000003860 storage Methods 0.000 claims abstract description 16
- 230000005540 biological transmission Effects 0.000 claims abstract description 9
- 230000006870 function Effects 0.000 claims description 94
- 238000000034 method Methods 0.000 claims description 83
- 238000004590 computer program Methods 0.000 claims description 14
- 238000000605 extraction Methods 0.000 claims description 3
- 241001269238 Data Species 0.000 abstract description 5
- 230000009471 action Effects 0.000 abstract description 4
- 238000005516 engineering process Methods 0.000 abstract description 3
- 238000004883 computer application Methods 0.000 abstract description 2
- 238000010586 diagram Methods 0.000 description 4
- 230000008569 process Effects 0.000 description 3
- 238000012986 modification Methods 0.000 description 2
- 230000004048 modification Effects 0.000 description 2
- 238000012546 transfer Methods 0.000 description 2
- 230000006399 behavior Effects 0.000 description 1
- 230000009286 beneficial effect Effects 0.000 description 1
- 238000009954 braiding Methods 0.000 description 1
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 230000008878 coupling Effects 0.000 description 1
- 238000010168 coupling process Methods 0.000 description 1
- 238000005859 coupling reaction Methods 0.000 description 1
- 238000005520 cutting process Methods 0.000 description 1
- 238000011161 development Methods 0.000 description 1
- 230000018109 developmental process Effects 0.000 description 1
- 238000009826 distribution Methods 0.000 description 1
- 230000005611 electricity Effects 0.000 description 1
- 239000000284 extract Substances 0.000 description 1
- 230000000977 initiatory effect Effects 0.000 description 1
- 238000009434 installation Methods 0.000 description 1
- 230000035515 penetration Effects 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000000926 separation method Methods 0.000 description 1
- 230000036299 sexual function Effects 0.000 description 1
- 230000033772 system development Effects 0.000 description 1
- 238000011282 treatment Methods 0.000 description 1
- 230000001960 triggered effect Effects 0.000 description 1
- 238000012795 verification Methods 0.000 description 1
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/20—Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
- G06F16/25—Integrating or interfacing systems involving database management systems
- G06F16/256—Integrating or interfacing systems involving database management systems in federated or virtual databases
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/448—Execution paradigms, e.g. implementations of programming paradigms
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Databases & Information Systems (AREA)
- Software Systems (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Stored Programmes (AREA)
Abstract
The present invention is suitable for computer application technology, provide a kind of multi-source data processing method, terminal device and computer readable storage medium, it include: by determining at least one section program corresponding to the program technic in the call request of user terminal transmission, and the corresponding target data of each section program, and the target data wherein stored is transferred from preset multiple data sources, directly to handle the corresponding target data of section program according to section program, the complete function of realizing program technic, avoid the tedious steps that a variety of multi-source datas are extracted to program technic of seeking unity of action again later, reduce the resource consumption and time loss when multi-source data obtains, increase the efficiency of data acquisition and data processing.
Description
Technical field
The invention belongs to computer application technology more particularly to a kind of multi-source data processing method, terminal device and
Computer readable storage medium.
Background technique
In current many data application scenes, the acquisition of data information often has multiple data sources to provide clothes jointly
Business, in the prior art by disposing multiple applications, each application is separately connected different application data sources, extracts institute respectively
After needing data, summarized, is finally combined into result and returns to called side.This way is expended from resource view very much first
Resource needs multiple common offer services of application.Secondly, being related to the communication between mostly application, the time loss of network layer
Performance is very influenced, therefore, is deposited in the prior art when the data based on different data sources carry out data acquisition with data processing
In the lower problem of efficiency.
Summary of the invention
In view of this, the embodiment of the invention provides a kind of multi-source data processing methods, terminal device and computer-readable
Storage medium, to solve in the prior art, when obtaining from different data sources with processing data, there are time, resource consumption are larger
The problem of.
The first aspect of the embodiment of the present invention provides a kind of multi-source data processing method, comprising:
Obtain the call request for the program technic that user terminal is sent;Including described program method in the call request
Function;The method that described program method is used to indicate processing data;
The call request is parsed, at least one corresponding section program of described program method is obtained, and is executed each
The Data Identification of target data to be called when the section program;The section program is to carry out section to described program method
Obtained program;The section program is for calling and handling associated with the section program in preset each data source
Data;All section programs for completely realizing the function of described program method together;
According to the Data Identification, target data corresponding with the Data Identification is called from each data source,
All section programs are executed, realize the function of described program method.
The second aspect of the embodiment of the present invention provides a kind of terminal device, including memory, processor and is stored in
In the memory and the computer program that can run on the processor, when the processor executes the computer program
It performs the steps of
Obtain the call request for the program technic that user terminal is sent;Including described program method in the call request
Function;The method that described program method is used to indicate processing data;
The call request is parsed, at least one corresponding section program of described program method is obtained, and is executed each
The Data Identification of target data to be called when the section program;The section program is to carry out section to described program method
Obtained program;The section program is for calling and handling associated with the section program in preset each data source
Data;All section programs for completely realizing the function of described program method together;
According to the Data Identification, target data corresponding with the Data Identification is called from each data source,
All section programs are executed, realize the function of described program method.
The third aspect of the embodiment of the present invention provides a kind of terminal device, comprising:
Acquiring unit, the call request of the program technic for obtaining user terminal transmission;Include in the call request
The function of described program method;The method that described program method is used to indicate processing data;
Resolution unit obtains at least one corresponding section program of described program method for parsing the call request,
And execute the Data Identification of target data to be called when each section program;The section program is to described program
Method carries out the program that section obtains;The section program is used to call and handle in preset each data source and the section
The associated data of program;All section programs for completely realizing the function of described program method together;
Execution unit, for being called and the Data Identification pair from each data source according to the Data Identification
The target data answered executes all section programs, realizes the function of described program method.
The fourth aspect of the embodiment of the present invention provides a kind of computer readable storage medium, the computer storage medium
It is stored with computer program, the computer program includes program instruction, and described program instruction makes institute when being executed by a processor
State the method that processor executes above-mentioned first aspect.
Existing beneficial effect is the embodiment of the present invention compared with prior art:
The call request for the program technic that the embodiment of the present invention is sent by acquisition user terminal;The calling is parsed to ask
It asks, obtains at least one corresponding section program of described program method, and execute to be called when each section program
The Data Identification of target data;The section program is to carry out the program that section obtains to described program method;The section journey
Sequence is for calling and handling data associated with the section program in preset each data source;All section programs
For completely realizing the function of described program method together;According to the Data Identification, called from each data source
Target data corresponding with the Data Identification executes all section programs, realizes the function of described program method.Pass through
Determine at least one section program and each section journey corresponding to the program technic in the call request of user terminal transmission
The corresponding target data of sequence, and the target data wherein stored is transferred from preset multiple data sources, come directly according to section
Program handles the corresponding target data of section program, and the complete function of realizing program technic avoids mentioning a variety of multi-source datas
The tedious steps for program technic of seeking unity of action again after taking reduce resource consumption and time loss when multi-source data obtains, increase
Add the efficiency of data acquisition and data processing.
Detailed description of the invention
It to describe the technical solutions in the embodiments of the present invention more clearly, below will be to embodiment or description of the prior art
Needed in attached drawing be briefly described, it should be apparent that, the accompanying drawings in the following description is only of the invention some
Embodiment for those of ordinary skill in the art without any creative labor, can also be according to these
Attached drawing obtains other attached drawings.
Fig. 1 is the flow chart for the multi-source data processing method that the embodiment of the present invention one provides;
Fig. 2 is the flow chart of multi-source data processing method provided by Embodiment 2 of the present invention;
Fig. 3 is the schematic diagram for the terminal device that the embodiment of the present invention three provides;
Fig. 4 is the schematic diagram for the terminal device that the embodiment of the present invention four provides.
Specific embodiment
In being described below, for illustration and not for limitation, the tool of such as particular system structure, technology etc is proposed
Body details, to understand thoroughly the embodiment of the present invention.However, it will be clear to one skilled in the art that there is no these specific
The present invention also may be implemented in the other embodiments of details.In other situations, it omits to well-known system, device, electricity
The detailed description of road and method, in case unnecessary details interferes description of the invention.
In order to illustrate technical solutions according to the invention, the following is a description of specific embodiments.
It is the flow chart for the multi-source data processing method that the embodiment of the present invention one provides referring to Fig. 1, Fig. 1.In the present embodiment
The executing subject of multi-source data processing method is terminal.Terminal includes but is not limited to smart phone, tablet computer, wearable device
Equal mobile terminals, can also be desktop computer etc..Multi-source data processing method as shown in the figure may comprise steps of:
S101: the call request for the program technic that user terminal is sent is obtained;It include described program in the call request
The function of method;The method that described program method is used to indicate processing data.
In practical applications in many cases, server is used to handle the various requests of user terminal.User terminal is logical
It crosses to server and sends various types of instructions or request, so that server is executed and realized.Service in the present embodiment
Device can obtain the call request of the program technic of user terminal transmission at any time, wherein call request includes the program technic
Function, that is, server can obtain user terminal and need which type of function after receiving the call request, then
According to the function of the program technic in call request, corresponding execution program is determined.
In practical applications, when starting a program technic, then program technic has invoked another method again, works as journey
Also a line of demarcation is passed through when sequence enters called method body, after executing completion by tune method, program flow will be returned
To program technic, here it is the boundaries how we do not recognize usually.Program section is used, we can put code
Onto those boundaries, these boundaries represent a place or a condition, very useful for placing some reusable codes.
S102: parsing the call request, obtains at least one corresponding section program of described program method, and execute
The Data Identification of target data to be called when each section program;The section program is to carry out to described program method
The program that section obtains, all section programs for realizing described program method function.
After getting call request, we parse call request, obtain program technic corresponding at least one
A section program.Section program in the present embodiment is to be obtained after carrying out section to program technic one by one with small function
The program of energy, all section programs are operated together the function that can realize the program technic.
In exploitation software systems, it is relatively simple to be frequently encountered function, it is widely distributed in systems but with specific industry
The unrelated function logic of logic of being engaged in.Such as log, the functions such as caching.These functions are more independent and the correlation of service logic
It is not high, but each level of system requires to pay close attention to it.Previous system development, more emphasis are longitudinal layered system, adjacent
Level between there are unidirectional adduction relationship, it is mutually transparent between non-conterminous level.But this development scheme is by longitudinal function
It can be isolated, coupled relation can not be eliminated with the function of each level versatility, the module of versatility be caused to safeguard relatively difficult, this reality
It applies in example through precompile mode, code level extension or runtime dynamic proxy, realizes and moved in the case where not modifying source code
State executes each section program, to realize the function of the program technic of user terminal transmission.Therefore the concept of lateral section is introduced,
By log, these general sexual functions such as caching are respectively used as a kind of lateral section, will need to carry out the places of these function treatments
Section focus is done, the coupled relation of section and its focus is stripped out and forms new module to section and its concern click-through
Row braiding, makes the developer of service logic that need not focus on specific section logic in this way, eliminates section function and business
The coupling of logic.
When parsing to call request, we can obtain some information by call request, these information can be with
For executing section program to realize the program function of call request.These information may include: section, answer for indicating one
With some aspect of system;Notice is embodied in a method for realizing section logic for indicating the behavior of section.
Common notice has: before, after, around, throws etc.;Tie point is for indicating to be inserted into application program implementation procedure
The point of section;Point of penetration specifies notice and should apply on which tie point.Target object refers to the object being notified.
Program technic in the present embodiment is for indicating an a full set of application program, for realizing a complete function
Energy.It but may include some small routines in this program technic, and processing corresponding to each small routine or needs obtain
The data source taken is different, and therefore, we carry out section to the program technic in advance, obtains different section methods.
In order to improve the reusability of application program and the efficiency of programming, section method base is preset in the present embodiment,
Section method for will be carried out small function is stored into the section method base, when method program needs, directly
It is called.We pass through the call request got, and section corresponding with the call request is found in the method base of section
Method program.It is preset with data source identification in each section method program, for indicating acquisition required for the section method program
Or the data in the data source called.
S103: according to the Data Identification, target corresponding with the Data Identification is called from each data source
Data execute all section programs, realize the function of described program method.
When calling the data in data source, we first determine the corresponding data source of all section methods in program technic,
It determines the configuration information of each data source, and data source is configured according to configuration information;Configuration information includes data source mark
Knowledge, data source address, data source pin and minimum and maximum number of connections information etc., configuration information be used for by section method with
Data source association, to connect upper corresponding data source when spring starts respectively.
Further, step S103 can specifically include step S1031 and step S1032:
S1031: according to the Data Identification, the configuration information of the corresponding target data of the Data Identification is determined.
We first determine the corresponding mesh of Data Identification according to Data Identification when according to Data Identification to determine target data
Mark the configuration information of data.These configurations can include but is not limited to: database name, database address, database user name are close
Code, minimum and maximum number of connections information etc..
Illustratively, under different business scene, method A and method B need to connect at runtime respectively pg database and
The two data sources of mysql database.On method A, needs to add customized note, the key of data source is specified on note
For pgdatabase, same addition is explained on method B, and explaining upper will specify data source key for mysqldatabase.
S1032: according to the configuration information and the Data Identification, extracting the target data from the data source,
And the section program is executed to handle the target data, realize the function of described program method.
After the configuration information that the corresponding target data of Data Identification has been determined, we are according to configuration information and data mark
Know, target data is extracted from corresponding data source, and execute each section program and carry out processing target data, finally realizes and use
The data processing function of family terminal.
Specifically, the configuration information in the present embodiment can include but is not limited to the corresponding database name of each data, number
According to library address, database user name password and minimum or maximum number of connections information etc..Pass through these configuration informations, Wo Menke
Accurately to find very much target data, for example, we can determine storage number of targets by database name and database address
According to storage region, directly read the data in the storage region, then mesh is extracted from the storage region by Data Identification
Mark data.Further, due to being designed with reading data permission or verification information in current many databases, this reality
Applying configuration information in example can also include database user name password etc., with by database user name password come verify data
The identity information of terminal is transferred, and after being verified, target data is sent to data transfers terminal and handle.
Illustratively, if a server will connect two data sources simultaneously, one is pg database, a mysql number
According to library.It will be respectively in the two good data sources of application configuration.These configurations include database name, database address, database use
Name in an account book password, minimum and maximum number of connections information etc..Upper corresponding data source is connected when spring starts respectively.The two
Data source all names a unique data source identification respectively for them, distinguishes the two data sources with this.For example, pg data
Library, the data source identification of data source identification pgdatabase, mysql database are mysqldatabase.Every time in the company of acquisition
It when connecing initiation database reading, requires call method and goes to determine current connection pool, during this time, by advance
Set specified data library key, to achieve the purpose that data source switches.Data processing terminal can be according to the execution of section program
Mode or trigger condition, toggle data source and carry out invocation target data and handled, and finally realize that program technic is corresponding
Data processing function.
Above scheme, by the call request for obtaining the program technic that user terminal is sent;Include in the call request
The function of described program method;The method that described program method is used to indicate processing data;The call request is parsed, institute is obtained
At least one corresponding section program of program technic is stated, and executes target data to be called when each section program
Data Identification;The section program is to carry out the program that section obtains to described program method;The section program is for calling
And handle data associated with the section program in preset each data source;All section programs are for complete together
The function of site preparation realization described program method;According to the Data Identification, called and the data from each data source
Corresponding target data is identified, all section programs are executed, realizes the function of described program method.By determining that user is whole
Hold at least one section program and the corresponding mesh of each section program corresponding to the program technic in the call request sent
Data are marked, and transfer the target data wherein stored from preset multiple data sources, directly to be handled according to section program and be somebody's turn to do
The corresponding target data of section program, the complete function of realizing program technic avoid uniting again after extracting a variety of multi-source datas
One executes the tedious steps of program technic, reduces resource consumption and time loss when multi-source data obtains, increases data acquisition
With the efficiency of data processing.
Referring to fig. 2, Fig. 2 is the flow chart of multi-source data processing method provided by Embodiment 2 of the present invention.In the present embodiment
The executing subject of multi-source data processing method is terminal.Terminal includes but is not limited to smart phone, tablet computer, wearable device
Equal mobile terminals, can also be desktop computer etc..Multi-source data processing method as shown in the figure may comprise steps of:
S201: the call request for the program technic that user terminal is sent is obtained;It include described program in the call request
The function of method;The method that described program method is used to indicate processing data.
The implementation of S101 is identical in S201 embodiment corresponding with Fig. 1 in the present embodiment, specifically refers to
The associated description of S101 in the corresponding embodiment of Fig. 1, details are not described herein.
S202: dividing the function of program technic described in the call request, obtains at least two subfunctions;Root
Section division is carried out to described program method according to the subfunction, obtains at least two subprograms;And according to the subprogram from
Section program corresponding with each subprogram is chosen in preset section program library.
After getting call request, we parse the function of the program technic in call request, are somebody's turn to do
Corresponding at least two subfunction of program technic, wherein all subfunctions combine the complete function that program technic may be implemented
Energy.Section division is carried out to program technic according to each subfunction, obtains at least two subprograms, the section journey in the present embodiment
Sequence is the program one by one with small function obtained after carrying out section to program technic, and all section programs are transported jointly
Row can realize the function of the program technic.
Further, can also include step S2021~S2022 before step S202:
S2021: the setting Data Identification corresponding with the default section program in the program of default section, and in the number
Incidence relation is established according between the data in mark and the data source;The incidence relation be used for by the Data Identification from
Data are extracted in the data source.
Before determining the corresponding data source identification of call request, it would be desirable to first set the corresponding number of each section program
It is identified according to source.Specifically, we are in the code of each section program, by way of customized annotation, in section method journey
Method corresponding data source identification in section is set in sequence, while establishing the pass of the association between the data in Data Identification and data source
System, and the section method after setting is stored into section method base.Number in the present embodiment in Data Identification and data source
Incidence relation between, for Data Identification and data source to associate, number can be passed through in the operation of section program
The corresponding target data of the section program is called directly with incidence relation according to mark.
Specifically, we can be set and default section program in the program of default section by way of customized note
Corresponding Data Identification.Customized note requirement must defeated field data library mark, defining customized explain is method rank, i.e.,
The note can only be used in method rank.Simultaneously define the section method towards the customized note, point of contact be it is all by this from
The method that modification is explained in definition.Section is defined as, and before being called by blanking method, specifies data source used in this method call,
Specific data source is specified by the field data library mark that user must be defeated when using customized note.Reached with this in method rank
The purpose in switch data source.
S2022: the default section program after setting is stored into the section program library.
Set program corresponding Data Identification in section in the program of section, and the data in Data Identification and data source it
Between establish after incidence relation, we can store the default section program after setting into section program library.This reality
The section program library in example is applied for storing various types of section programs, these section programs can be called at any time, with reality
Existing different small function can have been executed when many section programs are called according to certain timing or trigger condition
At a complete data processing function.
S203: the Data Identification of target data to be called in each section program of identification;The Data Identification is used
In the calling target data corresponding with the Data Identification from the data source.
After at least one corresponding section program of program technic has been determined, we can be according to the program of section program
Code identifies the Data Identification of target data to be called in each section program, to be cut by these Data Identifications to obtain
The corresponding target data of face program.
Every time when acquisition connection goes to initiate database reading, requires call method and go to determine current connection
Pond, during this time, by shifting to an earlier date set specified data library key, to achieve the purpose that data source switches.
Illustratively, specify the key of data source for pgdatabase, method B by method A, needing to add to explain
Upper same addition is explained, and it is mysqldatabase that data source key will be specified by, which explaining,.When method A is called, because of addition
It explains, section method call can be triggered, i.e., can call section method first before method A execution.In the method for section, meeting
Go to read user in the upper specified data source key of note, for method A, as pgdatabase.Later in section method
In, it can go that current data source is arranged to be pgdatabase, because being modified with threadlocal, this setting will be only current
The current method of thread is effective.For method B, reading user can be gone in note, and above specified data source key is
mysqldatabase.It when really going for that database is asked to connect, can first determine whether which current data source is, then go pair
Connection is obtained in the data source answered.The purpose in method level dynamic switch data source is thus accomplished.
Further, in different section method implementation procedures, the data of processing may more than corresponding number
According to source data, it is also possible to the data that other section methods obtain after executing, in this case, we can directly by with
The section method relevant section method association directly intercepts corresponding section method and executes data after terminating.
S204: according to the Data Identification, target corresponding with the Data Identification is called from each data source
Data execute all section programs, realize the function of described program method.
Determined realize program function at least one section program and its corresponding target data Data Identification it
Afterwards, we call target data corresponding with Data Identification from preset data source, execute all sections according to Data Identification
Program realizes the function of program technic.
Further, step S204 can specifically include step S2041~S2043:
S2041: the execution timing of each section program is determined.
The function of needing to use in many places in project, such as log, safety and things etc. by being focused on one by we
It is handled in class, without being used in, each place for needing to use the function is explicit to be called.When executing section program, it would be desirable to really
The execution timing of fixed all section programs, after execution timing has been determined, when can determine the execution of each section program
Between.
Further, the execution timing in the present embodiment can also include trigger condition when each section program executes
Timing, illustratively, section program A can execute section program B while execution, the two section programs are to hold simultaneously
Capable execution timing, but section program A could execute section program C after being finished, at this point, section program A has been executed
Finish is therefore the trigger condition that section program C is executed can also pass through the execution between each section program in the present embodiment
Progress is as mutual trigger condition.In addition to this it is possible to data E is generated while being section program D operation, and
Section program F is the section program for handling data E, at this point, can run section program F generates certain in this case
Kind data can also be used as the trigger condition for running corresponding section program.
In addition to this it is possible to determine tie point and the point of contact of each section program, wherein tie point is for indicating at what
Kind operation applies section when occurring.Such as when method call, when modification field and when throw exception etc.;Generally use some in point of contact
The specific method of class in packet is specified wherein using section, is just known as point of contact using this point of section, general with cutting
Point is to specify tie point.
S2042: it according to the Data Identification of each section program, is extracted and the Data Identification from the data source
Corresponding target data.
We first determine the corresponding mesh of Data Identification according to Data Identification when according to Data Identification to determine target data
Mark the configuration information of data.These configurations can include but is not limited to: database name, database address, database user name are close
Code, minimum and maximum number of connections information etc..Illustratively, under different business scene, method A and method B needs exist respectively
Pg database and mysql database the two data sources are connected when operation.On method A, need to add note, explaining will refer to
The key for determining data source is pgdatabase, and the upper same addition of method B is explained, and to specify the data source key to be on note
mysqldatabase。
S2043: according to the execution timing of each section program, the section program is executed to handle the section journey
The corresponding target data of sequence realizes the function of described program method.
After the configuration information that the corresponding target data of Data Identification has been determined, we are according to configuration information and data mark
Know, target data is extracted from corresponding data source, and execute each section program and carry out processing target data, finally realizes and use
The data processing function of family terminal.
Above scheme, by the call request for obtaining the program technic that user terminal is sent;Include in the call request
The function of described program method;The method that described program method is used to indicate processing data;To journey described in the call request
The function of sequence method is divided, and at least two subfunctions are obtained;Section is carried out to described program method according to the subfunction
It divides, obtains at least two subprograms;And it is chosen from preset section program library according to the subprogram and each son
The corresponding section program of program;Identify the Data Identification of target data to be called in each section program;The data
Mark from the data source for calling target data corresponding with the Data Identification.The section program is to the journey
Sequence method carries out the program that section obtains;The section program is cut in preset each data source with described for calling and handling
The associated data of face program;All section programs for completely realizing the function of described program method together;According to
The Data Identification calls target data corresponding with the Data Identification from each data source, executes all described
Section program realizes the function of described program method.The program technic institute in call request by determining user terminal transmission
At least one corresponding section program and the corresponding target data of each section program, and from preset multiple data sources
The target data wherein stored is transferred, it is complete real directly to handle the corresponding target data of section program according to section program
The function of existing program technic avoids the tedious steps that a variety of multi-source datas are extracted to program technic of seeking unity of action again later, reduces
Resource consumption and time loss when multi-source data obtains increase the efficiency of data acquisition and data processing.
It is a kind of schematic diagram for terminal device that the embodiment of the present invention three provides referring to Fig. 3, Fig. 3.What terminal device included
Each unit is used to execute each step in the corresponding embodiment of FIG. 1 to FIG. 2.Referring specifically to the corresponding implementation of FIG. 1 to FIG. 2
Associated description in example.For ease of description, only the parts related to this embodiment are shown.The terminal device of the present embodiment
300 include:
Acquiring unit 301, the call request of the program technic for obtaining user terminal transmission;It is wrapped in the call request
Include the function of described program method;The method that described program method is used to indicate processing data;
Resolution unit 302 obtains at least one corresponding section journey of described program method for parsing the call request
Sequence, and execute the Data Identification of target data to be called when each section program;The section program is to described
Program technic carries out the program that section obtains;The section program for call and handle in preset each data source with it is described
The associated data of section program;All section programs for completely realizing the function of described program method together;
Execution unit 303, for being called and the Data Identification from each data source according to the Data Identification
Corresponding target data executes all section programs, realizes the function of described program method.
Further, the resolution unit 302 may include:
Section unit divides for the function to program technic described in the call request, obtains at least two
Subfunction;Section division is carried out to described program method according to the subfunction, obtains at least two subprograms;And according to described
Subprogram chooses section program corresponding with each subprogram from preset section program library;
Recognition unit, for identification Data Identification of target data to be called in each section program;The number
According to mark for calling target data corresponding with the Data Identification from the data source.
Further, the terminal device can also include:
Associative cell, for setting Data Identification corresponding with the default section program in the program of default section, and
Incidence relation is established between the data in the Data Identification and the data source;The incidence relation is used to pass through the number
Data are extracted from the data source according to mark;
Storage unit, for storing the default section program after setting into the section program library.
Further, the execution unit 303 may include:
Information determination unit, for determining matching for the corresponding target data of the Data Identification according to the Data Identification
Confidence breath;
Data extracting unit, for extracting institute from the data source according to the configuration information and the Data Identification
Target data is stated, and executes the section program to handle the target data, realizes the function of described program method.
Further, the execution unit 303 may include:
Timing determination unit, for determining the execution timing of each section program;
Objective extraction unit, for the Data Identification according to each section program, extracted from the data source with
The corresponding target data of the Data Identification;
Program execution unit executes the section program for the execution timing according to each section program to locate
The corresponding target data of the section program is managed, realizes the function of described program method.
Above scheme, by the call request for obtaining the program technic that user terminal is sent;Include in the call request
The function of described program method;The method that described program method is used to indicate processing data;To journey described in the call request
The function of sequence method is divided, and at least two subfunctions are obtained;Section is carried out to described program method according to the subfunction
It divides, obtains at least two subprograms;And it is chosen from preset section program library according to the subprogram and each son
The corresponding section program of program;Identify the Data Identification of target data to be called in each section program;The data
Mark from the data source for calling target data corresponding with the Data Identification.The section program is to the journey
Sequence method carries out the program that section obtains;The section program is cut in preset each data source with described for calling and handling
The associated data of face program;All section programs for completely realizing the function of described program method together;According to
The Data Identification calls target data corresponding with the Data Identification from each data source, executes all described
Section program realizes the function of described program method.The program technic institute in call request by determining user terminal transmission
At least one corresponding section program and the corresponding target data of each section program, and from preset multiple data sources
The target data wherein stored is transferred, it is complete real directly to handle the corresponding target data of section program according to section program
The function of existing program technic avoids the tedious steps that a variety of multi-source datas are extracted to program technic of seeking unity of action again later, reduces
Resource consumption and time loss when multi-source data obtains increase the efficiency of data acquisition and data processing.
Fig. 4 is the schematic diagram for the terminal device that the embodiment of the present invention four provides.As shown in figure 4, the terminal of the embodiment is set
Standby 4 include: processor 40, memory 41 and are stored in the meter that can be run in the memory 41 and on the processor 40
Calculation machine program 42.The processor 40 realizes that above-mentioned each multi-source data processing method is implemented when executing the computer program 42
Step in example, such as step 101 shown in FIG. 1 is to 103.Alternatively, when the processor 40 executes the computer program 42
Realize the function of each module/unit in above-mentioned each Installation practice, such as the function of unit 301 to 303 shown in Fig. 3.
Illustratively, the computer program 42 can be divided into one or more module/units, it is one or
Multiple module/units are stored in the memory 41, and are executed by the processor 40, to complete the present invention.Described one
A or multiple module/units can be the series of computation machine program instruction section that can complete specific function, which is used for
Implementation procedure of the computer program 42 in the terminal device 4 is described.
The terminal device 4 can be the calculating such as desktop PC, notebook, palm PC and cloud server and set
It is standby.The terminal device may include, but be not limited only to, processor 40, memory 41.It will be understood by those skilled in the art that Fig. 4
The only example of terminal device 4 does not constitute the restriction to terminal device 4, may include than illustrating more or fewer portions
Part perhaps combines certain components or different components, such as the terminal device can also include input-output equipment, net
Network access device, bus etc..
Alleged processor 40 can be central processing unit (Central Processing Unit, CPU), can also be
Other general processors, digital signal processor (Digital Signal Processor, DSP), specific integrated circuit
(Application Specific Integrated Circuit, ASIC), ready-made programmable gate array (Field-
Programmable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor logic,
Discrete hardware components etc..General processor can be microprocessor or the processor is also possible to any conventional processor
Deng.
The memory 41 can be the internal storage unit of the terminal device 4, such as the hard disk or interior of terminal device 4
It deposits.The memory 41 is also possible to the External memory equipment of the terminal device 4, such as be equipped on the terminal device 4
Plug-in type hard disk, intelligent memory card (Smart Media Card, SMC), secure digital (Secure Digital, SD) card dodge
Deposit card (Flash Card, FC) etc..Further, the memory 41 can also have been deposited both the inside including the terminal device 4
Storage unit also includes External memory equipment.The memory 41 is for storing the computer program and terminal device institute
Other programs and data needed.The memory 41 can be also used for temporarily storing the number that has exported or will export
According to.
It is apparent to those skilled in the art that for convenience of description and succinctly, only with above-mentioned each function
Can unit, module division progress for example, in practical application, can according to need and by above-mentioned function distribution by different
Functional unit, module are completed, i.e., the internal structure of described device is divided into different functional unit or module, more than completing
The all or part of function of description.Each functional unit in embodiment, module can integrate in one processing unit, can also
To be that each unit physically exists alone, can also be integrated in one unit with two or more units, it is above-mentioned integrated
Unit both can take the form of hardware realization, can also realize in the form of software functional units.In addition, each function list
Member, the specific name of module are also only for convenience of distinguishing each other, the protection scope being not intended to limit this application.Above system
The specific work process of middle unit, module, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In the above-described embodiments, it all emphasizes particularly on different fields to the description of each embodiment, is not described in detail or remembers in some embodiment
The part of load may refer to the associated description of other embodiments.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
If the integrated module/unit be realized in the form of SFU software functional unit and as independent product sale or
In use, can store in a computer readable storage medium.Based on this understanding, the present invention realizes above-mentioned implementation
All or part of the process in example method, can also instruct relevant hardware to complete, the meter by computer program
Calculation machine program can be stored in a computer readable storage medium.
Embodiment described above is merely illustrative of the technical solution of the present invention, rather than its limitations;Although referring to aforementioned reality
Applying example, invention is explained in detail, those skilled in the art should understand that: it still can be to aforementioned each
Technical solution documented by embodiment is modified or equivalent replacement of some of the technical features;And these are modified
Or replacement, the spirit and scope for technical solution of various embodiments of the present invention that it does not separate the essence of the corresponding technical solution should all
It is included within protection scope of the present invention.
Claims (10)
1. a kind of multi-source data processing method characterized by comprising
Obtain the call request for the program technic that user terminal is sent;It include the function of described program method in the call request
Energy;The method that described program method is used to indicate processing data;
The call request is parsed, at least one corresponding section program of described program method is obtained, and is executed each described
The Data Identification of target data to be called when the program of section;The section program is to carry out section to described program method to obtain
Program;The section program is for calling and handling number associated with the section program in preset each data source
According to;All section programs for completely realizing the function of described program method together;
According to the Data Identification, target data corresponding with the Data Identification is called from each data source, is executed
All section programs realize the function of described program method.
2. multi-source data processing method as described in claim 1, which is characterized in that the parsing call request obtains
At least one corresponding section program of described program method, and execute target data to be called when each section program
Data Identification, comprising:
The function of program technic described in the call request is divided, at least two subfunctions are obtained;According to the son
Function carries out section division to described program method, obtains at least two subprograms;And it is cut according to the subprogram from preset
Section program corresponding with each subprogram is chosen in the program library of face;
Identify the Data Identification of target data to be called in each section program;The Data Identification is used for from the number
According to calling target data corresponding with the Data Identification in source.
3. multi-source data processing method as claimed in claim 2, which is characterized in that it is described according to the call request, to institute
It states program technic and carries out section, and chosen from preset section program library according to section result corresponding with described program method
Before at least one section program, further includes:
The setting Data Identification corresponding with the default section program in the program of default section, and in the Data Identification and institute
It states and establishes incidence relation between the data in data source;The incidence relation is used for through the Data Identification from the data source
Middle extraction data;
The default section program after setting is stored into the section program library.
4. multi-source data processing method as described in claim 1, which is characterized in that it is described according to the Data Identification, from institute
It states and calls corresponding with Data Identification target data in each data source, all section programs of execution, described in realization
The function of program technic, comprising:
According to the Data Identification, the configuration information of the corresponding target data of the Data Identification is determined;
According to the configuration information and the Data Identification, the target data is extracted from the data source, and described in execution
Section program handles the target data, realizes the function of described program method.
5. multi-source data processing method according to any one of claims 1-4, which is characterized in that described according to the data mark
Know, target data corresponding with the Data Identification is called from each data source, executes all section programs, it is real
The function of existing described program method, comprising:
Determine the execution timing of each section program;
According to the Data Identification of each section program, target corresponding with the Data Identification is extracted from the data source
Data;
According to the execution timing of each section program, the section program is executed to handle the corresponding mesh of the section program
Data are marked, realize the function of described program method.
6. a kind of terminal device, which is characterized in that including memory and processor, being stored in the memory can be described
The computer program run on processor, which is characterized in that when the processor executes the computer program, realize following step
It is rapid:
Obtain the call request for the program technic that user terminal is sent;It include the function of described program method in the call request
Energy;The method that described program method is used to indicate processing data;
The call request is parsed, at least one corresponding section program of described program method is obtained, and is executed each described
The Data Identification of target data to be called when the program of section;The section program is to carry out section to described program method to obtain
Program;The section program is for calling and handling number associated with the section program in preset each data source
According to;All section programs for completely realizing the function of described program method together;
According to the Data Identification, target data corresponding with the Data Identification is called from each data source, is executed
All section programs realize the function of described program method.
7. terminal device as claimed in claim 6, which is characterized in that the parsing call request obtains described program
At least one corresponding section program of method, and execute the data mark of target data to be called when each section program
Know, comprising:
The function of program technic described in the call request is divided, at least two subfunctions are obtained;According to the son
Function carries out section division to described program method, obtains at least two subprograms;And it is cut according to the subprogram from preset
Section program corresponding with each subprogram is chosen in the program library of face;
Identify the Data Identification of target data to be called in each section program;The Data Identification is used for from the number
According to calling target data corresponding with the Data Identification in source.
8. terminal device as claimed in claim 7, which is characterized in that it is described according to the call request, to described program side
Method carries out section, and chosen from preset section program library according to section result it is corresponding with described program method at least one
Before the program of section, further includes:
The setting Data Identification corresponding with the default section program in the program of default section, and in the Data Identification and institute
It states and establishes incidence relation between the data in data source;The incidence relation is used for through the Data Identification from the data source
Middle extraction data;
The default section program after setting is stored into the section program library.
9. a kind of terminal device characterized by comprising
Acquiring unit, the call request of the program technic for obtaining user terminal transmission;It include described in the call request
The function of program technic;The method that described program method is used to indicate processing data;
Resolution unit obtains at least one corresponding section program of described program method for parsing the call request, and
Execute the Data Identification of target data to be called when each section program;The section program is to described program method
Carry out the program that section obtains;The section program is used to call and handle in preset each data source and the section program
Associated data;All section programs for completely realizing the function of described program method together;
Execution unit, for being called from each data source corresponding with the Data Identification according to the Data Identification
Target data executes all section programs, realizes the function of described program method.
10. a kind of computer readable storage medium, the computer-readable recording medium storage has computer program, and feature exists
In when the computer program is executed by processor the step of any one of such as claim 1 to 5 of realization the method.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910426004.9A CN110262854A (en) | 2019-05-21 | 2019-05-21 | Multi-source data processing method and terminal device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910426004.9A CN110262854A (en) | 2019-05-21 | 2019-05-21 | Multi-source data processing method and terminal device |
Publications (1)
Publication Number | Publication Date |
---|---|
CN110262854A true CN110262854A (en) | 2019-09-20 |
Family
ID=67915046
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910426004.9A Pending CN110262854A (en) | 2019-05-21 | 2019-05-21 | Multi-source data processing method and terminal device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110262854A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112000738A (en) * | 2020-08-18 | 2020-11-27 | 中国建设银行股份有限公司 | Database connection switching method, device, equipment and medium |
Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300138A1 (en) * | 2008-05-29 | 2009-12-03 | Red Hat, Inc. | Using Distributed Aspects to Reorder Online Application Workflows |
CN103870455A (en) * | 2012-12-07 | 2014-06-18 | 阿里巴巴集团控股有限公司 | Multi-data-source data integrated processing method and device |
CN104991824A (en) * | 2015-08-03 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Method and system for dynamically switching application program data sources |
CN107301179A (en) * | 2016-04-14 | 2017-10-27 | 北京京东尚科信息技术有限公司 | The method and apparatus of data base read-write separation |
CN108520004A (en) * | 2018-03-12 | 2018-09-11 | 舟谱数据技术南京有限公司 | Based on method parameter section multi-tenant data source switching system |
CN109491830A (en) * | 2017-09-12 | 2019-03-19 | 北京京东尚科信息技术有限公司 | The method and system in switch data source |
-
2019
- 2019-05-21 CN CN201910426004.9A patent/CN110262854A/en active Pending
Patent Citations (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20090300138A1 (en) * | 2008-05-29 | 2009-12-03 | Red Hat, Inc. | Using Distributed Aspects to Reorder Online Application Workflows |
CN103870455A (en) * | 2012-12-07 | 2014-06-18 | 阿里巴巴集团控股有限公司 | Multi-data-source data integrated processing method and device |
CN104991824A (en) * | 2015-08-03 | 2015-10-21 | 上海斐讯数据通信技术有限公司 | Method and system for dynamically switching application program data sources |
CN107301179A (en) * | 2016-04-14 | 2017-10-27 | 北京京东尚科信息技术有限公司 | The method and apparatus of data base read-write separation |
CN109491830A (en) * | 2017-09-12 | 2019-03-19 | 北京京东尚科信息技术有限公司 | The method and system in switch data source |
CN108520004A (en) * | 2018-03-12 | 2018-09-11 | 舟谱数据技术南京有限公司 | Based on method parameter section multi-tenant data source switching system |
Non-Patent Citations (1)
Title |
---|
匿名: "Spring(4)——面向切面编程(AOP模块)", 《HTTPS://WWW.JIANSHU.COM/P/994027425B44》, 12 February 2019 (2019-02-12), pages 1 - 7 * |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN112000738A (en) * | 2020-08-18 | 2020-11-27 | 中国建设银行股份有限公司 | Database connection switching method, device, equipment and medium |
CN112000738B (en) * | 2020-08-18 | 2023-06-02 | 建信金融科技有限责任公司 | Database connection switching method, device, equipment and medium |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108536761A (en) | Report data querying method and server | |
CN109951547B (en) | Transaction request parallel processing method, device, equipment and medium | |
CN109962855A (en) | A kind of current-limiting method of WEB server, current-limiting apparatus and terminal device | |
CN110490416B (en) | Task management method and terminal equipment | |
US11645108B2 (en) | Automated semantic tagging | |
CN109491857A (en) | A kind of data monitoring method, system and the terminal device of rule-based engine | |
CN109542935A (en) | A kind of execution method, storage medium and the server of regulation engine | |
CN108255602A (en) | Task combined method and terminal device | |
JP7436077B2 (en) | Skill voice wake-up method and device | |
CN110244945A (en) | Interface document generation method and terminal device | |
CN109754072A (en) | Processing method, artificial intelligence process device and the Related product of internet off-line model | |
CN109241357A (en) | Chain structure model and its construction method, system and terminal device | |
CN111045893A (en) | Method, device and system for executing monitoring task, storage medium and electronic device | |
CN106446289B (en) | Information query method and device based on Pinpoint | |
CN110262854A (en) | Multi-source data processing method and terminal device | |
CN110245074A (en) | A kind of generation method of log recording, device, storage medium and server | |
CN113806216A (en) | Interface test method, device, medium and equipment | |
CN110019501A (en) | A kind of collecting method, device and terminal device | |
CN112559525A (en) | Data checking system, method, device and server | |
CN110516130A (en) | Metadata processing method and device, storage medium, electronic device | |
CN114254278A (en) | User account merging method and device, computer equipment and storage medium | |
CN109859038A (en) | A kind of take-effective method and device of block chain intelligence contract | |
CN114493598A (en) | Computing resource management method, device, computer equipment and storage medium | |
CN110309062B (en) | Use case generation method, device, electronic equipment and storage medium | |
CN110110067A (en) | A kind of database annotation method, apparatus and terminal device |
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 |