Invention content
The purpose of the present invention is to provide a data unified access method and system based on request data reconstruct, polymorphic types
Request data by unified data-interface access platform, dramatically saved the resource of data-interface, reduced service
The service pressure of device.
The purpose of the present invention is to provide a data unified access method and system based on request data reconstruct, difference please
Data is asked to match business module by specific function code, Added Business module only needs to configure function code, avoids additional number
According to the definition and exploitation of interface.
It is described to ask the purpose of the present invention is to provide a data unified access method and system based on request data reconstruct
Data is asked to be reconstructed, in order to the management and identification of request data in heaps, improve data access efficiency.
The purpose of the present invention is to provide a data unified access method and system based on request data reconstruct, using mark
The request data of polymorphic type, is accessed unified data-interface, and match business mould according to function code by accurate simple standard rule
Block improves data access efficiency so that user being capable of rapid abutting joint.
The purpose of the present invention is to provide a data unified access method and system based on request data reconstruct, convenient for system
One management request data and data-interface, the safety to realize request data provide technical support basis.
To realize any of the above goal of the invention, the present invention provides a data side of being uniformly accessed into based on request data reconstruct
Method, which is characterized in that include the following steps:
S1:RECONFIGURATION REQUEST data form common parameters and peculiar parameter, addition function code to the request data, institute
It states function code and corresponds to an at least business module;
S2:Unified interface is set according to the common parameters, wherein the unified interface allows to include the common parameters
Request data enter;And
S3:The function code is obtained, matches the function code and corresponding business module.
In some embodiments, the step S1 includes:
S11:According to the identical parameters of at least two business modules, the common parameters in the request data are encapsulated;
S12:According to the characteristic parameter of corresponding business module, the peculiar data of the request data are formed, and be based on
The basic data model obtains feature-based data model;And
S13:Function code is set according to the business module, adds the function code to the request data.
In some embodiments, the function code converts the basic data model to the feature-based data model.
In some embodiments, the step S3 includes:
S31:Obtain the function code in the request data;
S32:According to the function code, the matched business module is identified;And
S33:The basic data model is converted to the feature-based data model, the feature-based data model enters the industry
Business module.
In some embodiments, the step S3 includes:
S31a:Obtain the function code in the request data;
S32a:According to the function code, the matched business module is identified;And
S33a:The basic data model enters the business module, and according to the function code conversion basic number
According to model and the feature-based data model.
In some embodiments, the request data exists with JSON data formats, is submitted in a manner of POST.
In some embodiments, the function code corresponds to the characteristic parameter of the business module and is formed.
According to an aspect of the present invention, the present invention provides a data uniform access system based on request data reconstruct,
It is characterized in that, including:
Data cell, wherein the data cell stores an at least request data;
Business unit, wherein the business unit obtains the business datum of an at least business module, wherein the business number
According to including identical parameters and characteristic parameter;And
Reconfiguration unit, wherein the reconfiguration unit is communicatively coupled to the unit of the business to obtain the business number
According to being communicatively coupled to the data cell to obtain the request data, the reconfiguration unit includes shared parameter module, special
There are parameter module and function code module, wherein the shared parameter module reconstructs the request data according to the identical parameters
In common parameters, the peculiar parameter module reconstructs the peculiar parameter in the request data, institute according to the characteristic parameter
It states function code module and function code is obtained according to the business datum, the identification code identifies specific business module.
In some embodiments, including interface unit and matching unit, wherein the interface unit communications be connected to
The shared parameter module defines unified interface to obtain the common parameters according to the common parameters, wherein described
The business unit and the reconfiguration unit with unit communication are connected to, obtains the peculiar parameter and the function
Code, matching request data and specific business module.
In some embodiments, the shared parameter module builds basic data model according to the common parameters, described
Peculiar parameter module according to the peculiar parameter construction feature data model, the function code convert the basic data model with
And the feature-based data model.
Specific embodiment
Below in conjunction with the attached drawing in the embodiment of the present invention, the technical solution in the embodiment of the present invention is carried out clear, complete
Site preparation describes, it is clear that described embodiment is only part of the embodiment of the present invention, instead of all the embodiments.It is based on
Embodiment in the present invention, those of ordinary skill in the art's all other embodiments obtained belong to what the present invention protected
Range.
It will be understood by those skilled in the art that the present invention exposure in, term " longitudinal direction ", " transverse direction ", " on ",
" under ", "front", "rear", "left", "right", " vertical ", " level ", " top ", " bottom " " interior ", the orientation of the instructions such as " outer " or position close
System is based on orientation shown in the drawings or position relationship, is for only for ease of the description present invention and simplifies description, without referring to
Show or imply signified device or element there must be specific orientation, with specific azimuth configuration and operation, therefore above-mentioned art
Language is not considered as limiting the invention.
It is understood that term " one " is interpreted as " at least one " or " one or more ", i.e., in one embodiment,
The quantity of one element can be one, and in a further embodiment, the quantity of the element can be multiple, and term " one " is no
It is understood that as the limitation to quantity.
In general, in the transmission process of network data, request data is entered corresponding by the interface that platform is set
Business module, the business module carry out response processing to request data.It is initial that the business module includes but not limited to charging
Change, version updating, user's charging, the contents such as charging result notice, different business module realizes different functions, multiple requests
Data correspond to multiple business modules, to realize the request of different function.
As shown in Figure 1, Fig. 1 is the principle schematic of the data cut-in method of the prior art.In the prior art, for not
Same business module provides different data-interfaces, and wherein data-interface is platform for each individually business module opening
Unique access address, that is to say, that each data-interface corresponds to specific business module, when data are from a specific data
Interface entrance will arrive at a specific business module.Different request datas accesses different access address as a result, so as to
Into different data-interfaces hence into specific business module.
From the perspective of request data, wherein request data includes service request data, which corresponds to
Specific business module accesses specific access address according to the service request data and enters specific data-interface, so as to
Specific business module is entered, the various unmanageable of data-interface, Interface Expanding difference and number are easily caused under this mode
According to the problems such as access efficiency is low.
In order to solve problem above, the present invention provide one based on request data reconstruct data unified access method and be
System, it is described based on request data reconstruct data unified access method and system by request data carry out data reconstruction, from
And realize platform unified interface access request data, and the purpose of Rapid matching business module.
As shown in Fig. 2, Fig. 2 is the data side of being uniformly accessed into reconstructed based on request data of an embodiment according to the present invention
The principle schematic of method and system, the request data S enters the unified interface 10 after data reconstruction, by the system
The request data S that one interface 10 enters platform is matched different business modules 20 according to different function code GS.
As shown in figure 3, Fig. 3 is the request data reconstruct feelings of the request data S of embodiment according to the present invention
Condition.From the foregoing, it will be observed that the request data S for specific traffic module 20 of the prior art is implemented as specific type of data, it is described
Unified interface 10 uniquely identifies the request data S and then matches the business module 20.
In an embodiment of the present invention, the request data S is resorted to common parameters CS according to its attribute candidates, peculiar
The parameter TS and function code GS, wherein the common parameters CS corresponds to the identical parameters between multiple business modules 20, institute
State the characteristic parameter that peculiar parameter TS corresponds to specific traffic module 20, and the request after the common parameters CS is got
Data S forms basic data model, and the request data S forms feature-based data model after getting the peculiar parameter TS,
Described in feature-based data model inherit the basic data model, the function code GS corresponds to the specific completion of business module 20 institute
The conversion between basic data model and the feature-based data model is stated, while also determines the industry corresponding to request data S
Business module 20.
In addition, the peculiar parameter TS is divided into call parameter BS and inessential parameter TS according to necessity again, wherein
The call parameter BS and the inessential parameter FS are corresponding, i.e., can define when a parameter is when being call parameter BS
For inessential parameter FS, and can mutual inversion of phases between the call parameter BS and the inessential parameter FS.
That is, in the restructuring procedure of the request data S, the identical parameters according to each business module 20 are to institute
It states common parameters CS to be packaged, forms the basic data model, secondly, the characteristic parameter of specific traffic module 20 is defined
The peculiar parameter TS of the request data S, and the feature-based data model is obtained based on the basic data model extension, in addition
The function code GS for identifying corresponding specific traffic module 20 is added in the request data S.When server decompresses the request
The function code GS is obtained after data S, by the function code GS to request data S carry out as defined in business model conversion,
The business module corresponding to request data S is also determined simultaneously, and the changeable flexible and connection inlet of interface parameters has been achieved
Uniformity.
That is the request data S is different according to the difference of business, for example, such as when S pairs of the request data
What is answered is user's accounting request, then the request data S includes the common parameters CS, and common parameters CS such as seems (hand
Type number, mobile phone brand, mobile phone string number, networking type, client ip etc.), also including the peculiar parameter TS, wherein the spy
There is parameter TS to include charging point, User IP, client plug-in version, mobile phone brand, mobile phone agent etc., the charging point, user
IP is the call parameter BS, and the client plug-in version, mobile phone brand, mobile phone agent are the inessential parameter FS, separately
Outside, the request data S includes the accounting request function code of corresponding user's accounting request.
It is version updating, then the request data S includes institute
Common parameters CS is stated, common parameters CS such as seems mobile phone model, mobile phone brand, mobile phone string number, networking type, client ip
It is version etc. Deng, the call parameter BS, the inessential parameter FS is User IP, mobile phone brand etc., the request data S packets
Include the version updating function code of corresponding version updating.
It is worth noting that, the common parameters CS and peculiar parameter TS inherently has for the request data S
Standby information, the function code GS correspond to different business modules 20 and are added into the request data S, so as to which platform can root
The request data S and the business module 20 are matched according to the function code GS.
Based on above-mentioned request data reconfiguration principle, the present invention provides a data side of being uniformly accessed into based on request data reconstruct
Method, which is characterized in that include the following steps:
S1:RECONFIGURATION REQUEST data S forms common parameters CS and peculiar parameter TS, and adds function code GS and asked to described
Data S, the function code GS is asked to correspond to an at least business module 20;
S2:According to the common parameters CS set unified interface 10, wherein the unified interface 10 allow to include it is described common
The request data S of same parameter CS enters;And
S3:The function code GS is obtained, and matches the function code GS and corresponding business module 20.
In the step S1, the request data S can derive from the multi-functional client of polymorphic type, plurality of to ask
Data S is asked to correspond to multiple business modules 20, such as when client needs to ask charging, the request data S is corresponding to be
User's accounting request also corresponds to the business module that user's accounting request is directed in platform.
The common parameters CS corresponds to the identical parameters between multiple business modules 20, for example, mobile phone model, mobile phone brand,
Mobile phone string number, networking type, client ip etc.), and the basis of the corresponding request data S is obtained according to the peculiar parameter TS
Data model.
The peculiar parameter TS corresponds to the characteristic parameter of specific traffic module 20, and is getting the common parameters CS
The request data S forms basic data model afterwards, and the request data S forms characteristic after getting the peculiar parameter TS
According to model, wherein the feature-based data model inherits the basic data model.
The function code GS corresponds to specific business module 20 and completes the basic data model and the characteristic
Conversion between model, while also determine the business module 20 corresponding to request data S.
The step S1 further comprises the steps:
S11:According to the identical parameters of at least two business modules 20, the common parameters in the request data S are encapsulated
CS, and obtain corresponding to the basic data model of the request data S;
S12:According to the characteristic parameter of corresponding business module 20, the peculiar data TS of the request data S is formed, and
Feature-based data model is obtained based on the basic data model;And
S13:Function code GS is set, and add the function code GS to the request data S according to the business module 20.
In the step S2, the unified interface 10 is set according to the common parameters CS, described to allow to possess
The request data S access platforms of common parameters CS, at this time the request data S exist with the basic data model.
The unified interface 10 is the specific access address of platform distribution, the common parameters in the request data S
CS enters the unified interface 10, in other words, the basic data model of the request data S by unified communication protocol
Into the unified interface 10.In an embodiment of the present invention, the unified communication protocol is implemented as Http agreements, but this
Without limitation.
In the step S3, platform obtains the number of request according to the function code GS corresponding in the request data S
According to the business module 20 corresponding to S, each function code GS correspond to it is specific to business module 20.And as the request data S
After entering corresponding business module 20, the function code GS of the request data S converts the basic data model to institute
State feature-based data model.
That is, the step S3 further comprises the steps:
S31:Obtain the function code GS in the request data S;
S32:According to the function code GS, the matched business module 20 is identified;And
S33:The basic data model is converted to the feature-based data model, the feature-based data model enters the industry
Business module 20.
Herein what is particularly worth mentioning is that, the peculiar parameter TS again according to necessity be divided into call parameter BS and
Inessential parameter TS, the inessential parameter TS, which may be present, also may not be present.That is, the spy of the request data S
It is not necessarily intended to be related to inessential parameter completely in sign data model.
Also or, the step S3 further comprises the steps:
S31:Obtain the function code GS in the request data S;
S32:According to the function code GS, the matched business module 20 is identified;And
S33:The basic data model enters the business module, and according to the function code GS conversions basic number
According to model and the feature-based data model.
When needing business module 20 described in additional correction, operation personnel also only needs to adjust the function code GS.
Such as when needing to increase new business module 20, the function code GS of corresponding new business module 20 is obtained, and by the work(
Energy code GS is supplied to the request data S.It says for another example, when needing to revise the business module 20, directly revises the function
Code GS, and the function code GS is supplied to the request data S.
In order to realize data above unified access method, the present invention provides the data based on request data reconstruct and uniformly connects
Enter system, wherein it is described based on request data reconstruct data uniform access system include data cell 30, reconfiguration unit 40 with
And business unit 50, wherein the data cell 30, which stores at least a request data S, the business unit 50, stores an at least industry
Module 20 of being engaged in and corresponding business datum, the reconfiguration unit 40 reconstruct the request data S according to the business datum, into
And the data uniform access system can be uniformly accessed into data based on the request data S being reconstructed.
Specifically, an at least database K built in the data cell 30, wherein the request data S be placed in it is described
In database K, each request data S corresponds to an at least business module 20 in an embodiment of the present invention, that is to say, that the number
Corresponding business module 20 can be matched according to uniform access system according to the request data S.
The business unit 50 includes business data module 51, wherein 20 corresponding business datum of the business module is deposited
The business data module 51 is stored in, and the business unit 50 further comprises identical parameters module 52 and characteristic parameter
Module 53 is respectively used to store the identical parameters and characteristic parameter of the business datum.
In other words, the 20 corresponding business datum of business module is stored in the business data module 51, Duo Geye
There are identical parameters each other for data of being engaged in, and the identical parameters, the identical parameters are determined by comparing multiple business datums
It is stored in the identical parameters module 52.In addition, distinct between two business datums each other, i.e., each business datum has it
Corresponding characteristic parameter, the characteristic parameter are stored in the characteristic parameter module 53.
It is worth noting that, often newly increasing a business datum in the business module 53, the business datum can be divided
For the combination of the identical parameters and the characteristic parameter, the identical parameters be used to sort out the business datum, described
Characteristic be used to mark the business datum.No longer done herein about the business datum it is excessive repeat, with reference to thereon
Introduction.
The reconfiguration unit 40 includes the service parameter module 41, wherein the service parameter module 41 communicatedly connects
In the business unit 50, to obtain the identical parameters and characteristic parameter, the identical parameters and the characteristic
As the standard for reconstructing the request data S.
The reconfiguration unit 40 includes shared parameter module 42 and the peculiar parameter module 43, wherein the shared ginseng
Digital-to-analogue block 42 is communicatively coupled to the service parameter module 41, to obtain the identical parameters as reconstruction of standard.Described
In shared parameter module 42, the data that the identical parameters are relevant in the request data S are defined as common parameters CS,
Described in common parameters CS be stored in the shared parameter module 42.It is noted that the common parameters CS is corresponded to
Identical parameters between multiple business modules 20.
In addition, in some cases, the shared parameter module 42 stores the common parameters of the request data S
CS, and the basic data model is formed according to the common parameters CS.
The peculiar parameter module 43 is communicatively coupled to the service parameter module 41, is made with obtaining the characteristic parameter
For reconstruction of standard.In the peculiar parameter module 43, the data that the characteristic parameter is relevant in the request data S are determined
Justice is peculiar parameter TS, wherein the peculiar parameter TS is stored in the peculiar parameter module 43.It is noted that institute
State the characteristic parameter that peculiar parameter TS corresponds to business module 20.
In addition, in some cases, the peculiar parameter module 43 stores the peculiar parameter of the request data S
TS, and the feature-based data model is formed according to the peculiar parameter TS.The feature-based data model inherits the basic data
Model.That is, the peculiar parameter module 43 is communicatively coupled to the shared parameter module 42, to obtain the basis
Data model, and the feature-based data model is formed according to the peculiar parameter TS on the basis of the basic data model.
The reconfiguration unit 40 includes function code module 44, wherein the function code module 44 is communicatively coupled to the spy
Parameter module 53 is levied, to generate the function code GS specific to a certain business module 20.Specifically, the business module 20 has
Oneself specific characteristic parameter, the corresponding characteristic parameter determine the function code GS, wherein described in function code GS realizations
Basic data model and the conversion of the feature-based data model.
By this method, after the request data S enters the reconfiguration unit 40, the request data S is reconfigured as institute
State common parameters CS, the combination of the peculiar parameter TS and the function code GS, wherein described in common parameters CS compositions
Basic data model, the peculiar parameter TS combine the common parameters CS and form the feature-based data model, the function code
GS realizes the conversion between the basic data model and the feature-based data model.
As shown in fig. 7, the data uniform access system based on request data reconstruct includes interface unit 60, wherein institute
It states interface unit 60 and is communicatively coupled to the shared parameter module 42, to obtain the common parameters CS, and according to described common
Same parameter CS defines the unified interface 10.In an embodiment of the present invention, the unified interface 10 is access address interface, is wrapped
Enter the unified interface 10 containing the common parameters CS or with request data S existing for the basic data model, with this
Mode realizes that unified interface accesses data.
The data uniform access system based on request data reconstruct further comprises matching unit 70, wherein described
The function code module 44 and/or the peculiar parameter module 43 are communicatively coupled to unit 70, to match the number of request
According to S and the business module 20.
When the matching unit 70 is communicatively coupled to the function code module 44, the matching unit 70 is according to described
Function code GS matches the request data S and the business module 20.At this point, the matching unit 70 obtains the function code
GS, and the business module 20 is traversed according to the function code GS, to look for the business module 20 of adaptation, when the number of request
After entering the business module 20 according to S, the function code GS converts the basic data model to the characteristic mould
Type.
After the matching unit 70 is communicatively coupled to peculiar parameter module 43, the function code module 44 at this time
The shared parameter module 42 and the peculiar parameter module 43 are communicatedly connected, and converts the basic data model to described
Feature-based data model, the matching unit 70 obtains the characteristic parameter TS, and is asked according to described in characteristic parameter TS matchings
Ask data S and the business module 20.
In the same manner, the request data S enters different business modules 20 by unified interface, from different business module 20
The feedback information of feedback is exported by unified interface, so as to dramatically save the waste of interface resource, improves server
Efficiency of service.
In some embodiments, des encryption decryption can be carried out to the request data S, is passed with improving the request data S
Defeated safety.Specifically, DES (Data Encryption Standard) is one kind of symmetrical enciphering and deciphering algorithm, by IBM
Company develops in the last century 70's.The algorithm is using 64 keys (wherein comprising 8 bit parity checks, actual key length
It is 56) to the block data encryption as unit of 64,64 ciphertext data are generated, are then solved using identical key
It is close.Key only has communicating pair to know, third party is not disclosed.
In one embodiment of this invention, enter the unified interface after des encryption being carried out to the request data S
10, the server is decrypted to obtain ciphertext data, and turning the request data S into again for encrypted request data S
Entity object is turned to, different business modules is entered after then the function code in entity object is identified.
The present invention is not limited to above-mentioned preferred forms, anyone can show that other are various under the enlightenment of the present invention
The product of form, however, make any variation in its shape or structure, it is every that there is skill identical or similar to the present application
Art scheme, is within the scope of the present invention.