Summary of the invention
The embodiment of the present application technical problem to be solved is to provide a kind of side accessing instant messaging networkMethod and equipment, by solve according to prior art in by technical staff by edit code in the way of complete rightTechnical staff's work load mistake that the Data Format Transform of each information providing service carries out configuring and causesThe technical problem of weight.
For solving above-mentioned technical problem, the embodiment of the present application provides a kind of side accessing instant messaging networkMethod, is applied to configuration service device, including:
In response to the first configuring request for information providing service, with described information providing service place netThe server of network service is as target web server, and obtaining described target web server is described informationThe first data that offer business returns;Wherein, described first data acquisition is with the first data form encapsulation each theOne data object, described first data form uses the data-interface that described target web server provides;
Based on described first data, resolve the data of the corresponding described first data form of each first data objectPath, and present the corresponding relation between each first data object and each data path;
Input include each described data path in response to each filling position in corresponding second data formThe operation of each object template, sets up and records the mapping between each object template and each described filling position and closeSystem, as the first mapping relations;Described second data form uses the data that instant communication server providesInterface;
Described first mapping relations, for described configuration service device for described information providing service, according toThe data path of each data object, object template and filling position, by the number with the first data form encapsulationAccording to being converted into the data encapsulated in the second data format.
Optionally, described method also includes:
In response to the second configuring request for described information providing service, obtain described instant messaging networkTo the signature identification in the instant messaging request of described information providing service and described target web serverThe request address provided for described information providing service, sets up and records described signature identification and described requestMapping relations between address, as the second mapping relations;
Described second mapping relations, include described feature for described configuration service device in response to receivingThe instant messaging request of mark, the information sent to described target web server based on described request addressRequest.
Optionally, described information request includes header information, and described header information is to set up describedDuring two mapping relations described configuration service device in response to header information input operation and with described signature identificationCorresponding record.
Optionally, described method also includes:
In response to receiving described instant communication server, the instant messaging of described information providing service is askedAsk, send the information request to described information providing service to described target web server;
It is packaged into the first data lattice for described information request in response to receiving described target web serverThe second data that formula sends, each data path related to according to described first mapping relations, from described theEach second data object of two extracting data is as the second data object corresponding to each data path, according to instituteState each object template that the first mapping relations relate to, the second corresponding for each data path data object is replacedChange each data path in each object template, form the 3rd data object that each object template is corresponding, and pressAccording to the filling position that each object template in described first mapping relations is corresponding, by corresponding for each object templateThree data objects are packaged into the 3rd data of the second data form;
Described 3rd data are sent to described instant communication server, in order to each second data object presentsOn instant communication client.
Optionally, the object template that described first mapping relations relate to includes the first object template and/orTwo object templates;
Wherein, described first object template only includes that described data path, described second object template includeDescribed data path combines with side information.
Optionally, described object template is the velocity statement comprising described data path.
Optionally, the shape by key-value pair of the corresponding relation between each first data object and each data pathFormula realizes, and wherein, each described data path is key, and each first data object is value.
Additionally, the embodiment of the present application additionally provides a kind of equipment accessing instant messaging network, it is configured atPut server, including:
First acquisition module, in response to the first configuring request for information providing service, with describedThe server of information providing service place network service, as target web server, obtains described target networkNetwork server is the first data that described information providing service returns;Wherein, described first data acquisition is withOne data form encapsulates each first data object, and described first data form uses described target web serviceThe data-interface that device provides;
Parsing module, for based on described first data, resolves each first data object corresponding described firstThe data path of data form, and present the corresponding relation between each first data object and each data path;
First sets up module, for inputting comprise in response to each filling position in corresponding second data formThere is the operation of each object template of each described data path, set up and record each object template and fill out described in eachFill the mapping relations between position, as the first mapping relations;Described second data form uses IMUThe data-interface that telecommunications services device provides;
Described first mapping relations, for described configuration service device for described information providing service, according toThe data path of each data object, object template and filling position, by the number with the first data form encapsulationAccording to being converted into the data encapsulated in the second data format.
Optionally, described equipment also includes:
Second acquisition module, in response to the second configuring request for described information providing service, obtainsTake the signature identification during the instant messaging of described information providing service is asked by described instant messaging network andThe request address that described target web server provides for described information providing service;
Second sets up module, for setting up and record reflecting between described signature identification and described request addressPenetrate relation, as the second mapping relations;
Described second mapping relations, include described feature for described configuration service device in response to receivingThe instant messaging request of mark, the information sent to described target web server based on described request addressRequest.
Optionally, described information request includes header information, and described header information is to set up describedDuring two mapping relations described configuration service device in response to header information input operation and with described signature identificationCorresponding record.
Optionally, described equipment also includes:
First sending module, for providing described information in response to receiving described instant communication serverThe instant messaging request of business, sends the letter to described information providing service to described target web serverBreath request;
Extraction module, for sealing for described information request in response to receiving described target web serverDress up the second data that the first data form sends, each data related to according to described first mapping relationsPath, from each second data object of described second extracting data as each data path corresponding second numberAccording to object;
Form module, for each object template related to according to described first mapping relations, by each dataEach data path in the second data object each object template of replacement that path is corresponding, forms each object templateThe 3rd corresponding data object;
Package module, for the filling position corresponding according to each object template in described first mapping relations,The 3rd corresponding for each object template data object is packaged into the 3rd data of the second data form;
Second sending module, for being sent to described instant communication server by described 3rd data, in order toEach second data object is presented on instant communication client.
Optionally, the object template that described first mapping relations relate to includes the first object template and/orTwo object templates;
Wherein, described first object template only includes that described data path, described second object template includeDescribed data path combines with side information.
Compared with prior art, the application has the advantage that
According to the technical scheme of the embodiment of the present application, when network service accesses instant messaging network, permissibleBy the conversion regime that configuration service device is information providing service configuration data form, and when configuration, configurationServer can be that this information providing service is packaged into the by resolving the target web server of network serviceThe first data that one data form returns, present the data of the corresponding first data form of each first data objectPath, such technical staff can count each first according to the second data form that instant messaging network usesAccording to the packaged type of object, each filling position input of corresponding second data form comprises each first data pairAs each object template of corresponding data path, now, configuration service device can defeated with response technology personnelEnter operation, set up and record the mapping relations between each object template and each filling position, hereafter, forTarget web server is packaged into the data of the first data form, configuration service for this information providing serviceDevice can be according to data path, object template and the filling position of the first mapping relations record, should be withThe data of one data form encapsulation are converted into the data encapsulated in the second data format, thus will be with the second numberIt is sent to instant communication server according to the data of form encapsulation, thus realizes target web server by networkThe information that service provides presents to instant communication users by instant messaging network.Due to instant messaging networkUsing the second identical data form encapsulation of data object for each information providing service, each information providesIt is only the data object difference being filled into the second data form that business returns to the data of instant messaging network,Therefore, by including the object template and second of data path under the corresponding first data form of data objectMapping relations between filling position under data form, the number of first data form corresponding for data objectAccording to parsing and the encapsulation of second data form corresponding for each object template in path, each information provides industryBusiness can be realized by the program that configuration service device pre-sets, and without technical staff again for respectivelyInformation providing service respectively human-edited's code, technical staff only need to be for each information providing service correspondence theEach filling position input of two data forms comprises each object mould of data path corresponding to each data objectPlate, it can be seen that, on the one hand, technical staff without for each information providing service respectively human-edited's code,On the other hand, the configurator that technical staff changes data form for each information providing service again enters respectivelyRow test, thus alleviate the work load that technical staff undertakes for the conversion regime of configuration data form.
Detailed description of the invention
In order to make those skilled in the art be more fully understood that the application scheme, real below in conjunction with the applicationExecute the accompanying drawing in example, the technical scheme in the embodiment of the present application be clearly and completely described, it is clear thatDescribed embodiment is only some embodiments of the present application rather than whole embodiments.Based on this ShenEmbodiment in please, those of ordinary skill in the art are obtained under not making creative work premiseEvery other embodiment, broadly falls into the scope of the application protection.
The application can be used in numerous general or special purpose computing system environment or configuration.Such as: Ge RenjiCalculation machine, server computer, handheld device or portable set, laptop device, multicomputer system,System based on microprocessor, set top box, programmable consumer-elcetronics devices, network PC, small-sized calculatingMachine, mainframe computer, the distributed computing environment including any of the above system or equipment etc..
The application can described in the general context of computer executable instructions,Such as program module.Usually, program module includes performing particular task or realizing specific abstract data classThe routine of type, program, object, assembly, data structure etc..Can also be real in distributed meter environmentTrample the application, in these distributed computing environment, by the teleprocessing connected by communication networkEquipment performs task.In a distributed computing environment, program module may be located at and includes that storage device existsIn interior local and remote computer-readable storage medium.
Present inventor finds through research, and prior art accesses instant messaging network at network serviceTime why technical staff assume responsibility for overweight work load for the conversion regime of configuration data form, formerBecause being, for for each of instant messaging network offer information providing service, prior art all needsTo realize by the way of technical staff is by human-edited's code.Specifically, on the one hand, network takesWhen business accesses instant messaging network, generally provide substantial amounts of information providing service, and also can often increaseThe information providing service added or more renew, which results in technical staff in prior art to be a large amount of frequentlyThe Data Format Transform of information providing service configures and edits the code of a large amount of configurator, causes overweightWork load;On the other hand, due to the configurator of Data Format Transform of each information providing serviceIt is all to be realized by the way of edit code by technical staff, and the process of edit code often goes outExisting mistake, to this end, the configurator for the Data Format Transform of each information providing service is required forTechnical staff test whether can normal operation, cause overweight work load;Additionally, some are instantThe data-interface of communication network is also with ageing check token (i.e. token), and this also makes technology peopleMember needs to pay more workload when realizing configurator by edit code.
The studies above based on inventor, one of main thought of the application may include that works as network serviceWhen accessing instant messaging network, can be turning of information providing service configuration data form by configuration service deviceChange mode, and use the second identical data in view of instant messaging network for each information providing serviceForm encapsulation of data object, each information providing service returns to the data of instant messaging network and is only filled intoThe data object of the second data form is different, to this end, when configuration, configuration service device can be by resolvingThe target web server of network service is that this information providing service is packaged into that the first data form returnsOne data, present the data path of the corresponding first data form of each first data object, such technical staffCan be according to the second data form of instant messaging network employing to the packaged type of each first data objectEach filling position input of corresponding second data form comprises data path corresponding to each first data objectEach object template, now, configuration service device can be set up and record with the input operation of response technology personnelMapping relations between each object template and each filling position, hereafter, for target web server forThis information providing service is packaged into the data of the first data form, and configuration service device can map according to firstThe data path of relation record, object template and filling position, the number that this is encapsulated with the first data formAccording to being converted into the data encapsulated in the second data format, thus the data encapsulated in the second data format are sent outGive instant communication server, thus realize target web server and the information that network service provides is passed throughInstant messaging network presents to instant communication users, therefore, and first data form corresponding for data objectThe parsing of data path and the encapsulation of second data form corresponding for each object template, each information carriesCan be realized by the program that configuration service device pre-sets for business, and without technical staff's pin againTo each information providing service human-edited's code respectively, technical staff only need to be for each information providing service pairThe each filling position answering the second data form inputs each object comprising data path corresponding to each data objectTemplate, it can be seen that, on the one hand, technical staff is without distinguishing human-edited's generation for each information providing serviceCode, on the other hand, the configurator that technical staff changes data form for each information providing service again dividesDo not test, thus alleviate the work that technical staff undertakes for the conversion regime of configuration data formBurden.
Based on above-mentioned basic thought, one of application scenarios of the embodiment of the present application, configuration service can be passed throughDevice 101, the target web server 102 of network service, instant communication server 103 and instant messaging visitorRealizing alternately between family end 104.As it is shown in figure 1, in this application scenarios, configuration service device101 can be in response to the first configuring request for information providing service, with described information providing service placeThe server of network service is as target web server 102, and obtaining described target web server 102 isThe first data that described information providing service returns;Wherein, described first data acquisition is with the first data formEncapsulating each first data object, described first data form uses described target web server 102 to provideData-interface.Then, configuration service device 101 can resolve each first number based on described first dataAccording to the data path of the corresponding described first data form of object, and present each first data object and each dataCorresponding relation between path.After again, configuration service device 101 can be in response to corresponding second data formIn each filling position and input the operation of each object template including each described data path, set up and rememberRecord the mapping relations between each object template and each described filling position, as the first mapping relations;DescribedSecond data form uses the data-interface that instant communication server 103 provides.Wherein, described first reflectsPenetrate relation, for described configuration service device 101 for described information providing service, according to each data objectData path, object template and filling position, by with first data form encapsulation data be converted intoThe data of the second data form encapsulation, wherein, are objective network clothes with the data of the first data form encapsulationBusiness device 102 is sent to configuration service device 101, and the data encapsulated in the second data format are for configuringServer 101 is sent to instant communication server 103, in order to by instant communication server 103 by dataObject is presented on instant communication client 104.
It should be noted that in above-mentioned application scenarios, what term " configuration service device " represented is forInteraction data between instant communication server and the target web server of network service is carried out data formThe equipment of conversion, it can be independent of the outside instant communication server and target web serverRealize on tripartite's server, or, it can also be to realize on target web server, or, itsCan also is that and realize on instant communication server, presently filed embodiment does not limits.
It is also to be noted that above-mentioned application scenarios is for only for ease of understands spirit herein and principleAnd illustrate, presently filed embodiment is the most unrestricted.On the contrary, the embodiment party of the applicationFormula can apply to any scene being suitable for.
After describing the main thought of the application, below in conjunction with the accompanying drawings, each of the application is described in detailPlant non-limiting embodiment.
See Fig. 2, it is shown that the application accesses the flow chart of method one embodiment of instant messaging network.The present embodiment can apply to configuration service device, the most specifically may comprise steps of:
S201, in response to the first configuring request for information providing service, with described information providing serviceThe server of place network service is as target web server, and obtaining described target web server is instituteState the first data that information providing service returns;Wherein, described first data acquisition seals with the first data formFilling each first data object, described first data form uses the data that described target web server providesInterface.
When implementing, when being required for the conversion regime of certain information providing service configuration data form,Technical staff can trigger the first configuring request for this information providing service on the configuration server, thusMaking configuration service device can go to obtain target web server in response to the first configuring request is that this information carriesThe first data returned for business.
It is understood that in some embodiments of the present embodiment, configuration service device is to the first dataAcquisition mode, such as can by target web server send for this information providing serviceInformation request realizes.Specifically, the acquisition to the first data of the configuration service device, such as may include thatConfiguration service device, can be corresponding at objective network based on this information providing service in response to the first configuring requestRequest address on server, generates information request and sends to target web server, so that targetThe webserver is sent as the first of this information providing service return based on this information request to configuration service deviceData.
Wherein, generate the request address that information request is based on, such as, can be made up of two parts, i.e. netThe interface URL that network service provides for described information providing service and enter ginseng, more specifically, for conductFor the information request of Http request, interface URL is the address of requested webpage, enters ginseng for requested webpageParameter.Such as, in a kind of information request example, for wholesale.1688.com/xshow/ushow.htm?This request address of pinlei=nvzhuang&pagesize=5, its interface URL part is wholesale.1688.com/xshow/ushow.htm, it enters ginseng part for pinlei=nvzhuang&pagesize=5.Additionally,The generation of information request, except the request address provided for information providing service based on target web server,It is also based on coding, request method and/or request that target web server provides for information providing serviceheader.Wherein, the coding that target web server provides is the coding used as information request, such asUtf-8, gbk etc. can be included;The request method that target web server provides is indicated for this informationThe data acquiring mode that request is corresponding, such as, can include GET etc.;What target web server provided pleaseHeader is asked to could be for the information request safety verification by target web server, or, permissibleFor information request being made requests on the record of daily record, or, may be used for user behavior is followed,Etc..It is understood that generate the above-mentioned required parameter being based on, configuration service for information requestDevice may each be what the input operation by technical staff obtained.
It should be noted that when configuring the conversion regime of data form for information providing service, configuration clothesIt is the first data that this information providing service returns that business device obtains target web server, but this first numberInformation according to is typically not used at subsequently received instant communication server for this information providing serviceInstant messaging request time return to instant communication server.This is because, network service is for same letterBreath offer business provides the information of continuous renewal, that is, target web server is in the different timeReturn for same information providing service is different information, and such as, a certain e-commerce website is in sightTime communication network in the information providing service " popular women's dress " that provides, " the popular women's dress " of its different timeBeing different products, it returns different products at different time for the information request of " popular women's dress "Information.Therefore, the information in the first data that configuration service device obtains when configuration, is not that it is follow-upThe objective network clothes when receiving the instant communication server instant messaging for this information providing service and askingThe information that business device returns, therefore, these first data are generally used only for configuration server data formConversion regime.
S202, based on described first data, resolve each first corresponding described first data form of data objectData path, and present the corresponding relation between each first data object and each data path.
It is understood that for information providing service, the data that target web server sends areThe first data form that the information of offer is used as data object according to it and be packaged into, and instantCommunication network is only capable of the data object of the second data form encapsulation used according to it is presented to instant messagingUser, it is seen then that the Data Format Transform of information providing service, actually will be by from the first data latticeThe data object parsed in the data of formula encapsulation is packaged into data according to the second data form.In view of makingFor returning the data object in data, the letter that target web server returns for same information providing serviceBreath is to constantly update, to this end, in the present embodiment, uses data object corresponding at the first data formIn data path replace data object itself, to record what data object encapsulated according to the second data formMode, in order to extract target network according to data path when reality is instant messaging network return informationThe current data object that network server provides goes to encapsulate the data of the second data form.
It should be noted that the data object that target web server returns encapsulates according to the second data formMode, can be arranged by technical staff.For the ease of the setting of technical staff, need to presentCorresponding relation between each first data object and each data path, in order to which data technical staff determinesPath instead which data object.Target web server is returned for information providing serviceFor data, it is contemplated that the corresponding relation between its each data object and each data path is not only when configurationNeed to present to technical staff to set up, and when reality is instant messaging network return information beCorrectly it is also required to according to the second data form encapsulation of data object to set up, to this end, at the present embodimentSome embodiments in, according to the second data form encapsulation but also be easy to data in order to not only be easy to data objectObject resolves from the first data form, returns for information providing service for target web serverFor data, the corresponding relation between its each data object and each data path, such as, can pass through key assignmentsTo form realize, wherein, each data path can be key, and each data object can be value.Corresponding relation that present, between each first data object and each data path it is used for during specific to configuration,When this corresponding relation is embodied as key-value pair, its each data path is key, and its each first data object is value.
It is understood that for an information providing service, there is multiple data object in it, alsoThat is, target web server be this information providing service return data in, have multiple data object withCorresponding relation between data path.Corresponding relation between these data object and data paths is with keyValue to form realize time, be the formation of the data model of a Map form.The key of this Map isThe data path of each data object, the value of this Map is then data object.Such as, for Fig. 3Shown target web server is the data instance that information providing service returns, and Fig. 4 shows a kind of MapThe data model example of form, the key of it " quotes path " string is i.e. this Map, its " currency "String is i.e. the value of this Map.Wherein, in the example shown in figure 4, target web server returnsWhole data be defined as " jsonObj ", then for the data object in Fig. 3, " Milan, Cangnan county is femaleSub-duds processing factory ", shown in Fig. 4, the data path of this data object can be expressed as“jsonObj.content[2].companyName”。
S203, input include each described data in response to each filling position in corresponding second data formThe operation of each object template in path, sets up and records between each object template and each described filling positionMapping relations, as the first mapping relations;Described second data form uses instant communication server to provideData-interface.
Wherein, described first mapping relations, for described configuration service device for described information providing service,According to data path, object template and the filling position of each data object, will be with the first data form encapsulationData be converted into the data encapsulated in the second data format.
It is understood that for instant messaging network, its second data form can be expressed as oneIndividual data template, its data being packaged in the second data format then can be regarded as and be filled by data objectFormed to data template.For the data-interface of instant messaging network, it carries for each informationThe data form used for business is all identical, therefore, for the information providing service that each are different,The data returning to instant messaging network actually have identical data template, actually these dataBetween the different data object being only filled into data template.To this end, in the present embodiment, respectively believeBreath offer business is the same from, represents that the data template of the second data form can pre-set, and concreteWhen configuring the conversion regime of data form for each information providing service, technical staff only need to take based on networkThe data path of data object that business returns and go to edit the object that in data template, each filling position is insertedTemplate, and without editing data template again, so, according to the object template and the number that include data pathAccording to mapping relations between filling position in template, the data object that network service returns just can be according to rightIt is sent to instant messaging network as template and data template generate the data encapsulated in the second data format, fromAnd make technical staff without going again during each conversion regime configuring data form for information providing service to compileCollect the code of encapsulation of data object in the second data format, and, owing to encapsulating number in the second data formatAccording to liking by the data template pre-set, therefore provide industry for information without technical staff every timeBusiness goes to test the generation of encapsulation of data object in the second data format when configuring the conversion regime of data form againCode.
Such as, Fig. 4 is illustrated that the example of a kind of one piece of data encapsulated in the second data format.This numberAccording to using xml form.Wherein, "<xml>", "<ToUserName>", "<Content>" etc.Content belongs to data template, and these contents are all phase in for the return data of each information providing serviceWith, can pre-set, and edit without technical staff every time.Additionally, " [josinObj.Content [2] .companyName] " belong to the object template including data path, this object template is to needTechnical staff is wanted to need the part of editor.It is understood that for the ease of the editor of technical staff, joinPut the operation interface that server provides to technical staff, such as, can be return data lattice as shown in Figure 5Formula configuration interface example.In Figure 5, what each input frame was corresponding is the second data lattice pre-setA filling position in the data template of formula, technical staff can input in input frame and include dataThe object template in path, so, configuration service device just can be built in response to the input operation of technical staffVertical corresponding relation between object template and filling position.
It should be noted that the data object in view of network service return presents sometimes for being directly used inIt is used further to present to instant communication users, in this reality sometimes for making some changes to instant communication usersExecuting in some embodiments of example, the object template that described first mapping relations relate to such as can includeFirst object template and/or the second object template;Wherein, described first object template can only include describedData path, described second object template can include that described data path combines with side information.
In the above-described embodiment, some object template can be to represent the data object that network service returnsData path, now by second data form encapsulation data object be i.e. network service return dataObject, that is, the data object that these network services return is presented directly to instant communication users;And some object template can be the combination of data path and side information, now sealed by the second data formThe data object of dress is not merely the data object itself that network service returns, but is returned by network serviceThe data object that the data object returned combines with side information, that is, the data that these networks returnInstant communication users is presented to after side information combination to liking.
It is understood that in order to realize object template based on data path, in some of the present embodimentIn embodiment, object template can be such as the velocity statement comprising described data path.Such as,Several filling positions as shown in Figure 6 and the mapping relations example of object template, filling position is " in picture and textHolding header field " corresponding object template is i.e. only to include data path " jsonObj.content [] .subject "Object template, the object template that filling position " picture fields of graph-text content " is corresponding is i.e. only to includeThe object template of data path " jsonObj.content [] .img ", filling position " the url word of graph-text contentSection " corresponding object template is by data path " jsonObj.content [] .offerId " and side information" http://is m.1688.com/ for the object template that " http://is m.1688.com/offer/ " and " .html " are combined intoOffer/ $ jsonObj.content [] .offerId}.html ", filling position " the details description field of graph-text content "Corresponding object template is the object template only including data path " jsonObj.content [] .detail ".
It should be noted that the data returned except network service and the data accessing instant messaging network are depositedOutside the stylistic difference of data, the target web server of network service does not typically the most support IMUThe instant messaging of the information that network service provides is asked by communication network.Therefore, so that instant messaging pleaseAsk and can be converted into the information request that target web server is supported, at some embodiments of the present embodimentIn, such as can also include: configuration service device is in response to the second configuration for described information providing serviceRequest, obtains the feature during the instant messaging of described information providing service is asked by described instant messaging networkThe request address that mark and described target web server provide for described information providing service, sets up alsoRecord the mapping relations between described signature identification and described request address, as the second mapping relations;InstituteState the second mapping relations, include described signature identification for described configuration service device in response to receivingInstant messaging is asked, the information request sent to described target web server based on described request address.In the embodiment of the conversion regime of above-mentioned configuration request, technical staff can only input for letterSignature identification in the instant messaging request of breath offer business is that this information leads to business with target web serverThe request address provided, and without being converted into the configuration of the information request of network service for instant messaging requestProgram and edit code, thus decrease the workload that technical staff undertakes.
It is understood that for the information request sent to target web server, except request addressOutside, some other parameter may be also needed to, for the generation of information request.For example, it is contemplated that to oneThe target web server of a little network services may carry out safety verification to the information request received, and pacifiesFull checking can be the header information of authentication information request, to this end, in some embodiments, and can be pre-The header information of first configuration information request, in order to go to generate information request based on this header information, specifically,Described information request such as can include header information, and described header information is to reflect setting up described secondPenetrate described configuration service device during relation corresponding with described signature identification in response to the input operation of header informationRecord.And for example, in other embodiments, it is contemplated that target web server is to information requestDecoding process, it is also possible to pre-set the coding of information request, such as " utf-8 " or " gbk " etc., to adoptGo to generate information request with this coding.For another example, in other embodiment, it is contemplated that configuration service deviceTarget web server is returned the acquisition mode of data, it is also possible to pre-set the requesting party of information requestFormula, such as " GET " or " POST " etc., so that target web server can be true by information requestDetermine configuration service device and obtain the mode of data.
In the configuration example of a kind of possible instant messaging request transitional information request, based on technical staffInput, the instant messaging of certain information providing service is asked in signature identification, configuration service device is permissibleInformation request configuration interface as shown in Figure 7 is provided.In this information request configuration interface, " interface URL "Input frame in technical staff can input the interface URL that network service provides for this information providing service,In the input frame " entering ginseng ", technical staff can input the parameter of requested webpage, in the input frame of " coding "Technical staff can input the coding that the information request of this information providing service uses, " request method " defeatedIn entering frame, technical staff can input the configuration service device data acquiring mode to this information providing service, " pleaseSeek header " input frame in technical staff can input the header information of information request, " interface name "Input frame in technical staff can input the identification name identifying this information providing service for technical staffClaim.Wherein, the input content combination in two input frames of " interface URL " and " entering ginseng " can be somebody's turn to doInformation providing service request address on target web server.
It should be noted that typically can configure for same information providing service in view of technical staff simultaneouslyThe conversion of information request and the form conversion of return data, to this end, at some embodiments of the present embodimentIn, configuration service device can ask to set up an interface adapter for the instant messaging of certain information providing service.Specifically, set up interface when technical staff's request fit for the instant messaging request of certain information providing serviceDuring orchestration, configuration service device can provide information request configuration interface as shown in Figure 7 to technical staff,After technical staff completes the input operation of information request configuration interface and completes the configuration of information request,Configuration service device can send information request to obtain target web server for being somebody's turn to do to target web serverThe first data that information providing service returns, it is possible to present as key-value pair list as shown in Figure 4Corresponding relation between the data object that data path and each network service return, then, configuration service deviceReturn data form configuration interface as shown in Figure 5 can be provided to technical staff, complete technical staffAfter the input operation of this return data form configuration interface and completing returns the configuration of data form, configurationServer can complete the process of setting up of this interface adapter and record the relevant configuration of this interface adapterInformation, in order to when the instant messaging receiving this information providing service is asked, can fit according to this interfaceThe relevant configuration information of orchestration completes to send information request and by target web service to target web serverThe data that device returns are converted into the data form meeting instant messaging network requirement.It is understood thatSet up in the embodiment of interface adapter for information providing service, aforesaid first configuring request and aforementionedThe second configuring request all can be understood as be this interface adapter foundation request, additionally, this information carriesInterface adapter for business can be the signature identification correspondence establishment asked with its instant messaging, therefore,This interface adapter actually also contains the signature identification of instant messaging request and the request ground of information requestMapping relations between location.
It is understood that after aforementioned first mapping relations are set up, when configuration service device receives pinWhen the instant messaging of the information providing service corresponding to these the first mapping relations is asked, configuration service device is permissibleThe data utilizing these first mapping relations to return target web server are changed.Specifically, existIn some embodiments of the present embodiment, such as, can also include: configuration service device is in response to receivingState instant communication server the instant messaging of described information providing service is asked, take to described objective networkBusiness device sends the information request to described information providing service;Configuration service device is in response to receiving described meshThe mark webserver is the second data that described information request is packaged into that the first data form sends, according toEach data path that described first mapping relations relate to, from each second data of described second extracting dataObject, as the second data object corresponding to each data path, relates to according to described first mapping relationsEach object template, replaces each data in each object template by the second corresponding for each data path data objectPath, forms the 3rd data object that each object template is corresponding, and according to each in described first mapping relationsThe filling position that object template is corresponding, is packaged into the second number by the 3rd corresponding for each object template data objectThe 3rd data according to form;Described 3rd data are sent to described instant communication server by configuration service device,So that each second data object is presented on instant communication client.
Wherein it is possible to be understood by, built immediately time communication request signature identification and information requestIn the case of the second mapping relations between request address, configuration service device is in response to receiving instant messagingThe instant messaging of this information providing service is asked by server, can be according to above-mentioned second mapping relationship searchingTo request address, such that it is able to realize sending this information to target web server based on this request addressThe information request of offer business.
By the technical scheme of the present embodiment, the data path of first data form corresponding for data objectParsing and the encapsulation of second data form corresponding for each object template, each information providing service all may be usedRealize with the program pre-set by configuration service device, and carry for each information again without technical staffFor business human-edited's code respectively, technical staff only need to be for corresponding second data of each information providing serviceEach filling position input of form comprises each object template of data path corresponding to each data object, thusVisible, on the one hand, technical staff is without distinguishing human-edited's code, the opposing party for each information providing serviceFace, technical staff again for each information providing service conversion data form configurator test respectively,Thus alleviate the work load that technical staff undertakes for the conversion regime of configuration data form.
In the aforementioned embodiment, the angle from configuration service device describes and utilizes the object comprising data pathThe first mapping relations between template and filling position realize returning the embodiment party of the form conversion of dataFormula.It is more clearly understood from utilizing above-mentioned first mapping relations the most real for the ease of those skilled in the artNow present, for instant communication users, the information that network service provides, below from the mutual angle of information and be aided withAs a example by one concrete application scenarios, presently filed embodiment is introduced.In this application scenarios,The target web server that network service uses is web server, and its request of data uses http pleaseAsking, it returns data and uses json form, the request of data of instant messaging network and reception data acquisitionBe all xml form.It should be noted that this application scenarios only makes those skilled in the art moreIt is well understood to the present invention, but embodiments of the present invention are not limited to this application scenarios.
See Fig. 8, it is shown that the application accesses the flow process of the another embodiment of method of instant messaging networkFigure.In the present embodiment, the most specifically may comprise steps of:
S801, based on the signature identification in the instant messaging network xml request to information providing service, forThis information providing service is set up for asking conversion and the interface adapter of Data Format Transform.
Specifically, the embodiment that previous embodiment is introduced can be used, on the one hand provide for this informationBusiness sets up the second mapping relations between the signature identification in xml request and the request address of http request,On the other hand the object template including data path and xml form number are set up for this information providing serviceThe second mapping relations between filling position according to, wherein, this data path represents for this informationThe position of data object in the json formatted data of offer business.It is understood that above-mentioned twoMapping relations record is in the interface adapter of this information providing service.
The request of this information providing service is grasped by S802, instant communication client in response to instant communication usersMake, send the xml request to this information providing service to instant communication server.
This xml request is sent to configuration service device by S803, instant communication server.
S804, configuration service device find this information providing service based on the signature identification in this xml requestInterface adapter.
S805, configuration service device, based on this interface adapter, send to web server and carry for this informationHttp request for business.
Specifically, configuration service device can determine according to the second mapping relations of this interface adapter recordThe request address of this information providing service, thus generate http request based on this request address.
S806, web server are based on this http request, by the json formatted data of this information providing serviceReturn to configuration service device.
Specifically, web server can find out this information providing service corresponding based on this http requestCurrent information, these current informations are packaged into data as data object with json form and return to joinPut server.
This json formatted data, based on this interface adapter, is converted into xml lattice by S807, configuration service deviceFormula data.
Specifically, configuration service device can according to the first mapping relations of this interface adapter record, according toFirst mapping relations of its record, the data path related to according to the first mapping relations is from json form numberAccording to parsing each current information, and each current information is replaced the object template that the first mapping relations relate toIn the data path of each current information, form the data object for encapsulating xml form, then by these numbersIt is packaged into xml form according to the corresponding filling position in the first mapping relations of its object template according to objectData.
This xml formatted data is sent to instant communication server by S808, configuration service device.
This xml formatted data is returned to instant communication client by S809, instant communication server.
S810, instant communication client, by resolving xml formatted data, present this to instant communication usersEach current information that information providing service is corresponding.
By the technical scheme of the present embodiment, for data object correspondence json data path parsing withAnd the encapsulation for each object template correspondence xml, each information providing service can pass through configuration service deviceThe program pre-set realizes, and compiles for each information providing service is the most artificial without technical staff againCollecting code, technical staff only need to input for each filling position of each information providing service correspondence xml and compriseEach object template of the data path that each data object is corresponding, it can be seen that, on the one hand, technical staff withoutBeing required to be each information providing service human-edited's code respectively, on the other hand, technical staff is again for each informationThe configurator of offer business conversion data form is tested respectively, thus alleviates technical staff for joiningThe work load putting the conversion regime of data form and undertake.
After the method describing exemplary embodiment of the invention, it follows that exemplary to the applicationEmbodiment, be introduced for the equipment accessing instant messaging network.
See Fig. 9, it is shown that the application accesses the structure chart of equipment one embodiment of instant messaging network.The equipment of the present embodiment can be configured at configuration service device, the most specifically may include that
First acquisition module 901, in response to the first configuring request for information providing service, with instituteState the server of information providing service place network service as target web server, obtain described targetThe webserver is the first data that described information providing service returns;Wherein, described first data acquisition is usedFirst data form encapsulates each first data object, and described first data form uses described objective network clothesThe data-interface that business device provides;
Parsing module 902, for based on described first data, resolves each first data object corresponding described theThe data path of one data form, and present the corresponding pass between each first data object and each data pathSystem;
First sets up module 903, for inputting bag in response to each filling position in corresponding second data formThe operation of each object template containing each described data path, sets up and records each object template described with eachMapping relations between filling position, as the first mapping relations;Described second data form uses instantThe data-interface that the communication server provides;
Described first mapping relations, for described configuration service device for described information providing service, according toThe data path of each data object, object template and filling position, by the number with the first data form encapsulationAccording to being converted into the data encapsulated in the second data format.
In some embodiments of the present embodiment, optionally, described equipment such as can also include:
Second acquisition module, in response to the second configuring request for described information providing service, obtainsTake the signature identification during the instant messaging of described information providing service is asked by described instant messaging network andThe request address that described target web server provides for described information providing service;
Second sets up module, for setting up and record reflecting between described signature identification and described request addressPenetrate relation, as the second mapping relations;
Described second mapping relations, include described feature for described configuration service device in response to receivingThe instant messaging request of mark, the information sent to described target web server based on described request addressRequest.
In other embodiments of the present embodiment, optionally, the second acquisition is also included at described equipmentIn the case of module and second sets up ore grinding, described information request such as can include header information, instituteState header information when setting up described second mapping relations described configuration service device in response to header informationInput operation and with described signature identification corresponding record.
In the other embodiment of the present embodiment, optionally, described equipment such as can also include:
First sending module, for providing described information in response to receiving described instant communication serverThe instant messaging request of business, sends the letter to described information providing service to described target web serverBreath request;
Extraction module, for sealing for described information request in response to receiving described target web serverDress up the second data that the first data form sends, each data related to according to described first mapping relationsPath, from each second data object of described second extracting data as each data path corresponding second numberAccording to object;
Form module, for each object template related to according to described first mapping relations, by each dataEach data path in the second data object each object template of replacement that path is corresponding, forms each object templateThe 3rd corresponding data object;
Package module, for the filling position corresponding according to each object template in described first mapping relations,The 3rd corresponding for each object template data object is packaged into the 3rd data of the second data form;
Second sending module, for being sent to described instant communication server by described 3rd data, in order toEach second data object is presented on instant communication client.
In the still further embodiments of the present embodiment, optionally, described first mapping relations relate toObject template such as can include the first object template and/or the second object template;
Wherein, described first object template only includes that described data path, described second object template includeDescribed data path combines with side information.
In the still further embodiments again of the present embodiment, optionally, described object template can be such asComprise the velocity statement of described data path.
In the still further embodiments again of the present embodiment, optionally, each first data object and each dataCorresponding relation between path such as can be realized by the form of key-value pair, wherein, and each described dataPath is key, and each first data object is value.
By the technical scheme of the present embodiment, the data path of first data form corresponding for data objectParsing and the encapsulation of second data form corresponding for each object template, each information providing service all may be usedRealize with the program pre-set by configuration service device, and carry for each information again without technical staffFor business human-edited's code respectively, technical staff only need to be for corresponding second data of each information providing serviceEach filling position input of form comprises each object template of data path corresponding to each data object, thusVisible, on the one hand, technical staff is without distinguishing human-edited's code, the opposing party for each information providing serviceFace, technical staff again for each information providing service conversion data form configurator test respectively,Thus alleviate the work load that technical staff undertakes for the conversion regime of configuration data form.
It should be noted that in this article, the relational terms of such as first and second or the like is used merely toOne entity or operation are separated with another entity or operating space, and not necessarily requires or implyRelation or the order of any this reality is there is between these entities or operation.Term " includes ", " bagContain " or its any other variant be intended to comprising of nonexcludability so that include a series of wantProcess, method, article or the equipment of element not only include those key elements, but also include the most clearly arrangingOther key elements gone out, or also include want intrinsic for this process, method, article or equipmentElement.In the case of there is no more restriction, statement " including ... " key element limited, notGet rid of in including the process of described key element, method, article or equipment, there is also other identical element.
For apparatus embodiments, owing to it corresponds essentially to embodiment of the method, so relevant part ginsengSee that the part of embodiment of the method illustrates.Apparatus embodiments described above is only schematically,The wherein said unit illustrated as separating component can be or may not be physically separate, makeesThe parts shown for unit can be or may not be physical location, i.e. may be located at a place,Or can also be distributed on multiple NE.Can select according to the actual needs part therein orThe whole module of person realizes the purpose of the present embodiment scheme.Those of ordinary skill in the art are not paying creationProperty work in the case of, be i.e. appreciated that and implement.
The above is only the detailed description of the invention of the application, it is noted that general for the artFor logical technical staff, on the premise of without departing from the application principle, it is also possible to make some improvement and profitDecorations, these improvements and modifications also should be regarded as the protection domain of the application.